Quoting Pankaj Malviya ([EMAIL PROTECTED]):
> All the discussion that is going on about JSP vs Servlet doesn't answer
> following questions:

> Many a times in business logic the target page is dependent on the contents
> of source page. In these scenario a submit button cannot point to a fixed
> JSP page. What may happen is that submit button may point to a servlet where
> decision about the target page is taken and then the page is chained using
> requestDispatcher method.

In a template system you do not use the chaining stuff so much. What you
do is view the servlet as an entry point into a program--probably you
have one servlet per "task" or something, each of which is capable of
returning several different pages related to that task.

You can write a different method, or invoke methods on different objects,
depending on what page it is you currently want to display. You just load
up the template you want by name, and populate a hashtable with the
information relevant to that particular view.

The need (and the cost) of chaining servlets goes away.

In JSP it may not be so simple, but I suspect you could, with work,
pull off something similar to this.

Justin

- - -
WebMacro Servlet Framework
http://webmacro.org

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to