You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "chenshi (JIRA)" <ji...@apache.org> on 2007/01/08 08:01:16 UTC

[jira] Created: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

 Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
---------------------------------------------------------------------------------------------------

                 Key: WW-1608
                 URL: https://issues.apache.org/struts/browse/WW-1608
             Project: Struts 2
          Issue Type: Bug
          Components: Documentation
    Affects Versions: 2.0.1
            Reporter: chenshi


In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 

The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  

Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.






-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-1608.
---------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 2.0.3)
         Assignee: Don Brown

Ok, the problem is your action mapping that just contains the "*":

<action name="*" class="tutorial.GeneralSupport">
<result>/WEB-INF/jsp/{1}.jsp</result>
</action> 

You don't need that, and in fact, it is hijacking the Login action's urls.

>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>         Assigned To: Don Brown
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-1608:
---------------------------

    Fix Version/s: 2.0.3

>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>         Assigned To: Don Brown
>             Fix For: 2.0.3
>
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "chenshi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39753 ] 

chenshi commented on WW-1608:
-----------------------------

If i replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">"and access the website like this link "http://localhost:8080/StudyStuts/Logon!input.do", the tomcat will report like that 

No result defined for action tutorial.GeneralSupport and result input - action - file:/E:/My_Java/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/StudyStuts/WEB-INF/classes/struts.xml:15:52
	com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:218)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:88)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:88)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ParametersInterceptor.intercept(ParametersInterceptor.java:147)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:105)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:80)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:204)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:74)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:120)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:59)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:174)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:115)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.PrepareInterceptor.intercept(PrepareInterceptor.java:115)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:156)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:124)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:180)
	com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:200)
	org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:27)
	org.apache.struts2.impl.StrutsActionProxy$1.call(StrutsActionProxy.java:26)
	org.apache.struts2.impl.RequestContextImpl.callInContext(RequestContextImpl.java:152)
	org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:25)
	org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:330)
	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:256)
My Struts.xml is 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
	<include file="struts-default.xml"></include>

	<package name="default" extends="struts-default"></package>

	<package name="tutorial" extends="struts-default">
		<action name="HelloWorld" class="tutorial.HelloWorld">
			<result>/WEB-INF/jsp/HelloWorld.jsp</result>
		</action>

		<action name="*" class="tutorial.GeneralSupport">
			<result>/WEB-INF/jsp/{1}.jsp</result>
		</action>


		<action name="Logon!*" method="{1}" class="tutorial.Logon">
			<result type="redirect-action">Menu</result>
			<result name="input">/WEB-INF/jsp/Logon.jsp</result>
		</action>

	</package>
</struts>

If i let the <action name="Login" class="tutorial.Login"> alone, everything is fine.

My struts version is 2.0.1, tomcat version is 5.5, jdk version is 1.5


>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>             Fix For: 2.0.3
>
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ted Husted updated WW-1608:
---------------------------

    Fix Version/s: 2.0.3

>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>             Fix For: 2.0.3
>
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "chenshi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39906 ] 

chenshi commented on WW-1608:
-----------------------------

if the reason is this
"Ok, the problem is your action mapping that just contains the "*":

<action name="*" class="tutorial.GeneralSupport">
<result>/WEB-INF/jsp/{1}.jsp</result>
</action>

You don't need that, and in fact, it is hijacking the Login action's urls."

but why doesn't the real effect is the special action override the common
one.

if I appointed the Login action, the "*" action's priority should below the
Login action and can't hijack the Login action's url


>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>         Assigned To: Don Brown
>             Fix For: 2.0.3
>
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-1608) Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-1608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39752 ] 

Don Brown commented on WW-1608:
-------------------------------

it should actually work fine in either case.  The tutorial shows you how to do it with dynamic method invocation turned off.  Could you give more of the error you are seeing?

>  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input's example is wrong
> ---------------------------------------------------------------------------------------------------
>
>                 Key: WW-1608
>                 URL: https://issues.apache.org/struts/browse/WW-1608
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>    Affects Versions: 2.0.1
>            Reporter: chenshi
>             Fix For: 2.0.3
>
>
> In  Apache Struts 2 Documentation > Home > Tutorials > Bootstrap > Validating Input section. 
> The document tell me that we should delete <action name="Login" class="tutorial.Login"> and replace by <action name="Login!*" method="{1}" class="tutorial.Login"> in struts.xml. but when i do like this, tomcat report "No result defined for action com.opensymphony.xwork2.ActionSupport and result input - action".  
> Actually this is not need to replace "<action name="Login" class="tutorial.Login">" by "<action name="Login!*" method="{1}" class="tutorial.Login">", struts will auto find the method in class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira