dimanche 29 octobre 2017

How to pass parameters from a jsp to fill form of jsp2 and execute submit

I have two JSPs

JSP1: has a search field a button and three tabs bellow just like Google has the tabs web, images and maps. This JSP sends the text entered as well as the selected tab in POST to a servlet that handles the searching given a string and type.

JSP2: is a separate page with annotated paragraphs with some sentences as links. when a link is clicked, it submits two parameters(content and type) in a get method to JSP1.

What I want to achieve resembles the service (LetMeGoogleItForYou). #1 When a link is clicked in JSP2, I want to redirect the browser to JSP1 and #2 fill the search bar of JSP1 with the content submitted from JSP2 and make the tab corresponding to type active as well as trigger the form submit of JSP1.

I have achieved #1, but I can not figure out how to do #2. I am requesting any approaches or examples on how to achieve this.




Aucun commentaire:

Enregistrer un commentaire