Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

J2EE Web Application URI references

Status
Not open for further replies.

jeffgaer

Programmer
Jun 4, 2001
2
0
0
US
(1) How are uri's built to refer to other files packaged in the same .war file? For example

index.html in the root directory of the .war files has the following reference

<IMG hspace=0 src=&quot;images/logo.gif&quot; align=left border=0>

with the war file unjarred, if index.html is directly accessed the logo file is correctly resolved to the gif file in the images directory. However when accessing it through the J2EE application server ( tomcat 3.2.1 ) the image reference is unresolved. Likewise, I need to specify some xsl files for use by a translation servlet I can do this successfully by using a complete url i.e. but would like to do so using a relative expression so the hostname would not have to be known.

(2) is it possible to imbed some xml fragments into the web.xml file? I would like to be able to provide some table like configuration outside of a database.


<init-param>
<param-name>configXML</param-name>
<param-value>
<myXmlFrag>
<row attr1=&quot;a&quot; attr2=&quot;b&quot;>key</row>
......
<myXmlFrag>
</param-value>
</init-param>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top