aspose file tools*
The moose likes Tomcat and the fly likes where to place servlet class file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "where to place servlet class file " Watch "where to place servlet class file " New topic
Author

where to place servlet class file

niku shah
Ranch Hand

Joined: Aug 28, 2006
Posts: 41
Hi

I have installed Tomcat 5.0.28 version.
i want to know that inwhich directory servlet class files should be placed.

i am using JDK1.5 and JSDK2.0 for servlet.

also servletrunner in JSDK2.0 runs on port 8080 which is used by Tomcat so they both are conflicting, how can i change the default port for servletrunner ?

Thanks

Nikesh
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

If you have Tomcat, why do you need servletrunner?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
niku shah
Ranch Hand

Joined: Aug 28, 2006
Posts: 41
Hi Bear Bibeault

actually i am new in using Tomcat , if i dont use servletrunner then how will i compile my sevlets ?

Is there any other way to compile servlets , or is there any path setting in tomcat that will compile servlet classes with JDK1.5 ?

Thanks

Nikesh
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
Personally I compile servlets like I do all Java - using an ANT build script.
However you compile, your classpath will need to include servlet-api.jar which Tomcat keeps in $TOMCAT_HOME\common\lib
I don't know about servletrunner, but Tomcat uses a port defined in the ..\conf\server.xml file. Look for the <Connector element.

Bill
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

At a bare minumum, all Java developers should be able to compile a simple class with javac.

If you don't know how to do this, there are plenty of Java tutorials that cover setting up a classpath and compiling.
http://www.google.com/search?hl=en&lr=&q=JAVA+TUTORIAL+CLASSPATH+JAVAC&btnG=Search

Once you're comfortable with doing this, you may want to look for a tool or IDE to speed up your development process but I wouldn't rely on one until I knew I could get by in a pinch without it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where to place servlet class file