Marcelo is exactly correct, and here's an expansion of his explanation
showing a sample struts-config:


<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
<struts-config>
  <action-mappings>
    <action   path="/myJSP"
              type="package.ForwardAction"
              name="sampleForm"
              scope="request"
              input="/WEB-INF/jsp/myJSP.jsp">
    </action>
  </action-mappings>
</struts-config>


// In the ForwardAction class:

 public ActionForward performAction(ActionMapping mapping,
                                 ActionForm form,
                                 HttpServletRequest request,
                                 HttpServletResponse response,
                                 PASContext     ctx,
                                 Connection conn, Category cat)
         throws IOException, ServletException
    {

          return (new ActionForward(mapping.getInput()));
    }


> -----Original Message-----
> From: Marcelo Vanzin [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 19, 2002 11:15 AM
> To: Struts Users Mailing List
> Subject: Re: *.do ---- Proof of Concepts
>
>
>
>       Make a small action that only redirects to its input when
> the perform()
> method is called, e.g.:
>
>       return new ActionForward(mapping.getInput());
>
>       Then use it in all you action mappings in the config file,
> changing the
> "input" attribute to the desired JSP.
>
> K J wrote:
> > Say I have a web application which contains 1 JSP and
> > I wanted to use Struts. I don't have any action
> > classes, but I want to use the controler servelt and
> > the taglib. Will the *.do work only when you have
> > action classes? What would this entry look like if I
> > only want the Controler servelt to forward to a
> > JSP(without any action classes)?
>
>
> --
> []'s
> Marcelo Vanzin
> Touch Tecnologia
> [EMAIL PROTECTED]
> "Life is too short to drink cheap beer"
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


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

Reply via email to