• Post Reply Bookmark Topic Watch Topic
  • New Topic

Result pages in the WEB-INF folder

 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I'm following this tutorial on JSF. Link

It's mentioned here that I should be store all my result (e.g. after an operation has been carried out such as login/registration) pages in WEB-INF/results/....

Other than the pages are not directly accessible, is there any other reason why such a practise would be suggested ..??

Is there some convention I should be following?
I was just wondering how everyone else organises their JSF pages?

Thanks in advance for your thoughts
Regards
Zein
 
Krithika Srinath
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is obvious that the tutorial is using WEB-INF/results for deploying its example code. Afterall, you cannot expect your real-time application to be always deployed under WEB-INF/results
[ September 12, 2007: Message edited by: Krithika Srinath ]
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your response Srinath.

My question really was, why do they store their responses in the WEB-INF folder other than to stop the pages from being directly accessed?

And, for storing my pages, what convention should I use??

Thanks
Zein
 
Tim Holloway
Bartender
Posts: 18417
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think that this was what was meant buy "storing results", but you can't - or at least shouldn't have a webapp write files to WEB-INF or any other part of the webapp directory structure. For one thing, depending on the appserver and deployment, they might not be real directories, just directory paths in a WAR or EAR file.

However, WEB-INF is commonly used to hide things, including the source pages, since it's part of the standard that the appserver must never directly return objects from WEB-INF. Having the webapp retrieve objects from WEB-INF and use those objects to create output (like the JSP compiler does) is OK, but you can't code a URL and fetch the objects in WEB-INF directly from the client.
 
Zein Nunna
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your comment Tim.

I was just wondering how everyone else organises their pages?

Root
|_JSP
|_JScripts

Is this the best way of doing this?

Regards
Zein
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!