4

I am having trouble with the jsp:include tag. I have code like the following:

<jsp:include page="./Address.jsp">
    <jsp:param value="30" name="tabIndex"/>
    <jsp:param value="true" name="showBox"/>
    <jsp:param value="none" name="display"/>    
</jsp:include>

The page is included fine, but when I try to access the parameters on the Address.jsp page, they are null. I have tried accessing them the following ways (with jstl):

     <c:out value="${param.tabIndex}" />
     <c:out value="${param['tabIndex']} />
     <%= request.getParameter("tabIndex") %>
     <c:out value="${pageScope.param.tabIndex} />
     ${param.tabIndex}

etc...

Here is the kicker, The above works fine in tomcat 5.5. However, when I deploy the application in Weblogic 10, it does not.

Also, the code works fine in other areas of my application (on weblogic) just not a particular page.

Any Ideas?

Thanks!

doug
  • 51
  • 2
  • 5
  • I am not sure but is that `./` needed in the `page` attribute? – Teja Kantamneni May 12 '10 at 17:42
  • I'm not sure. But either way, the page is included, but the parameters are not being passed. – doug May 12 '10 at 17:47
  • Is there anything different on this page in the way you declare the tag library? – Dónal Boyle May 12 '10 at 17:52
  • Nothing that stands out. I even went as far as taking all the other stuff on the page out and only having the include statement on the jsp and still the paramaters are not getting through. – doug May 12 '10 at 18:02
  • What about setting the values as attributes on the request? – Tobias M May 13 '10 at 05:44
  • Tried that as well. Does not work. In my app there are several response.sendRedirect(...) calls before I get to this jsp, I think that the parameters are being wiped out by one of my filters. – doug May 13 '10 at 13:02

1 Answers1

0

Try this

<jsp:include page="./Address.jsp?tabIndex=30&showBox=true&display=none" />
Ravindra Gullapalli
  • 9,049
  • 3
  • 48
  • 70
  • No luck on this one either. In the controller that executes before this page I do several response.localRedirect() and I think that the implementation on Weblogic and tomcat is different so the data is being lost. – doug May 14 '10 at 14:21