> I know that you can directly call JSPs from servlets, passing them bean
> info, either in the request or the session, but what is the best way to go
> from JSP->servlet?

>From JSP you can call any object, including servlet - but you must all
servlet.init() yourself.
Don't try to use getServlet()  - it's obsolete in servlet 2.1API
Don't try the new RequestDispatcher - few engines supports 2.1

The reverse ( servlet->jsp) is much more difficult - I haven't saw 2
JSP engines
that map in the same way the jsp page to a servlet name, so you can't be
portable.

An API to get the servlet a JSP page is mapped to will be nice - but there is
no
requirment in the specs to generate  a servlet - there are other ways to do
it.

> Does this make sense?  How are other people doing it?

Support few JSP engines, find out what mapping conventions they use and
do the same mapping.
I also  changed GNU-JSP  to make it work in "make" mode, so I don't have to
worry
about class loaders.


> I know that JSPs are compiled into servlets, but it "seems" to make more
> sense to me that page to page sort of things should stay in JSPs (so if my
> designer looks at them, they won't freak) and I can use servlets for more
> complicated issues.

It's better to use Beans - servlets are not the best elements to design with.
( i.e do not try
to use servlets as "objects" or "dispatchers").
You can share the Beans - use them in both servlets and JSPs, or even Swing
applications.

There is nothing related with JSP1.0 - the problems are in the servlet API.
( but in 2.1 you'll have more support - at least from the API, all
implementations
I saw don't seem to help too much.)

Costin

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to