Can't you use the s:action tag? Anyway, this might have something to do with filter configuration. Try adding this to the filter definition in web.xml:
<dispatcher>REQUEST</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>FORWARD</dispatcher> Nils-H On Thu, Sep 24, 2009 at 11:18 AM, Per Johansson <perj...@gmail.com> wrote: > 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: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org