Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Including JSP Fragments

 
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello All,
What I have understood by reading online is that JSP fragments are incomplete JSP pages saved with .jspf extn.

I tried to include one just .jspf file using:
<jsp:include page="/jspf/header.jspf" />
and, inside this JSP fragment I'm trying to read from the implicit request attr.

<html><head><title>Thanks for visiting <%= request.getParameter("fName") %> <%= request.getParameter("lName") %> </title></head><body>

But, this doesn't work, however if I change the extension from.jspf to .jsp it works...pls help...
 
Bartender
Posts: 6663
5
MyEclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The jspf files will not compile when they have the .jspf extension. If you are using tomcat add this so that tomcat's jsp "servlet" is invoked when the .jspf extension is used.



[EDIT]

By the way... if you want scriplets to be evaluated use the include directive instead. But that means that you cant pass params to the included file like before. Either name your file .jsp to compile it, or associate the jspf extension in web.xml so that they are treated like JSPs, or use the include directive to compile scriplets et all.

Arrrghhhh so many choices !
[ September 30, 2006: Message edited by: John Meyers ]
 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks John!
It's working fine now.

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic