Struts2 action method and struts.convention.result.path not working
I have problem with Struts2 action method and
struts.convention.result.path Here is my struts.xml
<struts>
<constant name="struts.action.extension" value="" />
<constant name="struts.action.excludePattern"
value="/.*\.(html|jsp),/static/.*"/>
<constant name="struts.convention.result.path"
value="/WEB-INF/pages/" />
<package name="user" namespace="/user" extends="struts-default">
<action name="login" class="loginAction" method="login">
<result name="success">login.jsp</result>
</action>
</package>
<struts>
When I run url "localhost:8080/venus/user/login". It display error "HTTP
Status 404 - /venus/user/login.jsp"
If I change login() method to execute() method, it works. Or if I change
to /WEB-INF/pages/login.jsp, it works.
Can anyone explain and teach me how use action method with result.path
config in xml? Thank you!
No comments:
Post a Comment