jsp:include/WAR

2003-12-18 Thread Robert L. Brueckmann
Is this a tomcat issue or is this a jdk 1.4 issue where the jsp:include
calls in my jsp pages that include files from other directories do not work
when the webapp I'm deploying is in WAR format?  I have a context setup for
it in the server.xml with database parameters and login authentication
classes, so when tomcat deploys this webapp it doesn't autoexpand it, hence
it executes everything in WAR format and for whatever reason it doesn't
allow ANY of my jsp:include calls and serves me blank pages with
FileNotFoundException errors in my log files and obviously all my
getRealPath() calls break as well...is there any way to force Tomcat to
autoexpand my WAR file even though I'm setting it up with a context and
realm in server.xml?  Or am I stuck going through my entire application and
giving absolute paths to all my jsp:include files and writing something to
create temporary directories to replace my getRealPath() situations?  That's
kind of a really big bug if it is in fact a bug...

Any help is greatly appreciated.

Rob



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: include/WAR

2003-12-18 Thread Robert L. Brueckmann
Yoav, Thanks for the reply...yeah I'm a bit long-winded at times...sorry
'bout that.  :)

Anyways, to answer a few of your questions...my directory structure is as
follows...I have a directory called 'application' and in 'application' I
have a header.jsp file...then under 'application' I have 5 subdirectories
which contain the 5 functionalities of the software.  In these
subdirectories, all filed have the jsp:include file=../header.jsp call in
them to pull header.jsp from the 'application' directory, so they all share
this one common header file.  This works perfectly when I drop the actual
expanded directory structure in the webapps directory and set the docBase in
my server.xml to the parent directory of 'application'...but as soon as I
war everything up and drop the war in the webapps directory and set the
docBase to the war filename in server.xml, I get blank pages in any call I
make to any of the files in any of the subdirectories in the application
folder.

I also have a few files in the 'application' directory that have jsp:include
file=header.jsp in them and those all work perfectly in war format and
unpacked format...so I looked at the servlet log in the log directory of
tomcat and I have a bunch of FileNotFoundExceptions and it shows tomcat
trying to access the file like this:

/application/import/../header.jsp

It's like its trying to access header.jsp in a subdirectory of import with
the directory name of '..' instead of using those '..' to traverse up one
directory and look for the file.

Very strange stuff.

I'm using tomcat 4.0.3 (I know it's old but it's too late in the development
process and too close to the next release date to change the version of
tomcat we're using (which we plan on doing in the next developmental
cycle...but for now, this is really just curiosity...if we are forced to
leave it expanded, then so be it, but for out installation process, using
the WAR would be SO much nicer...and if we can work around this last bit of
trouble, we'd be in the clear.) )

As for the getRealPath...we don't use that call often, but we have a section
of the application where we import external files the user tells us the
filename of and I guess we're just doing it incorrectly...I'll look into
your suggestions on the replacement of the getRealPath...thank you for all
your help.

Rob

-Original Message-
From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 18, 2003 9:19 AM
To: Tomcat Users List
Subject: RE: include/WAR


Howdy,
Not a big fan of short sentence, huh? ;)

Is this a tomcat issue or is this a jdk 1.4 issue where the jsp:include
calls in my jsp pages that include files from other directories do not
work

It's probably neither a tomcat issue nor a JDK 1.4 issue.  By other
directories, do you mean outside the webapp?

when the webapp I'm deploying is in WAR format?  I have a context setup
for

Packed or unpacked WAR?  Either way, your webapp should not use
getRealPath calls: replace them with ServletContext#getResource or
getResourceAsStream.

getRealPath() calls break as well...is there any way to force Tomcat to
autoexpand my WAR file even though I'm setting it up with a context and

Yes, set the unpackWARs attribute to true for the Host element where
your Context is.  You can verify that your WAR is unpacked by looking at
the filesystem.  Remember, if you're using tomcat 5 it's under a
different directory from tomcat 4.

realm in server.xml?  Or am I stuck going through my entire application
and
giving absolute paths to all my jsp:include files and writing something
to
create temporary directories to replace my getRealPath() situations?

You should replace your getRealPath calls anyways.  You should have
relative paths for your inclusions anyways.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jsp:include problem when using WAR

2003-12-15 Thread Robert L. Brueckmann
I cannot for the life of me find if this is a known issue or not but I'm
using Tomcat 4.0.3 and I have a web application that, throughout the
software, uses a single header.jsp file on every JSP page.  There are
multiple subdirectories that call that header.jsp file like so:

jsp:include page=../header.jsp flush=true /

Because header.jsp exists in the root directory so all pages in
subdirectories make the above jsp:include call.this works beautifully when I
have the files in a directory, not WARed up in the webapps directory.but as
soon as I WAR everything up and drop the war file in the webapps directory,
I get blank pages in all the sections of the software that exist in
subdirectories that make the above jsp:include call.  Any page that exists
in the root directory that has a jsp:include call like so:

jsp:include page=header.jsp flush=true /

Compiles just fine.in my log files for tomcat, it's telling me the following
when I try to access a section of the software that exists in a
subdirectory:

2003-12-15 12:41:42 StandardContext[/smartanalysis]:  Mapped to servlet
'jsp' with servlet path '/application/feequery/../header.jsp' and path info
'null' and update=true
2003-12-15 12:41:42 ApplicationDispatcher[/smartanalysis] Servlet.service()
for servlet jsp threw exception
javax.servlet.ServletException: /application/feequery/../header.jsp
  at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:212)
  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
  at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474).etc.

Am I doing something wrong?  Like I said, when I expand the WAR and plave
the actual directory and files in the webapps directory, everything works
perfectly.as soon as it all gets WARed up.I encounter this problem.

Any help is greatly appreciated.

Thanks in advance, rlb



RE: Any help with this is great.

2001-06-08 Thread Robert L. Brueckmann

Did you download it from Apache's site and put it your apache/modules
directory?  And on windows you need the mod_jk.dll...not the mod_jk.so so
you need to make sure the .conf files are looking for the right file too...

download it from:

http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.2/bin/win32/i38
6/

Hope this helps...





Bundling Tomcat

2001-06-07 Thread Robert L. Brueckmann

Hello all...I'm not sure if I'm sending this to right place to ask this, but
you're all developers and some of you might be doing something similar...I
will be developing a piece of software that is built using servlets and JSPs
and we'll be using Tomcat as our servlet container, now, when the product is
developed and tested and ready to ship...have any of you bundled Tomcat with
your product to sell to a customer and what types of royalties and red tape
do you have to go through with Apache in order to do something like that?
Is there a section of the Jakarta site that deals with all these legal GPL
issues and limitations and what have you?  Any help is greatly appreciated.

And if this question can't be answered on this list, can someone possibly
head in me in the correct direction?

Much appreciated,
Rob Brueckmann