-
1. Re: JBoss 7.1.1 newbie
jaikiran Nov 19, 2012 10:00 PM (in response to hoffz31)hoffz31 wrote:
My index.jsp is under WEB-INF.
Move it outside of WEB-INF, directly into the .war.
-
2. Re: JBoss 7.1.1 newbie
hoffz31 Nov 20, 2012 7:45 AM (in response to jaikiran)Thanks so much Jaikiran!
I was use to packaging the content under WEB-INF.
-
3. Re: JBoss 7.1.1 newbie
jaikiran Nov 20, 2012 8:20 AM (in response to hoffz31)By the way, since you say you are a beginner, I would recommend you buy a Java EE book which explains the concepts in detail. Not all resources should be packaged outside of WEB-INF. There are some resource which should reside in the WEB-INF folder.
-
4. Re: JBoss 7.1.1 newbie
sfcoy Nov 20, 2012 8:44 AM (in response to hoffz31)It's a common strategy to package content such as JSP's in the WEB-INF directory. This is done because this directory is explicitly protected from direct access from a web browser.
The JSPs are rendered by invoking a java servlet or similar mechanism which then forwards to the WEB-INF/some-page.jsp for rendering the response:
{code:java}request.getRequestDispatcher("WEB-INF/some-page.jsp").forward(request, response);{code}
-
5. Re: JBoss 7.1.1 newbie
hoffz31 Nov 20, 2012 9:47 AM (in response to sfcoy)Thanks Stephen,
I am looking into setting up a simple JSF page using prime faces. How would you recommend structuring the project? Where would the .xhtml pages be placed? Inside the WEB-INF?
Thanks again!
-
6. Re: JBoss 7.1.1 newbie
sfcoy Nov 20, 2012 4:51 PM (in response to hoffz31)xhtml pages are typically JSF facelets, which have very little in common with JSPs aside from the notion of tag libraries and EL.
I recommend that you have a look at the JBoss Developer Quickstarts that include JSF and start from there.
I also found Core JavaServer Faces to be good too.