Think of included JSP files as being part of the file the include command is in. If you want the included file to see something, like a string, just make the String declaration before the include command and then use that variable in the included file. Example. Test1.jsp: ... <% String username = "Rey"; String editable = "ok"; %> <jsp:include page="Test.jsp" flush="true" /> ... Test.jsp: ... username = <%= username %><br> editable = <%= editable %> ... -----Original Message----- From: Tom Yang [mailto:[EMAIL PROTECTED]] Sent: Friday, November 03, 2000 2:03 PM To: [EMAIL PROTECTED] Subject: How to get the parameters passed to included jsp file? Hi all: I am trying to use the <jsp:include> to include another jsp file. I want to pass a few parameters to the included file. I used the statements like the following: <jsp:include page="Test.jsp" flush="true"/> <jsp:param name="username" value="eric"/> <jsp:param name="editable" value="ok" /> </jsp:include> But I don't know how I can get the parameters in the Test.jsp included. I tried to use the statement String User_Name = request.getParameter("username"); and User_Name is null. I also tried to use the variable username directly in the Test.jsp, it say it is an undefined varaible. Now how can I retrieve the value of the vaiable userename passed so that I can use it in the file Test.jsp included? Any help will be greately appreciated. Thanks in advance! Tom _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.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
