File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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: 14687
    
  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
 
Don't get me started about those stupid light bulbs.
 
subject: Sending request through links
 
Similar Threads
Knowning which link was clicked (take 2)
Mikalai Zaikin's SCBCD Guide ...
Servlet Invocation problem through Hyperlinks
reading a hyperlink innerhtml value
retrieving values from url rewritting in jsp