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. Advertisements

  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. Advertisements

  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. Advertisements

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.
Similar Threads
  1. circuit_breaker
    Replies:
    2
    Views:
    2,409
    Jack Jia
    Apr 4, 2004
  2. Replies:
    5
    Views:
    2,213
    Andrew Thompson
    Jan 12, 2005
  3. Replies:
    0
    Views:
    4,977
  4. javadev
    Replies:
    5
    Views:
    14,006
    javadev
    Nov 16, 2006
  5. Replies:
    4
    Views:
    1,049
  6. Replies:
    2
    Views:
    741
  7. zalek
    Replies:
    1
    Views:
    576
  8. harryos

    making invoker servlet work

    harryos, Nov 25, 2008, in forum: Java
    Replies:
    2
    Views:
    2,879
    Owen Jacobson
    Nov 25, 2008
Loading...