• Post Reply Bookmark Topic Watch Topic
  • New Topic

Localtion of JSP Fragments  RSS feed

 
Reema Patel
Ranch Hand
Posts: 169
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm using JSP fragments as partial JSP pages to render headers, footers and navigation bars.

These are static files.
Is there any standard location for placing .jspf files?

I read somewhere that they should be placed inside WEB-INF directory. But, WEB-INF is private directory (can't be directly accessed by the client), and the jspf files are static pages. On second thought, I think its apt cause they are not ment to be dirctly accessed by the client.

Any help shall be highly appreciated.

Thanks,
Reema
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no standard location. Making sure that they can't be accessed directly is a good idea. Keeping them inside of WEB-INF is one way to achieve that.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for putting them under WEB-INF is that they will not be interpreted as JSPs if accessed directly. The server will just serve up your source code, as is. This is true of any file without a ".jsp" extension.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!