This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Sending request through links Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Sending request through links" Watch "Sending request through links" New topic
Author

Sending request through links

abhinav singhal
Greenhorn

Joined: Jun 19, 2003
Posts: 29
Hi All,

I have one link (hyperlink). I want that link to act as a request to servlet or JSP. So that further processing of the data can be carried on. Please let me know how can i do so.

Right now through submit buttons only I am able to send the request and not through the links.
Is there any way I can send the request as
action="http://localhost:7001/Myservlet" in a hyperlink.

Thanks and Regards,
Abhinav
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Simply set that url as href on the hyperlink's anchor. Clicking the link will then send a request to that url.


A good workman is known by his tools.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Don't forget to implement the doGet method if you're submitting via a link.


[My Blog]
All roads lead to JavaRanch
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026


Here 'a' and 'b' are the Query String.
[ January 03, 2006: Message edited by: Vishnu Prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sending request through links