Hi.
I have been a web developer for a couple of years (some ASP, mostly PHP) and have recently taken on Java/JSP in the last two years.
The one thing I have tried repeatedly but continue to fail to wrap my head around is the way to setup a working JSP application in another location that is NOT the webapps folder. Rocking my application out of webapps does not seem to be a problem for me.
Could anyone help break this down, or point me to post somewhere which outlines it?
I have Googled repeatedly and read and re-read the documentation on the apache.org website, but I still cant seem to get it :(
I am trying to setup an "exploded" site (folders and files separated - not part of a WAR).
I know that I CAN edit the server.xml file, but am not supposed to (not that it matters... even when I attempt to edit that I fail).
I know I am missing something with the way the paths work. I THOUGHT I understand but I dont thinks so.
Any help is mucho appreciated!!
Love this site.
-- I have decided to re-phrase my question with more detail --
Let's say I have a directory structure as follows (**NOTE: webproject is NOT in the tomcat/webapps directory)
/webproject
/webproject/htdocs
/webproject/htdocs/images
/webproject/htdocs/images/logo.gif
/webproject/java
/webproject/java/page1.jsp
/webproject/java/page2.jsp
I would like to setup a virtual host so that I can view my project via a URL: http://webproject
I THINK all I need is two things (I am using apache):
- a 'VirtualHost' entry in my httpd.conf file.
- some type of 'context' file or fragment somewhere.
Am I right? If so, could someone help me define these two elements?
Also, if I want to use a domain-relative URL for referencing my logo.gif file from either of my jsp pages what would my path look like?
What if I want to use a domain-relative URL for referencing page2.jsp from page1.jsp?