Ove-

in your jsp
You can hook redirect-action to yout submit button as in
<a:submit name=&quot;redirect-action:someAction&quot; value=&quot;OK&quot;/>
http://struts.apache.org/WW/actionmapper.html

code
in your Action class execute method
mapping.findForward("someAction")

where struts.xml has
        <action name="someAction" class="org.sverige.someAction">
            <result>someAction.jsp</result>
        </action>

bistå ?
Martin --
This e-mail communication and any attachments may contain confidential and 
privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you 
are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, 
distribution or copying of it or its 
contents
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <user@struts.apache.org>
Sent: Thursday, December 07, 2006 3:32 AM
Subject: Struts2: How can I make a Filter redirecting to struts actions


Hi everybody,
I have experimented with a filter that triggers for keywords on the
request URL
and when found it should redirect to a struts action that processes the
keyword.

My dilemma is that I don't want to use:
response.sendRedirect("/some.action");
becoz redirect should be done internally in the servlet container, not
via browser.

I have tested:
request.getRequestDispatcher("/some.action").forward(request, response);
and it don't work. I guess becoz an action mapping is not a servlet, an
JSP page is.

Does anyone have an idea how to solve this? Any input welcome!

One approach could be to inherit:
org.apache.struts2.dispatcher.FilterDispatcher
and override doFilter() method and insert my keyword code. Kinda ugly
thou.

Regardings,
 Ove Oldberg, Sweden.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to