You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by jayadevan <ja...@gmail.com> on 2009/07/09 07:02:05 UTC
exceute() method in action class didn't called
hi all
I am using struts 1.1 for my accadamic project . My exceute() method in
action class did n't called . but the instance of action class created
struts - config.xml
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
<struts-config>
<form-beans>
<form-bean name="HelloWorldFromBean"
type="examples.firstStruct.helloWorld.HelloWorldFrom"/>
</form-beans>
<action-mappings>
<action
path="/helloWorld"
type="examples.firstStruct.helloWorld.HelloWorldAction"
name= ""
scope ="request"
>
<forward
name="xxx"
path="/pages/HelloWorld.jsp"/>
</action>
</action-mappings>
</struts-config>
action class
package examples.firstStruct.helloWorld;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class HelloWorldAction extends Action {
public HelloWorldAction(){
System.out.println("---------------inside execute -----------");
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
System.out.println("---------------inside execute -----------");
return mapping.findForward("xxx");
}
}
execute never called
tomcat log
Jul 9, 2009 9:47:57 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Processing a GET for /helloWorld
Jul 9, 2009 9:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Setting locale 'en_US'
Jul 9, 2009 9:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Looking for ActionForm bean under attribute ''
Jul 9, 2009 9:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Looking for Action instance for class
examples.firstStruct.helloWorld.HelloWorldAction
Jul 9, 2009 9:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Double checking for Action instance already there
Jul 9, 2009 9:47:58 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Creating new Action instance
---------------inside execute -----------
Jul 9, 2009 9:48:09 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Processing a GET for /helloWorld
Jul 9, 2009 9:48:09 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Looking for ActionForm bean under attribute ''
Jul 9, 2009 9:48:09 AM org.apache.catalina.core.ApplicationContext log
INFO: action: Looking for Action instance for class
examples.firstStruct.helloWorld.HelloWorldAction
please help me ?
thanks in advance
jayadevan
--
View this message in context: http://www.nabble.com/exceute%28%29-method-in-action-class-didn%27t-called-tp24404009p24404009.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: exceute() method in action class didn't called
Posted by Lukasz Lenart <lu...@googlemail.com>.
Ok, but it's truncated, could you send more?
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
Eddie Izzard - "Never put a sock in a toaster." -
http://www.brainyquote.com/quotes/authors/e/eddie_izzard.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: exceute() method in action class didn't called
Posted by jayadevan <ja...@gmail.com>.
thanks Lukasz
i tried it but i got one servelet exception
Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Looking for ActionForm bean under attribute
'HelloWorldFromBean'
Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Creating new ActionForm instance of class
'examples.firstStruct.helloWorld.HelloWorldFrom'
Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Storing instance under attribute 'HelloWorldFromBean' in
scope 'request'
Jul 9, 2009 12:02:11 PM org.apache.catalina.core.ApplicationContext log
INFO: action: Populating bean properties from this request
Jul 9, 2009 12:02:11 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
javax.servlet.ServletException: Servlet execution threw an exception
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Lukasz Lenart wrote:
>
> 2009/7/9 jayadevan <ja...@gmail.com>:
>> <action-mappings>
>> <action
>> path="/helloWorld"
>> type="examples.firstStruct.helloWorld.HelloWorldAction"
>> name= ""
>
> Add name = "HelloWorldFromBean"
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
> http://dailylog.lenart.org.pl/
>
> Jack Benny - "I don't deserve this award, but I have arthritis and I
> don't deserve that either." -
> http://www.brainyquote.com/quotes/authors/j/jack_benny.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/exceute%28%29-method-in-action-class-didn%27t-called-tp24404009p24404862.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: exceute() method in action class didn't called
Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/7/9 jayadevan <ja...@gmail.com>:
> <action-mappings>
> <action
> path="/helloWorld"
> type="examples.firstStruct.helloWorld.HelloWorldAction"
> name= ""
Add name = "HelloWorldFromBean"
Regards
--
Lukasz
http://www.lenart.org.pl/
http://dailylog.lenart.org.pl/
Jack Benny - "I don't deserve this award, but I have arthritis and I
don't deserve that either." -
http://www.brainyquote.com/quotes/authors/j/jack_benny.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org