Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is there a way to pass parameters and not open a session


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Nov 29, 2017 12:56 PM Last Post By: Alexandre Machado Threads: [ Previous | Next ]
Ed Brazell

Posts: 8
Registered: 12/16/04
Is there a way to pass parameters and not open a session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 12:12 PM
I have a html page that a user enters information. Clicks the submit button and the data past to our intraweb app to process. I got it working.

http://50.111.111.44:1975/?fname=Ed&lname=Brazell&street=999%20Willow%20Dr&city=Stinkville&state=NJ

I parse the data using the parameters.

This all works but it opens a session to the application. I can close it but I'd rather not have the user see any of this.

Thanks,

Ed

Edited by: Ed Brazell on Nov 28, 2017 12:12 PM
Jose Nilton Pace


Posts: 122
Registered: 5/15/98
Re: Is there a way to pass parameters and not open a session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 1:10 PM   in response to: Ed Brazell in response to: Ed Brazell
Hi Ed. Try this:
procedure TIWServerController.IWServerControllerBaseNewSession(aSession: TIWApplication);
begin
   ASession.Data := TIWUserSession.Create(nil, aSession);
 
   if ( ASession.RunParams[0] = 'fname' ) then begin
      { Do all your stuff here }
 
      ASession.Terminate;
      { or }
      aSession.TerminateAndRedirect( 'http://something.com' );
   end;
Dan Barclay

Posts: 889
Registered: 11/9/03
Re: Is there a way to pass parameters and not open a session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 28, 2017 8:10 PM   in response to: Ed Brazell in response to: Ed Brazell
Ed Brazell wrote:
I have a html page that a user enters information. Clicks the submit button and the data past to our intraweb app to process. I got it working.

http://50.111.111.44:1975/?fname=Ed&lname=Brazell&street=999%20Willow%20Dr&city=Stinkville&state=NJ

I parse the data using the parameters.

This all works but it opens a session to the application. I can close it but I'd rather not have the user see any of this.

Thanks,

Ed

Edited by: Ed Brazell on Nov 28, 2017 12:12 PM

In addition to terminating the session yourself, you may also want to look at the Custom Content Handler demo. It allows you to set up special handling for a specific message (or messages) while leaving your other session responses alone.

Dan
Alexandre Machado

Posts: 14
Registered: 5/16/15
Re: Is there a way to pass parameters and not open a session  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Nov 29, 2017 12:56 PM   in response to: Ed Brazell in response to: Ed Brazell
Ed Brazell wrote:
I have a html page that a user enters information. Clicks the submit button and the data past to our intraweb app to process. I got it working.

http://50.111.111.44:1975/?fname=Ed&lname=Brazell&street=999%20Willow%20Dr&city=Stinkville&state=NJ

I parse the data using the parameters.

This all works but it opens a session to the application. I can close it but I'd rather not have the user see any of this.

Thanks,

I'm not sure if you want your application to terminate or go on without URL parameters. ShowStartParams in server controller can control if these parameters are visible or not in the URL, after session initialization.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02