tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yair Fine" <fin...@bezeqint.net>
Subject i can't pass param using <jsp:param> to an included jspf
Date Sat, 21 Aug 2004 15:15:30 GMT
Hi,

I use Tomcat 5.25 and put the following .jsp files in webapp\ROOT directory.

 

FILE NAME : MainForm.jsp

<html>

<body bgcolor="#ffffff">

<jsp:include page="IncludedForm.jspf" flush="true">

    <jsp:param name="myVar" value="I was passed from main"/>

</jsp:include>

</body>

</html>

 

 

FILE NAME :IncludedForm.jspf

<pre>

<%

    String myVar = request.getParameter("myVar");

    String myVars[] = request.getParameterValues("myVar");

 

    out.println("myVar = "+myVar);

    out.println("The values for myVar are:");

    for (int i=0; i < myVars.length; i++)

    {

        out.println(myVars[i]);

    }

%>

</pre> 

 

the jsp:param name="myVar is not passed. though it should have passed from
MainForm.jsp to IncludedForm.jspf.

is it a matter of configuration?

Regards 

Yair 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message