Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help urgently

 
Deepak Lal
Ranch Hand
Posts: 561
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranncher,
I'm back with a bang but need help this time,Our team is stuck with a jsp problem,Need help urgently

http://localhost:8080/web/First.jsp?name=Sachin&value=Tendulkar

I need to extract the values separately from jsp which is in the query string.Can anyone explain how do i achieve it.?

I have another jsp page and on form submission i extract those values in my another jsp page.

Example is on form submission, i goto second.jsp page and there i need to get the below output

String name = Sachin
String value = Tendulkar

Please help urgently guys....
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:



form method is get i suppose

 
Jan Cumps
Bartender
Posts: 2575
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Deepak,

you are long enough with JavaRanch to know that you should use a meaningful subject line, and avoid need help urgently.
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Deepak, i didn't read your question properly.
You are passing parameters among two jsp's, without a servlet.


Well you'd better use Expression Language then

Use param in your receiving jsp



 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to take the time to compose descriptive subjects for your posts; read this for more information.

A title such as "need help urgently" is uesless. What would happen if all posts had such a title?

Please go back and change your post to add a more meaningful subject by clicking the button on your post.
 
Gireesh Giri
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try what Nicola was suggested in his first post by small change.
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need the cast. The getParameter method returns a String
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic