Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

import files question under Tomcat6.0.13

red phoenix

2007-07-12

Replies:

I tried with <c:import> to import a struts action,it raises a question,I use
Tomcat6.0.13,my directory is follows:
C:\tomcat\webapps\struts2-blank-2.0.8

when I use visit
http://localhost:8080/struts2-blank-2.0.8/a.jsp
it raise following error:
The requested resource (/struts2-blank-2.0.8/example/HelloWorld.action) is
not available

But when I use
http://localhost:8080/struts2-blank-2.0.8/example/HelloWorld.action, it can
runs well.
My a.jsp file is follows:
<%@(protected)" %>
<html>
<c:import url="/example/HelloWorld.action"/>
</html>

If I use absolute path,it can runs well,like follows:
<c:import url="
http://localhost:8080/struts2-blank-2.0.8/example/HelloWorld.action"/<http://localhost:8080/struts2-blank-2.0.8/example/HelloWorld.action%22/>>


Someone say before Tomcat5,it will run well,but after Tomcat5 or higher,it
will raise above error.I only want to use relative path,not absolute path,I
don't know why raise above error,and how to correct it?

Thanks
©2008 junlu.com - Jax Systems, LLC, U.S.A.