Yes, with that syntax naturally

----- Original Message -----
From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
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 <[EMAIL PROTECTED]> 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:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> >
>
>
> =====
> A$HI$H
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to