Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Strange Behaviour of jsp:param action

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello Friends,

I am little bit shocked with the way jsp aram is working. We know that jsp aram is used as subattribute in <jsp:include> , <jsp:forward> and <jsp lugin>
My code is ,
including.jsp
<html>
<body>
<jsp:include page="included.jsp" flush="true">
<jsp aram name="ename" value="Swati" />
<jsp aram name="deptno" value="20" />
</jsp:include>
</body>
</html>
included.jsp is my included file and reads 2 parameters pass by the pervious file.
included.jsp
<%
out.println(request.getParameter("ename"));
out.println(request.getParameter("deptno"));
%>

Output should be "Swati" and "20", but i am getting "null" and "null" value for both the parameter. I am really confused . Will anybody explain this to me.
Thanx
Swati
(SCJP2)
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which servlet/jsp container are you using?
Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic