Hi all,
In the discussion of JSP and Servlets, I want to be sure
that everyone understands something very very important:
compiled JSP and Servlets are *exactly* the same thing.
When you write a JSP, you write in a markup language
that looks like XML or HTML with some special tags.
The first time anyone uses your page, the server
automatically compiles the JSP into a Servlet.
So there is no such thing as executing a JSP--
your server is truly executing a Servlet.
Anything you can do in JSP, you can do in
a servlet-- because a JSP *becomes* a servlet.
However, servlets are more powerful than JSP.
The tradeoff is that servlets are more complex,
especially for web designers who only know HTML.
The JSP and Servlet model is similar to the ND template model.
In the ND template model, the first time anyone uses your page,
the ND server automatically compiles your ND template (SPG)
into a chunk of executable Java code. The ND server can make
many optimizations for speed, caching, database pooling, etc.
The important difference between JSP/Servlets and ND templates
is that JSP/Servlets are a Sun standard, and will be supported
by many webservers and app servers (including ND5 & IAS6).
In contrast, ND templates only work within ND-- but they
are much faster because ND can provide the optimizations,
and they are usually much easier to create because you
can use the point-and-click features of the ND studio.
So my take home advice is...
If you like HTML, use JSP. If you like coding, use Servlets.
If you like the ND Studio, then use the ND templates for now;
you will eventually want to migrate to JSP and/or Servlets,
and we are building tools to help automate this migration.
No matter what you use, JSP or Servlets or ND templates,
the most important thing is to clearly understand how to
separate your logic: any reusable logic should go in a
Java class by itself, typically a Java Bean or EJB.
Cheers,
Joel
home: [EMAIL PROTECTED]
work: [EMAIL PROTECTED]
_________________________________________________________________________
For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
For dire need help, email: [EMAIL PROTECTED]