Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sending request through links

 
abhinav singhal
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply set that url as href on the hyperlink's anchor. Clicking the link will then send a request to that url.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't forget to implement the doGet method if you're submitting via a link.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Here 'a' and 'b' are the Query String.
[ January 03, 2006: Message edited by: Vishnu Prakash ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic