You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ro...@globalgraphics.com on 2001/10/02 20:07:10 UTC
speiclised servlet actions
For various reasons, I'm trying to get an Action to call a method on a homemade
servlet like so:
servlet.getServletContext().checkoutCollection("DPPmfg_cds", "trunk","cache");
Which, unsurprisingly, does not compile. How does one get an action call methods
on servlets? Or am I barking up the wrong tree.
The servlet is trying to emulate the database servlet in the example; however,
for reasons of speed, I'm trying to get each action to call methods on the
servlet.
What am I doing wrong?
TIA.
Roger
Re: speiclised servlet actions
Posted by Marcelo Vanzin <va...@rededc.com.br>.
roger.day@globalgraphics.com wrote:
> For various reasons, I'm trying to get an Action to call a method on a homemade
> servlet like so:
>
> servlet.getServletContext().checkoutCollection("DPPmfg_cds", "trunk","cache");
>
> Which, unsurprisingly, does not compile.
I may be missing something here, but if the method is in the servlet, qhy are you calling it on the servlet context???
You should be doing something like:
((MyOwnServletClass)servlet).myCustomMethod();
Don't forget the cast.
--
[]'s
Marcelo Vanzin
Touch Tecnologia
vanza@rededc.com.br
"We're an underground revolution working overtime"