aspose file tools*
The moose likes JSP and the fly likes WAR file structure Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "WAR file structure" Watch "WAR file structure" New topic
Author

WAR file structure

surya sudhakar
Greenhorn

Joined: Jun 11, 2002
Posts: 18
Hi,
I am new to JSP, I have read that usually the web applications will be deployed using WAR(Web Archive file). As I know the directory structure is as follows.
exampleapp/
/WEB-INF
/Classes
/Lib
/tlds
The structure doesn't tell where to put the resources like .gif, .jpg etc,.
If this is right,
each container vendor follows his own way of understanding the WAR then how the resources will be read and put in jsps. I mean if I put the resources (Tomcat is putting resources in directory called "images")in some directory called "resources" in the application root directory how to tell the container to get the resources from that directory. In such cases how to make sure that(as a web application developer) my appllication(WAR) run on every container in world.
Thanx in advance
Sudhakar
Irene Loos
Ranch Hand

Joined: Apr 15, 2002
Posts: 78
JSP is compiled on server side and not on the client. All you need to worry about that the pass to your resources is correctly specified in your jsp, since you will deploy your resources with your jsp and java code.
[ June 12, 2002: Message edited by: Irene Loos ]

Irene Loos
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8898

Put all the public resource i.e. html,images,jsp etc at the top level of the web app directory structure. By convention we create a directory called as images under this top level directory structure and put all .gif there.


Groovy
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

Originally posted by Pradeep Bhat:
Put all the public resource i.e. html,images,jsp etc at the top level of the web app directory structure. By convention we create a directory called as images under this top level directory structure and put all .gif there.

Yup -- it doesn't matter where you put the images -- as long as you don't put them in the /WEB-INF directory. 'cause anything in that directory will not be served up by your application server.
surya sudhakar
Greenhorn

Joined: Jun 11, 2002
Posts: 18
Thank you guys, got clarified.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WAR file structure
 
Similar Threads
Question 21 of HFSJ Final mocktest
ERROR IN STARTUP
choosing a webhost for jsp
Writing image into WAR?
WAR file doubt