I am having a requirement wherein I want to include a jsp (request dispatcher.include). The jsp sets a value of a text field and control returns to the calling servlet. There after from the servlet, I redirect to some other location
My question : Will the jsp in any case be 'transported' to client? Or it will just be evaluated on server and control returned.
Also, how can I access the text field value set in that jsp?
If you use the original response object to include the JSP, then the content of the JSP will be sent to the client browser (but you can't redirect after that). If you don't want to send the content generated by the JSP to the client, you should use HttpServletResponseWrapper to build a dummy response object to include the JSP. That response object can store the content generated by the JSP in a String. You can also try to find the value of the text field in the String...