 |
 |
servlet confusion . . .
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2002
Status:
Offline
|
|
Hey there, I'm looking for help from any java experts, or perhaps pointers to other relevant forums. I'm trying to compile a java servlet, and then I'm going to upload it to another server where it's actually going to be run. I just need to be able to modify the code and compile it. Unfortunately, when I try to compile it under OSX, it runs into problems because it can't important javax.*
Some searching under google reveals more questions than answers, apparently this servlet library is not part of the default installation of Java, and it seems to relate to something called Tomcat. However, that doesn't particularly help me...I can't figure out how to download it, and where to put it in order to use it.
Anyone have any suggestions?
-prokrast
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by prokrast:
I just need to be able to modify the code and compile it. Unfortunately, when I try to compile it under OSX, it runs into problems because it can't important javax.*
Some searching under google reveals more questions than answers, apparently this servlet library is not part of the default installation of Java, and it seems to relate to something called Tomcat. However, that doesn't particularly help me...I can't figure out how to download it, and where to put it in order to use it.
Servlets are part of the javax.servlet package. This package is not part of the standard java. You can get it from any java servlet container, including Tomcat.
Tomcat is an open source java app server container. You can download it here:
http://jakarta.apache.org/tomcat/
Once you have it, you need the servlet.jar file in common/lib/ inside the Tomcat folder. Put that file in your classpath and you should be good.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Nov 2002
Location: PVD/MSP
Status:
Offline
|
|
If you're running Panther, you can install an Apple package that will add dev support for servlets. The package is ApplicationsServerDev.pkg and can usually be found in /Applications/Installers/Developer Tools/Packages
Note: After you do this, you will have a basic tomcat and Jboss installation at /Library/Tomcat and /Library/JBoss if you want to learn more about servlets servers.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 2001
Location: London
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Oct 2000
Location: Lawrence, KS
Status:
Offline
|
|
You could always compile your servlets by just putting the correct jar file on your classpath. However, you will not be able to run/test your work unless you install/configure/deploy your servlet in a servlet container.
Servlets need to run in their own dedicated environment (this the concept of a container). Tomcat provides that environment for you. There are a few others but Tomcat is the most popular one.
The link that Diggory provides has all you need to get you going. Java development is a fairly pleasant experience in OSX. Enjoy!
|
|
iMac 17" G4 800MHZ & 768 SDRAM
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jul 2002
Status:
Offline
|
|
Thanks for the help everyone, I was able to figure it all out and get it to compile. The Apple link was especially helpful . . .
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|