• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running a jsp with Tomcat

 
Sen George
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Tomcat forum.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64716
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic