Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Servlet Compilation

How we compile the sevlets in Tomcat. I am asking about servlets which are written by us directly in Java and not the JSP servlets.
Please tell whether we have to compile them manually in command prompt by using 'Javac' command or there is any other way also??
:confused:
[290 byte] By [abhijava] at [2007-11-11 10:07:38]
# 1 Re: Servlet Compilation
Yes u have to go to the tomcat servelet directory and manually compile ur servlet using the javac command.Before that make sure to place/copy ur servlet file in the tomcat servlet directory.After compilation invoke the servlet by connecting with a web browser to your Tomcat server.
bpha at 2007-11-11 22:31:59 >
# 2 Re: Servlet Compilation
Hi!

What is the best way for database connectivity in an online project. I mean, whether we should make connection in servlets, in beans or in jsp.
Can u provide me any helpful link or reference regarding this topic.

Thanks!
abhijava at 2007-11-11 22:32:53 >