You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Peter Steil <pe...@gmx.net> on 2006/08/17 20:01:24 UTC
Struts2
Hi, I am trying to get started on Struts2 using the nightly build 'struts2-core-2.0.0-SNAPSHOT-20060816.jar'. I started with the very basic example from 'http://cwiki.apache.org/WW/hello-world.html' and I still get the message 'The requested resource (/mystruts/helloWorld.do) is not available.' in my browser. My web.xml looks like this:
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>My Application</display-name>
<filter>
<filter-name>action2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>action2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
</web-app>
Can anybody help me?
Thanks,
Peter
--
Echte DSL-Flatrate dauerhaft für 0,- Euro*. Nur noch kurze Zeit!
"Feel free" mit GMX DSL: http://www.gmx.net/de/go/dsl
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2
Posted by Ted Husted <hu...@apache.org>.
The default extension for Struts2 is "action". The default makes it
easier to use both Struts 1 and Struts 2 in the same web applications.
To change the default to ".do", add a "struts.properties" file under
classes with the line
struts.action.extension = do
A good starting point is the Struts 2 MailReader application.
Unfortunately, the nightly build doesn't bundle the source, so the
best thing might be to check out the source from Subversion.
* http://struts.apache.org/downloads.html#Source_Code
I'll be updating the wiki tutorials next week with additional
material, adopted from the MailReader Training course.
-Ted.
On 8/17/06, Peter Steil <pe...@gmx.net> wrote:
> Hi, I am trying to get started on Struts2 using the nightly build 'struts2-core-2.0.0-SNAPSHOT-20060816.jar'. I started with the very basic example from 'http://cwiki.apache.org/WW/hello-world.html' and I still get the message 'The requested resource (/mystruts/helloWorld.do) is not available.' in my browser. My web.xml looks like this:
>
> <?xml version="1.0"?>
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
> <display-name>My Application</display-name>
> <filter>
> <filter-name>action2</filter-name>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>action2</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
> <listener>
> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
> </listener>
> </web-app>
>
>
> Can anybody help me?
> Thanks,
> Peter
> --
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts2
Posted by Ted Husted <hu...@apache.org>.
On 8/17/06, Peter Steil <pe...@gmx.net> wrote:
> Hi, I am trying to get started on Struts2 using the nightly build 'struts2-core-2.0.0-SNAPSHOT-20060816.jar'. I started with the very basic example from 'http://cwiki.apache.org/WW/hello-world.html'
There were several problems with the code on that page. I fixed the
page and checked the working code into a sandbox application, for
reference.
* http://svn.apache.org/viewvc/struts/sandbox/trunk/mailreader-course/struts2/hello/src/
HTH, Ted.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org