You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Moose <jg...@gmail.com> on 2008/07/28 21:58:21 UTC

There is no Action mapped for namespace / and action name ...

I know what you're thinking... web.xml has no action mapping, but it does!


<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

    <display-name>Struts 2 RESTful Ozone Services</display-name>

  <!-- Filters -->
      <filter>
          <filter-name>action2</filter-name>

<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
          <init-param>
              <param-name>actionPackages</param-name>
              <param-value>com.myeclipse.ozone</param-value>
          </init-param>
          <init-param>
              <param-name>struts.devMode</param-name>
              <param-value>true</param-value>
          </init-param>
      </filter>

      <filter-mapping>
          <filter-name>action2</filter-name>
          <url-pattern>/*</url-pattern>
      </filter-mapping>

  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>



This file works well with another Struts2.1.3 app.  Can someone help me
understand where to look for the cause of this???

Thanks folks

Re: There is no Action mapped for namespace / and action name ...

Posted by anah <an...@gmail.com>.
What do you mean by "re-ordered the libraries and builders"? How did you
re-order?

Ana



John Moose wrote:
> 
> re-ordered the libraries and builders, forced JDK compiler compliance to
> 5.0
> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
> *really* thought it was a Struts2 problem  ; )
> 
> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
> 
>> A very wierd situation...I have two projects in the Eclipse workspace --
>> Tagging and Dashbd  They both use the REST plugin and follow the naming
>> conventions, etc. Tagging will build, re-deploy and run perfectly. When I
>> close that project and open Dashbd, build, re-deploy and run I get the
>> Action mapping failure as described. Both projects have source files in
>> the
>> "com.myeclipse.ozone" package name(space). Is it possible that there is
>> some
>> very persistent caching going on ??? like over multiple starts and
>> re-starts
>> of Tomcat?  just a WAG...
>>
>> -John
>>
>>
>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>> savolainen.pauli@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am having exactly the same problem. I was using Struts 2.1.1,
>>> switched to struts 2.1.2 (including the restful and codebehind
>>> plugins) and started to get this 'no action found' error. I am quite
>>> confident that I did not do anything that should've resulted in this.
>>> Of course I cannot be 100% sure, because I did goof around with my
>>> code a bit, but I checked and rechecked and rerechecked everthing
>>> twice and couldn't find a reason for this behaviour.
>>>
>>> John's web.xml and the stacktrace are identical to mine. I don't
>>> declare any namespaces in my struts.xml packages nor in the login form
>>> from which I try to invoke the login action <s:form
>>> action="/login/execute" method="post">. (Also tried with an
>>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>>> execute method in the pacakge defined in the web.xml's actionPackages
>>> init parameter. At least this declaration used to send the control to
>>> the LoginAction's execute method. Doesn't do anymore.
>>>
>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>>> include a tiles main layout which in turn includes sub-layouts (such
>>> as the login form). I don't know if this has anything got to do with
>>> the problem I'm having.
>>>
>>> So, is a result of something I did wrong or could it be something else?
>>>
>>> Thank you
>>>
>>> Pauli Savolainen
>>>
>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>>> > What's the correct way of writing a good 404 or action not found page?
>>> Does
>>> > s2 have something like a fallback action if nothing can be found?
>>> >
>>> > Paul
>>> >
>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>>> wrote:
>>> >
>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week
>>> or so
>>> >> ago that I haven't had time to re-visit--so it actually could be the
>>> web.xml
>>> >> (specifically the dispatcher being used) and I may have put my foot
>>> in
>>> my
>>> >> mouth (again).
>>> >>
>>> >> Somebody followed up saying the original FilterDispatcher worked,
>>> though,
>>> >> so maybe not. Hrm.
>>> >>
>>> >> Dave
>>> >>
>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>> >> > and I probably should have included this as well:
>>> >> >
>>> >> > Struts Problem Report
>>> >> >
>>> >> > Struts has detected an unhandled exception:
>>> >> >   *Messages*:
>>> >> > There is no Action mapped for namespace / and action name
>>> >> > dashbd.
>>> >> >  ------------------------------
>>> >> > Stacktraces *There is no Action mapped for namespace / and
>>> >> > action name
>>> >> > dashbd. - [unknown location]*
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>> >> >
>>> >> >
>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>> >> >     java.lang.Thread.run(Thread.java:595)
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> >
>>> >> > > Hi Dave,
>>> >> > >
>>> >> > > I have the following snippet of DashbdController class
>>> >> > that I am expecting
>>> >> > > to hit with the following URL:
>>> >> > >
>>> >> > > http:/localhost:8080/Dashbd
>>> >> > >
>>> >> > > <---SNIPPET
>>> >> > >
>>> >> > > package com.myeclipse.ozone;
>>> >> > >
>>> >> > > import java.util.Collection;
>>> >> > >
>>> >> > > import com.myeclipse.hibernate.*;
>>> >> > >
>>> >> > > import org.hibernate.HibernateException;
>>> >> > > import org.hibernate.Session;
>>> >> > > import org.hibernate.cfg.Configuration;
>>> >> > >
>>> >> > > import org.apache.struts2.config.Result;
>>> >> > > import org.apache.struts2.config.Results;
>>> >> > > import
>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>>> >> > >
>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>>> >> > > import com.opensymphony.xwork2.Validateable;
>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>>> >> > >
>>> >> > >
>>> >> > > @Results({
>>> >> > >     @Result(name="success",
>>> >> > type=ServletActionRedirectResult.class,
>>> >> > > value="dashbd")
>>> >> > > })
>>> >> > >
>>> >> > > public class DashbdController extends
>>> >> > ValidationAwareSupport implements
>>> >> > > ModelDriven, Validateable{
>>> >> > >
>>> >> > >    //private static Gadget    transientGadget = new
>>> >> > Gadget();
>>> >> > >
>>> >> > >     //String id;
>>> >> > >     int id;
>>> >> > >
>>> >> > >     private static int    dashboardId;
>>> >> > >
>>> >> > >     private Collection<Dashbd>
>>> >> > dashboardList;
>>> >> > >     private Collection<Dashbd>     model;
>>> >> > >     private Collection<DashbdType>
>>> >> > dashboardTypeList;
>>> >> > >
>>> >> > >     private DashbdService dashboardService = new
>>> >> > DashbdService();  // where
>>> >> > > the DAOs live
>>> >> > >
>>> >> > >
>>> >> > >     /*
>>> >> > >
>>> >> >
>>> >>
>>> ****************************************************************************************
>>> >> > >      *             DASHBOARDS
>>> >> > >      */
>>> >> > >
>>> >> > >     //
>>> >> > >     // GET .../dashbd                 get all
>>> >> > dashboards in table
>>> >> > >     //
>>> >> > >     public HttpHeaders index() {
>>> >> > >         dashboardList = dashboardService.getAll();
>>> >> > >         return new
>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>>> >> > >             .disableCaching();
>>> >> > >     }
>>> >> > >
>>> >> > >
>>> >> > > and etc. ....
>>> >> > >
>>> >> > > ...END SNIPPET >
>>> >> > >
>>> >> > > There are more methods in this calss of course, but
>>> >> > all I'm trying to do
>>> >> > > initially is hit the index() action with the URL above
>>> >> > ?!?
>>> >> > >
>>> >> > > the index.jsp is really simple:
>>> >> > >
>>> >> > > <% response.sendRedirect("dashbd"); %>
>>> >> > >
>>> >> > >
>>> >> > > this same scheme works perfectly with another RESTful
>>> >> > app service and fir
>>> >> > > the life of me, I can't find any
>>> >> > >
>>> >> > >
>>> >> > >
>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>>> >> > <ne...@yahoo.com>wrote:
>>> >> > >
>>> >> > >> The web.xml doesn't have anything to do with
>>> >> > the error message; it thinks
>>> >> > >> there isn't an action configured at the URL
>>> >> > you're requesting.
>>> >> > >>
>>> >> > >> Impossible to help without more information.
>>> >> > >>
>>> >> > >> Dave
>>> >> > >>
>>> >> > >> --- On Mon, 7/28/08, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> > >>
>>> >> > >> > From: John Moose <jg...@gmail.com>
>>> >> > >> > Subject: There is no Action mapped for
>>> >> > namespace / and action name ...
>>> >> > >> > To: "Struts Users Mailing List"
>>> >> > <us...@struts.apache.org>
>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>>> >> > >> > I know what you're thinking... web.xml
>>> >> > has no action
>>> >> > >> > mapping, but it does!
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > <?xml version="1.0"
>>> >> > >> > encoding="UTF-8"?>
>>> >> > >> > <web-app version="2.5"
>>> >> > >> >
>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>>> >> > >> >
>>> >> > >> >
>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> >> > >> >
>>> >> > >> >
>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>> >> > >> >
>>> >> > >> >
>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>> >> > >> >
>>> >> > >> >     <display-name>Struts 2 RESTful
>>> >> > Ozone
>>> >> > >> > Services</display-name>
>>> >> > >> >
>>> >> > >> >   <!-- Filters -->
>>> >> > >> >       <filter>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > >>
>>> >> >
>>> >>
>>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>actionPackages</param-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-value>com.myeclipse.ozone</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>struts.devMode</param-name>
>>> >> > >> >
>>> >> > <param-value>true</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >       </filter>
>>> >> > >> >
>>> >> > >> >       <filter-mapping>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > <url-pattern>/*</url-pattern>
>>> >> > >> >       </filter-mapping>
>>> >> > >> >
>>> >> > >> >   <welcome-file-list>
>>> >> > >> >
>>> >> > <welcome-file>index.jsp</welcome-file>
>>> >> > >> >   </welcome-file-list>
>>> >> > >> > </web-app>
>>> >> > >> >
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > This file works well with another Struts2.1.3
>>> >> > app.  Can
>>> >> > >> > someone help me
>>> >> > >> > understand where to look for the cause of
>>> >> > this???
>>> >> > >> >
>>> >> > >> > Thanks folks
>>> >> > >>
>>> >> > >>
>>> >> >
>>> ---------------------------------------------------------------------
>>> >> > >> To unsubscribe, e-mail:
>>> >> > user-unsubscribe@struts.apache.org
>>> >> > >> For additional commands, e-mail:
>>> >> > user-help@struts.apache.org
>>> >> > >>
>>> >> > >>
>>> >> > >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p21937845.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: There is no Action mapped for namespace / and action name ...

Posted by John Moose <jg...@gmail.com>.
I know...when I have two projects that use the same package namespace for my
app source...I get this Action mapping error. Even when one project is
"Closed" (in the Eclipse sense). I neglected to mention this previously in
describing what I "changed" to make things work. There is still a
'fragility' that has crept into the Struts2.1.3-SNAPSHOT regarding
dispatcher filters and actions. I would really like to setup Struts2.1.x as
a Maven2 enabled MyEclipse project and explore things with a debugger. Maybe
this weekend... too damn hot and humid to do much else.

-John

On Wed, Jul 30, 2008 at 6:10 AM, Pauli Savolainen <
savolainen.pauli@gmail.com> wrote:

> Hi,
>
> I "fixed" the problem by reverting back to 2.1.1-SNAPSHOT version with
> struts core and all the plugins. Changing eclipse to 5.0 is really not
> a solution for me, so I couldn't do that. I wonder what in 2.1.2 makes
> my program not work anymore.
>
> Pauli
>
> 2008/7/29 John Moose <jg...@gmail.com>:
> > re-ordered the libraries and builders, forced JDK compiler compliance to
> 5.0
> > ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
> > *really* thought it was a Struts2 problem  ; )
> >
> > On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
> >
> >> A very wierd situation...I have two projects in the Eclipse workspace --
> >> Tagging and Dashbd  They both use the REST plugin and follow the naming
> >> conventions, etc. Tagging will build, re-deploy and run perfectly. When
> I
> >> close that project and open Dashbd, build, re-deploy and run I get the
> >> Action mapping failure as described. Both projects have source files in
> the
> >> "com.myeclipse.ozone" package name(space). Is it possible that there is
> some
> >> very persistent caching going on ??? like over multiple starts and
> re-starts
> >> of Tomcat?  just a WAG...
> >>
> >> -John
> >>
> >>
> >> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
> >> savolainen.pauli@gmail.com> wrote:
> >>
> >>> Hi,
> >>>
> >>> I am having exactly the same problem. I was using Struts 2.1.1,
> >>> switched to struts 2.1.2 (including the restful and codebehind
> >>> plugins) and started to get this 'no action found' error. I am quite
> >>> confident that I did not do anything that should've resulted in this.
> >>> Of course I cannot be 100% sure, because I did goof around with my
> >>> code a bit, but I checked and rechecked and rerechecked everthing
> >>> twice and couldn't find a reason for this behaviour.
> >>>
> >>> John's web.xml and the stacktrace are identical to mine. I don't
> >>> declare any namespaces in my struts.xml packages nor in the login form
> >>> from which I try to invoke the login action <s:form
> >>> action="/login/execute" method="post">. (Also tried with an
> >>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
> >>> execute method in the pacakge defined in the web.xml's actionPackages
> >>> init parameter. At least this declaration used to send the control to
> >>> the LoginAction's execute method. Doesn't do anymore.
> >>>
> >>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
> >>> include a tiles main layout which in turn includes sub-layouts (such
> >>> as the login form). I don't know if this has anything got to do with
> >>> the problem I'm having.
> >>>
> >>> So, is a result of something I did wrong or could it be something else?
> >>>
> >>> Thank you
> >>>
> >>> Pauli Savolainen
> >>>
> >>> 2008/7/28 Paul Benedict <pb...@apache.org>:
> >>> > What's the correct way of writing a good 404 or action not found
> page?
> >>> Does
> >>> > s2 have something like a fallback action if nothing can be found?
> >>> >
> >>> > Paul
> >>> >
> >>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
> >>> wrote:
> >>> >
> >>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a
> week
> >>> or so
> >>> >> ago that I haven't had time to re-visit--so it actually could be the
> >>> web.xml
> >>> >> (specifically the dispatcher being used) and I may have put my foot
> in
> >>> my
> >>> >> mouth (again).
> >>> >>
> >>> >> Somebody followed up saying the original FilterDispatcher worked,
> >>> though,
> >>> >> so maybe not. Hrm.
> >>> >>
> >>> >> Dave
> >>> >>
> >>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
> >>> >> > and I probably should have included this as well:
> >>> >> >
> >>> >> > Struts Problem Report
> >>> >> >
> >>> >> > Struts has detected an unhandled exception:
> >>> >> >   *Messages*:
> >>> >> > There is no Action mapped for namespace / and action name
> >>> >> > dashbd.
> >>> >> >  ------------------------------
> >>> >> > Stacktraces *There is no Action mapped for namespace / and
> >>> >> > action name
> >>> >> > dashbd. - [unknown location]*
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>> >> >
> >>> >> >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >>> >> >
> >>> >> >
> >>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >>> >> >
> >>> >> >
> >>> >>
> >>>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >>> >> >     java.lang.Thread.run(Thread.java:595)
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> >>> >> > <jg...@gmail.com> wrote:
> >>> >> >
> >>> >> > > Hi Dave,
> >>> >> > >
> >>> >> > > I have the following snippet of DashbdController class
> >>> >> > that I am expecting
> >>> >> > > to hit with the following URL:
> >>> >> > >
> >>> >> > > http:/localhost:8080/Dashbd
> >>> >> > >
> >>> >> > > <---SNIPPET
> >>> >> > >
> >>> >> > > package com.myeclipse.ozone;
> >>> >> > >
> >>> >> > > import java.util.Collection;
> >>> >> > >
> >>> >> > > import com.myeclipse.hibernate.*;
> >>> >> > >
> >>> >> > > import org.hibernate.HibernateException;
> >>> >> > > import org.hibernate.Session;
> >>> >> > > import org.hibernate.cfg.Configuration;
> >>> >> > >
> >>> >> > > import org.apache.struts2.config.Result;
> >>> >> > > import org.apache.struts2.config.Results;
> >>> >> > > import
> >>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
> >>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
> >>> >> > > import org.apache.struts2.rest.HttpHeaders;
> >>> >> > >
> >>> >> > > import com.opensymphony.xwork2.ModelDriven;
> >>> >> > > import com.opensymphony.xwork2.Validateable;
> >>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
> >>> >> > >
> >>> >> > >
> >>> >> > > @Results({
> >>> >> > >     @Result(name="success",
> >>> >> > type=ServletActionRedirectResult.class,
> >>> >> > > value="dashbd")
> >>> >> > > })
> >>> >> > >
> >>> >> > > public class DashbdController extends
> >>> >> > ValidationAwareSupport implements
> >>> >> > > ModelDriven<Object>, Validateable{
> >>> >> > >
> >>> >> > >    //private static Gadget    transientGadget = new
> >>> >> > Gadget();
> >>> >> > >
> >>> >> > >     //String id;
> >>> >> > >     int id;
> >>> >> > >
> >>> >> > >     private static int    dashboardId;
> >>> >> > >
> >>> >> > >     private Collection<Dashbd>
> >>> >> > dashboardList;
> >>> >> > >     private Collection<Dashbd>     model;
> >>> >> > >     private Collection<DashbdType>
> >>> >> > dashboardTypeList;
> >>> >> > >
> >>> >> > >     private DashbdService dashboardService = new
> >>> >> > DashbdService();  // where
> >>> >> > > the DAOs live
> >>> >> > >
> >>> >> > >
> >>> >> > >     /*
> >>> >> > >
> >>> >> >
> >>> >>
> >>>
> ****************************************************************************************
> >>> >> > >      *             DASHBOARDS
> >>> >> > >      */
> >>> >> > >
> >>> >> > >     //
> >>> >> > >     // GET .../dashbd                 get all
> >>> >> > dashboards in table
> >>> >> > >     //
> >>> >> > >     public HttpHeaders index() {
> >>> >> > >         dashboardList = dashboardService.getAll();
> >>> >> > >         return new
> >>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
> >>> >> > >             .disableCaching();
> >>> >> > >     }
> >>> >> > >
> >>> >> > >
> >>> >> > > and etc. ....
> >>> >> > >
> >>> >> > > ...END SNIPPET >
> >>> >> > >
> >>> >> > > There are more methods in this calss of course, but
> >>> >> > all I'm trying to do
> >>> >> > > initially is hit the index() action with the URL above
> >>> >> > ?!?
> >>> >> > >
> >>> >> > > the index.jsp is really simple:
> >>> >> > >
> >>> >> > > <% response.sendRedirect("dashbd"); %>
> >>> >> > >
> >>> >> > >
> >>> >> > > this same scheme works perfectly with another RESTful
> >>> >> > app service and fir
> >>> >> > > the life of me, I can't find any
> >>> >> > >
> >>> >> > >
> >>> >> > >
> >>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> >>> >> > <ne...@yahoo.com>wrote:
> >>> >> > >
> >>> >> > >> The web.xml doesn't have anything to do with
> >>> >> > the error message; it thinks
> >>> >> > >> there isn't an action configured at the URL
> >>> >> > you're requesting.
> >>> >> > >>
> >>> >> > >> Impossible to help without more information.
> >>> >> > >>
> >>> >> > >> Dave
> >>> >> > >>
> >>> >> > >> --- On Mon, 7/28/08, John Moose
> >>> >> > <jg...@gmail.com> wrote:
> >>> >> > >>
> >>> >> > >> > From: John Moose <jg...@gmail.com>
> >>> >> > >> > Subject: There is no Action mapped for
> >>> >> > namespace / and action name ...
> >>> >> > >> > To: "Struts Users Mailing List"
> >>> >> > <us...@struts.apache.org>
> >>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
> >>> >> > >> > I know what you're thinking... web.xml
> >>> >> > has no action
> >>> >> > >> > mapping, but it does!
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > >> > <?xml version="1.0"
> >>> >> > >> > encoding="UTF-8"?>
> >>> >> > >> > <web-app version="2.5"
> >>> >> > >> >
> >>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >>> >> > >> >
> >>> >> > >> >     <display-name>Struts 2 RESTful
> >>> >> > Ozone
> >>> >> > >> > Services</display-name>
> >>> >> > >> >
> >>> >> > >> >   <!-- Filters -->
> >>> >> > >> >       <filter>
> >>> >> > >> >
> >>> >> > <filter-name>action2</filter-name>
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > >>
> >>> >> >
> >>> >>
> >>>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >>> >> > >> >           <init-param>
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > <param-name>actionPackages</param-name>
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > <param-value>com.myeclipse.ozone</param-value>
> >>> >> > >> >           </init-param>
> >>> >> > >> >           <init-param>
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > <param-name>struts.devMode</param-name>
> >>> >> > >> >
> >>> >> > <param-value>true</param-value>
> >>> >> > >> >           </init-param>
> >>> >> > >> >       </filter>
> >>> >> > >> >
> >>> >> > >> >       <filter-mapping>
> >>> >> > >> >
> >>> >> > <filter-name>action2</filter-name>
> >>> >> > >> >
> >>> >> > <url-pattern>/*</url-pattern>
> >>> >> > >> >       </filter-mapping>
> >>> >> > >> >
> >>> >> > >> >   <welcome-file-list>
> >>> >> > >> >
> >>> >> > <welcome-file>index.jsp</welcome-file>
> >>> >> > >> >   </welcome-file-list>
> >>> >> > >> > </web-app>
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > >> >
> >>> >> > >> > This file works well with another Struts2.1.3
> >>> >> > app.  Can
> >>> >> > >> > someone help me
> >>> >> > >> > understand where to look for the cause of
> >>> >> > this???
> >>> >> > >> >
> >>> >> > >> > Thanks folks
> >>> >> > >>
> >>> >> > >>
> >>> >> >
> ---------------------------------------------------------------------
> >>> >> > >> To unsubscribe, e-mail:
> >>> >> > user-unsubscribe@struts.apache.org
> >>> >> > >> For additional commands, e-mail:
> >>> >> > user-help@struts.apache.org
> >>> >> > >>
> >>> >> > >>
> >>> >> > >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> >> For additional commands, e-mail: user-help@struts.apache.org
> >>> >>
> >>> >>
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>> For additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by Pauli Savolainen <sa...@gmail.com>.
Hi,

I "fixed" the problem by reverting back to 2.1.1-SNAPSHOT version with
struts core and all the plugins. Changing eclipse to 5.0 is really not
a solution for me, so I couldn't do that. I wonder what in 2.1.2 makes
my program not work anymore.

Pauli

2008/7/29 John Moose <jg...@gmail.com>:
> re-ordered the libraries and builders, forced JDK compiler compliance to 5.0
> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
> *really* thought it was a Struts2 problem  ; )
>
> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
>
>> A very wierd situation...I have two projects in the Eclipse workspace --
>> Tagging and Dashbd  They both use the REST plugin and follow the naming
>> conventions, etc. Tagging will build, re-deploy and run perfectly. When I
>> close that project and open Dashbd, build, re-deploy and run I get the
>> Action mapping failure as described. Both projects have source files in the
>> "com.myeclipse.ozone" package name(space). Is it possible that there is some
>> very persistent caching going on ??? like over multiple starts and re-starts
>> of Tomcat?  just a WAG...
>>
>> -John
>>
>>
>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>> savolainen.pauli@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am having exactly the same problem. I was using Struts 2.1.1,
>>> switched to struts 2.1.2 (including the restful and codebehind
>>> plugins) and started to get this 'no action found' error. I am quite
>>> confident that I did not do anything that should've resulted in this.
>>> Of course I cannot be 100% sure, because I did goof around with my
>>> code a bit, but I checked and rechecked and rerechecked everthing
>>> twice and couldn't find a reason for this behaviour.
>>>
>>> John's web.xml and the stacktrace are identical to mine. I don't
>>> declare any namespaces in my struts.xml packages nor in the login form
>>> from which I try to invoke the login action <s:form
>>> action="/login/execute" method="post">. (Also tried with an
>>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>>> execute method in the pacakge defined in the web.xml's actionPackages
>>> init parameter. At least this declaration used to send the control to
>>> the LoginAction's execute method. Doesn't do anymore.
>>>
>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>>> include a tiles main layout which in turn includes sub-layouts (such
>>> as the login form). I don't know if this has anything got to do with
>>> the problem I'm having.
>>>
>>> So, is a result of something I did wrong or could it be something else?
>>>
>>> Thank you
>>>
>>> Pauli Savolainen
>>>
>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>>> > What's the correct way of writing a good 404 or action not found page?
>>> Does
>>> > s2 have something like a fallback action if nothing can be found?
>>> >
>>> > Paul
>>> >
>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>>> wrote:
>>> >
>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week
>>> or so
>>> >> ago that I haven't had time to re-visit--so it actually could be the
>>> web.xml
>>> >> (specifically the dispatcher being used) and I may have put my foot in
>>> my
>>> >> mouth (again).
>>> >>
>>> >> Somebody followed up saying the original FilterDispatcher worked,
>>> though,
>>> >> so maybe not. Hrm.
>>> >>
>>> >> Dave
>>> >>
>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>> >> > and I probably should have included this as well:
>>> >> >
>>> >> > Struts Problem Report
>>> >> >
>>> >> > Struts has detected an unhandled exception:
>>> >> >   *Messages*:
>>> >> > There is no Action mapped for namespace / and action name
>>> >> > dashbd.
>>> >> >  ------------------------------
>>> >> > Stacktraces *There is no Action mapped for namespace / and
>>> >> > action name
>>> >> > dashbd. - [unknown location]*
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>> >> >
>>> >> >
>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>> >> >     java.lang.Thread.run(Thread.java:595)
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> >
>>> >> > > Hi Dave,
>>> >> > >
>>> >> > > I have the following snippet of DashbdController class
>>> >> > that I am expecting
>>> >> > > to hit with the following URL:
>>> >> > >
>>> >> > > http:/localhost:8080/Dashbd
>>> >> > >
>>> >> > > <---SNIPPET
>>> >> > >
>>> >> > > package com.myeclipse.ozone;
>>> >> > >
>>> >> > > import java.util.Collection;
>>> >> > >
>>> >> > > import com.myeclipse.hibernate.*;
>>> >> > >
>>> >> > > import org.hibernate.HibernateException;
>>> >> > > import org.hibernate.Session;
>>> >> > > import org.hibernate.cfg.Configuration;
>>> >> > >
>>> >> > > import org.apache.struts2.config.Result;
>>> >> > > import org.apache.struts2.config.Results;
>>> >> > > import
>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>>> >> > >
>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>>> >> > > import com.opensymphony.xwork2.Validateable;
>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>>> >> > >
>>> >> > >
>>> >> > > @Results({
>>> >> > >     @Result(name="success",
>>> >> > type=ServletActionRedirectResult.class,
>>> >> > > value="dashbd")
>>> >> > > })
>>> >> > >
>>> >> > > public class DashbdController extends
>>> >> > ValidationAwareSupport implements
>>> >> > > ModelDriven<Object>, Validateable{
>>> >> > >
>>> >> > >    //private static Gadget    transientGadget = new
>>> >> > Gadget();
>>> >> > >
>>> >> > >     //String id;
>>> >> > >     int id;
>>> >> > >
>>> >> > >     private static int    dashboardId;
>>> >> > >
>>> >> > >     private Collection<Dashbd>
>>> >> > dashboardList;
>>> >> > >     private Collection<Dashbd>     model;
>>> >> > >     private Collection<DashbdType>
>>> >> > dashboardTypeList;
>>> >> > >
>>> >> > >     private DashbdService dashboardService = new
>>> >> > DashbdService();  // where
>>> >> > > the DAOs live
>>> >> > >
>>> >> > >
>>> >> > >     /*
>>> >> > >
>>> >> >
>>> >>
>>> ****************************************************************************************
>>> >> > >      *             DASHBOARDS
>>> >> > >      */
>>> >> > >
>>> >> > >     //
>>> >> > >     // GET .../dashbd                 get all
>>> >> > dashboards in table
>>> >> > >     //
>>> >> > >     public HttpHeaders index() {
>>> >> > >         dashboardList = dashboardService.getAll();
>>> >> > >         return new
>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>>> >> > >             .disableCaching();
>>> >> > >     }
>>> >> > >
>>> >> > >
>>> >> > > and etc. ....
>>> >> > >
>>> >> > > ...END SNIPPET >
>>> >> > >
>>> >> > > There are more methods in this calss of course, but
>>> >> > all I'm trying to do
>>> >> > > initially is hit the index() action with the URL above
>>> >> > ?!?
>>> >> > >
>>> >> > > the index.jsp is really simple:
>>> >> > >
>>> >> > > <% response.sendRedirect("dashbd"); %>
>>> >> > >
>>> >> > >
>>> >> > > this same scheme works perfectly with another RESTful
>>> >> > app service and fir
>>> >> > > the life of me, I can't find any
>>> >> > >
>>> >> > >
>>> >> > >
>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>>> >> > <ne...@yahoo.com>wrote:
>>> >> > >
>>> >> > >> The web.xml doesn't have anything to do with
>>> >> > the error message; it thinks
>>> >> > >> there isn't an action configured at the URL
>>> >> > you're requesting.
>>> >> > >>
>>> >> > >> Impossible to help without more information.
>>> >> > >>
>>> >> > >> Dave
>>> >> > >>
>>> >> > >> --- On Mon, 7/28/08, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> > >>
>>> >> > >> > From: John Moose <jg...@gmail.com>
>>> >> > >> > Subject: There is no Action mapped for
>>> >> > namespace / and action name ...
>>> >> > >> > To: "Struts Users Mailing List"
>>> >> > <us...@struts.apache.org>
>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>>> >> > >> > I know what you're thinking... web.xml
>>> >> > has no action
>>> >> > >> > mapping, but it does!
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > <?xml version="1.0"
>>> >> > >> > encoding="UTF-8"?>
>>> >> > >> > <web-app version="2.5"
>>> >> > >> >
>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>>> >> > >> >
>>> >> > >> >
>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> >> > >> >
>>> >> > >> >
>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>> >> > >> >
>>> >> > >> >
>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>> >> > >> >
>>> >> > >> >     <display-name>Struts 2 RESTful
>>> >> > Ozone
>>> >> > >> > Services</display-name>
>>> >> > >> >
>>> >> > >> >   <!-- Filters -->
>>> >> > >> >       <filter>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > >>
>>> >> >
>>> >>
>>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>actionPackages</param-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-value>com.myeclipse.ozone</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>struts.devMode</param-name>
>>> >> > >> >
>>> >> > <param-value>true</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >       </filter>
>>> >> > >> >
>>> >> > >> >       <filter-mapping>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > <url-pattern>/*</url-pattern>
>>> >> > >> >       </filter-mapping>
>>> >> > >> >
>>> >> > >> >   <welcome-file-list>
>>> >> > >> >
>>> >> > <welcome-file>index.jsp</welcome-file>
>>> >> > >> >   </welcome-file-list>
>>> >> > >> > </web-app>
>>> >> > >> >
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > This file works well with another Struts2.1.3
>>> >> > app.  Can
>>> >> > >> > someone help me
>>> >> > >> > understand where to look for the cause of
>>> >> > this???
>>> >> > >> >
>>> >> > >> > Thanks folks
>>> >> > >>
>>> >> > >>
>>> >> > ---------------------------------------------------------------------
>>> >> > >> To unsubscribe, e-mail:
>>> >> > user-unsubscribe@struts.apache.org
>>> >> > >> For additional commands, e-mail:
>>> >> > user-help@struts.apache.org
>>> >> > >>
>>> >> > >>
>>> >> > >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
>

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


Re: There is no Action mapped for namespace / and action name ...

Posted by Stephan Schröder <si...@gmx.de>.
> If you are using trunk
not sure what you mean. you mean whether i use a new version from svn trunk?

I found the root of the problem. Struts doens't find my struts.xml file
(which includes my other files).
The XmlConfigurationProvider.loadConfigurationFiles(String fileName, Element
includeElement) calls ClassLoaderUtil.getRessources(
"struts.xml",XmlConfigurationProvider.class,false ) which returns an empty
Iterator<URL>.
There has to be a problem with the classloader. (It is called inside
getRessources.) I reinstalled Java, this time using synaptic instead of just
downloading it to a direrectory and wiring it inside Eclipse, but that
didn't help either. (Changing from sun1.6.07 to sun1.6.06 to 1.5.0gcj).
The strange thing is that deploying the war-file directly in tomcat works
(which uses 1.6.06). Only importing it in eclipse and deploying it from
there raises the exception.

Any ideas?

/Stephan


Musachy Barroso wrote:
> 
> If you are using trunk I would suggest to use the new filters, I also had
> some trouble using the "old" fillter, this is what I have in my web.xml
> and
> everything seems to work fine:
> 
>   <filter>
>         <filter-name>struts-prepare</filter-name>
> 
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
>     </filter>
>     <filter>
>         <filter-name>struts-execute</filter-name>
> 
> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
>     </filter>
>     <filter>
>         <filter-name>sitemesh</filter-name>
> 
> <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
>     </filter>
>     <filter-mapping>
>         <filter-name>struts-prepare</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <filter-mapping>
>         <filter-name>sitemesh</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
>     <filter-mapping>
>         <filter-name>struts-execute</filter-name>
>         <url-pattern>/*</url-pattern>
>     </filter-mapping>
> 
> musachy
> 
> On Sat, Aug 30, 2008 at 9:24 AM, Stephan Schröder <si...@gmx.de>
> wrote:
> 
>>
>> no, deleting the namespace-attribute on the package didn't work for me.
>>
>> I did a little debugging and i got this far: The Dispatcher init-method
>> invokes initTraditionalXMLConfigurations(). I think this is the place
>> where
>> all my namespace files (i got one for every package. they are included in
>> struts.xml) should be converted to Configuration instances, right?
>> The problem seems to be that initParams.get("config"); returns null and
>> therefore only default files (struts.xml,struts-default.xml and
>> struts-plugin.xml) are included. initParams is given to the depatcher via
>> a
>> constructor argument. So i'm not sure where it is initiated? I'm going to
>> check FilterDispatcher now but it's all a little bitte messy. So if you
>> know
>> where to look, please give me a hint.
>>
>> /Stephan
>>
>>
>> simson wrote:
>> >
>> > I had the same problem and the indication on the following link helped
>> me:
>> >
>> > http://www.roseindia.net/tutorialhelp/comment/58280
>> > regards,
>> > Simson
>> >
>> >
>> >
>> > Stephan Schröder wrote:
>> >>
>> >> having the same problem:
>> >> i use Struts2.0.11.2. and tomcat 6.0.16.
>> >> On my Windows desktop everything works fine. I exported the project as
>> >> war and imported it on my Linux laptop (so i can work a little bit in
>> my
>> >> hollidays).
>> >> But on the Linux laptop i only get a
>> >> "There is no Action mapped for action name index.".
>> >> My xml-files are UTF-8 coded on both machines so i have no idea where
>> the
>> >> problem is rooted in.
>> >> I'm using JRE1.6.0_07 on both machines, setting the compliance level
>> to
>> >> 1.5 didn't change anything. The tomcat startup shows no problems
>> either.
>> >>
>> >> What libraries did you change?
>> >>
>> >> /Stephan
>> >>
>> >>
>> >> John Moose wrote:
>> >>>
>> >>> re-ordered the libraries and builders, forced JDK compiler compliance
>> to
>> >>> 5.0
>> >>> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
>> >>> *really* thought it was a Struts2 problem  ; )
>> >>>
>> >>> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com>
>> wrote:
>> >>>
>> >>>> A very wierd situation...I have two projects in the Eclipse
>> workspace
>> >>>> --
>> >>>> Tagging and Dashbd  They both use the REST plugin and follow the
>> naming
>> >>>> conventions, etc. Tagging will build, re-deploy and run perfectly.
>> When
>> >>>> I
>> >>>> close that project and open Dashbd, build, re-deploy and run I get
>> the
>> >>>> Action mapping failure as described. Both projects have source files
>> in
>> >>>> the
>> >>>> "com.myeclipse.ozone" package name(space). Is it possible that there
>> is
>> >>>> some
>> >>>> very persistent caching going on ??? like over multiple starts and
>> >>>> re-starts
>> >>>> of Tomcat?  just a WAG...
>> >>>>
>> >>>> -John
>> >>>>
>> >>>>
>> >>>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>> >>>> savolainen.pauli@gmail.com> wrote:
>> >>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> I am having exactly the same problem. I was using Struts 2.1.1,
>> >>>>> switched to struts 2.1.2 (including the restful and codebehind
>> >>>>> plugins) and started to get this 'no action found' error. I am
>> quite
>> >>>>> confident that I did not do anything that should've resulted in
>> this.
>> >>>>> Of course I cannot be 100% sure, because I did goof around with my
>> >>>>> code a bit, but I checked and rechecked and rerechecked everthing
>> >>>>> twice and couldn't find a reason for this behaviour.
>> >>>>>
>> >>>>> John's web.xml and the stacktrace are identical to mine. I don't
>> >>>>> declare any namespaces in my struts.xml packages nor in the login
>> form
>> >>>>> from which I try to invoke the login action <s:form
>> >>>>> action="/login/execute" method="post">. (Also tried with an
>> >>>>> exclamation mark i.e. login!execute) I have a LoginAction.java with
>> an
>> >>>>> execute method in the pacakge defined in the web.xml's
>> actionPackages
>> >>>>> init parameter. At least this declaration used to send the control
>> to
>> >>>>> the LoginAction's execute method. Doesn't do anymore.
>> >>>>>
>> >>>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>> >>>>> include a tiles main layout which in turn includes sub-layouts
>> (such
>> >>>>> as the login form). I don't know if this has anything got to do
>> with
>> >>>>> the problem I'm having.
>> >>>>>
>> >>>>> So, is a result of something I did wrong or could it be something
>> >>>>> else?
>> >>>>>
>> >>>>> Thank you
>> >>>>>
>> >>>>> Pauli Savolainen
>> >>>>>
>> >>>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>> >>>>> > What's the correct way of writing a good 404 or action not found
>> >>>>> page?
>> >>>>> Does
>> >>>>> > s2 have something like a fallback action if nothing can be found?
>> >>>>> >
>> >>>>> > Paul
>> >>>>> >
>> >>>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <
>> newton.dave@yahoo.com>
>> >>>>> wrote:
>> >>>>> >
>> >>>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a
>> >>>>> week
>> >>>>> or so
>> >>>>> >> ago that I haven't had time to re-visit--so it actually could be
>> >>>>> the
>> >>>>> web.xml
>> >>>>> >> (specifically the dispatcher being used) and I may have put my
>> foot
>> >>>>> in
>> >>>>> my
>> >>>>> >> mouth (again).
>> >>>>> >>
>> >>>>> >> Somebody followed up saying the original FilterDispatcher
>> worked,
>> >>>>> though,
>> >>>>> >> so maybe not. Hrm.
>> >>>>> >>
>> >>>>> >> Dave
>> >>>>> >>
>> >>>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>> >>>>> >> > and I probably should have included this as well:
>> >>>>> >> >
>> >>>>> >> > Struts Problem Report
>> >>>>> >> >
>> >>>>> >> > Struts has detected an unhandled exception:
>> >>>>> >> >   *Messages*:
>> >>>>> >> > There is no Action mapped for namespace / and action name
>> >>>>> >> > dashbd.
>> >>>>> >> >  ------------------------------
>> >>>>> >> > Stacktraces *There is no Action mapped for namespace / and
>> >>>>> >> > action name
>> >>>>> >> > dashbd. - [unknown location]*
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>>
>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>>
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>> >>>>> >> >     java.lang.Thread.run(Thread.java:595)
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >> >
>> >>>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>> >>>>> >> > <jg...@gmail.com> wrote:
>> >>>>> >> >
>> >>>>> >> > > Hi Dave,
>> >>>>> >> > >
>> >>>>> >> > > I have the following snippet of DashbdController class
>> >>>>> >> > that I am expecting
>> >>>>> >> > > to hit with the following URL:
>> >>>>> >> > >
>> >>>>> >> > > http:/localhost:8080/Dashbd
>> >>>>> >> > >
>> >>>>> >> > > <---SNIPPET
>> >>>>> >> > >
>> >>>>> >> > > package com.myeclipse.ozone;
>> >>>>> >> > >
>> >>>>> >> > > import java.util.Collection;
>> >>>>> >> > >
>> >>>>> >> > > import com.myeclipse.hibernate.*;
>> >>>>> >> > >
>> >>>>> >> > > import org.hibernate.HibernateException;
>> >>>>> >> > > import org.hibernate.Session;
>> >>>>> >> > > import org.hibernate.cfg.Configuration;
>> >>>>> >> > >
>> >>>>> >> > > import org.apache.struts2.config.Result;
>> >>>>> >> > > import org.apache.struts2.config.Results;
>> >>>>> >> > > import
>> >>>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>> >>>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>> >>>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>> >>>>> >> > >
>> >>>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>> >>>>> >> > > import com.opensymphony.xwork2.Validateable;
>> >>>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > > @Results({
>> >>>>> >> > >     @Result(name="success",
>> >>>>> >> > type=ServletActionRedirectResult.class,
>> >>>>> >> > > value="dashbd")
>> >>>>> >> > > })
>> >>>>> >> > >
>> >>>>> >> > > public class DashbdController extends
>> >>>>> >> > ValidationAwareSupport implements
>> >>>>> >> > > ModelDriven, Validateable{
>> >>>>> >> > >
>> >>>>> >> > >    //private static Gadget    transientGadget = new
>> >>>>> >> > Gadget();
>> >>>>> >> > >
>> >>>>> >> > >     //String id;
>> >>>>> >> > >     int id;
>> >>>>> >> > >
>> >>>>> >> > >     private static int    dashboardId;
>> >>>>> >> > >
>> >>>>> >> > >     private Collection<Dashbd>
>> >>>>> >> > dashboardList;
>> >>>>> >> > >     private Collection<Dashbd>     model;
>> >>>>> >> > >     private Collection<DashbdType>
>> >>>>> >> > dashboardTypeList;
>> >>>>> >> > >
>> >>>>> >> > >     private DashbdService dashboardService = new
>> >>>>> >> > DashbdService();  // where
>> >>>>> >> > > the DAOs live
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > >     /*
>> >>>>> >> > >
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> ****************************************************************************************
>> >>>>> >> > >      *             DASHBOARDS
>> >>>>> >> > >      */
>> >>>>> >> > >
>> >>>>> >> > >     //
>> >>>>> >> > >     // GET .../dashbd                 get all
>> >>>>> >> > dashboards in table
>> >>>>> >> > >     //
>> >>>>> >> > >     public HttpHeaders index() {
>> >>>>> >> > >         dashboardList = dashboardService.getAll();
>> >>>>> >> > >         return new
>> >>>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>> >>>>> >> > >             .disableCaching();
>> >>>>> >> > >     }
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > > and etc. ....
>> >>>>> >> > >
>> >>>>> >> > > ...END SNIPPET >
>> >>>>> >> > >
>> >>>>> >> > > There are more methods in this calss of course, but
>> >>>>> >> > all I'm trying to do
>> >>>>> >> > > initially is hit the index() action with the URL above
>> >>>>> >> > ?!?
>> >>>>> >> > >
>> >>>>> >> > > the index.jsp is really simple:
>> >>>>> >> > >
>> >>>>> >> > > <% response.sendRedirect("dashbd"); %>
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > > this same scheme works perfectly with another RESTful
>> >>>>> >> > app service and fir
>> >>>>> >> > > the life of me, I can't find any
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > >
>> >>>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>> >>>>> >> > <ne...@yahoo.com>wrote:
>> >>>>> >> > >
>> >>>>> >> > >> The web.xml doesn't have anything to do with
>> >>>>> >> > the error message; it thinks
>> >>>>> >> > >> there isn't an action configured at the URL
>> >>>>> >> > you're requesting.
>> >>>>> >> > >>
>> >>>>> >> > >> Impossible to help without more information.
>> >>>>> >> > >>
>> >>>>> >> > >> Dave
>> >>>>> >> > >>
>> >>>>> >> > >> --- On Mon, 7/28/08, John Moose
>> >>>>> >> > <jg...@gmail.com> wrote:
>> >>>>> >> > >>
>> >>>>> >> > >> > From: John Moose <jg...@gmail.com>
>> >>>>> >> > >> > Subject: There is no Action mapped for
>> >>>>> >> > namespace / and action name ...
>> >>>>> >> > >> > To: "Struts Users Mailing List"
>> >>>>> >> > <us...@struts.apache.org>
>> >>>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>> >>>>> >> > >> > I know what you're thinking... web.xml
>> >>>>> >> > has no action
>> >>>>> >> > >> > mapping, but it does!
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > >> > <?xml version="1.0"
>> >>>>> >> > >> > encoding="UTF-8"?>
>> >>>>> >> > >> > <web-app version="2.5"
>> >>>>> >> > >> >
>> >>>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> >>>>> >> > >> >
>> >>>>> >> > >> >     <display-name>Struts 2 RESTful
>> >>>>> >> > Ozone
>> >>>>> >> > >> > Services</display-name>
>> >>>>> >> > >> >
>> >>>>> >> > >> >   <!-- Filters -->
>> >>>>> >> > >> >       <filter>
>> >>>>> >> > >> >
>> >>>>> >> > <filter-name>action2</filter-name>
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > >>
>> >>>>> >> >
>> >>>>> >>
>> >>>>>
>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>> >>>>> >> > >> >           <init-param>
> 
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > <param-name>actionPackages</param-name>
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > <param-value>com.myeclipse.ozone</param-value>
>> >>>>> >> > >> >           </init-param>
>> >>>>> >> > >> >           <init-param>
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > <param-name>struts.devMode</param-name>
>> >>>>> >> > >> >
>> >>>>> >> > <param-value>true</param-value>
>> >>>>> >> > >> >           </init-param>
>> >>>>> >> > >> >       </filter>
>> >>>>> >> > >> >
>> >>>>> >> > >> >       <filter-mapping>
>> >>>>> >> > >> >
>> >>>>> >> > <filter-name>action2</filter-name>
>> >>>>> >> > >> >
>> >>>>> >> > <url-pattern>/*</url-pattern>
>> >>>>> >> > >> >       </filter-mapping>
>> >>>>> >> > >> >
>> >>>>> >> > >> >   <welcome-file-list>
>> >>>>> >> > >> >
>> >>>>> >> > <welcome-file>index.jsp</welcome-file>
>> >>>>> >> > >> >   </welcome-file-list>
>> >>>>> >> > >> > </web-app>
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > >> >
>> >>>>> >> > >> > This file works well with another Struts2.1.3
>> >>>>> >> > app.  Can
>> >>>>> >> > >> > someone help me
>> >>>>> >> > >> > understand where to look for the cause of
>> >>>>> >> > this???
>> >>>>> >> > >> >
>> >>>>> >> > >> > Thanks folks
>> >>>>> >> > >>
>> >>>>> >> > >>
>> >>>>> >> >
>> >>>>>
>> ---------------------------------------------------------------------
>> >>>>> >> > >> To unsubscribe, e-mail:
>> >>>>> >> > user-unsubscribe@struts.apache.org
>> >>>>> >> > >> For additional commands, e-mail:
>> >>>>> >> > user-help@struts.apache.org
>> >>>>> >> > >>
>> >>>>> >> > >>
>> >>>>> >> > >
>> >>>>> >>
>> >>>>> >>
>> >>>>>
>> ---------------------------------------------------------------------
>> >>>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >>>>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>>>> >>
>> >>>>> >>
>> >>>>> >
>> >>>>>
>> >>>>>
>> ---------------------------------------------------------------------
>> >>>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19233346.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
>>
>>
> 
> 
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> 

-- 
View this message in context: http://www.nabble.com/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19235498.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: There is no Action mapped for namespace / and action name ...

Posted by Musachy Barroso <mu...@gmail.com>.
If you are using trunk I would suggest to use the new filters, I also had
some trouble using the "old" fillter, this is what I have in my web.xml and
everything seems to work fine:

  <filter>
        <filter-name>struts-prepare</filter-name>

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter</filter-class>
    </filter>
    <filter>
        <filter-name>struts-execute</filter-name>

<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter</filter-class>
    </filter>
    <filter>
        <filter-name>sitemesh</filter-name>

<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts-prepare</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>sitemesh</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
        <filter-name>struts-execute</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

musachy

On Sat, Aug 30, 2008 at 9:24 AM, Stephan Schröder <si...@gmx.de> wrote:

>
> no, deleting the namespace-attribute on the package didn't work for me.
>
> I did a little debugging and i got this far: The Dispatcher init-method
> invokes initTraditionalXMLConfigurations(). I think this is the place where
> all my namespace files (i got one for every package. they are included in
> struts.xml) should be converted to Configuration instances, right?
> The problem seems to be that initParams.get("config"); returns null and
> therefore only default files (struts.xml,struts-default.xml and
> struts-plugin.xml) are included. initParams is given to the depatcher via a
> constructor argument. So i'm not sure where it is initiated? I'm going to
> check FilterDispatcher now but it's all a little bitte messy. So if you
> know
> where to look, please give me a hint.
>
> /Stephan
>
>
> simson wrote:
> >
> > I had the same problem and the indication on the following link helped
> me:
> >
> > http://www.roseindia.net/tutorialhelp/comment/58280
> > regards,
> > Simson
> >
> >
> >
> > Stephan Schröder wrote:
> >>
> >> having the same problem:
> >> i use Struts2.0.11.2. and tomcat 6.0.16.
> >> On my Windows desktop everything works fine. I exported the project as
> >> war and imported it on my Linux laptop (so i can work a little bit in my
> >> hollidays).
> >> But on the Linux laptop i only get a
> >> "There is no Action mapped for action name index.".
> >> My xml-files are UTF-8 coded on both machines so i have no idea where
> the
> >> problem is rooted in.
> >> I'm using JRE1.6.0_07 on both machines, setting the compliance level to
> >> 1.5 didn't change anything. The tomcat startup shows no problems either.
> >>
> >> What libraries did you change?
> >>
> >> /Stephan
> >>
> >>
> >> John Moose wrote:
> >>>
> >>> re-ordered the libraries and builders, forced JDK compiler compliance
> to
> >>> 5.0
> >>> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
> >>> *really* thought it was a Struts2 problem  ; )
> >>>
> >>> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
> >>>
> >>>> A very wierd situation...I have two projects in the Eclipse workspace
> >>>> --
> >>>> Tagging and Dashbd  They both use the REST plugin and follow the
> naming
> >>>> conventions, etc. Tagging will build, re-deploy and run perfectly.
> When
> >>>> I
> >>>> close that project and open Dashbd, build, re-deploy and run I get the
> >>>> Action mapping failure as described. Both projects have source files
> in
> >>>> the
> >>>> "com.myeclipse.ozone" package name(space). Is it possible that there
> is
> >>>> some
> >>>> very persistent caching going on ??? like over multiple starts and
> >>>> re-starts
> >>>> of Tomcat?  just a WAG...
> >>>>
> >>>> -John
> >>>>
> >>>>
> >>>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
> >>>> savolainen.pauli@gmail.com> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> I am having exactly the same problem. I was using Struts 2.1.1,
> >>>>> switched to struts 2.1.2 (including the restful and codebehind
> >>>>> plugins) and started to get this 'no action found' error. I am quite
> >>>>> confident that I did not do anything that should've resulted in this.
> >>>>> Of course I cannot be 100% sure, because I did goof around with my
> >>>>> code a bit, but I checked and rechecked and rerechecked everthing
> >>>>> twice and couldn't find a reason for this behaviour.
> >>>>>
> >>>>> John's web.xml and the stacktrace are identical to mine. I don't
> >>>>> declare any namespaces in my struts.xml packages nor in the login
> form
> >>>>> from which I try to invoke the login action <s:form
> >>>>> action="/login/execute" method="post">. (Also tried with an
> >>>>> exclamation mark i.e. login!execute) I have a LoginAction.java with
> an
> >>>>> execute method in the pacakge defined in the web.xml's actionPackages
> >>>>> init parameter. At least this declaration used to send the control to
> >>>>> the LoginAction's execute method. Doesn't do anymore.
> >>>>>
> >>>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
> >>>>> include a tiles main layout which in turn includes sub-layouts (such
> >>>>> as the login form). I don't know if this has anything got to do with
> >>>>> the problem I'm having.
> >>>>>
> >>>>> So, is a result of something I did wrong or could it be something
> >>>>> else?
> >>>>>
> >>>>> Thank you
> >>>>>
> >>>>> Pauli Savolainen
> >>>>>
> >>>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
> >>>>> > What's the correct way of writing a good 404 or action not found
> >>>>> page?
> >>>>> Does
> >>>>> > s2 have something like a fallback action if nothing can be found?
> >>>>> >
> >>>>> > Paul
> >>>>> >
> >>>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <
> newton.dave@yahoo.com>
> >>>>> wrote:
> >>>>> >
> >>>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a
> >>>>> week
> >>>>> or so
> >>>>> >> ago that I haven't had time to re-visit--so it actually could be
> >>>>> the
> >>>>> web.xml
> >>>>> >> (specifically the dispatcher being used) and I may have put my
> foot
> >>>>> in
> >>>>> my
> >>>>> >> mouth (again).
> >>>>> >>
> >>>>> >> Somebody followed up saying the original FilterDispatcher worked,
> >>>>> though,
> >>>>> >> so maybe not. Hrm.
> >>>>> >>
> >>>>> >> Dave
> >>>>> >>
> >>>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
> >>>>> >> > and I probably should have included this as well:
> >>>>> >> >
> >>>>> >> > Struts Problem Report
> >>>>> >> >
> >>>>> >> > Struts has detected an unhandled exception:
> >>>>> >> >   *Messages*:
> >>>>> >> > There is no Action mapped for namespace / and action name
> >>>>> >> > dashbd.
> >>>>> >> >  ------------------------------
> >>>>> >> > Stacktraces *There is no Action mapped for namespace / and
> >>>>> >> > action name
> >>>>> >> > dashbd. - [unknown location]*
> >>>>> >> >
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >>>>> >> >
> >>>>> >> >
> >>>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >>>>> >> >
> >>>>> >> >
> >>>>>
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >>>>> >> >
> >>>>> >> >
> >>>>> >>
> >>>>>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >>>>> >> >     java.lang.Thread.run(Thread.java:595)
> >>>>> >> >
> >>>>> >> >
> >>>>> >> >
> >>>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> >>>>> >> > <jg...@gmail.com> wrote:
> >>>>> >> >
> >>>>> >> > > Hi Dave,
> >>>>> >> > >
> >>>>> >> > > I have the following snippet of DashbdController class
> >>>>> >> > that I am expecting
> >>>>> >> > > to hit with the following URL:
> >>>>> >> > >
> >>>>> >> > > http:/localhost:8080/Dashbd
> >>>>> >> > >
> >>>>> >> > > <---SNIPPET
> >>>>> >> > >
> >>>>> >> > > package com.myeclipse.ozone;
> >>>>> >> > >
> >>>>> >> > > import java.util.Collection;
> >>>>> >> > >
> >>>>> >> > > import com.myeclipse.hibernate.*;
> >>>>> >> > >
> >>>>> >> > > import org.hibernate.HibernateException;
> >>>>> >> > > import org.hibernate.Session;
> >>>>> >> > > import org.hibernate.cfg.Configuration;
> >>>>> >> > >
> >>>>> >> > > import org.apache.struts2.config.Result;
> >>>>> >> > > import org.apache.struts2.config.Results;
> >>>>> >> > > import
> >>>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
> >>>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
> >>>>> >> > > import org.apache.struts2.rest.HttpHeaders;
> >>>>> >> > >
> >>>>> >> > > import com.opensymphony.xwork2.ModelDriven;
> >>>>> >> > > import com.opensymphony.xwork2.Validateable;
> >>>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > > @Results({
> >>>>> >> > >     @Result(name="success",
> >>>>> >> > type=ServletActionRedirectResult.class,
> >>>>> >> > > value="dashbd")
> >>>>> >> > > })
> >>>>> >> > >
> >>>>> >> > > public class DashbdController extends
> >>>>> >> > ValidationAwareSupport implements
> >>>>> >> > > ModelDriven, Validateable{
> >>>>> >> > >
> >>>>> >> > >    //private static Gadget    transientGadget = new
> >>>>> >> > Gadget();
> >>>>> >> > >
> >>>>> >> > >     //String id;
> >>>>> >> > >     int id;
> >>>>> >> > >
> >>>>> >> > >     private static int    dashboardId;
> >>>>> >> > >
> >>>>> >> > >     private Collection<Dashbd>
> >>>>> >> > dashboardList;
> >>>>> >> > >     private Collection<Dashbd>     model;
> >>>>> >> > >     private Collection<DashbdType>
> >>>>> >> > dashboardTypeList;
> >>>>> >> > >
> >>>>> >> > >     private DashbdService dashboardService = new
> >>>>> >> > DashbdService();  // where
> >>>>> >> > > the DAOs live
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > >     /*
> >>>>> >> > >
> >>>>> >> >
> >>>>> >>
> >>>>>
> ****************************************************************************************
> >>>>> >> > >      *             DASHBOARDS
> >>>>> >> > >      */
> >>>>> >> > >
> >>>>> >> > >     //
> >>>>> >> > >     // GET .../dashbd                 get all
> >>>>> >> > dashboards in table
> >>>>> >> > >     //
> >>>>> >> > >     public HttpHeaders index() {
> >>>>> >> > >         dashboardList = dashboardService.getAll();
> >>>>> >> > >         return new
> >>>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
> >>>>> >> > >             .disableCaching();
> >>>>> >> > >     }
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > > and etc. ....
> >>>>> >> > >
> >>>>> >> > > ...END SNIPPET >
> >>>>> >> > >
> >>>>> >> > > There are more methods in this calss of course, but
> >>>>> >> > all I'm trying to do
> >>>>> >> > > initially is hit the index() action with the URL above
> >>>>> >> > ?!?
> >>>>> >> > >
> >>>>> >> > > the index.jsp is really simple:
> >>>>> >> > >
> >>>>> >> > > <% response.sendRedirect("dashbd"); %>
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > > this same scheme works perfectly with another RESTful
> >>>>> >> > app service and fir
> >>>>> >> > > the life of me, I can't find any
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > >
> >>>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> >>>>> >> > <ne...@yahoo.com>wrote:
> >>>>> >> > >
> >>>>> >> > >> The web.xml doesn't have anything to do with
> >>>>> >> > the error message; it thinks
> >>>>> >> > >> there isn't an action configured at the URL
> >>>>> >> > you're requesting.
> >>>>> >> > >>
> >>>>> >> > >> Impossible to help without more information.
> >>>>> >> > >>
> >>>>> >> > >> Dave
> >>>>> >> > >>
> >>>>> >> > >> --- On Mon, 7/28/08, John Moose
> >>>>> >> > <jg...@gmail.com> wrote:
> >>>>> >> > >>
> >>>>> >> > >> > From: John Moose <jg...@gmail.com>
> >>>>> >> > >> > Subject: There is no Action mapped for
> >>>>> >> > namespace / and action name ...
> >>>>> >> > >> > To: "Struts Users Mailing List"
> >>>>> >> > <us...@struts.apache.org>
> >>>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
> >>>>> >> > >> > I know what you're thinking... web.xml
> >>>>> >> > has no action
> >>>>> >> > >> > mapping, but it does!
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > >> > <?xml version="1.0"
> >>>>> >> > >> > encoding="UTF-8"?>
> >>>>> >> > >> > <web-app version="2.5"
> >>>>> >> > >> >
> >>>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >>>>> >> > >> >
> >>>>> >> > >> >     <display-name>Struts 2 RESTful
> >>>>> >> > Ozone
> >>>>> >> > >> > Services</display-name>
> >>>>> >> > >> >
> >>>>> >> > >> >   <!-- Filters -->
> >>>>> >> > >> >       <filter>
> >>>>> >> > >> >
> >>>>> >> > <filter-name>action2</filter-name>
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > >>
> >>>>> >> >
> >>>>> >>
> >>>>>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >>>>> >> > >> >           <init-param>
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > <param-name>actionPackages</param-name>
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > <param-value>com.myeclipse.ozone</param-value>
> >>>>> >> > >> >           </init-param>
> >>>>> >> > >> >           <init-param>
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > <param-name>struts.devMode</param-name>
> >>>>> >> > >> >
> >>>>> >> > <param-value>true</param-value>
> >>>>> >> > >> >           </init-param>
> >>>>> >> > >> >       </filter>
> >>>>> >> > >> >
> >>>>> >> > >> >       <filter-mapping>
> >>>>> >> > >> >
> >>>>> >> > <filter-name>action2</filter-name>
> >>>>> >> > >> >
> >>>>> >> > <url-pattern>/*</url-pattern>
> >>>>> >> > >> >       </filter-mapping>
> >>>>> >> > >> >
> >>>>> >> > >> >   <welcome-file-list>
> >>>>> >> > >> >
> >>>>> >> > <welcome-file>index.jsp</welcome-file>
> >>>>> >> > >> >   </welcome-file-list>
> >>>>> >> > >> > </web-app>
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > >> >
> >>>>> >> > >> > This file works well with another Struts2.1.3
> >>>>> >> > app.  Can
> >>>>> >> > >> > someone help me
> >>>>> >> > >> > understand where to look for the cause of
> >>>>> >> > this???
> >>>>> >> > >> >
> >>>>> >> > >> > Thanks folks
> >>>>> >> > >>
> >>>>> >> > >>
> >>>>> >> >
> >>>>> ---------------------------------------------------------------------
> >>>>> >> > >> To unsubscribe, e-mail:
> >>>>> >> > user-unsubscribe@struts.apache.org
> >>>>> >> > >> For additional commands, e-mail:
> >>>>> >> > user-help@struts.apache.org
> >>>>> >> > >>
> >>>>> >> > >>
> >>>>> >> > >
> >>>>> >>
> >>>>> >>
> >>>>> ---------------------------------------------------------------------
> >>>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >>>>> >> For additional commands, e-mail: user-help@struts.apache.org
> >>>>> >>
> >>>>> >>
> >>>>> >
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19233346.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
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: There is no Action mapped for namespace / and action name ...

Posted by Stephan Schröder <si...@gmx.de>.
no, deleting the namespace-attribute on the package didn't work for me.

I did a little debugging and i got this far: The Dispatcher init-method
invokes initTraditionalXMLConfigurations(). I think this is the place where
all my namespace files (i got one for every package. they are included in
struts.xml) should be converted to Configuration instances, right?
The problem seems to be that initParams.get("config"); returns null and
therefore only default files (struts.xml,struts-default.xml and
struts-plugin.xml) are included. initParams is given to the depatcher via a
constructor argument. So i'm not sure where it is initiated? I'm going to
check FilterDispatcher now but it's all a little bitte messy. So if you know
where to look, please give me a hint.

/Stephan


simson wrote:
> 
> I had the same problem and the indication on the following link helped me:
> 
> http://www.roseindia.net/tutorialhelp/comment/58280
> regards,
> Simson
> 
> 
> 
> Stephan Schröder wrote:
>> 
>> having the same problem:
>> i use Struts2.0.11.2. and tomcat 6.0.16.
>> On my Windows desktop everything works fine. I exported the project as
>> war and imported it on my Linux laptop (so i can work a little bit in my
>> hollidays). 
>> But on the Linux laptop i only get a
>> "There is no Action mapped for action name index.".
>> My xml-files are UTF-8 coded on both machines so i have no idea where the
>> problem is rooted in.
>> I'm using JRE1.6.0_07 on both machines, setting the compliance level to
>> 1.5 didn't change anything. The tomcat startup shows no problems either.
>> 
>> What libraries did you change?
>> 
>> /Stephan
>> 
>> 
>> John Moose wrote:
>>> 
>>> re-ordered the libraries and builders, forced JDK compiler compliance to
>>> 5.0
>>> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
>>> *really* thought it was a Struts2 problem  ; )
>>> 
>>> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
>>> 
>>>> A very wierd situation...I have two projects in the Eclipse workspace
>>>> --
>>>> Tagging and Dashbd  They both use the REST plugin and follow the naming
>>>> conventions, etc. Tagging will build, re-deploy and run perfectly. When
>>>> I
>>>> close that project and open Dashbd, build, re-deploy and run I get the
>>>> Action mapping failure as described. Both projects have source files in
>>>> the
>>>> "com.myeclipse.ozone" package name(space). Is it possible that there is
>>>> some
>>>> very persistent caching going on ??? like over multiple starts and
>>>> re-starts
>>>> of Tomcat?  just a WAG...
>>>>
>>>> -John
>>>>
>>>>
>>>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>>>> savolainen.pauli@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I am having exactly the same problem. I was using Struts 2.1.1,
>>>>> switched to struts 2.1.2 (including the restful and codebehind
>>>>> plugins) and started to get this 'no action found' error. I am quite
>>>>> confident that I did not do anything that should've resulted in this.
>>>>> Of course I cannot be 100% sure, because I did goof around with my
>>>>> code a bit, but I checked and rechecked and rerechecked everthing
>>>>> twice and couldn't find a reason for this behaviour.
>>>>>
>>>>> John's web.xml and the stacktrace are identical to mine. I don't
>>>>> declare any namespaces in my struts.xml packages nor in the login form
>>>>> from which I try to invoke the login action <s:form
>>>>> action="/login/execute" method="post">. (Also tried with an
>>>>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>>>>> execute method in the pacakge defined in the web.xml's actionPackages
>>>>> init parameter. At least this declaration used to send the control to
>>>>> the LoginAction's execute method. Doesn't do anymore.
>>>>>
>>>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>>>>> include a tiles main layout which in turn includes sub-layouts (such
>>>>> as the login form). I don't know if this has anything got to do with
>>>>> the problem I'm having.
>>>>>
>>>>> So, is a result of something I did wrong or could it be something
>>>>> else?
>>>>>
>>>>> Thank you
>>>>>
>>>>> Pauli Savolainen
>>>>>
>>>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>>>>> > What's the correct way of writing a good 404 or action not found
>>>>> page?
>>>>> Does
>>>>> > s2 have something like a fallback action if nothing can be found?
>>>>> >
>>>>> > Paul
>>>>> >
>>>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>>>>> wrote:
>>>>> >
>>>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a
>>>>> week
>>>>> or so
>>>>> >> ago that I haven't had time to re-visit--so it actually could be
>>>>> the
>>>>> web.xml
>>>>> >> (specifically the dispatcher being used) and I may have put my foot
>>>>> in
>>>>> my
>>>>> >> mouth (again).
>>>>> >>
>>>>> >> Somebody followed up saying the original FilterDispatcher worked,
>>>>> though,
>>>>> >> so maybe not. Hrm.
>>>>> >>
>>>>> >> Dave
>>>>> >>
>>>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>>>> >> > and I probably should have included this as well:
>>>>> >> >
>>>>> >> > Struts Problem Report
>>>>> >> >
>>>>> >> > Struts has detected an unhandled exception:
>>>>> >> >   *Messages*:
>>>>> >> > There is no Action mapped for namespace / and action name
>>>>> >> > dashbd.
>>>>> >> >  ------------------------------
>>>>> >> > Stacktraces *There is no Action mapped for namespace / and
>>>>> >> > action name
>>>>> >> > dashbd. - [unknown location]*
>>>>> >> >
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>>> >> >
>>>>> >> >
>>>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>>>> >> >
>>>>> >> >
>>>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>>>> >> >
>>>>> >> >
>>>>> >>
>>>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>>>> >> >     java.lang.Thread.run(Thread.java:595)
>>>>> >> >
>>>>> >> >
>>>>> >> >
>>>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>>>>> >> > <jg...@gmail.com> wrote:
>>>>> >> >
>>>>> >> > > Hi Dave,
>>>>> >> > >
>>>>> >> > > I have the following snippet of DashbdController class
>>>>> >> > that I am expecting
>>>>> >> > > to hit with the following URL:
>>>>> >> > >
>>>>> >> > > http:/localhost:8080/Dashbd
>>>>> >> > >
>>>>> >> > > <---SNIPPET
>>>>> >> > >
>>>>> >> > > package com.myeclipse.ozone;
>>>>> >> > >
>>>>> >> > > import java.util.Collection;
>>>>> >> > >
>>>>> >> > > import com.myeclipse.hibernate.*;
>>>>> >> > >
>>>>> >> > > import org.hibernate.HibernateException;
>>>>> >> > > import org.hibernate.Session;
>>>>> >> > > import org.hibernate.cfg.Configuration;
>>>>> >> > >
>>>>> >> > > import org.apache.struts2.config.Result;
>>>>> >> > > import org.apache.struts2.config.Results;
>>>>> >> > > import
>>>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>>>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>>>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>>>>> >> > >
>>>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>>>>> >> > > import com.opensymphony.xwork2.Validateable;
>>>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > @Results({
>>>>> >> > >     @Result(name="success",
>>>>> >> > type=ServletActionRedirectResult.class,
>>>>> >> > > value="dashbd")
>>>>> >> > > })
>>>>> >> > >
>>>>> >> > > public class DashbdController extends
>>>>> >> > ValidationAwareSupport implements
>>>>> >> > > ModelDriven, Validateable{
>>>>> >> > >
>>>>> >> > >    //private static Gadget    transientGadget = new
>>>>> >> > Gadget();
>>>>> >> > >
>>>>> >> > >     //String id;
>>>>> >> > >     int id;
>>>>> >> > >
>>>>> >> > >     private static int    dashboardId;
>>>>> >> > >
>>>>> >> > >     private Collection<Dashbd>
>>>>> >> > dashboardList;
>>>>> >> > >     private Collection<Dashbd>     model;
>>>>> >> > >     private Collection<DashbdType>
>>>>> >> > dashboardTypeList;
>>>>> >> > >
>>>>> >> > >     private DashbdService dashboardService = new
>>>>> >> > DashbdService();  // where
>>>>> >> > > the DAOs live
>>>>> >> > >
>>>>> >> > >
>>>>> >> > >     /*
>>>>> >> > >
>>>>> >> >
>>>>> >>
>>>>> ****************************************************************************************
>>>>> >> > >      *             DASHBOARDS
>>>>> >> > >      */
>>>>> >> > >
>>>>> >> > >     //
>>>>> >> > >     // GET .../dashbd                 get all
>>>>> >> > dashboards in table
>>>>> >> > >     //
>>>>> >> > >     public HttpHeaders index() {
>>>>> >> > >         dashboardList = dashboardService.getAll();
>>>>> >> > >         return new
>>>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>>>>> >> > >             .disableCaching();
>>>>> >> > >     }
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > and etc. ....
>>>>> >> > >
>>>>> >> > > ...END SNIPPET >
>>>>> >> > >
>>>>> >> > > There are more methods in this calss of course, but
>>>>> >> > all I'm trying to do
>>>>> >> > > initially is hit the index() action with the URL above
>>>>> >> > ?!?
>>>>> >> > >
>>>>> >> > > the index.jsp is really simple:
>>>>> >> > >
>>>>> >> > > <% response.sendRedirect("dashbd"); %>
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > this same scheme works perfectly with another RESTful
>>>>> >> > app service and fir
>>>>> >> > > the life of me, I can't find any
>>>>> >> > >
>>>>> >> > >
>>>>> >> > >
>>>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>>>>> >> > <ne...@yahoo.com>wrote:
>>>>> >> > >
>>>>> >> > >> The web.xml doesn't have anything to do with
>>>>> >> > the error message; it thinks
>>>>> >> > >> there isn't an action configured at the URL
>>>>> >> > you're requesting.
>>>>> >> > >>
>>>>> >> > >> Impossible to help without more information.
>>>>> >> > >>
>>>>> >> > >> Dave
>>>>> >> > >>
>>>>> >> > >> --- On Mon, 7/28/08, John Moose
>>>>> >> > <jg...@gmail.com> wrote:
>>>>> >> > >>
>>>>> >> > >> > From: John Moose <jg...@gmail.com>
>>>>> >> > >> > Subject: There is no Action mapped for
>>>>> >> > namespace / and action name ...
>>>>> >> > >> > To: "Struts Users Mailing List"
>>>>> >> > <us...@struts.apache.org>
>>>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>>>>> >> > >> > I know what you're thinking... web.xml
>>>>> >> > has no action
>>>>> >> > >> > mapping, but it does!
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > >> > <?xml version="1.0"
>>>>> >> > >> > encoding="UTF-8"?>
>>>>> >> > >> > <web-app version="2.5"
>>>>> >> > >> >
>>>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>>>> >> > >> >
>>>>> >> > >> >     <display-name>Struts 2 RESTful
>>>>> >> > Ozone
>>>>> >> > >> > Services</display-name>
>>>>> >> > >> >
>>>>> >> > >> >   <!-- Filters -->
>>>>> >> > >> >       <filter>
>>>>> >> > >> >
>>>>> >> > <filter-name>action2</filter-name>
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > >>
>>>>> >> >
>>>>> >>
>>>>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>>>> >> > >> >           <init-param>
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > <param-name>actionPackages</param-name>
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > <param-value>com.myeclipse.ozone</param-value>
>>>>> >> > >> >           </init-param>
>>>>> >> > >> >           <init-param>
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > <param-name>struts.devMode</param-name>
>>>>> >> > >> >
>>>>> >> > <param-value>true</param-value>
>>>>> >> > >> >           </init-param>
>>>>> >> > >> >       </filter>
>>>>> >> > >> >
>>>>> >> > >> >       <filter-mapping>
>>>>> >> > >> >
>>>>> >> > <filter-name>action2</filter-name>
>>>>> >> > >> >
>>>>> >> > <url-pattern>/*</url-pattern>
>>>>> >> > >> >       </filter-mapping>
>>>>> >> > >> >
>>>>> >> > >> >   <welcome-file-list>
>>>>> >> > >> >
>>>>> >> > <welcome-file>index.jsp</welcome-file>
>>>>> >> > >> >   </welcome-file-list>
>>>>> >> > >> > </web-app>
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > >> >
>>>>> >> > >> > This file works well with another Struts2.1.3
>>>>> >> > app.  Can
>>>>> >> > >> > someone help me
>>>>> >> > >> > understand where to look for the cause of
>>>>> >> > this???
>>>>> >> > >> >
>>>>> >> > >> > Thanks folks
>>>>> >> > >>
>>>>> >> > >>
>>>>> >> >
>>>>> ---------------------------------------------------------------------
>>>>> >> > >> To unsubscribe, e-mail:
>>>>> >> > user-unsubscribe@struts.apache.org
>>>>> >> > >> For additional commands, e-mail:
>>>>> >> > user-help@struts.apache.org
>>>>> >> > >>
>>>>> >> > >>
>>>>> >> > >
>>>>> >>
>>>>> >>
>>>>> ---------------------------------------------------------------------
>>>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>>>> >>
>>>>> >>
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19233346.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: There is no Action mapped for namespace / and action name ...

Posted by simson <dj...@yahoo.fr>.
I had the same problem and the indication on the following link helped me:

http://www.roseindia.net/tutorialhelp/comment/58280
regards,
Simson



Stephan Schröder wrote:
> 
> having the same problem:
> i use Struts2.0.11.2. and tomcat 6.0.16.
> On my Windows desktop everything works fine. I exported the project as war
> and imported it on my Linux laptop (so i can work a little bit in my
> hollidays). 
> But on the Linux laptop i only get a
> "There is no Action mapped for action name index.".
> My xml-files are UTF-8 coded on both machines so i have no idea where the
> problem is rooted in.
> I'm using JRE1.6.0_07 on both machines, setting the compliance level to
> 1.5 didn't change anything. The tomcat startup shows no problems either.
> 
> What libraries did you change?
> 
> /Stephan
> 
> 
> John Moose wrote:
>> 
>> re-ordered the libraries and builders, forced JDK compiler compliance to
>> 5.0
>> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
>> *really* thought it was a Struts2 problem  ; )
>> 
>> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
>> 
>>> A very wierd situation...I have two projects in the Eclipse workspace --
>>> Tagging and Dashbd  They both use the REST plugin and follow the naming
>>> conventions, etc. Tagging will build, re-deploy and run perfectly. When
>>> I
>>> close that project and open Dashbd, build, re-deploy and run I get the
>>> Action mapping failure as described. Both projects have source files in
>>> the
>>> "com.myeclipse.ozone" package name(space). Is it possible that there is
>>> some
>>> very persistent caching going on ??? like over multiple starts and
>>> re-starts
>>> of Tomcat?  just a WAG...
>>>
>>> -John
>>>
>>>
>>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>>> savolainen.pauli@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I am having exactly the same problem. I was using Struts 2.1.1,
>>>> switched to struts 2.1.2 (including the restful and codebehind
>>>> plugins) and started to get this 'no action found' error. I am quite
>>>> confident that I did not do anything that should've resulted in this.
>>>> Of course I cannot be 100% sure, because I did goof around with my
>>>> code a bit, but I checked and rechecked and rerechecked everthing
>>>> twice and couldn't find a reason for this behaviour.
>>>>
>>>> John's web.xml and the stacktrace are identical to mine. I don't
>>>> declare any namespaces in my struts.xml packages nor in the login form
>>>> from which I try to invoke the login action <s:form
>>>> action="/login/execute" method="post">. (Also tried with an
>>>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>>>> execute method in the pacakge defined in the web.xml's actionPackages
>>>> init parameter. At least this declaration used to send the control to
>>>> the LoginAction's execute method. Doesn't do anymore.
>>>>
>>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>>>> include a tiles main layout which in turn includes sub-layouts (such
>>>> as the login form). I don't know if this has anything got to do with
>>>> the problem I'm having.
>>>>
>>>> So, is a result of something I did wrong or could it be something else?
>>>>
>>>> Thank you
>>>>
>>>> Pauli Savolainen
>>>>
>>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>>>> > What's the correct way of writing a good 404 or action not found
>>>> page?
>>>> Does
>>>> > s2 have something like a fallback action if nothing can be found?
>>>> >
>>>> > Paul
>>>> >
>>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>>>> wrote:
>>>> >
>>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a
>>>> week
>>>> or so
>>>> >> ago that I haven't had time to re-visit--so it actually could be the
>>>> web.xml
>>>> >> (specifically the dispatcher being used) and I may have put my foot
>>>> in
>>>> my
>>>> >> mouth (again).
>>>> >>
>>>> >> Somebody followed up saying the original FilterDispatcher worked,
>>>> though,
>>>> >> so maybe not. Hrm.
>>>> >>
>>>> >> Dave
>>>> >>
>>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>>> >> > and I probably should have included this as well:
>>>> >> >
>>>> >> > Struts Problem Report
>>>> >> >
>>>> >> > Struts has detected an unhandled exception:
>>>> >> >   *Messages*:
>>>> >> > There is no Action mapped for namespace / and action name
>>>> >> > dashbd.
>>>> >> >  ------------------------------
>>>> >> > Stacktraces *There is no Action mapped for namespace / and
>>>> >> > action name
>>>> >> > dashbd. - [unknown location]*
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >>
>>>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>>>> >> >
>>>> >> >
>>>> >>
>>>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>>> >> >
>>>> >> >
>>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>>> >> >
>>>> >> >
>>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>>> >> >
>>>> >> >
>>>> >>
>>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>>> >> >     java.lang.Thread.run(Thread.java:595)
>>>> >> >
>>>> >> >
>>>> >> >
>>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>>>> >> > <jg...@gmail.com> wrote:
>>>> >> >
>>>> >> > > Hi Dave,
>>>> >> > >
>>>> >> > > I have the following snippet of DashbdController class
>>>> >> > that I am expecting
>>>> >> > > to hit with the following URL:
>>>> >> > >
>>>> >> > > http:/localhost:8080/Dashbd
>>>> >> > >
>>>> >> > > <---SNIPPET
>>>> >> > >
>>>> >> > > package com.myeclipse.ozone;
>>>> >> > >
>>>> >> > > import java.util.Collection;
>>>> >> > >
>>>> >> > > import com.myeclipse.hibernate.*;
>>>> >> > >
>>>> >> > > import org.hibernate.HibernateException;
>>>> >> > > import org.hibernate.Session;
>>>> >> > > import org.hibernate.cfg.Configuration;
>>>> >> > >
>>>> >> > > import org.apache.struts2.config.Result;
>>>> >> > > import org.apache.struts2.config.Results;
>>>> >> > > import
>>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>>>> >> > >
>>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>>>> >> > > import com.opensymphony.xwork2.Validateable;
>>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>>>> >> > >
>>>> >> > >
>>>> >> > > @Results({
>>>> >> > >     @Result(name="success",
>>>> >> > type=ServletActionRedirectResult.class,
>>>> >> > > value="dashbd")
>>>> >> > > })
>>>> >> > >
>>>> >> > > public class DashbdController extends
>>>> >> > ValidationAwareSupport implements
>>>> >> > > ModelDriven, Validateable{
>>>> >> > >
>>>> >> > >    //private static Gadget    transientGadget = new
>>>> >> > Gadget();
>>>> >> > >
>>>> >> > >     //String id;
>>>> >> > >     int id;
>>>> >> > >
>>>> >> > >     private static int    dashboardId;
>>>> >> > >
>>>> >> > >     private Collection<Dashbd>
>>>> >> > dashboardList;
>>>> >> > >     private Collection<Dashbd>     model;
>>>> >> > >     private Collection<DashbdType>
>>>> >> > dashboardTypeList;
>>>> >> > >
>>>> >> > >     private DashbdService dashboardService = new
>>>> >> > DashbdService();  // where
>>>> >> > > the DAOs live
>>>> >> > >
>>>> >> > >
>>>> >> > >     /*
>>>> >> > >
>>>> >> >
>>>> >>
>>>> ****************************************************************************************
>>>> >> > >      *             DASHBOARDS
>>>> >> > >      */
>>>> >> > >
>>>> >> > >     //
>>>> >> > >     // GET .../dashbd                 get all
>>>> >> > dashboards in table
>>>> >> > >     //
>>>> >> > >     public HttpHeaders index() {
>>>> >> > >         dashboardList = dashboardService.getAll();
>>>> >> > >         return new
>>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>>>> >> > >             .disableCaching();
>>>> >> > >     }
>>>> >> > >
>>>> >> > >
>>>> >> > > and etc. ....
>>>> >> > >
>>>> >> > > ...END SNIPPET >
>>>> >> > >
>>>> >> > > There are more methods in this calss of course, but
>>>> >> > all I'm trying to do
>>>> >> > > initially is hit the index() action with the URL above
>>>> >> > ?!?
>>>> >> > >
>>>> >> > > the index.jsp is really simple:
>>>> >> > >
>>>> >> > > <% response.sendRedirect("dashbd"); %>
>>>> >> > >
>>>> >> > >
>>>> >> > > this same scheme works perfectly with another RESTful
>>>> >> > app service and fir
>>>> >> > > the life of me, I can't find any
>>>> >> > >
>>>> >> > >
>>>> >> > >
>>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>>>> >> > <ne...@yahoo.com>wrote:
>>>> >> > >
>>>> >> > >> The web.xml doesn't have anything to do with
>>>> >> > the error message; it thinks
>>>> >> > >> there isn't an action configured at the URL
>>>> >> > you're requesting.
>>>> >> > >>
>>>> >> > >> Impossible to help without more information.
>>>> >> > >>
>>>> >> > >> Dave
>>>> >> > >>
>>>> >> > >> --- On Mon, 7/28/08, John Moose
>>>> >> > <jg...@gmail.com> wrote:
>>>> >> > >>
>>>> >> > >> > From: John Moose <jg...@gmail.com>
>>>> >> > >> > Subject: There is no Action mapped for
>>>> >> > namespace / and action name ...
>>>> >> > >> > To: "Struts Users Mailing List"
>>>> >> > <us...@struts.apache.org>
>>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>>>> >> > >> > I know what you're thinking... web.xml
>>>> >> > has no action
>>>> >> > >> > mapping, but it does!
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > >> > <?xml version="1.0"
>>>> >> > >> > encoding="UTF-8"?>
>>>> >> > >> > <web-app version="2.5"
>>>> >> > >> >
>>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>>> >> > >> >
>>>> >> > >> >     <display-name>Struts 2 RESTful
>>>> >> > Ozone
>>>> >> > >> > Services</display-name>
>>>> >> > >> >
>>>> >> > >> >   <!-- Filters -->
>>>> >> > >> >       <filter>
>>>> >> > >> >
>>>> >> > <filter-name>action2</filter-name>
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > >>
>>>> >> >
>>>> >>
>>>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>>> >> > >> >           <init-param>
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > <param-name>actionPackages</param-name>
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > <param-value>com.myeclipse.ozone</param-value>
>>>> >> > >> >           </init-param>
>>>> >> > >> >           <init-param>
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > <param-name>struts.devMode</param-name>
>>>> >> > >> >
>>>> >> > <param-value>true</param-value>
>>>> >> > >> >           </init-param>
>>>> >> > >> >       </filter>
>>>> >> > >> >
>>>> >> > >> >       <filter-mapping>
>>>> >> > >> >
>>>> >> > <filter-name>action2</filter-name>
>>>> >> > >> >
>>>> >> > <url-pattern>/*</url-pattern>
>>>> >> > >> >       </filter-mapping>
>>>> >> > >> >
>>>> >> > >> >   <welcome-file-list>
>>>> >> > >> >
>>>> >> > <welcome-file>index.jsp</welcome-file>
>>>> >> > >> >   </welcome-file-list>
>>>> >> > >> > </web-app>
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > >> >
>>>> >> > >> > This file works well with another Struts2.1.3
>>>> >> > app.  Can
>>>> >> > >> > someone help me
>>>> >> > >> > understand where to look for the cause of
>>>> >> > this???
>>>> >> > >> >
>>>> >> > >> > Thanks folks
>>>> >> > >>
>>>> >> > >>
>>>> >> >
>>>> ---------------------------------------------------------------------
>>>> >> > >> To unsubscribe, e-mail:
>>>> >> > user-unsubscribe@struts.apache.org
>>>> >> > >> For additional commands, e-mail:
>>>> >> > user-help@struts.apache.org
>>>> >> > >>
>>>> >> > >>
>>>> >> > >
>>>> >>
>>>> >>
>>>> ---------------------------------------------------------------------
>>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>>> >>
>>>> >>
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19230229.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: There is no Action mapped for namespace / and action name ...

Posted by Stephan Schröder <si...@gmx.de>.
having the same problem:
i use Struts2.0.11.2. and tomcat 6.0.16.
On my Windows desktop everything works fine. I exported the project as war
and imported it on my Linux laptop (so i can work a little bit in my
hollidays). 
But on the Linux laptop i only get a
"There is no Action mapped for action name index.".
My xml-files are UTF-8 coded on both machines so i have no idea where the
problem is rooted in.
I'm using JRE1.6.0_07 on both machines, setting the compliance level to 1.5
didn't change anything. The tomcat startup shows no problems either.

What libraries did you change?

/Stephan


John Moose wrote:
> 
> re-ordered the libraries and builders, forced JDK compiler compliance to
> 5.0
> ( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
> *really* thought it was a Struts2 problem  ; )
> 
> On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:
> 
>> A very wierd situation...I have two projects in the Eclipse workspace --
>> Tagging and Dashbd  They both use the REST plugin and follow the naming
>> conventions, etc. Tagging will build, re-deploy and run perfectly. When I
>> close that project and open Dashbd, build, re-deploy and run I get the
>> Action mapping failure as described. Both projects have source files in
>> the
>> "com.myeclipse.ozone" package name(space). Is it possible that there is
>> some
>> very persistent caching going on ??? like over multiple starts and
>> re-starts
>> of Tomcat?  just a WAG...
>>
>> -John
>>
>>
>> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
>> savolainen.pauli@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I am having exactly the same problem. I was using Struts 2.1.1,
>>> switched to struts 2.1.2 (including the restful and codebehind
>>> plugins) and started to get this 'no action found' error. I am quite
>>> confident that I did not do anything that should've resulted in this.
>>> Of course I cannot be 100% sure, because I did goof around with my
>>> code a bit, but I checked and rechecked and rerechecked everthing
>>> twice and couldn't find a reason for this behaviour.
>>>
>>> John's web.xml and the stacktrace are identical to mine. I don't
>>> declare any namespaces in my struts.xml packages nor in the login form
>>> from which I try to invoke the login action <s:form
>>> action="/login/execute" method="post">. (Also tried with an
>>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>>> execute method in the pacakge defined in the web.xml's actionPackages
>>> init parameter. At least this declaration used to send the control to
>>> the LoginAction's execute method. Doesn't do anymore.
>>>
>>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>>> include a tiles main layout which in turn includes sub-layouts (such
>>> as the login form). I don't know if this has anything got to do with
>>> the problem I'm having.
>>>
>>> So, is a result of something I did wrong or could it be something else?
>>>
>>> Thank you
>>>
>>> Pauli Savolainen
>>>
>>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>>> > What's the correct way of writing a good 404 or action not found page?
>>> Does
>>> > s2 have something like a fallback action if nothing can be found?
>>> >
>>> > Paul
>>> >
>>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>>> wrote:
>>> >
>>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week
>>> or so
>>> >> ago that I haven't had time to re-visit--so it actually could be the
>>> web.xml
>>> >> (specifically the dispatcher being used) and I may have put my foot
>>> in
>>> my
>>> >> mouth (again).
>>> >>
>>> >> Somebody followed up saying the original FilterDispatcher worked,
>>> though,
>>> >> so maybe not. Hrm.
>>> >>
>>> >> Dave
>>> >>
>>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>> >> > and I probably should have included this as well:
>>> >> >
>>> >> > Struts Problem Report
>>> >> >
>>> >> > Struts has detected an unhandled exception:
>>> >> >   *Messages*:
>>> >> > There is no Action mapped for namespace / and action name
>>> >> > dashbd.
>>> >> >  ------------------------------
>>> >> > Stacktraces *There is no Action mapped for namespace / and
>>> >> > action name
>>> >> > dashbd. - [unknown location]*
>>> >> >
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>>> >> >
>>> >> >
>>> >>
>>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>>> >> >
>>> >> >
>>> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>>> >> >
>>> >> >
>>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>>> >> >
>>> >> >
>>> >>
>>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>>> >> >     java.lang.Thread.run(Thread.java:595)
>>> >> >
>>> >> >
>>> >> >
>>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> >
>>> >> > > Hi Dave,
>>> >> > >
>>> >> > > I have the following snippet of DashbdController class
>>> >> > that I am expecting
>>> >> > > to hit with the following URL:
>>> >> > >
>>> >> > > http:/localhost:8080/Dashbd
>>> >> > >
>>> >> > > <---SNIPPET
>>> >> > >
>>> >> > > package com.myeclipse.ozone;
>>> >> > >
>>> >> > > import java.util.Collection;
>>> >> > >
>>> >> > > import com.myeclipse.hibernate.*;
>>> >> > >
>>> >> > > import org.hibernate.HibernateException;
>>> >> > > import org.hibernate.Session;
>>> >> > > import org.hibernate.cfg.Configuration;
>>> >> > >
>>> >> > > import org.apache.struts2.config.Result;
>>> >> > > import org.apache.struts2.config.Results;
>>> >> > > import
>>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>>> >> > > import org.apache.struts2.rest.HttpHeaders;
>>> >> > >
>>> >> > > import com.opensymphony.xwork2.ModelDriven;
>>> >> > > import com.opensymphony.xwork2.Validateable;
>>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>>> >> > >
>>> >> > >
>>> >> > > @Results({
>>> >> > >     @Result(name="success",
>>> >> > type=ServletActionRedirectResult.class,
>>> >> > > value="dashbd")
>>> >> > > })
>>> >> > >
>>> >> > > public class DashbdController extends
>>> >> > ValidationAwareSupport implements
>>> >> > > ModelDriven, Validateable{
>>> >> > >
>>> >> > >    //private static Gadget    transientGadget = new
>>> >> > Gadget();
>>> >> > >
>>> >> > >     //String id;
>>> >> > >     int id;
>>> >> > >
>>> >> > >     private static int    dashboardId;
>>> >> > >
>>> >> > >     private Collection<Dashbd>
>>> >> > dashboardList;
>>> >> > >     private Collection<Dashbd>     model;
>>> >> > >     private Collection<DashbdType>
>>> >> > dashboardTypeList;
>>> >> > >
>>> >> > >     private DashbdService dashboardService = new
>>> >> > DashbdService();  // where
>>> >> > > the DAOs live
>>> >> > >
>>> >> > >
>>> >> > >     /*
>>> >> > >
>>> >> >
>>> >>
>>> ****************************************************************************************
>>> >> > >      *             DASHBOARDS
>>> >> > >      */
>>> >> > >
>>> >> > >     //
>>> >> > >     // GET .../dashbd                 get all
>>> >> > dashboards in table
>>> >> > >     //
>>> >> > >     public HttpHeaders index() {
>>> >> > >         dashboardList = dashboardService.getAll();
>>> >> > >         return new
>>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>>> >> > >             .disableCaching();
>>> >> > >     }
>>> >> > >
>>> >> > >
>>> >> > > and etc. ....
>>> >> > >
>>> >> > > ...END SNIPPET >
>>> >> > >
>>> >> > > There are more methods in this calss of course, but
>>> >> > all I'm trying to do
>>> >> > > initially is hit the index() action with the URL above
>>> >> > ?!?
>>> >> > >
>>> >> > > the index.jsp is really simple:
>>> >> > >
>>> >> > > <% response.sendRedirect("dashbd"); %>
>>> >> > >
>>> >> > >
>>> >> > > this same scheme works perfectly with another RESTful
>>> >> > app service and fir
>>> >> > > the life of me, I can't find any
>>> >> > >
>>> >> > >
>>> >> > >
>>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>>> >> > <ne...@yahoo.com>wrote:
>>> >> > >
>>> >> > >> The web.xml doesn't have anything to do with
>>> >> > the error message; it thinks
>>> >> > >> there isn't an action configured at the URL
>>> >> > you're requesting.
>>> >> > >>
>>> >> > >> Impossible to help without more information.
>>> >> > >>
>>> >> > >> Dave
>>> >> > >>
>>> >> > >> --- On Mon, 7/28/08, John Moose
>>> >> > <jg...@gmail.com> wrote:
>>> >> > >>
>>> >> > >> > From: John Moose <jg...@gmail.com>
>>> >> > >> > Subject: There is no Action mapped for
>>> >> > namespace / and action name ...
>>> >> > >> > To: "Struts Users Mailing List"
>>> >> > <us...@struts.apache.org>
>>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>>> >> > >> > I know what you're thinking... web.xml
>>> >> > has no action
>>> >> > >> > mapping, but it does!
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > <?xml version="1.0"
>>> >> > >> > encoding="UTF-8"?>
>>> >> > >> > <web-app version="2.5"
>>> >> > >> >
>>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>>> >> > >> >
>>> >> > >> >
>>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>> >> > >> >
>>> >> > >> >
>>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>>> >> > >> >
>>> >> > >> >
>>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>>> >> > >> >
>>> >> > >> >     <display-name>Struts 2 RESTful
>>> >> > Ozone
>>> >> > >> > Services</display-name>
>>> >> > >> >
>>> >> > >> >   <!-- Filters -->
>>> >> > >> >       <filter>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > >>
>>> >> >
>>> >>
>>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>actionPackages</param-name>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-value>com.myeclipse.ozone</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >           <init-param>
>>> >> > >> >
>>> >> > >> >
>>> >> > <param-name>struts.devMode</param-name>
>>> >> > >> >
>>> >> > <param-value>true</param-value>
>>> >> > >> >           </init-param>
>>> >> > >> >       </filter>
>>> >> > >> >
>>> >> > >> >       <filter-mapping>
>>> >> > >> >
>>> >> > <filter-name>action2</filter-name>
>>> >> > >> >
>>> >> > <url-pattern>/*</url-pattern>
>>> >> > >> >       </filter-mapping>
>>> >> > >> >
>>> >> > >> >   <welcome-file-list>
>>> >> > >> >
>>> >> > <welcome-file>index.jsp</welcome-file>
>>> >> > >> >   </welcome-file-list>
>>> >> > >> > </web-app>
>>> >> > >> >
>>> >> > >> >
>>> >> > >> >
>>> >> > >> > This file works well with another Struts2.1.3
>>> >> > app.  Can
>>> >> > >> > someone help me
>>> >> > >> > understand where to look for the cause of
>>> >> > this???
>>> >> > >> >
>>> >> > >> > Thanks folks
>>> >> > >>
>>> >> > >>
>>> >> >
>>> ---------------------------------------------------------------------
>>> >> > >> To unsubscribe, e-mail:
>>> >> > user-unsubscribe@struts.apache.org
>>> >> > >> For additional commands, e-mail:
>>> >> > user-help@struts.apache.org
>>> >> > >>
>>> >> > >>
>>> >> > >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> >> For additional commands, e-mail: user-help@struts.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> 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/There-is-no-Action-mapped-for-namespace---and-action-name-...-tp18698350p19221813.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: There is no Action mapped for namespace / and action name ...

Posted by John Moose <jg...@gmail.com>.
re-ordered the libraries and builders, forced JDK compiler compliance to 5.0
( definitely *not* 6.0 !!) in Eclipse and voila...runs great.  never
*really* thought it was a Struts2 problem  ; )

On Tue, Jul 29, 2008 at 9:26 AM, John Moose <jg...@gmail.com> wrote:

> A very wierd situation...I have two projects in the Eclipse workspace --
> Tagging and Dashbd  They both use the REST plugin and follow the naming
> conventions, etc. Tagging will build, re-deploy and run perfectly. When I
> close that project and open Dashbd, build, re-deploy and run I get the
> Action mapping failure as described. Both projects have source files in the
> "com.myeclipse.ozone" package name(space). Is it possible that there is some
> very persistent caching going on ??? like over multiple starts and re-starts
> of Tomcat?  just a WAG...
>
> -John
>
>
> On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
> savolainen.pauli@gmail.com> wrote:
>
>> Hi,
>>
>> I am having exactly the same problem. I was using Struts 2.1.1,
>> switched to struts 2.1.2 (including the restful and codebehind
>> plugins) and started to get this 'no action found' error. I am quite
>> confident that I did not do anything that should've resulted in this.
>> Of course I cannot be 100% sure, because I did goof around with my
>> code a bit, but I checked and rechecked and rerechecked everthing
>> twice and couldn't find a reason for this behaviour.
>>
>> John's web.xml and the stacktrace are identical to mine. I don't
>> declare any namespaces in my struts.xml packages nor in the login form
>> from which I try to invoke the login action <s:form
>> action="/login/execute" method="post">. (Also tried with an
>> exclamation mark i.e. login!execute) I have a LoginAction.java with an
>> execute method in the pacakge defined in the web.xml's actionPackages
>> init parameter. At least this declaration used to send the control to
>> the LoginAction's execute method. Doesn't do anymore.
>>
>> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
>> include a tiles main layout which in turn includes sub-layouts (such
>> as the login form). I don't know if this has anything got to do with
>> the problem I'm having.
>>
>> So, is a result of something I did wrong or could it be something else?
>>
>> Thank you
>>
>> Pauli Savolainen
>>
>> 2008/7/28 Paul Benedict <pb...@apache.org>:
>> > What's the correct way of writing a good 404 or action not found page?
>> Does
>> > s2 have something like a fallback action if nothing can be found?
>> >
>> > Paul
>> >
>> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
>> wrote:
>> >
>> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week
>> or so
>> >> ago that I haven't had time to re-visit--so it actually could be the
>> web.xml
>> >> (specifically the dispatcher being used) and I may have put my foot in
>> my
>> >> mouth (again).
>> >>
>> >> Somebody followed up saying the original FilterDispatcher worked,
>> though,
>> >> so maybe not. Hrm.
>> >>
>> >> Dave
>> >>
>> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>> >> > and I probably should have included this as well:
>> >> >
>> >> > Struts Problem Report
>> >> >
>> >> > Struts has detected an unhandled exception:
>> >> >   *Messages*:
>> >> > There is no Action mapped for namespace / and action name
>> >> > dashbd.
>> >> >  ------------------------------
>> >> > Stacktraces *There is no Action mapped for namespace / and
>> >> > action name
>> >> > dashbd. - [unknown location]*
>> >> >
>> >> >
>> >> >
>> >>
>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>> >> >
>> >> >
>> >>
>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>> >> >
>> >> >
>> >>
>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>> >> >
>> >> >
>> >>
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>> >> >
>> >> >
>> >>
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >> >
>> >> >
>> >>
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >> >
>> >> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>> >> >
>> >> >
>> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>> >> >
>> >> >
>> >>
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>> >> >
>> >> >
>> >>
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>> >> >
>> >> >
>> >>
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> >> >
>> >> >
>> >>
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>> >> >     java.lang.Thread.run(Thread.java:595)
>> >> >
>> >> >
>> >> >
>> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>> >> > <jg...@gmail.com> wrote:
>> >> >
>> >> > > Hi Dave,
>> >> > >
>> >> > > I have the following snippet of DashbdController class
>> >> > that I am expecting
>> >> > > to hit with the following URL:
>> >> > >
>> >> > > http:/localhost:8080/Dashbd
>> >> > >
>> >> > > <---SNIPPET
>> >> > >
>> >> > > package com.myeclipse.ozone;
>> >> > >
>> >> > > import java.util.Collection;
>> >> > >
>> >> > > import com.myeclipse.hibernate.*;
>> >> > >
>> >> > > import org.hibernate.HibernateException;
>> >> > > import org.hibernate.Session;
>> >> > > import org.hibernate.cfg.Configuration;
>> >> > >
>> >> > > import org.apache.struts2.config.Result;
>> >> > > import org.apache.struts2.config.Results;
>> >> > > import
>> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>> >> > > import org.apache.struts2.rest.HttpHeaders;
>> >> > >
>> >> > > import com.opensymphony.xwork2.ModelDriven;
>> >> > > import com.opensymphony.xwork2.Validateable;
>> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>> >> > >
>> >> > >
>> >> > > @Results({
>> >> > >     @Result(name="success",
>> >> > type=ServletActionRedirectResult.class,
>> >> > > value="dashbd")
>> >> > > })
>> >> > >
>> >> > > public class DashbdController extends
>> >> > ValidationAwareSupport implements
>> >> > > ModelDriven<Object>, Validateable{
>> >> > >
>> >> > >    //private static Gadget    transientGadget = new
>> >> > Gadget();
>> >> > >
>> >> > >     //String id;
>> >> > >     int id;
>> >> > >
>> >> > >     private static int    dashboardId;
>> >> > >
>> >> > >     private Collection<Dashbd>
>> >> > dashboardList;
>> >> > >     private Collection<Dashbd>     model;
>> >> > >     private Collection<DashbdType>
>> >> > dashboardTypeList;
>> >> > >
>> >> > >     private DashbdService dashboardService = new
>> >> > DashbdService();  // where
>> >> > > the DAOs live
>> >> > >
>> >> > >
>> >> > >     /*
>> >> > >
>> >> >
>> >>
>> ****************************************************************************************
>> >> > >      *             DASHBOARDS
>> >> > >      */
>> >> > >
>> >> > >     //
>> >> > >     // GET .../dashbd                 get all
>> >> > dashboards in table
>> >> > >     //
>> >> > >     public HttpHeaders index() {
>> >> > >         dashboardList = dashboardService.getAll();
>> >> > >         return new
>> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>> >> > >             .disableCaching();
>> >> > >     }
>> >> > >
>> >> > >
>> >> > > and etc. ....
>> >> > >
>> >> > > ...END SNIPPET >
>> >> > >
>> >> > > There are more methods in this calss of course, but
>> >> > all I'm trying to do
>> >> > > initially is hit the index() action with the URL above
>> >> > ?!?
>> >> > >
>> >> > > the index.jsp is really simple:
>> >> > >
>> >> > > <% response.sendRedirect("dashbd"); %>
>> >> > >
>> >> > >
>> >> > > this same scheme works perfectly with another RESTful
>> >> > app service and fir
>> >> > > the life of me, I can't find any
>> >> > >
>> >> > >
>> >> > >
>> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>> >> > <ne...@yahoo.com>wrote:
>> >> > >
>> >> > >> The web.xml doesn't have anything to do with
>> >> > the error message; it thinks
>> >> > >> there isn't an action configured at the URL
>> >> > you're requesting.
>> >> > >>
>> >> > >> Impossible to help without more information.
>> >> > >>
>> >> > >> Dave
>> >> > >>
>> >> > >> --- On Mon, 7/28/08, John Moose
>> >> > <jg...@gmail.com> wrote:
>> >> > >>
>> >> > >> > From: John Moose <jg...@gmail.com>
>> >> > >> > Subject: There is no Action mapped for
>> >> > namespace / and action name ...
>> >> > >> > To: "Struts Users Mailing List"
>> >> > <us...@struts.apache.org>
>> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
>> >> > >> > I know what you're thinking... web.xml
>> >> > has no action
>> >> > >> > mapping, but it does!
>> >> > >> >
>> >> > >> >
>> >> > >> > <?xml version="1.0"
>> >> > >> > encoding="UTF-8"?>
>> >> > >> > <web-app version="2.5"
>> >> > >> >
>> >> > xmlns="http://java.sun.com/xml/ns/javaee"
>> >> > >> >
>> >> > >> >
>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> > >> >
>> >> > >> >
>> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> >> > >> >
>> >> > >> >
>> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> >> > >> >
>> >> > >> >     <display-name>Struts 2 RESTful
>> >> > Ozone
>> >> > >> > Services</display-name>
>> >> > >> >
>> >> > >> >   <!-- Filters -->
>> >> > >> >       <filter>
>> >> > >> >
>> >> > <filter-name>action2</filter-name>
>> >> > >> >
>> >> > >> >
>> >> > >>
>> >> >
>> >>
>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>> >> > >> >           <init-param>
>> >> > >> >
>> >> > >> >
>> >> > <param-name>actionPackages</param-name>
>> >> > >> >
>> >> > >> >
>> >> > <param-value>com.myeclipse.ozone</param-value>
>> >> > >> >           </init-param>
>> >> > >> >           <init-param>
>> >> > >> >
>> >> > >> >
>> >> > <param-name>struts.devMode</param-name>
>> >> > >> >
>> >> > <param-value>true</param-value>
>> >> > >> >           </init-param>
>> >> > >> >       </filter>
>> >> > >> >
>> >> > >> >       <filter-mapping>
>> >> > >> >
>> >> > <filter-name>action2</filter-name>
>> >> > >> >
>> >> > <url-pattern>/*</url-pattern>
>> >> > >> >       </filter-mapping>
>> >> > >> >
>> >> > >> >   <welcome-file-list>
>> >> > >> >
>> >> > <welcome-file>index.jsp</welcome-file>
>> >> > >> >   </welcome-file-list>
>> >> > >> > </web-app>
>> >> > >> >
>> >> > >> >
>> >> > >> >
>> >> > >> > This file works well with another Struts2.1.3
>> >> > app.  Can
>> >> > >> > someone help me
>> >> > >> > understand where to look for the cause of
>> >> > this???
>> >> > >> >
>> >> > >> > Thanks folks
>> >> > >>
>> >> > >>
>> >> > ---------------------------------------------------------------------
>> >> > >> To unsubscribe, e-mail:
>> >> > user-unsubscribe@struts.apache.org
>> >> > >> For additional commands, e-mail:
>> >> > user-help@struts.apache.org
>> >> > >>
>> >> > >>
>> >> > >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by John Moose <jg...@gmail.com>.
A very wierd situation...I have two projects in the Eclipse workspace --
Tagging and Dashbd  They both use the REST plugin and follow the naming
conventions, etc. Tagging will build, re-deploy and run perfectly. When I
close that project and open Dashbd, build, re-deploy and run I get the
Action mapping failure as described. Both projects have source files in the
"com.myeclipse.ozone" package name(space). Is it possible that there is some
very persistent caching going on ??? like over multiple starts and re-starts
of Tomcat?  just a WAG...

-John

On Tue, Jul 29, 2008 at 5:08 AM, Pauli Savolainen <
savolainen.pauli@gmail.com> wrote:

> Hi,
>
> I am having exactly the same problem. I was using Struts 2.1.1,
> switched to struts 2.1.2 (including the restful and codebehind
> plugins) and started to get this 'no action found' error. I am quite
> confident that I did not do anything that should've resulted in this.
> Of course I cannot be 100% sure, because I did goof around with my
> code a bit, but I checked and rechecked and rerechecked everthing
> twice and couldn't find a reason for this behaviour.
>
> John's web.xml and the stacktrace are identical to mine. I don't
> declare any namespaces in my struts.xml packages nor in the login form
> from which I try to invoke the login action <s:form
> action="/login/execute" method="post">. (Also tried with an
> exclamation mark i.e. login!execute) I have a LoginAction.java with an
> execute method in the pacakge defined in the web.xml's actionPackages
> init parameter. At least this declaration used to send the control to
> the LoginAction's execute method. Doesn't do anymore.
>
> I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
> include a tiles main layout which in turn includes sub-layouts (such
> as the login form). I don't know if this has anything got to do with
> the problem I'm having.
>
> So, is a result of something I did wrong or could it be something else?
>
> Thank you
>
> Pauli Savolainen
>
> 2008/7/28 Paul Benedict <pb...@apache.org>:
> > What's the correct way of writing a good 404 or action not found page?
> Does
> > s2 have something like a fallback action if nothing can be found?
> >
> > Paul
> >
> > On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com>
> wrote:
> >
> >> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or
> so
> >> ago that I haven't had time to re-visit--so it actually could be the
> web.xml
> >> (specifically the dispatcher being used) and I may have put my foot in
> my
> >> mouth (again).
> >>
> >> Somebody followed up saying the original FilterDispatcher worked,
> though,
> >> so maybe not. Hrm.
> >>
> >> Dave
> >>
> >> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
> >> > and I probably should have included this as well:
> >> >
> >> > Struts Problem Report
> >> >
> >> > Struts has detected an unhandled exception:
> >> >   *Messages*:
> >> > There is no Action mapped for namespace / and action name
> >> > dashbd.
> >> >  ------------------------------
> >> > Stacktraces *There is no Action mapped for namespace / and
> >> > action name
> >> > dashbd. - [unknown location]*
> >> >
> >> >
> >> >
> >>
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
> >> >
> >> >
> >>
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
> >> >
> >> >
> >>
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
> >> >
> >> >
> >>
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
> >> >
> >> >
> >>
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
> >> >
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >> >
> >> >
> >>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >> >
> >> >
> >>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >> >
> >> >
> >>
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >> >
> >> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >> >
> >> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >> >
> >> >
> >>
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >> >
> >> >
> >>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >> >
> >> >
> >>
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >> >
> >> >
> >>
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >> >     java.lang.Thread.run(Thread.java:595)
> >> >
> >> >
> >> >
> >> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> >> > <jg...@gmail.com> wrote:
> >> >
> >> > > Hi Dave,
> >> > >
> >> > > I have the following snippet of DashbdController class
> >> > that I am expecting
> >> > > to hit with the following URL:
> >> > >
> >> > > http:/localhost:8080/Dashbd
> >> > >
> >> > > <---SNIPPET
> >> > >
> >> > > package com.myeclipse.ozone;
> >> > >
> >> > > import java.util.Collection;
> >> > >
> >> > > import com.myeclipse.hibernate.*;
> >> > >
> >> > > import org.hibernate.HibernateException;
> >> > > import org.hibernate.Session;
> >> > > import org.hibernate.cfg.Configuration;
> >> > >
> >> > > import org.apache.struts2.config.Result;
> >> > > import org.apache.struts2.config.Results;
> >> > > import
> >> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
> >> > > import org.apache.struts2.rest.DefaultHttpHeaders;
> >> > > import org.apache.struts2.rest.HttpHeaders;
> >> > >
> >> > > import com.opensymphony.xwork2.ModelDriven;
> >> > > import com.opensymphony.xwork2.Validateable;
> >> > > import com.opensymphony.xwork2.ValidationAwareSupport;
> >> > >
> >> > >
> >> > > @Results({
> >> > >     @Result(name="success",
> >> > type=ServletActionRedirectResult.class,
> >> > > value="dashbd")
> >> > > })
> >> > >
> >> > > public class DashbdController extends
> >> > ValidationAwareSupport implements
> >> > > ModelDriven<Object>, Validateable{
> >> > >
> >> > >    //private static Gadget    transientGadget = new
> >> > Gadget();
> >> > >
> >> > >     //String id;
> >> > >     int id;
> >> > >
> >> > >     private static int    dashboardId;
> >> > >
> >> > >     private Collection<Dashbd>
> >> > dashboardList;
> >> > >     private Collection<Dashbd>     model;
> >> > >     private Collection<DashbdType>
> >> > dashboardTypeList;
> >> > >
> >> > >     private DashbdService dashboardService = new
> >> > DashbdService();  // where
> >> > > the DAOs live
> >> > >
> >> > >
> >> > >     /*
> >> > >
> >> >
> >>
> ****************************************************************************************
> >> > >      *             DASHBOARDS
> >> > >      */
> >> > >
> >> > >     //
> >> > >     // GET .../dashbd                 get all
> >> > dashboards in table
> >> > >     //
> >> > >     public HttpHeaders index() {
> >> > >         dashboardList = dashboardService.getAll();
> >> > >         return new
> >> > DefaultHttpHeaders("index")   // dashbd-index.jsp
> >> > >             .disableCaching();
> >> > >     }
> >> > >
> >> > >
> >> > > and etc. ....
> >> > >
> >> > > ...END SNIPPET >
> >> > >
> >> > > There are more methods in this calss of course, but
> >> > all I'm trying to do
> >> > > initially is hit the index() action with the URL above
> >> > ?!?
> >> > >
> >> > > the index.jsp is really simple:
> >> > >
> >> > > <% response.sendRedirect("dashbd"); %>
> >> > >
> >> > >
> >> > > this same scheme works perfectly with another RESTful
> >> > app service and fir
> >> > > the life of me, I can't find any
> >> > >
> >> > >
> >> > >
> >> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> >> > <ne...@yahoo.com>wrote:
> >> > >
> >> > >> The web.xml doesn't have anything to do with
> >> > the error message; it thinks
> >> > >> there isn't an action configured at the URL
> >> > you're requesting.
> >> > >>
> >> > >> Impossible to help without more information.
> >> > >>
> >> > >> Dave
> >> > >>
> >> > >> --- On Mon, 7/28/08, John Moose
> >> > <jg...@gmail.com> wrote:
> >> > >>
> >> > >> > From: John Moose <jg...@gmail.com>
> >> > >> > Subject: There is no Action mapped for
> >> > namespace / and action name ...
> >> > >> > To: "Struts Users Mailing List"
> >> > <us...@struts.apache.org>
> >> > >> > Date: Monday, July 28, 2008, 3:58 PM
> >> > >> > I know what you're thinking... web.xml
> >> > has no action
> >> > >> > mapping, but it does!
> >> > >> >
> >> > >> >
> >> > >> > <?xml version="1.0"
> >> > >> > encoding="UTF-8"?>
> >> > >> > <web-app version="2.5"
> >> > >> >
> >> > xmlns="http://java.sun.com/xml/ns/javaee"
> >> > >> >
> >> > >> >
> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> > >> >
> >> > >> >
> >> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >> > >> >
> >> > >> >
> >> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >> > >> >
> >> > >> >     <display-name>Struts 2 RESTful
> >> > Ozone
> >> > >> > Services</display-name>
> >> > >> >
> >> > >> >   <!-- Filters -->
> >> > >> >       <filter>
> >> > >> >
> >> > <filter-name>action2</filter-name>
> >> > >> >
> >> > >> >
> >> > >>
> >> >
> >>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >> > >> >           <init-param>
> >> > >> >
> >> > >> >
> >> > <param-name>actionPackages</param-name>
> >> > >> >
> >> > >> >
> >> > <param-value>com.myeclipse.ozone</param-value>
> >> > >> >           </init-param>
> >> > >> >           <init-param>
> >> > >> >
> >> > >> >
> >> > <param-name>struts.devMode</param-name>
> >> > >> >
> >> > <param-value>true</param-value>
> >> > >> >           </init-param>
> >> > >> >       </filter>
> >> > >> >
> >> > >> >       <filter-mapping>
> >> > >> >
> >> > <filter-name>action2</filter-name>
> >> > >> >
> >> > <url-pattern>/*</url-pattern>
> >> > >> >       </filter-mapping>
> >> > >> >
> >> > >> >   <welcome-file-list>
> >> > >> >
> >> > <welcome-file>index.jsp</welcome-file>
> >> > >> >   </welcome-file-list>
> >> > >> > </web-app>
> >> > >> >
> >> > >> >
> >> > >> >
> >> > >> > This file works well with another Struts2.1.3
> >> > app.  Can
> >> > >> > someone help me
> >> > >> > understand where to look for the cause of
> >> > this???
> >> > >> >
> >> > >> > Thanks folks
> >> > >>
> >> > >>
> >> > ---------------------------------------------------------------------
> >> > >> To unsubscribe, e-mail:
> >> > user-unsubscribe@struts.apache.org
> >> > >> For additional commands, e-mail:
> >> > user-help@struts.apache.org
> >> > >>
> >> > >>
> >> > >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by Pauli Savolainen <sa...@gmail.com>.
Hi,

I am having exactly the same problem. I was using Struts 2.1.1,
switched to struts 2.1.2 (including the restful and codebehind
plugins) and started to get this 'no action found' error. I am quite
confident that I did not do anything that should've resulted in this.
Of course I cannot be 100% sure, because I did goof around with my
code a bit, but I checked and rechecked and rerechecked everthing
twice and couldn't find a reason for this behaviour.

John's web.xml and the stacktrace are identical to mine. I don't
declare any namespaces in my struts.xml packages nor in the login form
from which I try to invoke the login action <s:form
action="/login/execute" method="post">. (Also tried with an
exclamation mark i.e. login!execute) I have a LoginAction.java with an
execute method in the pacakge defined in the web.xml's actionPackages
init parameter. At least this declaration used to send the control to
the LoginAction's execute method. Doesn't do anymore.

I am using the struts 2.1.2 tiles plugin as well. On my index.jsp I
include a tiles main layout which in turn includes sub-layouts (such
as the login form). I don't know if this has anything got to do with
the problem I'm having.

So, is a result of something I did wrong or could it be something else?

Thank you

Pauli Savolainen

2008/7/28 Paul Benedict <pb...@apache.org>:
> What's the correct way of writing a good 404 or action not found page? Does
> s2 have something like a fallback action if nothing can be found?
>
> Paul
>
> On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com> wrote:
>
>> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or so
>> ago that I haven't had time to re-visit--so it actually could be the web.xml
>> (specifically the dispatcher being used) and I may have put my foot in my
>> mouth (again).
>>
>> Somebody followed up saying the original FilterDispatcher worked, though,
>> so maybe not. Hrm.
>>
>> Dave
>>
>> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>> > and I probably should have included this as well:
>> >
>> > Struts Problem Report
>> >
>> > Struts has detected an unhandled exception:
>> >   *Messages*:
>> > There is no Action mapped for namespace / and action name
>> > dashbd.
>> >  ------------------------------
>> > Stacktraces *There is no Action mapped for namespace / and
>> > action name
>> > dashbd. - [unknown location]*
>> >
>> >
>> >
>> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>> >
>> >
>> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>> >
>> >
>> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>> >
>> >
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>> >
>> >
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>> >
>> >
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>> >
>> >
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>> >
>> >
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>> >
>> >
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >
>> >
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >
>> >
>> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>> >
>> >
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>> >
>> >
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >
>> >
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >
>> >
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>> >
>> >
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >
>> >
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>> >
>> >
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>> >
>> >
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >
>> >
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>> >
>> >
>> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>> >
>> >
>> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>> >
>> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>> >
>> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>> >
>> >
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>> >
>> >
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>> >
>> >
>> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>> >
>> >
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>> >     java.lang.Thread.run(Thread.java:595)
>> >
>> >
>> >
>> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
>> > <jg...@gmail.com> wrote:
>> >
>> > > Hi Dave,
>> > >
>> > > I have the following snippet of DashbdController class
>> > that I am expecting
>> > > to hit with the following URL:
>> > >
>> > > http:/localhost:8080/Dashbd
>> > >
>> > > <---SNIPPET
>> > >
>> > > package com.myeclipse.ozone;
>> > >
>> > > import java.util.Collection;
>> > >
>> > > import com.myeclipse.hibernate.*;
>> > >
>> > > import org.hibernate.HibernateException;
>> > > import org.hibernate.Session;
>> > > import org.hibernate.cfg.Configuration;
>> > >
>> > > import org.apache.struts2.config.Result;
>> > > import org.apache.struts2.config.Results;
>> > > import
>> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
>> > > import org.apache.struts2.rest.DefaultHttpHeaders;
>> > > import org.apache.struts2.rest.HttpHeaders;
>> > >
>> > > import com.opensymphony.xwork2.ModelDriven;
>> > > import com.opensymphony.xwork2.Validateable;
>> > > import com.opensymphony.xwork2.ValidationAwareSupport;
>> > >
>> > >
>> > > @Results({
>> > >     @Result(name="success",
>> > type=ServletActionRedirectResult.class,
>> > > value="dashbd")
>> > > })
>> > >
>> > > public class DashbdController extends
>> > ValidationAwareSupport implements
>> > > ModelDriven<Object>, Validateable{
>> > >
>> > >    //private static Gadget    transientGadget = new
>> > Gadget();
>> > >
>> > >     //String id;
>> > >     int id;
>> > >
>> > >     private static int    dashboardId;
>> > >
>> > >     private Collection<Dashbd>
>> > dashboardList;
>> > >     private Collection<Dashbd>     model;
>> > >     private Collection<DashbdType>
>> > dashboardTypeList;
>> > >
>> > >     private DashbdService dashboardService = new
>> > DashbdService();  // where
>> > > the DAOs live
>> > >
>> > >
>> > >     /*
>> > >
>> >
>> ****************************************************************************************
>> > >      *             DASHBOARDS
>> > >      */
>> > >
>> > >     //
>> > >     // GET .../dashbd                 get all
>> > dashboards in table
>> > >     //
>> > >     public HttpHeaders index() {
>> > >         dashboardList = dashboardService.getAll();
>> > >         return new
>> > DefaultHttpHeaders("index")   // dashbd-index.jsp
>> > >             .disableCaching();
>> > >     }
>> > >
>> > >
>> > > and etc. ....
>> > >
>> > > ...END SNIPPET >
>> > >
>> > > There are more methods in this calss of course, but
>> > all I'm trying to do
>> > > initially is hit the index() action with the URL above
>> > ?!?
>> > >
>> > > the index.jsp is really simple:
>> > >
>> > > <% response.sendRedirect("dashbd"); %>
>> > >
>> > >
>> > > this same scheme works perfectly with another RESTful
>> > app service and fir
>> > > the life of me, I can't find any
>> > >
>> > >
>> > >
>> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
>> > <ne...@yahoo.com>wrote:
>> > >
>> > >> The web.xml doesn't have anything to do with
>> > the error message; it thinks
>> > >> there isn't an action configured at the URL
>> > you're requesting.
>> > >>
>> > >> Impossible to help without more information.
>> > >>
>> > >> Dave
>> > >>
>> > >> --- On Mon, 7/28/08, John Moose
>> > <jg...@gmail.com> wrote:
>> > >>
>> > >> > From: John Moose <jg...@gmail.com>
>> > >> > Subject: There is no Action mapped for
>> > namespace / and action name ...
>> > >> > To: "Struts Users Mailing List"
>> > <us...@struts.apache.org>
>> > >> > Date: Monday, July 28, 2008, 3:58 PM
>> > >> > I know what you're thinking... web.xml
>> > has no action
>> > >> > mapping, but it does!
>> > >> >
>> > >> >
>> > >> > <?xml version="1.0"
>> > >> > encoding="UTF-8"?>
>> > >> > <web-app version="2.5"
>> > >> >
>> > xmlns="http://java.sun.com/xml/ns/javaee"
>> > >> >
>> > >> >
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > >> >
>> > >> >
>> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> > >> >
>> > >> >
>> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> > >> >
>> > >> >     <display-name>Struts 2 RESTful
>> > Ozone
>> > >> > Services</display-name>
>> > >> >
>> > >> >   <!-- Filters -->
>> > >> >       <filter>
>> > >> >
>> > <filter-name>action2</filter-name>
>> > >> >
>> > >> >
>> > >>
>> >
>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>> > >> >           <init-param>
>> > >> >
>> > >> >
>> > <param-name>actionPackages</param-name>
>> > >> >
>> > >> >
>> > <param-value>com.myeclipse.ozone</param-value>
>> > >> >           </init-param>
>> > >> >           <init-param>
>> > >> >
>> > >> >
>> > <param-name>struts.devMode</param-name>
>> > >> >
>> > <param-value>true</param-value>
>> > >> >           </init-param>
>> > >> >       </filter>
>> > >> >
>> > >> >       <filter-mapping>
>> > >> >
>> > <filter-name>action2</filter-name>
>> > >> >
>> > <url-pattern>/*</url-pattern>
>> > >> >       </filter-mapping>
>> > >> >
>> > >> >   <welcome-file-list>
>> > >> >
>> > <welcome-file>index.jsp</welcome-file>
>> > >> >   </welcome-file-list>
>> > >> > </web-app>
>> > >> >
>> > >> >
>> > >> >
>> > >> > This file works well with another Struts2.1.3
>> > app.  Can
>> > >> > someone help me
>> > >> > understand where to look for the cause of
>> > this???
>> > >> >
>> > >> > Thanks folks
>> > >>
>> > >>
>> > ---------------------------------------------------------------------
>> > >> To unsubscribe, e-mail:
>> > user-unsubscribe@struts.apache.org
>> > >> For additional commands, e-mail:
>> > user-help@struts.apache.org
>> > >>
>> > >>
>> > >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

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


Re: There is no Action mapped for namespace / and action name ...

Posted by Paul Benedict <pb...@apache.org>.
What's the correct way of writing a good 404 or action not found page? Does
s2 have something like a fallback action if nothing can be found?

Paul

On Mon, Jul 28, 2008 at 4:04 PM, Dave Newton <ne...@yahoo.com> wrote:

> Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or so
> ago that I haven't had time to re-visit--so it actually could be the web.xml
> (specifically the dispatcher being used) and I may have put my foot in my
> mouth (again).
>
> Somebody followed up saying the original FilterDispatcher worked, though,
> so maybe not. Hrm.
>
> Dave
>
> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
> > and I probably should have included this as well:
> >
> > Struts Problem Report
> >
> > Struts has detected an unhandled exception:
> >   *Messages*:
> > There is no Action mapped for namespace / and action name
> > dashbd.
> >  ------------------------------
> > Stacktraces *There is no Action mapped for namespace / and
> > action name
> > dashbd. - [unknown location]*
> >
> >
> >
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
> >
> >
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
> >
> >
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
> >
> >
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
> >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
> >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
> >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
> >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
> >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
> >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
> >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
> >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
> >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
> >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
> >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
> >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
> >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
> >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >     java.lang.Thread.run(Thread.java:595)
> >
> >
> >
> > On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> > <jg...@gmail.com> wrote:
> >
> > > Hi Dave,
> > >
> > > I have the following snippet of DashbdController class
> > that I am expecting
> > > to hit with the following URL:
> > >
> > > http:/localhost:8080/Dashbd
> > >
> > > <---SNIPPET
> > >
> > > package com.myeclipse.ozone;
> > >
> > > import java.util.Collection;
> > >
> > > import com.myeclipse.hibernate.*;
> > >
> > > import org.hibernate.HibernateException;
> > > import org.hibernate.Session;
> > > import org.hibernate.cfg.Configuration;
> > >
> > > import org.apache.struts2.config.Result;
> > > import org.apache.struts2.config.Results;
> > > import
> > org.apache.struts2.dispatcher.ServletActionRedirectResult;
> > > import org.apache.struts2.rest.DefaultHttpHeaders;
> > > import org.apache.struts2.rest.HttpHeaders;
> > >
> > > import com.opensymphony.xwork2.ModelDriven;
> > > import com.opensymphony.xwork2.Validateable;
> > > import com.opensymphony.xwork2.ValidationAwareSupport;
> > >
> > >
> > > @Results({
> > >     @Result(name="success",
> > type=ServletActionRedirectResult.class,
> > > value="dashbd")
> > > })
> > >
> > > public class DashbdController extends
> > ValidationAwareSupport implements
> > > ModelDriven<Object>, Validateable{
> > >
> > >    //private static Gadget    transientGadget = new
> > Gadget();
> > >
> > >     //String id;
> > >     int id;
> > >
> > >     private static int    dashboardId;
> > >
> > >     private Collection<Dashbd>
> > dashboardList;
> > >     private Collection<Dashbd>     model;
> > >     private Collection<DashbdType>
> > dashboardTypeList;
> > >
> > >     private DashbdService dashboardService = new
> > DashbdService();  // where
> > > the DAOs live
> > >
> > >
> > >     /*
> > >
> >
> ****************************************************************************************
> > >      *             DASHBOARDS
> > >      */
> > >
> > >     //
> > >     // GET .../dashbd                 get all
> > dashboards in table
> > >     //
> > >     public HttpHeaders index() {
> > >         dashboardList = dashboardService.getAll();
> > >         return new
> > DefaultHttpHeaders("index")   // dashbd-index.jsp
> > >             .disableCaching();
> > >     }
> > >
> > >
> > > and etc. ....
> > >
> > > ...END SNIPPET >
> > >
> > > There are more methods in this calss of course, but
> > all I'm trying to do
> > > initially is hit the index() action with the URL above
> > ?!?
> > >
> > > the index.jsp is really simple:
> > >
> > > <% response.sendRedirect("dashbd"); %>
> > >
> > >
> > > this same scheme works perfectly with another RESTful
> > app service and fir
> > > the life of me, I can't find any
> > >
> > >
> > >
> > > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> > <ne...@yahoo.com>wrote:
> > >
> > >> The web.xml doesn't have anything to do with
> > the error message; it thinks
> > >> there isn't an action configured at the URL
> > you're requesting.
> > >>
> > >> Impossible to help without more information.
> > >>
> > >> Dave
> > >>
> > >> --- On Mon, 7/28/08, John Moose
> > <jg...@gmail.com> wrote:
> > >>
> > >> > From: John Moose <jg...@gmail.com>
> > >> > Subject: There is no Action mapped for
> > namespace / and action name ...
> > >> > To: "Struts Users Mailing List"
> > <us...@struts.apache.org>
> > >> > Date: Monday, July 28, 2008, 3:58 PM
> > >> > I know what you're thinking... web.xml
> > has no action
> > >> > mapping, but it does!
> > >> >
> > >> >
> > >> > <?xml version="1.0"
> > >> > encoding="UTF-8"?>
> > >> > <web-app version="2.5"
> > >> >
> > xmlns="http://java.sun.com/xml/ns/javaee"
> > >> >
> > >> >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >> >
> > >> >
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > >> >
> > >> >
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> > >> >
> > >> >     <display-name>Struts 2 RESTful
> > Ozone
> > >> > Services</display-name>
> > >> >
> > >> >   <!-- Filters -->
> > >> >       <filter>
> > >> >
> > <filter-name>action2</filter-name>
> > >> >
> > >> >
> > >>
> >
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> > >> >           <init-param>
> > >> >
> > >> >
> > <param-name>actionPackages</param-name>
> > >> >
> > >> >
> > <param-value>com.myeclipse.ozone</param-value>
> > >> >           </init-param>
> > >> >           <init-param>
> > >> >
> > >> >
> > <param-name>struts.devMode</param-name>
> > >> >
> > <param-value>true</param-value>
> > >> >           </init-param>
> > >> >       </filter>
> > >> >
> > >> >       <filter-mapping>
> > >> >
> > <filter-name>action2</filter-name>
> > >> >
> > <url-pattern>/*</url-pattern>
> > >> >       </filter-mapping>
> > >> >
> > >> >   <welcome-file-list>
> > >> >
> > <welcome-file>index.jsp</welcome-file>
> > >> >   </welcome-file-list>
> > >> > </web-app>
> > >> >
> > >> >
> > >> >
> > >> > This file works well with another Struts2.1.3
> > app.  Can
> > >> > someone help me
> > >> > understand where to look for the cause of
> > this???
> > >> >
> > >> > Thanks folks
> > >>
> > >>
> > ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail:
> > user-unsubscribe@struts.apache.org
> > >> For additional commands, e-mail:
> > user-help@struts.apache.org
> > >>
> > >>
> > >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by Dave Newton <ne...@yahoo.com>.
Hmm, I wonder if it was the same issue I was having with 2.1.3 a week or so ago that I haven't had time to re-visit--so it actually could be the web.xml (specifically the dispatcher being used) and I may have put my foot in my mouth (again).

Somebody followed up saying the original FilterDispatcher worked, though, so maybe not. Hrm.

Dave

--- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
> and I probably should have included this as well:
> 
> Struts Problem Report
> 
> Struts has detected an unhandled exception:
>   *Messages*:
> There is no Action mapped for namespace / and action name
> dashbd.
>  ------------------------------
> Stacktraces *There is no Action mapped for namespace / and
> action name
> dashbd. - [unknown location]*
> 
>    
> com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
>    
> com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
>    
> org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
>    
> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
>    
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
>    
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
>    
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
>    
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
>    
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>    
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>    
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
>    
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
>    
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>    
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>    
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
>    
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>    
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
>    
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
>    
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>    
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>    
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
>    
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
>    
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
>    
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
>    
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
>    
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
>     java.lang.Thread.run(Thread.java:595)
> 
> 
> 
> On Mon, Jul 28, 2008 at 4:39 PM, John Moose
> <jg...@gmail.com> wrote:
> 
> > Hi Dave,
> >
> > I have the following snippet of DashbdController class
> that I am expecting
> > to hit with the following URL:
> >
> > http:/localhost:8080/Dashbd
> >
> > <---SNIPPET
> >
> > package com.myeclipse.ozone;
> >
> > import java.util.Collection;
> >
> > import com.myeclipse.hibernate.*;
> >
> > import org.hibernate.HibernateException;
> > import org.hibernate.Session;
> > import org.hibernate.cfg.Configuration;
> >
> > import org.apache.struts2.config.Result;
> > import org.apache.struts2.config.Results;
> > import
> org.apache.struts2.dispatcher.ServletActionRedirectResult;
> > import org.apache.struts2.rest.DefaultHttpHeaders;
> > import org.apache.struts2.rest.HttpHeaders;
> >
> > import com.opensymphony.xwork2.ModelDriven;
> > import com.opensymphony.xwork2.Validateable;
> > import com.opensymphony.xwork2.ValidationAwareSupport;
> >
> >
> > @Results({
> >     @Result(name="success",
> type=ServletActionRedirectResult.class,
> > value="dashbd")
> > })
> >
> > public class DashbdController extends
> ValidationAwareSupport implements
> > ModelDriven<Object>, Validateable{
> >
> >    //private static Gadget    transientGadget = new
> Gadget();
> >
> >     //String id;
> >     int id;
> >
> >     private static int    dashboardId;
> >
> >     private Collection<Dashbd>    
> dashboardList;
> >     private Collection<Dashbd>     model;
> >     private Collection<DashbdType>
> dashboardTypeList;
> >
> >     private DashbdService dashboardService = new
> DashbdService();  // where
> > the DAOs live
> >
> >
> >     /*
> >
> ****************************************************************************************
> >      *             DASHBOARDS
> >      */
> >
> >     //
> >     // GET .../dashbd                 get all
> dashboards in table
> >     //
> >     public HttpHeaders index() {
> >         dashboardList = dashboardService.getAll();
> >         return new
> DefaultHttpHeaders("index")   // dashbd-index.jsp
> >             .disableCaching();
> >     }
> >
> >
> > and etc. ....
> >
> > ...END SNIPPET >
> >
> > There are more methods in this calss of course, but
> all I'm trying to do
> > initially is hit the index() action with the URL above
> ?!?
> >
> > the index.jsp is really simple:
> >
> > <% response.sendRedirect("dashbd"); %>
> >
> >
> > this same scheme works perfectly with another RESTful
> app service and fir
> > the life of me, I can't find any
> >
> >
> >
> > On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton
> <ne...@yahoo.com>wrote:
> >
> >> The web.xml doesn't have anything to do with
> the error message; it thinks
> >> there isn't an action configured at the URL
> you're requesting.
> >>
> >> Impossible to help without more information.
> >>
> >> Dave
> >>
> >> --- On Mon, 7/28/08, John Moose
> <jg...@gmail.com> wrote:
> >>
> >> > From: John Moose <jg...@gmail.com>
> >> > Subject: There is no Action mapped for
> namespace / and action name ...
> >> > To: "Struts Users Mailing List"
> <us...@struts.apache.org>
> >> > Date: Monday, July 28, 2008, 3:58 PM
> >> > I know what you're thinking... web.xml
> has no action
> >> > mapping, but it does!
> >> >
> >> >
> >> > <?xml version="1.0"
> >> > encoding="UTF-8"?>
> >> > <web-app version="2.5"
> >> >    
> xmlns="http://java.sun.com/xml/ns/javaee"
> >> >
> >> >
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >
> >> >
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >> >
> >> >
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >> >
> >> >     <display-name>Struts 2 RESTful
> Ozone
> >> > Services</display-name>
> >> >
> >> >   <!-- Filters -->
> >> >       <filter>
> >> >          
> <filter-name>action2</filter-name>
> >> >
> >> >
> >>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >> >           <init-param>
> >> >
> >> >
> <param-name>actionPackages</param-name>
> >> >
> >> >
> <param-value>com.myeclipse.ozone</param-value>
> >> >           </init-param>
> >> >           <init-param>
> >> >
> >> >
> <param-name>struts.devMode</param-name>
> >> >              
> <param-value>true</param-value>
> >> >           </init-param>
> >> >       </filter>
> >> >
> >> >       <filter-mapping>
> >> >          
> <filter-name>action2</filter-name>
> >> >          
> <url-pattern>/*</url-pattern>
> >> >       </filter-mapping>
> >> >
> >> >   <welcome-file-list>
> >> >    
> <welcome-file>index.jsp</welcome-file>
> >> >   </welcome-file-list>
> >> > </web-app>
> >> >
> >> >
> >> >
> >> > This file works well with another Struts2.1.3
> app.  Can
> >> > someone help me
> >> > understand where to look for the cause of
> this???
> >> >
> >> > Thanks folks
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail:
> user-help@struts.apache.org
> >>
> >>
> >

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


Re: There is no Action mapped for namespace / and action name ...

Posted by John Moose <jg...@gmail.com>.
and I probably should have included this as well:

Struts Problem Report

Struts has detected an unhandled exception:
  *Messages*:
There is no Action mapped for namespace / and action name dashbd.
 ------------------------------
Stacktraces *There is no Action mapped for namespace / and action name
dashbd. - [unknown location]*

    com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:177)
    com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:59)
    org.apache.struts2.rest.RestActionProxyFactory.createActionProxy(RestActionProxyFactory.java:40)
    org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:439)
    org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
    org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
    java.lang.Thread.run(Thread.java:595)



On Mon, Jul 28, 2008 at 4:39 PM, John Moose <jg...@gmail.com> wrote:

> Hi Dave,
>
> I have the following snippet of DashbdController class that I am expecting
> to hit with the following URL:
>
> http:/localhost:8080/Dashbd
>
> <---SNIPPET
>
> package com.myeclipse.ozone;
>
> import java.util.Collection;
>
> import com.myeclipse.hibernate.*;
>
> import org.hibernate.HibernateException;
> import org.hibernate.Session;
> import org.hibernate.cfg.Configuration;
>
> import org.apache.struts2.config.Result;
> import org.apache.struts2.config.Results;
> import org.apache.struts2.dispatcher.ServletActionRedirectResult;
> import org.apache.struts2.rest.DefaultHttpHeaders;
> import org.apache.struts2.rest.HttpHeaders;
>
> import com.opensymphony.xwork2.ModelDriven;
> import com.opensymphony.xwork2.Validateable;
> import com.opensymphony.xwork2.ValidationAwareSupport;
>
>
> @Results({
>     @Result(name="success", type=ServletActionRedirectResult.class,
> value="dashbd")
> })
>
> public class DashbdController extends ValidationAwareSupport implements
> ModelDriven<Object>, Validateable{
>
>    //private static Gadget    transientGadget = new Gadget();
>
>     //String id;
>     int id;
>
>     private static int    dashboardId;
>
>     private Collection<Dashbd>     dashboardList;
>     private Collection<Dashbd>     model;
>     private Collection<DashbdType> dashboardTypeList;
>
>     private DashbdService dashboardService = new DashbdService();  // where
> the DAOs live
>
>
>     /*
> ****************************************************************************************
>      *             DASHBOARDS
>      */
>
>     //
>     // GET .../dashbd                 get all dashboards in table
>     //
>     public HttpHeaders index() {
>         dashboardList = dashboardService.getAll();
>         return new DefaultHttpHeaders("index")   // dashbd-index.jsp
>             .disableCaching();
>     }
>
>
> and etc. ....
>
> ...END SNIPPET >
>
> There are more methods in this calss of course, but all I'm trying to do
> initially is hit the index() action with the URL above ?!?
>
> the index.jsp is really simple:
>
> <% response.sendRedirect("dashbd"); %>
>
>
> this same scheme works perfectly with another RESTful app service and fir
> the life of me, I can't find any
>
>
>
> On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton <ne...@yahoo.com>wrote:
>
>> The web.xml doesn't have anything to do with the error message; it thinks
>> there isn't an action configured at the URL you're requesting.
>>
>> Impossible to help without more information.
>>
>> Dave
>>
>> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>>
>> > From: John Moose <jg...@gmail.com>
>> > Subject: There is no Action mapped for namespace / and action name ...
>> > To: "Struts Users Mailing List" <us...@struts.apache.org>
>> > Date: Monday, July 28, 2008, 3:58 PM
>> > I know what you're thinking... web.xml has no action
>> > mapping, but it does!
>> >
>> >
>> > <?xml version="1.0"
>> > encoding="UTF-8"?>
>> > <web-app version="2.5"
>> >     xmlns="http://java.sun.com/xml/ns/javaee"
>> >
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >
>> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> >
>> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
>> >
>> >     <display-name>Struts 2 RESTful Ozone
>> > Services</display-name>
>> >
>> >   <!-- Filters -->
>> >       <filter>
>> >           <filter-name>action2</filter-name>
>> >
>> >
>> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>> >           <init-param>
>> >
>> > <param-name>actionPackages</param-name>
>> >
>> > <param-value>com.myeclipse.ozone</param-value>
>> >           </init-param>
>> >           <init-param>
>> >
>> > <param-name>struts.devMode</param-name>
>> >               <param-value>true</param-value>
>> >           </init-param>
>> >       </filter>
>> >
>> >       <filter-mapping>
>> >           <filter-name>action2</filter-name>
>> >           <url-pattern>/*</url-pattern>
>> >       </filter-mapping>
>> >
>> >   <welcome-file-list>
>> >     <welcome-file>index.jsp</welcome-file>
>> >   </welcome-file-list>
>> > </web-app>
>> >
>> >
>> >
>> > This file works well with another Struts2.1.3 app.  Can
>> > someone help me
>> > understand where to look for the cause of this???
>> >
>> > Thanks folks
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by John Moose <jg...@gmail.com>.
Hi Dave,

I have the following snippet of DashbdController class that I am expecting
to hit with the following URL:

http:/localhost:8080/Dashbd

<---SNIPPET

package com.myeclipse.ozone;

import java.util.Collection;

import com.myeclipse.hibernate.*;

import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.cfg.Configuration;

import org.apache.struts2.config.Result;
import org.apache.struts2.config.Results;
import org.apache.struts2.dispatcher.ServletActionRedirectResult;
import org.apache.struts2.rest.DefaultHttpHeaders;
import org.apache.struts2.rest.HttpHeaders;

import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.Validateable;
import com.opensymphony.xwork2.ValidationAwareSupport;


@Results({
    @Result(name="success", type=ServletActionRedirectResult.class,
value="dashbd")
})

public class DashbdController extends ValidationAwareSupport implements
ModelDriven<Object>, Validateable{

   //private static Gadget    transientGadget = new Gadget();

    //String id;
    int id;

    private static int    dashboardId;

    private Collection<Dashbd>     dashboardList;
    private Collection<Dashbd>     model;
    private Collection<DashbdType> dashboardTypeList;

    private DashbdService dashboardService = new DashbdService();  // where
the DAOs live


    /*
****************************************************************************************
     *             DASHBOARDS
     */

    //
    // GET .../dashbd                 get all dashboards in table
    //
    public HttpHeaders index() {
        dashboardList = dashboardService.getAll();
        return new DefaultHttpHeaders("index")   // dashbd-index.jsp
            .disableCaching();
    }


and etc. ....

...END SNIPPET >

There are more methods in this calss of course, but all I'm trying to do
initially is hit the index() action with the URL above ?!?

the index.jsp is really simple:

<% response.sendRedirect("dashbd"); %>


this same scheme works perfectly with another RESTful app service and fir
the life of me, I can't find any



On Mon, Jul 28, 2008 at 4:17 PM, Dave Newton <ne...@yahoo.com> wrote:

> The web.xml doesn't have anything to do with the error message; it thinks
> there isn't an action configured at the URL you're requesting.
>
> Impossible to help without more information.
>
> Dave
>
> --- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:
>
> > From: John Moose <jg...@gmail.com>
> > Subject: There is no Action mapped for namespace / and action name ...
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Date: Monday, July 28, 2008, 3:58 PM
> > I know what you're thinking... web.xml has no action
> > mapping, but it does!
> >
> >
> > <?xml version="1.0"
> > encoding="UTF-8"?>
> > <web-app version="2.5"
> >     xmlns="http://java.sun.com/xml/ns/javaee"
> >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >
> > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >
> > http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> >
> >     <display-name>Struts 2 RESTful Ozone
> > Services</display-name>
> >
> >   <!-- Filters -->
> >       <filter>
> >           <filter-name>action2</filter-name>
> >
> >
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> >           <init-param>
> >
> > <param-name>actionPackages</param-name>
> >
> > <param-value>com.myeclipse.ozone</param-value>
> >           </init-param>
> >           <init-param>
> >
> > <param-name>struts.devMode</param-name>
> >               <param-value>true</param-value>
> >           </init-param>
> >       </filter>
> >
> >       <filter-mapping>
> >           <filter-name>action2</filter-name>
> >           <url-pattern>/*</url-pattern>
> >       </filter-mapping>
> >
> >   <welcome-file-list>
> >     <welcome-file>index.jsp</welcome-file>
> >   </welcome-file-list>
> > </web-app>
> >
> >
> >
> > This file works well with another Struts2.1.3 app.  Can
> > someone help me
> > understand where to look for the cause of this???
> >
> > Thanks folks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: There is no Action mapped for namespace / and action name ...

Posted by Dave Newton <ne...@yahoo.com>.
The web.xml doesn't have anything to do with the error message; it thinks there isn't an action configured at the URL you're requesting.

Impossible to help without more information.

Dave

--- On Mon, 7/28/08, John Moose <jg...@gmail.com> wrote:

> From: John Moose <jg...@gmail.com>
> Subject: There is no Action mapped for namespace / and action name ...
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Monday, July 28, 2008, 3:58 PM
> I know what you're thinking... web.xml has no action
> mapping, but it does!
> 
> 
> <?xml version="1.0"
> encoding="UTF-8"?>
> <web-app version="2.5"
>     xmlns="http://java.sun.com/xml/ns/javaee"
>    
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>    
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>    
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> 
>     <display-name>Struts 2 RESTful Ozone
> Services</display-name>
> 
>   <!-- Filters -->
>       <filter>
>           <filter-name>action2</filter-name>
> 
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
>           <init-param>
>              
> <param-name>actionPackages</param-name>
>              
> <param-value>com.myeclipse.ozone</param-value>
>           </init-param>
>           <init-param>
>              
> <param-name>struts.devMode</param-name>
>               <param-value>true</param-value>
>           </init-param>
>       </filter>
> 
>       <filter-mapping>
>           <filter-name>action2</filter-name>
>           <url-pattern>/*</url-pattern>
>       </filter-mapping>
> 
>   <welcome-file-list>
>     <welcome-file>index.jsp</welcome-file>
>   </welcome-file-list>
> </web-app>
> 
> 
> 
> This file works well with another Struts2.1.3 app.  Can
> someone help me
> understand where to look for the cause of this???
> 
> Thanks folks

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