aspose file tools*
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
Author

using jsp:param

muthu kumaran
Ranch Hand

Joined: Oct 26, 2004
Posts: 56
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

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

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
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

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-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!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using jsp:param