Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using jsp:param

 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I was trying to execute the code associated with jsp aram given in HFSJ

Main.jsp

<html>
<body>
<jsp:include page="Header.jspf" >
<jsp aram name="subTitle" value="some subtitle...." />
</jsp:include>
</body>
</html>

Header.jspf
<b> The parameter is ${param.subTitle} </b>


When I ran this in tomcat.. I wasn't getting the value of subTitle.
Instead the output appeared like

"The parameter is ${param.subTitle}"

Is there anything else that needs to be configured ?
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops !! seems that "semicolon followed by p" produces
 
Marcus Green
arch rival
Rancher
Posts: 2813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the [ code ] tag to prevent smilies (I've spaced it so it doesn't put the rest of the text as code
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Servlet are you using ?
If it is 2.3, EL will be off by default.
Check out the <web-app> tag in web.xml.

Moreover, jspf is not a interpreted (text/plain) by Tomcat, so you have to add this in your web.xml :

[ January 29, 2006: Message edited by: Satou kurinosuke ]
 
muthu kumaran
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Satou its working now,
I am using version 2.4 .. but didn't include

" <servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jspf</url-pattern>
</servlet-mapping> "

in web.xml

When I included the above mapping it worked !!

And Marcus thanks for u'r suggestion too!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic