> thanks for your opinion
> but i can use offline browser to download the jsp page. It is
[quoted text clipped - 3 lines]
> thanks
> from Peter (cmk128@hotmail.com)
No, servlets are not better than JSP - both have their applications.
Generally, servlets perform business logic, while JSP provides presentation
to the end user.
Servlets generating presentation output (usually HTML) is a very nasty thing
to do, while embedding large amounts of Java code (business logic) in a JSP
is also very nasty. A JSP is compiled to a servlet by the application
server, usually at first-request time (container dependant).
To perform raw database operations in a Servlet is very crude, and even more
so, in a JSP.
You might want to investigate the use of EJB or an O-R mapping tool such as
Hibernate.

Signature
Tony Morris
(BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
Software Engineer
IBM Australia - Tivoli Security Software
(2003 VTR1000F)
Leo Gaggl - 05 Feb 2004 03:16 GMT
In your situation I would have a good look at some of the MVC frameworks
out there to properly structure your application and seperate
database/business logic/presentation. Might be a learning curve but well
worth it.
There are quite a few Jakarta Turbine, Jakarta Struts, Maverick ....
http://jakarta.apache.org/ should get you started. Or use Google to
search for "java mvc framework". These frameworks can integrate with a
number O/R tools or use JDBC directly.
HTH,
--
Leo Gaggl
Adelaide, South Australia
"Peter" <cmk128@hotmail.com> wrote :
> but i can use offline browser to download the jsp page.
wrong!!!
you can not in every case offline use jsp - except of "dummy pure HTML JSP"
JSP run on the server, so when you use offline browser - you just see in
browser result of JSP.
> better to write sql statement in servlet i think. Actually servlet is
> better than jsp, i don't know why SUN have to make jsp too.
>
> thanks
> from Peter (cmk128@hotmail.com)