You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ga...@ercgroup.com on 2002/09/17 01:20:43 UTC

Web Application directory structure

Hi,
	My question is : Does Struts append the application URI to all
relative URLS within JSPs automatically? The following are the observations
which raise this question.

	I've got the following directory structure for my Web Application
below the default server root. 

------------>/MyProject
------------------>WEB-INF
------------------>jsp
------------------>images

	The entry in my web-apps.xml for this web application is 

<web-app uri="/MyProject" dir="C:/iPlanet/Servers/docs/MyProject"
enable="true"/>

	Now in my web.xml I've referred to the location of struts-config.xml
as /WEB-INF/struts-config.xml and it works fine.
	However if in my JSPs i use the standard IMG tag and give
/images/imagename to access an image it doesn't work, I have to give
/MyProject/imagename. Thus my JSP code gets tied to the name of the project.

	I also noticed that the index.jsp of the example application has got
only /struts-power.gif to refer to the image, but when I do the View source
for the displayed HTML it shows /example/struts-power.gif as the URL for the
image (example being the URI I used while deploying the example app). 
	Did struts append the "example" to the URL of the image?
	

Thanks,
Gaurav

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>