You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Vampire Wang (JIRA)" <ji...@apache.org> on 2007/08/30 02:56:34 UTC
[jira] Created: (WW-2148) Self made interceptor problem
Self made interceptor problem
-----------------------------
Key: WW-2148
URL: https://issues.apache.org/struts/browse/WW-2148
Project: Struts 2
Issue Type: Temp
Components: Interceptors
Affects Versions: 2.0.8
Environment: Windows XP SP2, JDK 1.6, Struts 2.0.8
Reporter: Vampire Wang
I've encountered a big problem when programming my own interceptor, I found that my interceptor wouldn't inject parameters into the the action class, so that I can't get my request parameters in my action; but when i removed my own interceptor, everything went right, I don't know if there's some thing I didn't notice, I had searched through the internet a while, and got nothing useful, could anyone here help me out about this issue?
here's my struts.xml:
<interceptors>
<interceptor name="createSession" class="org.apache.struts2.interceptor.CreateSessionInterceptor" />
<interceptor name ="auth" class="com.vam.book.interceptor.AuthorizationInterceptor" />
<interceptor-stack name="myStack">
<interceptor-ref name="auth"/>
<interceptor-ref name="createSession"/>
<interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="myStack"/>
and my interceptor:
public class AuthorizationInterceptor extends AbstractInterceptor {
public String intercept(ActionInvocation ai) throws Exception {
if (session.containsKey("name")) {
return ai.invoke();
}
else
return Action.INPUT;
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (WW-2148) Self made interceptor problem
Posted by "James Holmes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/struts/browse/WW-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Holmes closed WW-2148.
----------------------------
Resolution: Not A Problem
These types of questions should be asked on the Struts users mailing list and not by opening JIRA issues.
http://struts.apache.org/mail.html
> Self made interceptor problem
> -----------------------------
>
> Key: WW-2148
> URL: https://issues.apache.org/struts/browse/WW-2148
> Project: Struts 2
> Issue Type: Temp
> Components: Interceptors
> Affects Versions: 2.0.8
> Environment: Windows XP SP2, JDK 1.6, Struts 2.0.8
> Reporter: Vampire Wang
>
> I've encountered a big problem when programming my own interceptor, I found that my interceptor wouldn't inject parameters into the the action class, so that I can't get my request parameters in my action; but when i removed my own interceptor, everything went right, I don't know if there's some thing I didn't notice, I had searched through the internet a while, and got nothing useful, could anyone here help me out about this issue?
> here's my struts.xml:
> <interceptors>
> <interceptor name="createSession" class="org.apache.struts2.interceptor.CreateSessionInterceptor" />
> <interceptor name ="auth" class="com.vam.book.interceptor.AuthorizationInterceptor" />
> <interceptor-stack name="myStack">
> <interceptor-ref name="auth"/>
> <interceptor-ref name="createSession"/>
> <interceptor-ref name="defaultStack"/>
> </interceptor-stack>
> </interceptors>
> <default-interceptor-ref name="myStack"/>
> and my interceptor:
> public class AuthorizationInterceptor extends AbstractInterceptor {
> public String intercept(ActionInvocation ai) throws Exception {
> if (session.containsKey("name")) {
> return ai.invoke();
> }
> else
> return Action.INPUT;
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.