io exceptions with JDK 1.4 and Tomcat 4.0.x

2002-06-25 Thread Chris Bailey

I've seen some mention of JDK 1.4 and Tomcat 4.0.x.  Recently we started
using JDK 1.4 on Linux and Windows 2000.  When we run our app under Tomcat,
we quite often see a stack trace by Tomcat where it's doing io related
stuff.  I am wondering if anyone else is seeing this, what might be causing
it, what I should look for and so on:

java.lang.IllegalStateException: Current state = FLUSHED, new state =
CODING_END
at
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEncoder.ja
va:933)
at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
at
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.java:356)
at
sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
at java.io.PrintWriter.close(PrintWriter.java:137)
at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBase.java:
482)
at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpResponseBa
se.java:236)
at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(HttpRespo
nseImpl.java:288)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:
1039)
at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1107
)at java.lang.Thread.run(Thread.java:536)

____
Chris Bailey   mailto:[EMAIL PROTECTED]
Code Intensity   http://www.codeintensity.com


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




RE: Can servlet write to file in /WEB-INF?

2002-06-24 Thread Chris Bailey

Right, keep in mind the whole WAR file aspect.  If your web app is not
packaged as a WAR file then it's less of an issue, and you could use
getRealPath, but if it is a WAR - even if it gets expanded by the container,
you can't use getRealPath and should write to a temp directory, or some
other directory you set up (you could store the location of this other
directory as a property in your web.xml file, etc.).

-Original Message-
From: Les Hughes [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 3:08 AM
To: 'Tomcat Users List'
Subject: RE: Can servlet write to file in /WEB-INF?


Hi,

getRealPath() and its ilk are really very evil. If the webapp isn't exploded
into the filesystem - i.e. it's "run" straight from the war file then you
wont be able to write to the filesystem under WEB-INF anyway. And that's not
addressing *why* a webapp requires filesystem access and the related
security issues of allowing a servlet/jsp to write into a "protected" area
like WEB-INF either.

Anyway, my 2p says you should be doing something like:-

File temp =
(File)getServletContext().getAttribute("javax.servlet.context.tempdir");

then make a dir/file under this for your output.

Hope this helps.

Les


> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 24 June 2002 09:13
> To: [EMAIL PROTECTED]
> Subject: RE: Can servlet write to file in /WEB-INF?
>
>
> Instead there is a method in the servlet context :
> getRealPath(String relativefilename) -> then you can open a
> "normal" fileoutputstream.
>
> -Original Message-
> From: tamir [mailto:[EMAIL PROTECTED]]
> Sent: 24 June 2002 11:31
> To: 'Tomcat Users List'
> Subject: RE: Can servlet write to file in /WEB-INF?
>
>
> Hi,
> Making URLConnection to a directory under WEB-INF, is the
> same like writing
> this url in the explorer.
> However, You can't go directly to any directory under WEB-INF
> in that way,
> which justifies your failure of
> writing to this directory.
>
> You can write to files in this directory, if you don't use
> URLConnection.
> That's what I think
> Tamir
>
> -Original Message-
> From: john-paul delaney [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, June 22, 2002 10:48 AM
> To: TC user list
> Subject: Can servlet write to file in /WEB-INF?
>
>
> I was trying to see if I could write to a file in the
> /WEB-INF directory but
> I couldn't get it to work - is there a problem with a servlet
> writing to
> this directory or is it just me (again ;( ) ?
>
> thanks
> /j-p.
>
> URL url = context.getResource("/contextTest.txt");
> URLConnection con = url.openConnection();
> con.setDoOutput(true);
> OutputStream out = con.getOutputStream();
> PrintWriter pw = new PrintWriter(new OutputStreamWriter(out));
> pw.println("foo");
> pw.close();
> out.close();
>
>
>
> ---
>  JUSTATEST Art Online
>   www.justatest.com
>
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>  DISCLAIMER 
> "This e-mail and any attachments thereto may contain information
> which is confidential and/or protected by intellectual property
> rights and are intended for the sole use of the recipient(s)
> named above.
> Any use of the information contained herein (including, but
> not limited to,
> total or partial reproduction, communication or distribution
> in any form)
> by persons other than the designated recipient(s) is prohibited.
> If you have received this e-mail in error, please notify the
> sender either
> by telephone or by e-mail and delete the material from any computer.
> Thank you for your cooperation."
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: No more RPM distributions?

2002-06-20 Thread Chris Bailey

I agree, the RPM's are nice.  Makes upgrading and tracking what you have
installed a tad easier (assuming the RPM update doesn't blow away your
webapps or modified server.xml, etc.).

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 10:57 AM
To: Tomcat Users Mailing List
Subject: No more RPM distributions?


Hi - just curious if there would be no more RPM distributions past 4.0.3.
That's the last version I see one for.  I rather like the RPMs myself and
would like to see them continue.  Did someone accidentally comment out that
part of the Ant script? =)

Thanks!

Eddie



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: good profiler software for Java apps ??

2002-06-20 Thread Chris Bailey

Check out JUnitPerf, HttpUnit, and JMeter for some of the below needs.

Memory leaks?  In a Java app?!  How can that be ;)

-Original Message-
From: Bing Zhang [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 9:45 AM
To: 'Tomcat Users List'
Subject: good profiler software for Java apps ??


Hi:

Just wondering if someone could recommend any good open source
profiler software to monitor/analyze performance and track down memory leaks
in Java applications.

Also, is there any open source testing-automation software/tool
equivalent to WinRunner/LoadRunner  ??

Appreciate your help.

Bing

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Way to remove index page file name from URL?

2002-06-18 Thread Chris Bailey

I have a web app with a few servlets.  One of these servlets I'd like to be
the "default" servlet - basically it should handle any request that the
other servlets don't handle, or that isn't for an image file or other
resource.  So far, I've set this up by mapping a special index/welcome page
name to the servlet.  i.e. with *.mypage, and
then setting "index.mypage" as one of the welcome files.  This works nicely,
but the only problem is that on Tomcat (and maybe others), "index.mypage"
now shows up in the URL.  For example, if the original URL the user typed in
was "http://www.foo.com/";, their browser will now show
"http://www.foo.com/index.mypage";.

Is there any way to have Tomcat not set the location to the URL with the
index.mypage in it?

I should note, this shall be the only webapp for this instance of Tomcat, so
if I need to redo my context somehow to achieve this, that's fine.
Currently the context looks like:

  

I will need to be able to deploy it as both a WAR, and an expanded
webapp/non-WAR (for development).

Chris Bailey   mailto:[EMAIL PROTECTED]
Code Intensity   http://www.codeintensity.com


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




How can I map all requests to a single servlet?

2002-06-12 Thread Chris Bailey

I have a web application that uses a single servlet to respond to all
requests.  This is the only web app that will be running under Tomcat.  How
can I set up the servlet-mapping so that it gets all requests, without doing
something like setting the  to be "index.*"?  Or, more
specifically, I don't want the "index.page" (or whatever) being added into
the URL.  So, the URL's should just be something like
"http://www.foo.com/?param=blah";.


Chris Bailey   mailto:[EMAIL PROTECTED]
Code Intensity   http://www.codeintensity.com


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




RE: How to write files when web-app is a WAR?

2002-06-10 Thread Chris Bailey

That is not true to my understanding.  If you deploy a WAR file on Tomcat (v
4.0.3 anyway), then ServletContext.getRealPath() will return null (even
though the WAR gets expanded).  This is proper behavior as per the Servlet
spec.

Les' message about how to get the temp path is closer, but basically I need
more complete access to the file system.

For the time being I have just deployed not using a WAR file and I can then,
at deploy time, write the full path location into a property and use that,
etc.  But, what worries me is that there may be containers out there
(WebLogic maybe? Resin? others?) that ONLY allow deploying as a WAR file and
further, don't expand it; meaning that my normally nested file paths in the
expanded WAR area are now not accessible via java.io.File.

-Original Message-
From: John Burgess [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 10, 2002 3:25 AM
To: Tomcat Users List
Subject: RE: How to write files when web-app is a WAR?


If the war file is unpacked (which tomcat will do automatically at startup
unless you specify somewhere in server.xml not to) then it is just as if you
had deployed to the webapp\your_app directory yourself.  I believe that
leaving war's unpacked results in slightly worse performance and isn't
recommended for a deployment server anyway.

Best Wishes
John Burgess
[EMAIL PROTECTED]
Tel: 01865 718666
Fax: 01865 718600


-Original Message-
From: Chris Bailey [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 8:02 PM
To: Tomcat Mailing List
Subject: How to write files when web-app is a WAR?


>From what I've read, it seems that if you package your web application in a
WAR file, you have no way of attaining a path on the server's file system
that you can use to write files.  Reference:
http://mikal.org/interests/java/tomcat/archive/view?mesg=15006.

I have a web app that we'd like to package as a WAR.  But, we need to be
able to write various data files out to the server's file system.  What
solution(s) are people using for this?  Writing the files to a database is
not acceptable for us  (I'm not a DBMS expert, but have been told that BLOB
performance is not great, and that using a DB as a file system replacement
is not good, etc.).

I was thinking we'd have to do a bit of a hack...  Basically, at the time we
"install" our application, the user will pick the real path on their disk
where the data files are stored.  We then store this in a property in
web.xml, and retrieve that in the app for using as the path.  For
links/hrefs on a web page, we'd just use something like /data_files, but
then set up a path-mapping that had /data_files mapped to say
/home/appname/data_files or whatever.   I also am assuming I will need to
ensure that this real path lies outside of the WAR expanded directory
because someday Tomcat (and maybe others already?) will not expand the WAR
file.

Anyway, what have folks come up with?  While we use Tomcat for all our
development work, we'll likely have to support a variety of Servlet
containers (I think we can require at least Servlet 2.2, hopefully 2.3).


Chris Bailey   mailto:[EMAIL PROTECTED]
Code Intensity   http://www.codeintensity.com


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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 24/05/02


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.365 / Virus Database: 202 - Release Date: 24/05/02


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



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




How to write files when web-app is a WAR?

2002-06-07 Thread Chris Bailey

>From what I've read, it seems that if you package your web application in a
WAR file, you have no way of attaining a path on the server's file system
that you can use to write files.  Reference:
http://mikal.org/interests/java/tomcat/archive/view?mesg=15006.

I have a web app that we'd like to package as a WAR.  But, we need to be
able to write various data files out to the server's file system.  What
solution(s) are people using for this?  Writing the files to a database is
not acceptable for us  (I'm not a DBMS expert, but have been told that BLOB
performance is not great, and that using a DB as a file system replacement
is not good, etc.).

I was thinking we'd have to do a bit of a hack...  Basically, at the time we
"install" our application, the user will pick the real path on their disk
where the data files are stored.  We then store this in a property in
web.xml, and retrieve that in the app for using as the path.  For
links/hrefs on a web page, we'd just use something like /data_files, but
then set up a path-mapping that had /data_files mapped to say
/home/appname/data_files or whatever.   I also am assuming I will need to
ensure that this real path lies outside of the WAR expanded directory
because someday Tomcat (and maybe others already?) will not expand the WAR
file.

Anyway, what have folks come up with?  While we use Tomcat for all our
development work, we'll likely have to support a variety of Servlet
containers (I think we can require at least Servlet 2.2, hopefully 2.3).


Chris Bailey   mailto:[EMAIL PROTECTED]
Code Intensity   http://www.codeintensity.com


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




Re: session id occasionally put into URL?

2001-04-24 Thread Chris Bailey

On 24 Apr 2001 14:53:12 -0500, [EMAIL PROTECTED] wrote:
> On 24 Apr 2001, Chris Bailey wrote:
> 
> > I am using Tomcat 3.2.1, mod_jk (w/ ajp13), Linux, Apache 1.3.19.  I
> > have the home page of a site mapped to a servlet, by mapping index.html
> > to a servlet in the web.xml file.  The problem is, I sporadically get
> > the session id showing up in the URL, and this results in a 404 Not
> > Found.
> >
> > When it works "properly", I can go to the URL, "http://foo.bar.com"; for
> > example.  Apache determines this means I want the index.html file, and
> > then sees this is mapped to a servlet via mod_jk, etc., and runs the
> > servlet, all is fine.  The browser displays either http://foo.bar.com,
> > or sometimes http://foo.bar.com/index.html plus any parameters, etc.
> >
> > The problem case is where I see the browser shows the URL similar to
> > http://foo.bar.com/;jsessionid=9946qv2xml1 plus any params.  This hoses
> > the browser, because it tries to request the web page of
> > ";jsessionid...", and of course fails.
> >
> > Can someone explain what's going on, and how I might fix this?
> 
> That's URL Rewriting -- which is an alternative way (to cookies) to
> how session ids are transmitted.  I think the API calls that put that
> on the URL are encodeURL and encodeRedirectURL.  So perhaps you have
> some stray, unintended calls to those methods somewhere in your code.
> 
> Milt Epstein
> Research Programmer
> Software/Systems Development Group
> Computing and Communications Services Office (CCSO)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
> 

I would think though, that this same problem would occur (if it is
happening in our code) under JServ?  This never happened in JServ, so it
leads me to think Tomcat is somehow involved.

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




RE: How do I map www.blah.com to a servlet?

2001-04-24 Thread Chris Bailey

On 24 Apr 2001 10:25:42 -0500, [EMAIL PROTECTED] wrote:
> On 23 Apr 2001, Chris Bailey wrote:
> 
> > This is what I'm already doing (see the email below) - I map my
> > servlet to index.html in web.xml.
> 
> Here's something you can try.  I haven't tried it exactly myself,
> although I have tried something similar (i.e. having
> http://www.foo.com/bar/ go directly to a servlet).  The steps below
> are analogous to what I have done.
> 
> First, add a directive to your tomcat/apache conf file that directs
> *all* requests to tomcat's default context.  This might be something
> like:
> 
>   JkMount /* /ROOT
> 
> (I'm using mod_jserv, not mod_jk, which is an additional reason I'm
> not 100% sure of what exactly you need to do this part of it.)
> 
> Second, add a servlet-mapping for the URL "/" to the servlet you wish
> the requests to go to (I believe you'll have to have defined that
> servlet, i.e. set up a servlet-name for it).  This should go in
> tomcat's root context's web.xml file.
> 
> That's it.

This is orignally how I had it set up, but the problem was that by using
"JkMount /* /whatever", which as you said, directs _all_ requests to
Tomcat, it directs EVERY request to that domain to the servlet.  So, if
for example, I put "http://www.blah.com/test/whatever.html"; in, that
still matches "http://www.blah.com/*"; (the /* being the JkMount part),
so it goes to the servlet as well.  This is undesireable (probably in
most cases), becuase then if the browser requests say a stylesheet, or a
static HTML file or whatever, it's all going to get mapped to the
servlet.

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




session id occasionally put into URL?

2001-04-24 Thread Chris Bailey

I am using Tomcat 3.2.1, mod_jk (w/ ajp13), Linux, Apache 1.3.19.  I
have the home page of a site mapped to a servlet, by mapping index.html
to a servlet in the web.xml file.  The problem is, I sporadically get
the session id showing up in the URL, and this results in a 404 Not
Found.

When it works "properly", I can go to the URL, "http://foo.bar.com"; for
example.  Apache determines this means I want the index.html file, and
then sees this is mapped to a servlet via mod_jk, etc., and runs the
servlet, all is fine.  The browser displays either http://foo.bar.com,
or sometimes http://foo.bar.com/index.html plus any parameters, etc.

The problem case is where I see the browser shows the URL similar to
http://foo.bar.com/;jsessionid=9946qv2xml1 plus any params.  This hoses
the browser, because it tries to request the web page of
";jsessionid...", and of course fails.

Can someone explain what's going on, and how I might fix this?


-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




RE: How do I map www.blah.com to a servlet?

2001-04-23 Thread Chris Bailey

This is what I'm already doing (see the email below) - I map my servlet
to index.html in web.xml.

On 23 Apr 2001 16:26:04 -0700, [EMAIL PROTECTED] wrote:
> can't you map the name index.html to your servlet in the web.xml file?
> or you can change the index file name to point to your servlet.
> Filip
> 
> ~
> Namaste - I bow to the divine in you
> ~
> Filip Hanik
> Software Architect
> [EMAIL PROTECTED]
> www.filip.net 
> 
> > -Original Message-
> > From: Chris Bailey [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, April 23, 2001 4:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: How do I map www.blah.com to a servlet?
> > 
> > 
> > I'm using Linux, Apache 1.3.19, Tomcat 3.2.1, mod_jk.  I want to map a
> > URL such as "http://www.foo.com"; to a servlet.  Right now I do this by
> > just mapping the default page (e.g. index.html) to a servlet.  But, then
> > index.html shows up in the URL on many further uses.  Is there a
> > different way to do it, or a way to make sure that "index.html" doesn't
> > show up in the URL?
> > 
> > -- 
> > Chris Bailey[EMAIL PROTECTED]
> > Wego Systemshttp://www.wego.com
> > 
> > 
> 

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




How do I map www.blah.com to a servlet?

2001-04-23 Thread Chris Bailey

I'm using Linux, Apache 1.3.19, Tomcat 3.2.1, mod_jk.  I want to map a
URL such as "http://www.foo.com"; to a servlet.  Right now I do this by
just mapping the default page (e.g. index.html) to a servlet.  But, then
index.html shows up in the URL on many further uses.  Is there a
different way to do it, or a way to make sure that "index.html" doesn't
show up in the URL?

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




Re: WEB-INF/lib vs. TOMCAT_HOME/lib

2001-04-18 Thread Chris Bailey

I'm on RedHat Linux 6.2 i386, Apache 1.3.19, Tomcat 3.2.1.

On 18 Apr 2001 12:50:31 +0100, [EMAIL PROTECTED] wrote:
> I'm afraid to say its not a problem I've seen here. Which platform are you
> running on?
> 
> sam
> > -Original Message-
> > From: Chris Bailey [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, April 17, 2001 7:32 PM
> > To: [EMAIL PROTECTED]
> > Subject: WEB-INF/lib vs. TOMCAT_HOME/lib
> >
> >
> > The Tomcat automatic setting of a classpath for a given webapp is not
> > seeming to work for me.  I have my various jar files in .../WEB-INF/lib,
> > for my web app.  But, that fails.  If I however, put them in
> > $TOMCAT_HOME/lib, then they get added to the generic classpath (which is
> > displayed on startup of Tomcat), and things work fine.
> >
> > How do I fix this?
> >
> > --
> > Chris Bailey[EMAIL PROTECTED]
> > Wego Systemshttp://www.wego.com
> >
> >
> > **
> > Information in this email is confidential and may be privileged.
> > It is intended for the addressee only. If you have received it in error,
> > please notify the sender immediately and delete it from your system.
> > You should not otherwise copy it, retransmit it or use or disclose its
> > contents to anyone.
> > Thank you for your co-operation.
> > **
> >
> 
> 

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




RE: WEB-INF/lib vs. TOMCAT_HOME/lib

2001-04-18 Thread Chris Bailey

My jasper.log file only says what the scratch directory is, and not to
modify any generated servlets.  It doesn't list any classpath stuff.

On 18 Apr 2001 06:28:16 -0400, [EMAIL PROTECTED] wrote:
> I haven't noticed this problem.  I have however noted that when Tomcat 
> starts up it doesn't list the jar for any of my webapps in it's initial 
> classpath.  If, however, I check my jasper.log it does list them.  So you 
> might want to just check that, Tomcat might be working right for you, you 
> just might be looking in the wrong spot to find the classpath it's using.
> 
> At 06:18 AM 4/18/2001, you wrote:
> >I have the same problem and have posted the same thing before with no reply.
> >I actually keep the jars in the WEB-INF/lib directory and add them to the
> >Tomcat classpath with wrapper.properties (I'm starting as an NT service).
> >This means a config change whenever I deploy a webapp which is far from
> >ideal.
> >
> >Maybe someone with superior knowledge about this could shed some light this
> >time?
> >
> >Richard.
> >
> >-Original Message-
> >From: Chris Bailey [mailto:[EMAIL PROTECTED]]
> >Sent: Tuesday, April 17, 2001 7:32 PM
> >To: [EMAIL PROTECTED]
> >Subject: WEB-INF/lib vs. TOMCAT_HOME/lib
> >
> >
> >The Tomcat automatic setting of a classpath for a given webapp is not
> >seeming to work for me.  I have my various jar files in .../WEB-INF/lib,
> >for my web app.  But, that fails.  If I however, put them in
> >$TOMCAT_HOME/lib, then they get added to the generic classpath (which is
> >displayed on startup of Tomcat), and things work fine.
> >
> >How do I fix this?
> >
> >--
> >Chris Bailey[EMAIL PROTECTED]
> >Wego Systemshttp://www.wego.com
> >
> >
> >**
> >Information in this email is confidential and may be privileged.
> >It is intended for the addressee only. If you have received it in error,
> >please notify the sender immediately and delete it from your system.
> >You should not otherwise copy it, retransmit it or use or disclose its
> >contents to anyone.
> >Thank you for your co-operation.
> >******
> 
> Chad La Joie   "Only a man who can not conquer
> IT Specialist his deficiencies feels the need to
> IS&C - WARD convince the world he has none"
> 
> 

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




WEB-INF/lib vs. TOMCAT_HOME/lib

2001-04-17 Thread Chris Bailey

The Tomcat automatic setting of a classpath for a given webapp is not
seeming to work for me.  I have my various jar files in .../WEB-INF/lib,
for my web app.  But, that fails.  If I however, put them in
$TOMCAT_HOME/lib, then they get added to the generic classpath (which is
displayed on startup of Tomcat), and things work fine.  

How do I fix this?

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




Re: stdout/err logging - how?

2001-04-12 Thread Chris Bailey

On 12 Apr 2001 10:55:00 +, [EMAIL PROTECTED] wrote:
> "tomcat.sh &> file.log" will overwrite your logfile every time you call
> this command. It &> redirects stdout and stderr to a file.
> If you want to concat output from stderr as well as stdout to some log
> file do:
> "tomcat.sh >> file.log 2>&1"
> or if you want all error message in a separate file:
> "tomcat.sh >> file.normal.log 2>> file.error.log"
> 
> > that your not using logforge which is also an apache code license java
> > thingy!
> what about log4j?
> http://jakarta.apache.org/log4j/docs/index.html
> This is what I want to use in my next project maybe.
> Do you have an URL to logforge?

This is something I tried (>> file 2>&1), but it didn't seem to spit
anything out (and I know stuff is getting spit out). 

For now, I've switched over to use log4j, which works fine (and is
probably a lot better to use anyway), but I'm still curious.  Plus, this
doesn't alleviate the issue of getting stdout/err in case something else
is printing to that.





stdout/err logging - how?

2001-04-11 Thread Chris Bailey

I've seen this topic come up in the past on the list, and searched the
archives, but...  I cannot seem to have my stdout written to a log file
(nor does it show up in the console window).  I'm on RedHat 6.2, Tomcat
3.2.1, Apache 1.3.19, mod_jk.  I have the Logger's in server.xml set to
DEBUG verbosity, and with path statements.  But, nothing gets spit into
those log files (well, at least not my System.out.println's and such).
Also, I tried one of the suggestions I saw in the list's archives, about
setting up a file and redirecting System.out and System.err to that (via
System.setOut(), etc.).  While the file gets created, nothing gets sent
to it.

What's the story on this?  This seems really pathetic that such a simple
need appears to be so hard to make work in Tomcat.  I'm hoping someone
can straighten this out for me.

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




classpath question

2001-04-11 Thread Chris Bailey

[System: Linux, Tomcat 3.2.1, Apache 1.3.19, mod_jk]

I have a web app that uses several jar files.  I have these in a lib
directory that has a symlink in my WEB-INF dir.  However, they don't
seem to get picked up.  It only seems to work if I put them in
TOMCAT_HOME/lib.  Do I need to do some other configuration?

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




Tomcat equivalent of JServ's LogWriter?

2001-04-04 Thread Chris Bailey

Is there an equivalent to Apache JServ's LogWriter
(org.apache.java.io.LogWriter) facility in Tomcat?  

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com




JkMount and not serving non-servlet/JSP files?

2001-03-30 Thread Chris Bailey

I have a web application where I want users to be able to type in a URL 
such as: http://www.foo.com, and have that go to a main servlet I have. 
  Basically all requests will go to this one servlet (which then figures 
out what to do, etc.).  However, I also want Apache to serve up the 
stylesheets and any non-servlet (and non-JSP, although I don't use JSP) 
files.  How can I configure this?

Right now I have a "JkMount / ajp13" in my httpd.conf file, and then I 
have my web.xml file map my main servlet to the url-pattern "/".  This 
makes the above url work, but it fails to load the style sheets and 
image files.  How can I configure this properly?

-- 
Chris Bailey[EMAIL PROTECTED]
Wego Systemshttp://www.wego.com