Sneha Sharma@CONTEXT
07/11/2000 09:46 AM


Hey Rupali!

I have been using the following approach.

Before forwarding to another page,
 I set the request.setAttribute("a","b");

<jsp:forward page="1.jsp">

and in 1.jsp
i say request.getAttribute("a");
and it works.

Try giving the absolute path in jsp:forward for ur page.
Also, try setting the attribute in request instead of response.

Bye,
Sneha




Rupali Bains Goswami <[EMAIL PROTECTED]> on 07/11/2000 11:51:39 AM

Please respond to A mailing list about Java Server Pages specification and
      reference <[EMAIL PROTECTED]>



 To:      [EMAIL PROTECTED]

 cc:      (bcc: Sneha Sharma/Context)



 Subject: Passing paramters between two jsp files









I know this question has been posted before and I have tried the solutions
but somehow it doesnt work for me

JSP1


response.setAttribute("AdminName","AccountManager");
response.sendRedirect (response.encodeRedirectURL("Success.jsp"));

In success.jsp

out.print ("The user is : " + request.getAttribute("AdminName"));

But the error I get for JSP1 is

logonadministrator.java:138: cannot resolve symbol
probably occurred due to an error in /htdocs/login2/logonAdministrator.jsp
line 14:
response.setAttribute("AdminName","AccountManager");

Any ideas as to why I am getting this?
I am using weblogic 5.1
Also I am using sendRedirect as I am unable to use the forward tag in jsp
... I get a NoSuchMethod error when I use

<jsp:forward page = "/Success.jsp" />

Thanks for the help

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to