Hi Dham,
use config browser plugin to verify your configuration:
http://poulwiel.blogspot.com/2009/09/config-browser-plugin-in-struts2.html

Also try to first run blank or demo app from struts_apps.zip and then
modify it to suit your needs.

Best greetings,
Paweł Wielgus.

2009/12/22 dhammikas <dhammi...@gmail.com>:
>
> Dear All,
> I am very new to strusts 2.1 and just struggling with up and running the
> hello world app. Following is the error that i am getting
>
> ------------------------------------------------------------------------------------
> WARNING: Could not find action or result
> There is no Action mapped for action name HelloWorld. - [unknown location]
>        at
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:178)
>        at
> org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
>        at
> org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
>        at
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
>        at
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
>        at
> org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
>        at
> org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        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:191)
>        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:286)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>        at 
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Unknown Source)
>
> ------------------------------------------------------------------------------------
> Following is the mapping at web.xml
>
>
>  <display-name>hw</display-name>
>
>
>  <filter>
>        <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
>        <init-param>
>                <param-name>actionPackages</param-name>
>                <param-value>sample</param-value>
>        </init-param>
>    </filter>
>
>
>  <filter-mapping>
>      <filter-name>struts2</filter-name>
>      <url-pattern>/*</url-pattern>
>  </filter-mapping>
>
>
> ------------------------------------------------------------------------------------
> Following is the strusts.xml mapping
>
> <struts>
>    <constant name="struts.enable.DynamicMethodInvocation" value="false"/>
>    <constant name="struts.devMode" value="false"/>
>
>    <package name="sample" namespace="/sample" extends="struts-default">
>        <action name="HelloWorld" class="sample.HelloWorld">
>            <result>/pages/helloWorld.jsp</result>
>        </action>
>    </package>
> </struts>
>
>
> ------------------------------------------------------------------------------------
> Following is the sample.HelloWorld.java
>
> package sample;
>
> import com.opensymphony.xwork2.ActionSupport;
>
> public class HelloWorld extends ActionSupport{
>
>    private String message;
>
>    public String getMessage() {
>        return message;
>    }
>
>    public void setMessage(String message) {
>        this.message = message;
>    }
>
>    public String execute() throws Exception {
>        setMessage("Hello World!");
>        return SUCCESS;
>    }
>
>
> }
>
>
> ------------------------------------------------------------------------------------
> Following is the /pages/helloWorld.jsp
>
> <%@ taglib prefix="s" uri="/struts-tags" %>
>
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
> <title>Hello World</title>
>
> </head>
> <body>
> <div align=left>To your information this is your helloWorld.jsp page under
> WebContent directiory.</div>
> <br>
> <br>
> <center><h1><s:property value="message"/></h1></center>
> </body>
> </html>
>
>
> ------------------------------------------------------------------------------------
> Following is the url being used to access the helloWorld.jsp
>
> http://localhost:8080/hw/sample/HelloWorld.action
> http://localhost:8080/hw/sample/HelloWorld.action
>
>
>
> ------------------------------------------------------------------------------------
>
> ANYBODY, PLEASE BE KIND ENOUGH TO HELP ME TO GET RID OF THIS TERRIBLE DAMN
> ERROR.
>
> Thanking and please let me know any concerns/thoughts.
> Dham
>
> --
> View this message in context: 
> http://old.nabble.com/Strusts-Error----no-Action-mapped-for-action-name-HelloWorld-tp26884710p26884710.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to