I'm trying to use the ActionServlet, running on
Orion Server.
I'm using the following in
web.xml:
<servlet>
<servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name> <url-pattern>/*.do</url-pattern> </servlet-mapping> I've defined a root /OtherWorld where my app
resides, and have a class TryAction.class on the path.
<action path="/try"
actionClass="TryAction" > </action> Then when I call localhost/OtherWorld, to take me
to the HTML home page, the page displays successfully.
However, when I call localhost/OtherWorld/try.do,
the Digester chokes. I get
java.net.MalformedURLException: unknown protocol:
jndi
What happens is that the Digester tries to map the
name of the DTD file for struts to the local struts-config_1_0.dtd file. The
exception gets thrown when the Digester's resolveEntity() method tries to
construct a new URL from the string
'jndi://C_/OtherWorld/OtherWorld-web/WEB-INF/lib/struts.jar/org/apache/struts/resources/struts-config_1_0.dtd'.
The strange thing is, that when I did the initial
call to localhost/OtherWorld, the trace shows that the Digester got past exactly
the same line and successfully did the resolveEntity on the exact same string,
without any exceptions.
Why does it crash when it tries to do it a second
time??
|
- Re: InDigestion Richard Leibbrandt
- Re: InDigestion Craig R. McClanahan
- Re: InDigestion Hee Meng, Poh