• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

QueryString(in ASP) Equivalent in JSP

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi ,
I m new to JSP. I have worked in ASP. Can anyone help me out with the Equivalent of QueryString in Jsp.
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
JSP does not distinguish between get and post methods of submit. To obtain any parameter value, use request.getParameter("param_name").
Uma.
 
Hari Haran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Uma Balu:
Hi,
JSP does not distinguish between get and post methods of submit. To obtain any parameter value, use request.getParameter("param_name").
Uma.



hi ,
I m not submitting my jsp page . Have a look at this code.
<FRAME name="left" src="symbol.asp?<%=strQueryString%>" scrolling="auto" marginwidth="0" marginheight="0">
I have a page(lets have it as source.asp) which has the above code. I m storing certain values in the variable "strQueryString" . By making use of the above code i will be able to access the values stored in "strQueryString" in symbol.asp page. Similarly i want to do in a jsp page. If i can make use of request.getparameter, should i set the value of the variable in source page.
 
Uma Balu
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
As per my understanding of ur code, the same thing will work fine in JSP also. You can use, <%= %> kind of expression in JSP also. If in case you want to extract the querystring part of your url, lets say, u have something like this,
http://www.someserver.com?name=uma&password=test
Then, if you use request.getQueryString(), then u can get the contents after the ?, ie, name=uma&password=test can be retrieved.
I hope this is what you are looking for...
Uma...
 
Hari Haran
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Uma Balu:
Hi,
As per my understanding of ur code, the same thing will work fine in JSP also. You can use, <%= %> kind of expression in JSP also. If in case you want to extract the querystring part of your url, lets say, u have something like this,
http://www.someserver.com?name=uma&password=test
Then, if you use request.getQueryString(), then u can get the contents after the ?, ie, name=uma&password=test can be retrieved.
I hope this is what you are looking for...
Uma...



Exactly!! This was what i was looking for.
Thanks
 
Marshal
Posts: 67497
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch Servlet Learnet!
You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
Thanks!
bear
JSP Fourm Bartender
 
reply
    Bookmark Topic Watch Topic
  • New Topic