Hi,
Try the following :
1)Use request.setAttribute to set attribute value in request inside your servlet
2)RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/test.jsp");
dispatcher.forward(request,response);
3)retrieve the value from request in test.jsp.
HIH
Rick
request.setAttribute("test",test);
------------- Original Message --------------
fumitada <[EMAIL PROTECTED]> wrote:
To:[EMAIL PROTECTED]
From:fumitada <[EMAIL PROTECTED]>
Date:Thu, 1 Feb 2001 06:00:25 -0800
Subject: How can I make it ?
Hi there,
How can I modify this code in jsp to use in servlets ?
<jsp:forward page="http://localhost/test.jsp">
<jsp:param name="a" value="10" />
<jsp:param name="b" value="20" />
</jsp:forward>
I thought this way:
RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/test.jsp");
dispatcher.forward(request,response);
But I cannot pass the values !!
(I don't wanna do ...getRequestDispatcher("/test.jsp?a=10&b=20")... Are
there any other ways than this ?)
How can I make it ?
Best regards,
fumi
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html