How to pass query strings to the doGet method in servlet

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to pass query strings to the doGet method in servlet

jhoconer
I am currently developing a webpage that automatically logs in a userID from the client GUI to the webpage. I was able to open the web browser and pass the query string for my ssp to read. However, this resulted with several session IDs being created.
 
I was thinking to use doGet method to access a servlet that will handle the process of creating the needed session variable. Is it possible to pass the values from the query string to the doGet method? Do I need to create a form? Is there a way for me to avoid creating the form?
 
Hoping for your advice! Thanks!!!
 
 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: How to pass query strings to the doGet method in servlet

Mark Roberts
Julia,

To access query variables, you should just be able to use #getParameter: in your servlet code. E.g.:

    userName := self getParameter: 'user_name'.

However, it's not entirely clear to me why you need a separate servlet for this. If you already have a server page, it should be possible to do everything there.

HTH,

Mark Roberts
Cincom Systems, Inc.

On 8/29/2012 12:08 AM, Julia Oconer wrote:
I am currently developing a webpage that automatically logs in a userID from the client GUI to the webpage. I was able to open the web browser and pass the query string for my ssp to read. However, this resulted with several session IDs being created.
 
I was thinking to use doGet method to access a servlet that will handle the process of creating the needed session variable. Is it possible to pass the values from the query string to the doGet method? Do I need to create a form? Is there a way for me to avoid creating the form?
 
Hoping for your advice! Thanks!!!
 
 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc