Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where to place servlet class file

 
niku shah
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have Tomcat, why do you need servletrunner?
 
niku shah
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic