This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes hyperlink data retrieve Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "hyperlink data retrieve" Watch "hyperlink data retrieve" New topic
Author

hyperlink data retrieve

kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51
can we send data through hyperlink..? how can we retrieve it on the next page..? please help..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

Sending data in a link is just basic HTTP. Look up the concept of a "query string".

Retrieving the request parameters in a servlet (preferred) is easy via request.getParameter(), and in a JSP using the EL -- for example, ${param.someParameter}.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51
please explain it for JSP in detail.. how can i retrieve data in a JSP forwarded from another JSP through a hyperlink..?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

Forwarding is a different matter -- you asked about links. Which is it?
kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51
i m sending data from 1st jsp to 2nd jsp through a hyperlink.. tell me how can i retreive the data on 2nd jsp.. please explain the methods clearly..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

OK, for that, I've already given you the information you need to start digging in. Place the data on the query string (no, I'm not going to look it up for you -- please show some effort of your own), and retrieve it with the param built-in map of the EL in the target JSP.
kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51


this is my hyperlink.. i want to retrieve "name" on other jsp.. i m not familiar with the method you are telling me.. please explain..
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

${param.name}

Look up the concept of the JSP Expression Language (EL).

It's what you should be using on your pages along with the JSTL in place of old-fashioned Java scriptlets.
kunal vermaa
Ranch Hand

Joined: Jun 27, 2009
Posts: 51
thanks a lot bro..
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: hyperlink data retrieve
 
Similar Threads
collection
JTable
Hyper Link
How to display HyperLink Data in JTable column
retrieve hyperlink data through scriplet