File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes using jsp:param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "using jsp:param" Watch "using jsp:param" New topic

using jsp:param

muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
I was trying to execute the code associated with jsp aram given in HFSJ


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

<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

Joined: Oct 26, 2004
Posts: 56
oops !! seems that "semicolon followed by p" produces
Marcus Green
arch rival

Joined: Sep 14, 1999
Posts: 2813
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

SCWCD: Online Course, 50,000+ words and 200+ questions
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

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 ]

[My Blog]
All roads lead to JavaRanch
muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
Thanks Satou its working now,
I am using version 2.4 .. but didn't include

" <servlet-mapping>
</servlet-mapping> "

in web.xml

When I included the above mapping it worked !!

And Marcus thanks for u'r suggestion too!!
I agree. Here's the link:
subject: using jsp:param
It's not a secret anymore!