This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic