?
Solved

null value from getParameter in included jsp

Posted on 2005-03-18
8
Medium Priority
?
342 Views
Last Modified: 2010-08-05
My parent jsp is passing params to the dynamically included jsp using the jsp:param tag. In the included jsp, I am using the  request.getParameter("param") to retrieve the parameters passed from the parent jsp.
Surprisingly, I get a null value out of the request.getParameter("param"); in the included jsp.

Please advice.

Thanks
0
Comment
Question by:PMagal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
8 Comments
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13573514
Can you post your code for this section of your jsp please?
0
 
LVL 29

Accepted Solution

by:
bloodredsun earned 500 total points
ID: 13573560
Make sure that you are doing somehting like this:

Parent.jsp
---------------
<html>
<body>
<h2>Start of include</h2><br/>
<jsp:include page="includeme.jsp">
      <jsp:param name="username" value="<%= request.getParameter("page")%>" />
</jsp:include>
</body>
</html>

includeme.jsp
---------------
<html>
<body>
<h2>Eat me</h2><br/>
Page = <%= request.getParameter("page")%>
</body>
</html>

And go to http://localhost:8080/<your_webapp>/parent.jsp?page=hello
0
 
LVL 19

Assisted Solution

by:Kuldeepchaturvedi
Kuldeepchaturvedi earned 500 total points
ID: 13577521
>><jsp:param name="username" value="<%= request.getParameter("page")%>" />

If you do this then in the parent page don't you think you will have to do a

Page = <%= request.getParameter("username")%> instead of "page"??

jsp:include is  gets converted to request.include(rq,rs) so ideally speaking
request.getParameter("page") will also work
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13581359
You're correct of course! It was a typo as I threw it together
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 14232256
fine with me
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introducing Priority Question, our latest feature.
The Summer 2017 Scholarship Winners have been announced!
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question