Hi SHEKHAR, I tried your suggestion like this :
---JSP 1 ----
<%! String msg ="Hello"; %>
<jsp:include page="second.jsp" flush="true"/>
--- second.jsp ----
<%= msg %>
---------
It complain that variable does not exist. Am I doing anything wrong?
Thank you,
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Agarwal, Shekhar (MED,
TCS America)
Sent: Thursday, March 15, 2001 12:26 PM
To: [EMAIL PROTECTED]
Subject: Re: forward question?
hi
in case of include u need not pass it as a parameter. u can simply use
the variables which have been declared in the body of the main jsp
(prior to the include tag) in the included jsp. simlarly the variables u
have declared in the included jsp u can use it the body of the main jsp
after the include tag.
shekhar
SHEKHAR AGARWAL (B.TECH)
TATA CONSULTANCY SERVICES
Email : [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Tel: 268-548-2592 (work)
262-798-1052 (home)
-----Original Message-----
From: Alireza Nahavandi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 15, 2001 10:32 AM
To: [EMAIL PROTECTED]
Subject: Re: forward question?
Hi,
This works for "forward" but what about "include", I tried the same
technique I did not work. any solution?
Thank you.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Nishit Trivedi
Sent: Wednesday, March 14, 2001 5:45 PM
To: [EMAIL PROTECTED]
Subject: Re: forward question?
try this:
-- JSP Page #1 --
<jsp:forward page="TestPage1.jsp">
<jsp:param name="testparm1" value="Hello"/>
</jsp:forward>
--JSP Page #2 --
<%
String param1 = request.getParameter("testparm1");
out.println("the param1 is:"+param1);
%>
Nishit
-----Original Message-----
From: a b [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 14, 2001 5:29 PM
To: [EMAIL PROTECTED]
Subject: jsp:forward question?
Hello,
I'm attempting to forward from one jsp to another jsp
with parameters, but when I try out.printl("param") it
displays as NULL... Is there something that I'm
missing...? Is there another way that perhaps I
should try? Is it possible to do a RequestDispatcher
call from a JSP.. if so.. would you know where I could
see and example? Any help would greatly be
appreciated. Thanks in advance.
Here's what the code looks like:
-- JSP Page #1 --
<jsp:forward page="TestPage1.jsp">
<jsp:param name="testparm1" value="Hello"/>
</jsp:forward>
--JSP Page #2 --
<%= String testLine1 =
request.getParameter("testparm1"); %>
<%= out.println (testLine1);%>
-- I've also tried this....
<%= request.getParameter("testparm1");%>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/
========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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