Hi,
I am new to Struts and want to import a Struts 2 action into a jsp by
jstl import:
<c:import url="/HelloWorld_input.action" />
But neither Tomcat nor Jboss seem to like this - but gives the reply:
Importing /HelloWorld_input.action: The requested resource
(/HelloImport/HelloWorld_input.action) is not available
Using c:import does not seem to trigger the processing of the struts
filter dispatcher.
If I import via an intermediate jsp instead, it works:
<c:import url="/hello.jsp" />
With hello.jsp:
---
<body>
<form action="/HelloImport/HelloWorld.action" >
<input type="text" name="userName" />
<input type="submit" />
</form>
</body>
---
And struts.xml:
<struts>
<package name="default" extends="struts-default">
<action name="HelloWorld_input" >
<result>/hello.jsp</result>
</action>
<action name="HelloWorld" class="test.HelloWorld">
<result >/success.jsp</result>
</action>
</package>
</struts>
With Struts you should never access jsp:s directly, but always work
with actions.
Is there any trick to import a Struts 2 action directly into a JSP?
/Best regards, Per Johansson
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]