:-) The question is not, whether it works on different servers,
the question is, whether the original including of forwarding
Action works on some servers.
If the Action.perform returns null, then there is no forward and
no reason for such an exception.
The real problem with this solution is that it breaks the MVC
pattern. In order to make it work, your VIEW (your JSP) which
includes the action, decides how to display the action's results.
It does so by incluing the second *.jsp.
But this decision should be made by the action itself in cooperation
with the ActionServlet. (The action decides what is the logical
result e.g. "success" and the action servlet maps it to the
physical *.jsp or whatever is defined in struts-config.xml)
--
gR
----- Original Message -----
From: "Mikkel Bruun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, September 03, 2001 12:19 PM
Subject: SV: Including Actions via jsp:include
> whoa!
>
> thanks alot...
>
> does this hack work on all servers???
> I have just tested it on tomcat 3.2, will try on Iplanet later...
>
> ::
> Mikkel Bruun
> Senior IT Developer
> [EMAIL PROTECTED]
> Direct: +45 32 88 22 73
>
> Valtech A/S
> Kanonbaadsvej 10
> DK-1437 Copenhagen
> Tel +45 32 88 20 00
> Fax +45 32 88 20 20
>
>
>
> > -----Oprindelig meddelelse-----
> > Fra: Gregor Rayman [mailto:[EMAIL PROTECTED]]
> > Sendt: 03 September 2001 11:50
> > Til: [EMAIL PROTECTED]
> > Emne: Re: Including Actions via jsp:include
> >
> >
> > > hi Guys,
> > >
> > > I bet this has come up before...
> > >
> > > I need to include the output of an action in a jsp, using
> > the jsp:include
> > > tag lie this:
> > >
> > > <jsp:include page="/myAction.do" flush="true">
> > > <jsp:param name="USERID" value="CARLOSUS" />
> > > </jsp:include>
> > >
> > > but I get an illegalstate exception, as the ActionServlet
> > forwards instead
> > > of includes...
> > >
> > > is there anyway to do this???
> > >
> > > thanks
> >
> >
> > I've found one workaround which can help in some situations:
> >
> > make the Action.perform return null.
> >
> > include the view (JSP) then.
> >
> > So it could look like this:
> >
> > <jsp:include page="/myAction.do" flush="true">
> > <jsp:param name="USERID" value="CARLOSUS" />
> > </jsp:include>
> > <jsp:include page="/myAction.jsp" flush="true" />
> >
> >
> > But it is ugly indeed.
> >
> > --
> > gR
> >
> >
> >
> >
>