This week's book giveaway is in the Java in General forum.
We're giving away four copies of Helidon Revealed: A Practical Guide to Oracle’s Microservices Framework and have Michael Redlich on-line!
See this thread for details.
  • 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

using jsp:param

 
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops !! seems that "semicolon followed by p" produces
 
arch rival
Posts: 2813
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic