Can you Subclass it?
SitePage:
def writeContent:
   self.DoThisPageAction()

Servlet1.
def DoThisPageAction()
   do somthing....

Do you need to actually calls the method of another servet?

Keep the servelts small. MAybe you can move the methods outsite of the servelt and into a module. This way you can have a servlet that can call any method it needs. Servlets calling servlets gets difficult.

Maybe a plug-in system would be better?

Can you provide more info?




Jarosław Zabiełło wrote:


I am developing an application using many servlets and I am thinking
about the best strategy for using them.

My first idea, was to nest cascade of servlets() (using
.forward('AnotherServlet') I also used .actions() method for dealing
with form submits (btw, nice idea). Althought the code became more
clear I found there are some problems as well. First is the
performance. For every nested page I have to execute all those
servlets from first to the last.
The second is the problem of .actions() method. The way it works is
not clear. When I define "_action_Submit1" in servlet1 and
"_action_Submit_2" in nested servlet2, I sometimes loose control and
cannot run servlet2. It is because I have to define the same name
for submit in the second servlet. When I changed it into the same
name, it started works. Is it mean, I have to be very aware of naming
convention of all my submit in the nested servlets? Sometimes it id
difficult to find the error.

So, I think about another idea. Maybe, the better solution is using
only one, big controll method (from one, main servlet) which calls
(using .callMethodOfServlet()) all other servlets? It should be faster
because only two servlets are executed for every page. But such code
is bigger and complicated.

What do you think about it? Maybe is another way?




-- -Aaron http://www.MetroNY.com/ "I don't know what's wrong with my television set. I was getting C-Span and the Home Shopping Network on the same station. I actually bought a congressman." - Bruce Baum





-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to