• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

project file structure for web application (war).

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am not sure whether my web applicaition project is correct or not.
After deployed my EAR file to jboss 6.0, I don't see my xhtml web page is picking up css and js files. The web applicaiton (client) has all the js, css and xhtml pages bundled. primefaces 2.2.1 is also bundled in the war project.

Here is my war project stucture:

Web Pages
- WEB-INF
- resources
|- css
|- images
|- scripts
- templates
|- layout-with-right-left.xhtml
- index.html

Here is my index.xhtml file:



Here is layout_with_right_left.xhtml:



is the line path "/WEB-INF/templates/layout_with_right_left.xhtml" and /WEB-INF/resources/css/style.css defined correctly in my above xhtml files?

Thank you advance for any suggestion.

Thanks
Sam
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do not place your resources under WEB-INF. The browser will not be able to access them from there. No app server will server any files from within the WEB-INF directory.
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Do not place your resources under WEB-INF. The browser will not be able to access them from there. No app server will server any files from within the WEB-INF directory.



Hello, thank you for your response.
I have moved the "resources" and "templates" folders to "web" like this:

web
-- WEB-INF
-- templates
|-- layout_with_right_left.xhtml
-- resources
|-- css
|-- images
|-- scripts
-- index.xhtml

Now I changed my xhtml like this:

layout_with_right_left.xhtml:



index.xhtml:


After deployed the file, browsed to the index.xhtml page, I still can't see the styles applied to the xhtml page.
I have verified that the xhtml files are updated in the jboss server tmp directory.

 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are going to post your questions on multiple forums, you should also post your solution in all of the forums.
 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry for the not posting my answers to this forum.
The answer is I a missing web.xml (with facelets definition) in the project, which is same as when I had the problem with getting the naming object not found exception when invoke the Facade bean object from client.

Thanks
Sam
 
reply
    Bookmark Topic Watch Topic
  • New Topic