struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Steil" <petelo...@gmx.net>
Subject Re: RE: Struts2
Date Thu, 17 Aug 2006 20:04:54 GMT
If I set the path, I get the following message in the browser:

file:/C:/tomcat-5.5.17/webapps/mystruts/WEB-INF/classes/struts.xml:9:72
	com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFile(XmlConfigurationProvider.java:678)
	com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:117)
	com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:87)
	com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:46)
	org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:215)


Also, Tomcat logs the following:
SEVERE: Attribute "path" must be declared for element type "action". at (null:9:
72)



-------- Original-Nachricht --------
Datum: Thu, 17 Aug 2006 15:47:54 -0400
Von: Monkeyden <monkeyden@gmail.com>
An: "Struts Users Mailing List" <user@struts.apache.org>
Betreff: Re: RE: Struts2

> you need a path attribute for the action mapping.
> 
> <action path="/helloWorld" name="helloWorld" class="HelloWorld">
> 
> On 8/17/06, Peter Steil <petelocke@gmx.net> wrote:
> >
> > The exact same thing happens. I give you some more information. You know
> > how my web.xml looks like. Here are the other files:
> >
> > struts.xml:
> > ------------
> >
> > <!DOCTYPE struts PUBLIC
> >    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
> >    "http://struts.apache.org/dtds/struts-2.0.dtd">
> >
> > <struts>
> >   <include file="struts-default.xml"/>
> >
> >   <package name="default" extends="struts-default">
> >     <action name="helloWorld" class="HelloWorld">
> >         <result name="success">helloWorld.jsp</result>
> >      </action>
> >   </package>
> > </struts>
> >
> >
> > helloWorld.jsp:
> > ---------------
> >
> > <%@ taglib prefix="saf" uri="/tags" %>
> > <html>
> >   <head>
> >    <title>Hello World</title>
> >   </head>
> > <body>
> >    The message generated by my first Action is:
> >    <saf:property value="message"/>
> > </body>
> > </html>
> >
> >
> >
> > HelloWorld.java:
> > ----------------
> >
> > import com.opensymphony.xwork2.Action;
> > import java.util.*;
> > import java.text.DateFormat;
> >
> > public class HelloWorld implements Action {
> >
> > private String message;
> >
> > public String execute() {
> >   message = "Hello, World!\n";
> >   message += "The time is:\n";
> >   message += DateFormat.getDateInstance().format(new Date());
> >
> >   return SUCCESS;
> > }
> >
> > public String getMessage() {
> >   return message;
> > }
> >
> > }
> >
> >
> >
> > Thanks,
> > Peter
> >
> >
> > -------- Original-Nachricht --------
> > Datum: Thu, 17 Aug 2006 14:04:52 -0500
> > Von: George.Dinwiddie@wellsfargo.com
> > An: user@struts.apache.org
> > Betreff: RE: Struts2
> >
> > > It looks like you're requesting a page with suffix mapping
> > > ("helloWorld.do") but you've configured struts to use prefix mapping
> > ("/*").  What happens
> > > if you change to "<url-pattern>*.do</url-pattern>"?
> > >
> > >  - George
> > >    http://www.idiacomputing.com/
> > >
> > >
> > > > -----Original Message-----
> > > > From: Peter Steil [mailto:petelocke@gmx.net]
> > > > Sent: Thursday, August 17, 2006 2:01 PM
> > > > To: user@struts.apache.org
> > > > Subject: 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.ContextLoaderL
> > > > istener</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
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> >
> > --
> >
> >
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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


Mime
View raw message