struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simen Brekken" <si...@lunarlounge.org>
Subject Re: Newbie: Hello World ActionForward returns nothing
Date Wed, 12 Mar 2003 00:07:59 GMT
Found the problem, I was reading docs for 1.1RC1 the class uses execute()
which sadly isn't present in 1.0.2 which I was developing for.

D O H.


----- Original Message -----
From: "Simen Brekken" <simen@lunarlounge.org>
To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
Sent: Tuesday, March 11, 2003 11:00 PM
Subject: Re: Newbie: Hello World ActionForward returns nothing


> Yes, with that syntax naturally
>
> ----- Original Message -----
> From: "Ashish Kulkarni" <kulkarni_ash1312@yahoo.com>
> To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
> Sent: Tuesday, March 11, 2003 10:39 PM
> Subject: Re: Newbie: Hello World ActionForward returns nothing
>
>
> > How do u call this action class??
> > are u loading it from jsp or html??
> > http://localhost:8080/yourapplicationname/helloWorld.do
> > should call it i guess???
> > Correct me if i am wrong
> > --- Simen Brekken <simen@lunarlounge.org> wrote:
> > > (NOTE: If this is reposted, I appoligize.)
> > >
> > > It's a drop dead simple "Hello World!" example but
> > > after almost two days
> > > trying to get it working I'm giving up helping some
> > > of you can make sense
> > > out of this nightmare :)
> > >
> > > - Jetty 4.2.8
> > > - Struts 1.0.2
> > > - All config files (web.xml, jetty.xml and
> > > struts.xml) have been validated
> > > against DTDs.
> > > - Debug and detail set to "2" in web.xml
> > > - commons-logging in WEB-INF/classes set to one line
> > >
> >
"org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
> > >
> > > Struts is "working", as I have tried a
> > > HelloWorldStatic (using a simple
> > > <action path="/helloWorldStatic"
> > > forward="/hello.jsp" />) and it prints
> > > "Hello Word!"
> > >
> > > struts.xml defines a simple action with only one
> > > possible forward.
> > >
> > > -- WEB-INF/struts.xml --
> > > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > >  <!DOCTYPE struts-config PUBLIC
> > >        "-//Apache Software Foundation//DTD Struts
> > > Configuration 1.1//EN"
> > >
> > >
> > "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
> > > <struts-config>
> > >  <action-mapping>
> > >   <action path="/helloWorld"
> > > type="org.foo.hellobirdy.HelloBirdyAction">
> > >    <forward name="hello" path="/hello.jsp" />
> > >   </action>
> > >  </action-mapping>
> > > </struts-config>
> > > -- END --
> > >
> > > --
> > > WEB-INF/src/org/foo/hellobirdy/HelloBirdyAction.java
> > > --
> > > package org.foo.hellobirdy;
> > >
> > > import javax.servlet.http.HttpServletRequest;
> > > import javax.servlet.http.HttpServletResponse;
> > >
> > > import org.apache.commons.logging.Log;
> > > import org.apache.commons.logging.LogFactory;
> > > import org.apache.struts.action.Action;
> > > import org.apache.struts.action.ActionForm;
> > > import org.apache.struts.action.ActionForward;
> > > import org.apache.struts.action.ActionMapping;
> > >
> > > public final class HelloBirdyAction extends Action
> > > {
> > >  public ActionForward execute(
> > >   ActionMapping mapping,
> > >   ActionForm form,
> > >   HttpServletRequest request,
> > >   HttpServletResponse response)
> > >   throws Exception
> > >  {
> > >   ActionForward forward = null;
> > >   Log log =
> > > LogFactory.getLog(HelloBirdyAction.class);
> > >
> > >   forward = mapping.findForward("hello");
> > >
> > >   log.error("mapping: "+mapping.toString());
> > >   log.error("found forward: "+forward);
> > >
> > >   return forward;
> > >  }
> > > }
> > > -- END --
> > >
> > > Now it compiles like a charm, jsp works by putting
> > > in URL manually but:
> > >
> > > - I get nothing in the browser
> > > - Nothing in the container logs
> > > - Nothing except "Processing a GET for /helloWorld"
> > > in STDOUT.
> > >
> > > Hope I explained things good enough for someone to
> > > assist me, I'm going
> > > insaaaaneee :)
> > >
> > > ___
> > > SIMEN BREKKEN / in his prime
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > struts-user-help@jakarta.apache.org
> > >
> >
> >
> > =====
> > A$HI$H
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Web Hosting - establish your business online
> > http://webhosting.yahoo.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


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


Mime
View raw message