Query string question

Discussions

Web tier: servlets, JSP, Web frameworks: Query string question

  1. Query string question (1 messages)

    I have a servlet that gets the parameters from a query string. The parameters are then dipslayed in a jsp as a text, however, in the jsp, I need to pass the same parameters to the next jsp page. I tried storing the parameters in the httpsession in the servlet that I use, the first time the query string is passed, the problem is, the session no longer exist when the first jsp page is displayed. Any suggestions on how to make the parameters accessible all throughout the session? Thank you.

  2. Query string question[ Go to top ]

    You may try accessing the session, request.getSession(true) in your servlet that display the initial jsp. Alternatively, see if you can use ServletContext instead of HttpSession.

     

    http://download.oracle.com/javaee/1.3/api/javax/servlet/ServletContext.html