That can work, but your C:\myapp-share\jsps directory will need a
WEB-INF folder and WEB-INF/web.xml per the servlet spec. Then you'll
have to write a file named jsps.xml with the <Context path="/htmlPath"
docbase="C:\\myapp-share\\jsps" /> element in it and place that within
conf/Catalina/localhost of your tomcat app. Given you aren't putting
the webapp in the tomcat webapps directory, you can declare the path
attribute to be any path that fits into your site design.
At the end of it all, any collection of jsps has to be put together in a
valid web application as defined by the servlet spec before it can be
served up by tomcat. Then you can mount the jsps webapp in Apache Httpd
using mod_jk and the JkMount directive.
The documentation on the tomcat website is your friend here.
--David
Victor Huang wrote:
Thanks David.
I'm using Tomcat 5.5.23 and Apache 2.2.4, JK-1.2.22 on Windows XP
I understand that I can put JSPs into TOMCAT-INSTALL\webapps\* (I tried it
and it worked) but that doesn't solve my issue. I wanted to put JSPs into
somewhere out of Tomcat completely - lets say C:\myapp-share\jsps\. Make a
link/virtual folder for that directory in Apache, when Apache gets the
request page from that folder it will pass into Tomcat container or Tomcat
can look for it through file system based on what Apache/JK passes in. Is
that do-able?
Regards,
Victor
-----Original Message-----
From: David Smith [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 26, 2007 11:44 AM
To: Tomcat Users List
Subject: Re: Can Tomcat access JSP pages out of tomcat folder?
They can be accessed outside of tomcat's folder, but still have to be in
a webapp structure per spec. Can you describe your layout a bit more
and include the version of your tomcat?
--David
Victor Huang wrote:
Hi There,
I'm working on a project that needs to move current web application from
IIS/JRUN/Windows into Apache/Tomcat/Windows. One of the problem is I can
not
make Tomcat access (pre-compile) JSP pages deployed out of Tomcat folder.
It
is working fine under IIS/JRUN.
Our current application has 3 parts:
1. web application back-end which is a WAR file deployed under JRUN
2. web application front-end which is a set of JSPs, htmls, image files,
javascripts, etc. deployed under IIS.
3. A set of JSPs, JavaScript files which can be accessed by front-end.
In case of IIS for example I have index.jsp under IIS which includes
login.jsp which located under another directory - c:\comp\inc\login.jsp,
when IIS calls index.jsp it redirects the page to JRUN, JRUN will complete
the rest of the work and return result to IIS. But this doesn't work on
Apache/Tomcat unless I put all files under Tomcat's webapps directory.
Every
time I call Index.jsp all I get in browser is full of html/jsp code in
that
file (on FF) or static contents with jsp code (on IE). It seems to me
Apache
/jk connector doesn't send the page to Tomcat but rather serve it as a
static HTML page!
I tried to change server.xml by adding Context, JK connector properties
file, Apache httpd.conf by adding lines which specifies external resource
but it didn't work out.
Can anyone help me out? Thanks in advance!
/Victor
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]