pls can anybody tell , how to read the variable in jsp from servlet and how to map the url-pattern in web.xml file.
Printable View
pls can anybody tell , how to read the variable in jsp from servlet and how to map the url-pattern in web.xml file.
Could you give us a little more background to your problem and give us some example code of what you're trying to do?
Your question is unclear.
In jsp how to receive a data from servlet?
In servlet we use request.getParameter("name"); to get a variable from jsp, so what is the code for receiving that parameter value from servlet to jsp.
I think you misunderstand the technology.
JSPs are servlets. At least that is what they become.
A JSP does not create a request...that comes from the client browser.
The content of the HTML page displayed by the browser may have been generated by a JSP, but it is not a JSP.
Your servlet forwards to a JSP, in the same way it could forward to another servlet...so the JSP can use the contents of the HttpRequest as though it were the original target of the request.