You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Theodoridis <st...@tera.gr> on 2003/09/25 20:27:29 UTC

Tiles and ControllerClass

Hi.

In tiles-def.xml i have the following definition

 <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" controllerClass="gr.tera.portal.actions.poll.GetPollAction">
       <put name="title"  value="Poll" />
       <put name="tileBody" value="/pages/poll/poll.jsp" />
</definition>

But when i run the application i am getting the following message

javax.servlet.ServletException: Controller of class 'gr.tera.portal.actions.poll.GetPollAction' should implements 'Controller' or extends 'Action'
 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
 at org.apache.jsp.vboxLayout_jsp._jspService(vboxLayout_jsp.java:100)
..........

The class GetPollAction extends the Action class 

I  am using Struts 1.2b
Tomcat 1.24

To solve the problem  i use  the following

   <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
   <put name="title"  value="Poll" />
   <put name="tileBody" value="/poll.do" />
  </definition>
in tiles-def.xml

and in struts-config.xml this

 <action  path="/pollAction"
  type="gr.tera.portal.actions.poll.GetPollAction">
  <forward name="success" path="/pages/poll/poll.jsp"/>
 </action>

is this write? or will be a problem?

Thanx

Theodoridis Dimitris

Re: Tiles and ControllerClass

Posted by Barry Volpe <st...@childrencare.com>.
I addition if you implement Controller you will
need to declare the (interface requirement) perform method.




----- Original Message ----- 
From: "Barry Volpe" <st...@childrencare.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 11:32 AM
Subject: Re: Tiles and ControllerClass


> The problem I ran into with this is if you are using the controllerClass
you
> are required to
> implement Controller even though you are extending Action.
>
> If you are extending Action or Tiles Action and not implementing
Controller
> then
> I was required to use ControllerUrl.  This required me to add an action in
> the struts-config as you have
> already defined:
>
> I'll foward you a previous post in another email to show you what I did.
>
> Barry
>
> ----- Original Message ----- 
> From: "Jim Theodoridis" <st...@tera.gr>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Thursday, September 25, 2003 11:27 AM
> Subject: Tiles and ControllerClass
>
>
> Hi.
>
> In tiles-def.xml i have the following definition
>
>  <definition name=".poll" path="/tiles/layouts/tileLayout.jsp"
> controllerClass="gr.tera.portal.actions.poll.GetPollAction">
>        <put name="title"  value="Poll" />
>        <put name="tileBody" value="/pages/poll/poll.jsp" />
> </definition>
>
> But when i run the application i am getting the following message
>
> javax.servlet.ServletException: Controller of class
> 'gr.tera.portal.actions.poll.GetPollAction' should implements 'Controller'
> or extends 'Action'
>  at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
> l.java:533)
>  at org.apache.jsp.vboxLayout_jsp._jspService(vboxLayout_jsp.java:100)
> ..........
>
> The class GetPollAction extends the Action class
>
> I  am using Struts 1.2b
> Tomcat 1.24
>
> To solve the problem  i use  the following
>
>    <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
>    <put name="title"  value="Poll" />
>    <put name="tileBody" value="/poll.do" />
>   </definition>
> in tiles-def.xml
>
> and in struts-config.xml this
>
>  <action  path="/pollAction"
>   type="gr.tera.portal.actions.poll.GetPollAction">
>   <forward name="success" path="/pages/poll/poll.jsp"/>
>  </action>
>
> is this write? or will be a problem?
>
> Thanx
>
> Theodoridis Dimitris
>
>
>
> ---------------------------------------------------------------------
> 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


Re: Tiles and ControllerClass

Posted by Barry Volpe <st...@childrencare.com>.
The problem I ran into with this is if you are using the controllerClass you
are required to
implement Controller even though you are extending Action.

If you are extending Action or Tiles Action and not implementing Controller
then
I was required to use ControllerUrl.  This required me to add an action in
the struts-config as you have
already defined:

I'll foward you a previous post in another email to show you what I did.

Barry

----- Original Message ----- 
From: "Jim Theodoridis" <st...@tera.gr>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 11:27 AM
Subject: Tiles and ControllerClass


Hi.

In tiles-def.xml i have the following definition

 <definition name=".poll" path="/tiles/layouts/tileLayout.jsp"
controllerClass="gr.tera.portal.actions.poll.GetPollAction">
       <put name="title"  value="Poll" />
       <put name="tileBody" value="/pages/poll/poll.jsp" />
</definition>

But when i run the application i am getting the following message

javax.servlet.ServletException: Controller of class
'gr.tera.portal.actions.poll.GetPollAction' should implements 'Controller'
or extends 'Action'
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
 at org.apache.jsp.vboxLayout_jsp._jspService(vboxLayout_jsp.java:100)
..........

The class GetPollAction extends the Action class

I  am using Struts 1.2b
Tomcat 1.24

To solve the problem  i use  the following

   <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
   <put name="title"  value="Poll" />
   <put name="tileBody" value="/poll.do" />
  </definition>
in tiles-def.xml

and in struts-config.xml this

 <action  path="/pollAction"
  type="gr.tera.portal.actions.poll.GetPollAction">
  <forward name="success" path="/pages/poll/poll.jsp"/>
 </action>

is this write? or will be a problem?

Thanx

Theodoridis Dimitris



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


Re: And now for something completely different... [OT]

Posted by Max Cooper <ma...@maxcooper.com>.
Well, I do some administration work on a few Unix servers from time to time,
but I wouldn't really call myself a sysadmin. Oh no! I am in denial. :-)

-Max

----- Original Message ----- 
From: "Adam Hardy" <ah...@cyberspaceroad.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 2:35 PM
Subject: Re: And now for something completely different... [OT]


> Oh I see, Max, it sounds like you might be a Unix systems administrator
> yourself....... ;)
>
> is it Friday yet?
>
> On 09/25/2003 10:28 PM Max Cooper wrote:
> > What's with this?:
> >
> > "Drug and alcohol abusers will vehemently deny their addiction,
especially
> > UNIX systems administrators..."
> >
> > Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
> > author thinks that Unix is over, and that the sysadmins are just in
denial
> > about that and thus prone to denial about other problems? This just
strikes
> > me as a very strange statement -- I don't get it.
> >
> > -Max
> >
> > ----- Original Message ----- 
> > From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Thursday, September 25, 2003 12:06 PM
> > Subject: And now for something completely different... [OT]
> >
> >
> >
> >>Please don't kick me for posting this here, but still, one
> >>or two might possibly be interested in taking notice:
> >>
> >>http://www.dba-oracle.com/art_firing.htm
> >>
> >>It's always good to know one's enemies :-)
> >>
> >>-- Chris
> >>
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
>
> -- 
> struts 1.1 + tomcat 4.1.27 + java 1.4.2
> Linux 2.4.20 RH9
>
>
> ---------------------------------------------------------------------
> 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


Re: And now for something completely different... [OT]

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Oh I see, Max, it sounds like you might be a Unix systems administrator 
yourself....... ;)

is it Friday yet?

On 09/25/2003 10:28 PM Max Cooper wrote:
> What's with this?:
> 
> "Drug and alcohol abusers will vehemently deny their addiction, especially
> UNIX systems administrators..."
> 
> Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
> author thinks that Unix is over, and that the sysadmins are just in denial
> about that and thus prone to denial about other problems? This just strikes
> me as a very strange statement -- I don't get it.
> 
> -Max
> 
> ----- Original Message ----- 
> From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Thursday, September 25, 2003 12:06 PM
> Subject: And now for something completely different... [OT]
> 
> 
> 
>>Please don't kick me for posting this here, but still, one
>>or two might possibly be interested in taking notice:
>>
>>http://www.dba-oracle.com/art_firing.htm
>>
>>It's always good to know one's enemies :-)
>>
>>-- Chris
>>
>>
>>---------------------------------------------------------------------
>>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
> 
> 

-- 
struts 1.1 + tomcat 4.1.27 + java 1.4.2
Linux 2.4.20 RH9


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


Re: And now for something completely different... [OT]

Posted by Mark Lowe <ma...@talk21.com>.
Umm .. I've known a lot more coked-up account managers than alcoholic 
programmers...

Donald Burleson should get booted just for looking like an older man's 
hair product advert. He probably just getting his own back because no 
body ever invited him to the right kinda parties.


On Friday, September 26, 2003, at 12:08 PM, Mark Galbreath wrote:

> What do expect from a manager?  Managers are like art critics: if they 
> were
> worth a damn in their fields, they would be DOING, not observing.  I'd
> rather have an alcoholic C++ programmer than a manager any day of the 
> week.
> At least the alcoholic coder is incompetent only part of the time.
>
> Mark
>
> -----Original Message-----
> From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
> Sent: Thursday, September 25, 2003 11:39 PM
> To: Struts Users Mailing List
> Subject: RE: And now for something completely different... [OT]
>
>
> <snip>
> This just strikes me as a very strange statement -- I don't get it.
> </snip>
>
> Too much BSD will do that to you...
>
> -----Original Message-----
> From: Max Cooper [mailto:max@maxcooper.com]
> Sent: Friday, 26 September 2003 04:28
> To: Struts Users Mailing List
> Subject: Re: And now for something completely different... [OT]
>
>
> What's with this?:
>
> "Drug and alcohol abusers will vehemently deny their addiction, 
> especially
> UNIX systems administrators..."
>
> Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
> author thinks that Unix is over, and that the sysadmins are just in 
> denial
> about that and thus prone to denial about other problems? This just 
> strikes
> me as a very strange statement -- I don't get it.
>
> -Max
>
> ----- Original Message -----
> From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Thursday, September 25, 2003 12:06 PM
> Subject: And now for something completely different... [OT]
>
>
>> Please don't kick me for posting this here, but still, one
>> or two might possibly be interested in taking notice:
>>
>> http://www.dba-oracle.com/art_firing.htm
>>
>> It's always good to know one's enemies :-)
>>
>> -- Chris
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
> ---------------------------------------------------------------------
> 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


RE: And now for something completely different... [OT]

Posted by Mark Galbreath <mg...@dirtroad.net>.
What do expect from a manager?  Managers are like art critics: if they were
worth a damn in their fields, they would be DOING, not observing.  I'd
rather have an alcoholic C++ programmer than a manager any day of the week.
At least the alcoholic coder is incompetent only part of the time.

Mark

-----Original Message-----
From: Andrew Hill [mailto:andrew.david.hill@gridnode.com]
Sent: Thursday, September 25, 2003 11:39 PM
To: Struts Users Mailing List
Subject: RE: And now for something completely different... [OT]


<snip>
This just strikes me as a very strange statement -- I don't get it.
</snip>

Too much BSD will do that to you...

-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com]
Sent: Friday, 26 September 2003 04:28
To: Struts Users Mailing List
Subject: Re: And now for something completely different... [OT]


What's with this?:

"Drug and alcohol abusers will vehemently deny their addiction, especially
UNIX systems administrators..."

Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
author thinks that Unix is over, and that the sysadmins are just in denial
about that and thus prone to denial about other problems? This just strikes
me as a very strange statement -- I don't get it.

-Max

----- Original Message -----
From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 12:06 PM
Subject: And now for something completely different... [OT]


> Please don't kick me for posting this here, but still, one
> or two might possibly be interested in taking notice:
>
> http://www.dba-oracle.com/art_firing.htm
>
> It's always good to know one's enemies :-)
>
> -- Chris
>
>
> ---------------------------------------------------------------------
> 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



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


RE: And now for something completely different... [OT]

Posted by Andrew Hill <an...@gridnode.com>.
<snip>
This just strikes me as a very strange statement -- I don't get it.
</snip>

Too much BSD will do that to you...

-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com]
Sent: Friday, 26 September 2003 04:28
To: Struts Users Mailing List
Subject: Re: And now for something completely different... [OT]


What's with this?:

"Drug and alcohol abusers will vehemently deny their addiction, especially
UNIX systems administrators..."

Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
author thinks that Unix is over, and that the sysadmins are just in denial
about that and thus prone to denial about other problems? This just strikes
me as a very strange statement -- I don't get it.

-Max

----- Original Message ----- 
From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 12:06 PM
Subject: And now for something completely different... [OT]


> Please don't kick me for posting this here, but still, one
> or two might possibly be interested in taking notice:
>
> http://www.dba-oracle.com/art_firing.htm
>
> It's always good to know one's enemies :-)
>
> -- Chris
>
>
> ---------------------------------------------------------------------
> 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


Re: And now for something completely different... [OT]

Posted by Max Cooper <ma...@maxcooper.com>.
What's with this?:

"Drug and alcohol abusers will vehemently deny their addiction, especially
UNIX systems administrators..."

Are Unix Sys Admins the hardest partyers of the IT bunch? Or maybe the
author thinks that Unix is over, and that the sysadmins are just in denial
about that and thus prone to denial about other problems? This just strikes
me as a very strange statement -- I don't get it.

-Max

----- Original Message ----- 
From: "Christian Bollmeyer" <ja...@christianbollmeyer.de>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 12:06 PM
Subject: And now for something completely different... [OT]


> Please don't kick me for posting this here, but still, one
> or two might possibly be interested in taking notice:
>
> http://www.dba-oracle.com/art_firing.htm
>
> It's always good to know one's enemies :-)
>
> -- Chris
>
>
> ---------------------------------------------------------------------
> 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


And now for something completely different... [OT]

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
Please don't kick me for posting this here, but still, one
or two might possibly be interested in taking notice:

http://www.dba-oracle.com/art_firing.htm

It's always good to know one's enemies :-)

-- Chris


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


Re: Tiles and ControllerClass

Posted by Jim Theodoridis <st...@tera.gr>.
Thank you for your help.

Is thera any problem if i use a single Action like this? 

   <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
   <put name="title"  value="Poll" />
   <put name="tileBody" value="/pollTileAction.do" />
  </definition>


and not the TilesAction?




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


Re: Tiles and ControllerClass

Posted by khote <kh...@mminternet.com>.
You can also just implement the Controller:

package gr.tera.portal.actions.poll;
....
public class GetPollAction implements org.apache.struts.tiles.Controller {
....
}

the tiles processor currently calls the "perform" method, but the docs say
that this will be deprecated in 1.2
I found this useful, for the day when execute is called instead.

    public void perform(ComponentContext tileContext,
                        HttpServletRequest request,
                        HttpServletResponse response,
                        ServletContext servletContext)
                throws ServletException, java.io.IOException  {

        try {
            execute(tileContext,request,response,servletContext);
        } catch (Exception e) {
            throw new ServletException("execute returned an exception",e);
        }

    }




----- Original Message ----- 
From: "Alex Shneyderman" <al...@law.columbia.edu>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, September 25, 2003 11:28 AM
Subject: RE: Tiles and ControllerClass


> Yep, you gotta extend the right class.
> Try to extend
>
>    org.apache.struts.tiles.ActionController
>
> instead
>
> > -----Original Message-----
> > From: Jim Theodoridis [mailto:struts@tera.gr]
> > Sent: Thursday, September 25, 2003 2:27 PM
> > To: Struts Users Mailing List
> > Subject: Tiles and ControllerClass
> >
> > Hi.
> >
> > In tiles-def.xml i have the following definition
> >
> >  <definition name=".poll" path="/tiles/layouts/tileLayout.jsp"
> > controllerClass="gr.tera.portal.actions.poll.GetPollAction">
> >        <put name="title"  value="Poll" />
> >        <put name="tileBody" value="/pages/poll/poll.jsp" />
> > </definition>
> >
> > But when i run the application i am getting the following message
> >
> > javax.servlet.ServletException: Controller of class
> > 'gr.tera.portal.actions.poll.GetPollAction' should implements
> 'Controller'
> > or extends 'Action'
> >  at
> >
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
> tI
> > mpl.java:533)
> >  at org.apache.jsp.vboxLayout_jsp._jspService(vboxLayout_jsp.java:100)
> > ..........
> >
> > The class GetPollAction extends the Action class
> >
> > I  am using Struts 1.2b
> > Tomcat 1.24
> >
> > To solve the problem  i use  the following
> >
> >    <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
> >    <put name="title"  value="Poll" />
> >    <put name="tileBody" value="/poll.do" />
> >   </definition>
> > in tiles-def.xml
> >
> > and in struts-config.xml this
> >
> >  <action  path="/pollAction"
> >   type="gr.tera.portal.actions.poll.GetPollAction">
> >   <forward name="success" path="/pages/poll/poll.jsp"/>
> >  </action>
> >
> > is this write? or will be a problem?
> >
> > Thanx
> >
> > Theodoridis Dimitris
>
>
> ---------------------------------------------------------------------
> 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


RE: Tiles and ControllerClass

Posted by Alex Shneyderman <al...@law.columbia.edu>.
Yep, you gotta extend the right class.
Try to extend 

   org.apache.struts.tiles.ActionController

instead

> -----Original Message-----
> From: Jim Theodoridis [mailto:struts@tera.gr]
> Sent: Thursday, September 25, 2003 2:27 PM
> To: Struts Users Mailing List
> Subject: Tiles and ControllerClass
> 
> Hi.
> 
> In tiles-def.xml i have the following definition
> 
>  <definition name=".poll" path="/tiles/layouts/tileLayout.jsp"
> controllerClass="gr.tera.portal.actions.poll.GetPollAction">
>        <put name="title"  value="Poll" />
>        <put name="tileBody" value="/pages/poll/poll.jsp" />
> </definition>
> 
> But when i run the application i am getting the following message
> 
> javax.servlet.ServletException: Controller of class
> 'gr.tera.portal.actions.poll.GetPollAction' should implements
'Controller'
> or extends 'Action'
>  at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tI
> mpl.java:533)
>  at org.apache.jsp.vboxLayout_jsp._jspService(vboxLayout_jsp.java:100)
> ..........
> 
> The class GetPollAction extends the Action class
> 
> I  am using Struts 1.2b
> Tomcat 1.24
> 
> To solve the problem  i use  the following
> 
>    <definition name=".poll" path="/tiles/layouts/tileLayout.jsp" >
>    <put name="title"  value="Poll" />
>    <put name="tileBody" value="/poll.do" />
>   </definition>
> in tiles-def.xml
> 
> and in struts-config.xml this
> 
>  <action  path="/pollAction"
>   type="gr.tera.portal.actions.poll.GetPollAction">
>   <forward name="success" path="/pages/poll/poll.jsp"/>
>  </action>
> 
> is this write? or will be a problem?
> 
> Thanx
> 
> Theodoridis Dimitris


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