| | |
How to send an action to servlet through hyperlink and display the data on to jsp.
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2006
Posts: 2
Reputation:
Solved Threads: 0
How to send an action to servlet through hyperlink and display the data on to jsp.
0
#1 Oct 7th, 2006
Hi all,
My code is as follows
when i click this link, it will go to contactSearch.jsp. I want to send an action to the servlet when clicking this link, and display the data from the servlet on the contactSearch.jsp.
The data I mentioned is a dynamic data, which I am getting from backend through "collections".
Please help me on this....really stuck at this point
My code is as follows
JSP Syntax (Toggle Plain Text)
<a href="/web/contacts/contactSearch.jsp">Search</a>
when i click this link, it will go to contactSearch.jsp. I want to send an action to the servlet when clicking this link, and display the data from the servlet on the contactSearch.jsp.
The data I mentioned is a dynamic data, which I am getting from backend through "collections".
Please help me on this....really stuck at this point
Re: How to send an action to servlet through hyperlink and display the data on to jsp.
0
#2 Oct 8th, 2006
instead of the URI for the result JSP, place the URI for the servlet (as mapped in the web.xml deployment descriptor) in the link tag.
Then in the servlet place the result of its operation in the request or session (if it should be persistent between requests) and forward the request to the result jsp with request.getRequestDispatcher().forward() (or something like that).
Then in the servlet place the result of its operation in the request or session (if it should be persistent between requests) and forward the request to the result jsp with request.getRequestDispatcher().forward() (or something like that).
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
•
•
Join Date: Oct 2006
Posts: 2
Reputation:
Solved Threads: 0
Re: How to send an action to servlet through hyperlink and display the data on to jsp.
0
#3 Oct 8th, 2006
![]() |
Similar Threads
- How to use a Hyperlink to send info to a servlet (JSP)
- PHP Sendmail Tutorial (PHP)
- Windows socket questions (send()) (C)
- can we write our Action Servlet? (Java)
- This ought to be simple - extra spaces (PHP)
- a weird Javascript error (JavaScript / DHTML / AJAX)
Other Threads in the JSP Forum
- Previous Thread: error
- Next Thread: having problem for display the piechart in JSP
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






