Making a JSP into a servlet - newbie

Discussion in 'Java' started by Mike, Feb 23, 2004.

  1. Mike

    Mike Guest

    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
     
    Mike, Feb 23, 2004
    #1
    1. Advertising

  2. Mike

    Matt Parker Guest

    Mike wrote:

    > 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

    --
    Not so interesting...
    http://www.mpcontracting.co.uk
     
    Matt Parker, Feb 23, 2004
    #2
    1. Advertising

  3. Mike

    toto Guest

    hey sports,
    RrequestDispatcher is for you
    "Mike" <> a écrit dans le message de news:
    ...
    > 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
     
    toto, Feb 24, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page