aspose file tools*
The moose likes JSP and the fly likes hyperlink data retrieve Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
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: 61761
    
  67

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}.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by 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: 61761
    
  67

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: 61761
    
  67

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: 61761
    
  67

${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://aspose.com/file-tools
 
subject: hyperlink data retrieve