Hi all,
My code is as follows

<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

Recommended Answers

All 2 Replies

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

Could you please be more specific...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.