You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Andy <an...@hotmail.com> on 2009/03/30 07:01:04 UTC
DWR and S2 setup problem
I am trying to incorporate DWR into my Spring/Struts2 application, but receive a 404 when accessing http://localhost:8080/myapp/dwr. It seems the DWR servlet is not being reached. Any ideas? Thanks
Here is the error:
There is no Action mapped for action name dwr/. - [unknown location]
Here is my web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.spring.DwrSpringServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>/content/jsp/index.jsp</welcome-file>
</welcome-file-list>
</web-app>
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
RE: DWR and S2 setup problem
Posted by Andy <an...@hotmail.com>.
Even though the servlet doesnt work the DWR calls are still made somehow. I havent looked into it too much to understand how it all works. Maybe the test servlet it just for testing? I dont know..
I ended up sticking with the Spring plugin instead of using the S2 plugin. I like to define my stuff in applicationContext.xml instead of using a dwr.xml file. Just my preference. Thanks for the post.
Andy
> Date: Mon, 30 Mar 2009 00:21:10 -0500
> Subject: Re: DWR and S2 setup problem
> From: cody@burlesontech.com
> To: user@struts.apache.org
>
> I haven't tried to work with DWR yet, but I thought I might pass this
> possibility your way. Have you tried using the DWR plugin for Struts 2 yet?
> Maybe you will have better luck in that direction rather than the approach
> you are taking. Just an idea to try.
>
> Here is the URL:
> http://struts.apache.org/2.x/docs/dwr-plugin.html
>
> - Cody Burleson
>
>
> On Mon, Mar 30, 2009 at 12:01 AM, Andy <an...@hotmail.com> wrote:
>
> >
> > I am trying to incorporate DWR into my Spring/Struts2 application, but
> > receive a 404 when accessing http://localhost:8080/myapp/dwr. It seems
> > the DWR servlet is not being reached. Any ideas? Thanks
> >
> >
> >
_________________________________________________________________
Express your personality in color! Preview and select themes for HotmailĀ®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TXT_MSGTX_WL_HM_express_032009#colortheme
Re: DWR and S2 setup problem
Posted by Cody Burleson <co...@burlesontech.com>.
I haven't tried to work with DWR yet, but I thought I might pass this
possibility your way. Have you tried using the DWR plugin for Struts 2 yet?
Maybe you will have better luck in that direction rather than the approach
you are taking. Just an idea to try.
Here is the URL:
http://struts.apache.org/2.x/docs/dwr-plugin.html
- Cody Burleson
On Mon, Mar 30, 2009 at 12:01 AM, Andy <an...@hotmail.com> wrote:
>
> I am trying to incorporate DWR into my Spring/Struts2 application, but
> receive a 404 when accessing http://localhost:8080/myapp/dwr. It seems
> the DWR servlet is not being reached. Any ideas? Thanks
>
>
>