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

Running a jsp with Tomcat

Sen George
Ranch Hand

Joined: Sep 21, 2005
Posts: 76
I am using Tomcat version 5.5. I have verified that Tomcat indeed works by executing http://localhost:8080. I have written a simple jsp program and is stored under my home directory.

Do I have to necessarily copy the jsp program somewhere under Tomcat directory to run the jsp or it can still reside under my home directory and make the program run by making some configuration change/path setting?

Please advise.

Sen.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61790
    
  67

Moved to the Tomcat forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42952
    
  73
Haven't tried this, but you can configure the <Context> of a web application with the "docbase" attribute set to a specific directory. Not sure if it can be outside the Tomcat directory, though.

I would advise against this approach, though. It's too easy to make available the contents of your home directory to the world by mistake, which you definitely don't want to do.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61790
    
  67

Not sure if it can be outside the Tomcat directory, though.


Yes, you can create a context anywhere on the file system.
C Broussard
Greenhorn

Joined: Jun 18, 2004
Posts: 28
I realize this is somewhat outside of the topic mentioned. But I would look into getting an IDE to do development. I use eclipse, I have my workspace setup in my home directory, and then I deploy out to tomcat/jboss. i also use myeclipseide.com, and that helps simplify things further.

hope that helps,

www.binaryfrost.com
[ November 27, 2005: Message edited by: C Broussard ]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12839
    
    5
You don't need a big IDE to set up a convenient environment that separates development directories from deployment directories.
I use UltraEdit-32 plus ANT. There is a bit of a learning curve to ANT but you don't have to learn the whole monster to start getting major benefits.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Running a jsp with Tomcat