This week's book giveaways are in the AI and JavaScript forums.
We're giving away four copies each of GANs in Action and WebAssembly in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

project file structure for web application (war).

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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
 
rubbery bacon. crispy tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!