Making a JSP into a servlet - newbie

M

Mike

Hi,
I have a working web application, but it all runs as JSP pages and I'd
like to put my client output into JSPs and the rest into Servlets.

I have one JSP page which uploads files to the server, then uses the
<jsp:forward> tag to return the user to a new page. What is the
equivalent of the forward tag with a Servlet? Can I also specify
variables and values to be forwarded to the new page?

Thanks,
Mike
 
M

Matt Parker

Mike said:
Hi,
I have a working web application, but it all runs as JSP pages and I'd
like to put my client output into JSPs and the rest into Servlets.

I have one JSP page which uploads files to the server, then uses the
<jsp:forward> tag to return the user to a new page. What is the
equivalent of the forward tag with a Servlet? Can I also specify
variables and values to be forwarded to the new page?

Thanks,
Mike

You need to look at the RequestDispatcher class if you want to do it
manually. Better yet would be to use something like Struts -
http://jakarta.apache.org/struts to manage all that stuff for you.

Matt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top