Tomcat 5.0.x, Log4J, Commons Logging, and Digester Hell (Need Best Practices)

2005-03-16 Thread Lukas Bradley
I need some best practices advice regarding the use of Log4J, Commons 
Logging, Tomcat 5.0.x, Digester, multiple third party support 
applications (such as Jakarta Struts, Hibernate 3 
(http://www.hibernate.org), Spring Framework 
(http://www.springframework.org), and others.

For the past 2 years, I have simply not included the Commons Logging Jar 
because of the Digester spam received during Tomcat startup.  I have 
tried MULTIPLE configurations using different properties files to no avail.

Would someone please offer me a solution for a development environment 
whereby I can customize the types of logging offered to stdout?  In 
short, I want to set Digester logging to WARN, but have been incredibly 
unsuccessful.

Thank you for any help.  Please be specific about the steps I should 
take; I don't want to miss anything, or have a noble poster assume I 
know something, when I don't.

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


Apache 2.0.51, Tomcat 5.0.x, mod_jk (not supported?!)

2004-10-19 Thread Lukas Bradley
Running Red Hat Fed Core 2, Apache 2.0.51, Tomcat 5.0.x.
I'm trying to configure Apache and Tomcat like I have countless times 
before.  The only mod_jk source or binary I can find is for Apache 
2.0.50.  If I try to use it with 2.0.51 it's a no-go.

Since the documentation on mod_jk2 is horrendous, and I've NEVER been 
able to properly get it to work, I really would like to continue with 
mod_jk without re-installing Apache 2.0.50.

More disturbingly, I saw this archive email:
 Should we see the works on mod_proxy and ajp support in the upcoming 
2.0.51 ?

 No, not in 2.0.51 (and to your following question of 2.0.x later
 releases, also likely no.)
http://www.mail-archive.com/[EMAIL PROTECTED]/msg22326.html

So, is mod_jk not being supported with a 2.0.51 version?
Does anyone have a better option for me?  Can anyone show me the Holy 
Grail of mod_jk2 properties file documentation?

Any other options?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache 2.0.51, Tomcat 5.0.x, mod_jk (not supported?!)

2004-10-19 Thread Lukas Bradley
[EMAIL PROTECTED] wrote:
How many instances are your running? 1 or multiple?  dealing with one is
very easy.
If by instances, do you mean root processes- then 1 of each.
I am running multiple connector threads for httpd and java, but 
everything is running on the same machine.

This should be a very simple operation with JK, but it seems to be not 
supported with 2.0.51

Unless I am mistaken, and I hope I am.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Apache 2.0.51, Tomcat 5.0.x, mod_jk (not supported?!)

2004-10-19 Thread Lukas Bradley
Ive also read somewhere that mod_jk2 isnt suitable for multiple jvm hosting.
mod_jk2 is so devious, it isn't suitable for torturing your worst enemy. 
  I don't want too much of my geekdom to show, but this bad boy is 
going to be one of the horrendous programs uploaded to the Monolith in 
3001 when it returns to destroy humanity.

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


Re: Customizing Tomcat error page

2004-10-16 Thread Lukas Bradley
Unfortunately, the exception-type does not catch return code.  I 
already have one exception-typejava.lang.Exception/exception-type 
which is a good umbrella for all exception an alike.  However, it does 
not catch 404, for example.  
Try this in your web.xml
error-page
error-code400/error-code
location/400.jsp/location
/error-page 
401 and 403 are trickier, but this should solve most your your needs.
Lukas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


JspC on Tomcat5 vs Tomcat4 - Java Source Generation

2004-10-15 Thread Lukas Bradley
On old Tomcat 4 projects, the Manager used Ant to generate Java source 
from my JSPs, which could then be compiled directly with my other Java 
source, and all was good.  The Manager saw that it was good, and it was 
good.

In the great migration to Tomcat 5, the Ant script proclaimed:
this task doesn't support Tomcat 5.x properly, please use the Tomcat 
provided jspc task instead

And there was much scurrying.
The Manager defined a new task, one for Tomcat 5.x using 
org.apache.jasper.JspC, for Tomcat 5 begat Jasper2.  (Actually, it was 
earlier, but that's neither here nor there...)

The Manager was pleased that the task looked about the same, and he saw 
that it was good, and it was good.

Until he freaking tried to run it, and it didn't work.
Because it appears as if the task is attempting to generate AND compile 
from JSP to classes, which isn't what I want.  I would really like for 
my Java source to be generated, so I can compile it along-side my 
regular source later.

When trying to compile, it's looking for dependencies in my code that is 
right beside it, but uncompiled.  Maybe I'm a little off, and it needs 
those binary dependant classes for source generation, but my tingling 
geeky sense tells me otherwise.

What setting am I missing to do this?
Here is the setup:
   target name=jsp-to-java depends=prepare
  echoproperties
  /echoproperties
  taskdef classname=org.apache.jasper.JspC name=jasper2
 classpath id=jspc.classpath
pathelement location=${java.home}/lib/tools.jar /
fileset dir=${catalina.home}/bin
   include name=*.jar /
/fileset
fileset dir=${catalina.home}/server/lib
   include name=*.jar /
/fileset
fileset dir=${catalina.home}/common/lib
   include name=*.jar /
/fileset
fileset dir=${catalina.home}/shared/lib
   include name=*.jar /
/fileset
 /classpath
  /taskdef
  jasper2 verbose=9
 package=p2p.ui.jsp
 validateXml=false webxml=${build.web-inf.dir}/web.xml 
uriroot=${build.web.dir} webXmlFragment=${temp}/webinc.xml 
outputDir=${build.java.source.dir} /
   /target

And the You suck, I can't find your dependant classes error:
jsp-to-java:
  [jasper2] log4j:WARN No appenders could be found for logger 
(org.apache.jasper.compiler.Compiler).
  [jasper2] log4j:WARN Please initialize the log4j system properly.
  [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \Error.jsp
  [jasper2] Oct 15, 2004 3:07:39 PM org.apache.jasper.JspC processFile
  [jasper2] INFO: Built File: \SecurityException.jsp
BUILD FAILED: C:\dev\games\conf\build\build.xml:146: 
org.apache.jasper.JasperException: 
file:C:/dev/games/build/web/user/Login.jsp(4,0) Unable to load tag 
handler class p2p.ui.tags.form.ErrorsTag for tag form:errors

I've started compiled my classes before the JSPs, then including that in 
the JspC path, but I'm just all flustered now that my previous build 
order has been changed, and expectations are all off.  And I don't want 
to continue pouting.

Inform me, please.
Lukas


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


Re: JspC on Tomcat5 vs Tomcat4 - Java Source Generation

2004-10-15 Thread Lukas Bradley
Yes, Yoav, everything you wrote is correct.  I have read all those 
things, and the source is being created *for those files that do not 
have dependencies with my other java source.*

In short, I was wondering why the older JSP Java generation in ANT 
didn't need those class dependencies, but the new one does.

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


Tomcat 5 Session Replication and ServletContext

2004-06-21 Thread Lukas Bradley
I'm looking for a clarification on the functionality of the Session
Replication within Tomcat 5.  

 

Is the only data replicated across servers that which is placed in the
HttpSession?  In other words, is any data placed within the ServletContext
(application layer) object replicated?

 

Thanks for any help.

 

Lukas



RE: [ANN] Apache Tomcat 5.0.16 Stable released

2003-12-07 Thread Lukas Bradley
Congratulations to all those involved.  This is a huge release, in my book.

Lukas




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



Re: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general)

2003-11-27 Thread Lukas Bradley
Thank you for the quick reply.

Lukas


Shapira, Yoav [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]...
 
 Howdy,
 By the time sessionDestroyed is call, the session has been 
 invalidated. That doesn't mean you can't get information about it: 
 only certain information ;)  HttpSession#getAttribute is clearly 
 documented to throw an IllegalStateException if called on an 
 invalidated session.
 
 If you're interested in attributes, implement an HttpSessionAttribute 
 or Binding listener.  In it, you will be notified when an attribute is 
 removed and you will be able to access its value.
 
 Yoav Shapira
 Millennium ChemInformatics
 
 
 -Original Message-
 From: Lukas Bradley [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 26, 2003 1:07 PM
 To: [EMAIL PROTECTED]
 Subject: HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener
 in
 general)
 
 All,
 
 When I attempt to access the HttpSession object within the 
 sessionDestroyed(), I get the following error.
 
 DEBUG [StandardManager[]] (SessionListener.java:40) -
 sessionDestroyed()
 StandardManager[] Session event listener threw exception
 java.lang.IllegalStateException: getAttribute: Session already
 invalidated
 at 
 org.apache.catalina.session.StandardSession.getAttribute(StandardSess
 io
 n.ja
 v
 a:954)
 at 
 org.apache.catalina.session.StandardSessionFacade.getAttribute(Standa
 rd
 Sess
 i
 onFacade.java:171)
 at
 dollars.ui.actions.DollarsAction.getUserVO(DollarsAction.java:46)
 at 
 dollars.ui.controllers.SessionListener.sessionDestroyed(SessionListen
 er
 .jav
 a
 :42)
 at 
 org.apache.catalina.session.StandardSession.expire(StandardSession.ja
 va
 :659
 )
 at 
 org.apache.catalina.session.StandardSession.expire(StandardSession.ja
 va
 :608
 )
 at 
 org.apache.catalina.session.StandardManager.processExpires(StandardMa
 na
 ger.
 j
 ava:793)
 at 
 org.apache.catalina.session.StandardManager.run(StandardManager.java:
 87
 0)
 at java.lang.Thread.run(Thread.java:536)
 
 Why would the HttpSessionEvent *seem* like it should have access to 
 the session that has just been removed, yet not be able to access it?  
 Is
 this
 a
 Tomcat problem, or does the Servlet 2.3 spec simply want you to know
 that
 some random session was just invalidated, but you can't get any
 information
 about it.
 
 Any help appreciated.
 
 Lukas
 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 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]



HttpSessionListener in Tomcat 4.1.27 (or HttpSessionListener in general)

2003-11-26 Thread Lukas Bradley
All,

When I attempt to access the HttpSession object within the
sessionDestroyed(), I get the following error.

DEBUG [StandardManager[]] (SessionListener.java:40) - sessionDestroyed()
StandardManager[] Session event listener threw exception
java.lang.IllegalStateException: getAttribute: Session already invalidated
at
org.apache.catalina.session.StandardSession.getAttribute(StandardSession.jav
a:954)
at
org.apache.catalina.session.StandardSessionFacade.getAttribute(StandardSessi
onFacade.java:171)
at dollars.ui.actions.DollarsAction.getUserVO(DollarsAction.java:46)
at
dollars.ui.controllers.SessionListener.sessionDestroyed(SessionListener.java
:42)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:659)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:608)
at
org.apache.catalina.session.StandardManager.processExpires(StandardManager.j
ava:793)
at
org.apache.catalina.session.StandardManager.run(StandardManager.java:870)
at java.lang.Thread.run(Thread.java:536)

Why would the HttpSessionEvent *seem* like it should have access to the
session that has just been removed, yet not be able to access it?  Is this a
Tomcat problem, or does the Servlet 2.3 spec simply want you to know that
some random session was just invalidated, but you can't get any information
about it.

Any help appreciated.

Lukas





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



Tomcat 4.1 Runaway Java Procs on Debian LINUX

2003-11-13 Thread Lukas Bradley
What determines the number of Java procs running catalina upon startup?
The OS is Debian Linux, and it's Tomcat 4.1.

If you look closely below, between ids 268 and 317 was full of java
instances.  That's 49 java instances running the bootstrap.  What would make
this happen?  Is this normal?  Is this what happens when a server gets
throttled?

I tried shutting them down, but was unable.  The catalina.out log was filled
with this:

StandardWrapperValve[default]: Servlet.service() for servlet default threw
exception
java.net.SocketException: Broken pipe
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at
org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri
te(InternalOutputBuffer.java:668)
 at
org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutput
Filter.java:160)
 at
org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
ava:523)
 at org.apache.coyote.Response.doWrite(Response.java:524)
 at
org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384)
 at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
 at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
 at org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:411)

then this:

CoyoteAdapter An exception or error occurred in the container during the
request processing
java.lang.NullPointerException
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:164)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:392)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
 at java.lang.Thread.run(Thread.java:536)

If the server were rebooted, why would 25 or so processes start?  Any ideas?
Any consultants in Atlanta want to make some money tomorrow?

Thanks for any and all help.
nat447:# ps auxww|grep java

root 268 2.7 9.5 253720 49036 pts/0 S 17:55 0:05

/usr/local/java/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endor
sed -classpath
/usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar

-Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.i
o.tmpdir=/usr/local/tomcat/temp

org.apache.catalina.startup.Bootstrap start

-snip-

root 317 0.0 9.5 253720 49036 pts/0 S 17:56 0:00

/usr/local/java/b

in/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed

-classpath /usr/l
ocal/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar

-Dcatalina.base=/usr

/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/
tomc at/temp org.apache.catalina.startup.Bootstrap start




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



Re: Tomcat 4.1 Runaway Java Procs on Debian LINUX

2003-11-13 Thread Lukas Bradley
First, this was my main contention point.  It was answered on JGuru.

[N.B.: Under Linux, each Java Thread appears in the process list (ps) as a
separate process. This is because native Linux threads are implemented as
lightweight processes. However, there is still only one Java process
space -- the memory/CPU reported by each thread is actually shared among all
threads. -A]



Lukas Bradley [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 What determines the number of Java procs running catalina upon startup?
 The OS is Debian Linux, and it's Tomcat 4.1.

 If you look closely below, between ids 268 and 317 was full of java
 instances.  That's 49 java instances running the bootstrap.  What would
make
 this happen?  Is this normal?  Is this what happens when a server gets
 throttled?

 I tried shutting them down, but was unable.  The catalina.out log was
filled
 with this:

 StandardWrapperValve[default]: Servlet.service() for servlet default threw
 exception
 java.net.SocketException: Broken pipe
  at java.net.SocketOutputStream.socketWrite0(Native Method)
  at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
  at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
  at

org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWri
 te(InternalOutputBuffer.java:668)
  at

org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutput
 Filter.java:160)
  at

org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.j
 ava:523)
  at org.apache.coyote.Response.doWrite(Response.java:524)
  at

org.apache.coyote.tomcat4.OutputBuffer.realWriteBytes(OutputBuffer.java:384)
  at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:439)
  at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:359)
  at
org.apache.coyote.tomcat4.OutputBuffer.writeBytes(OutputBuffer.java:411)

 then this:

 CoyoteAdapter An exception or error occurred in the container during the
 request processing
 java.lang.NullPointerException
  at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
 :164)
  at

org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
 eNext(StandardPipeline.java:643)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
  at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
  at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
  at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
  at

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
 ction(Http11Protocol.java:392)
  at
 org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
  at

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
 a:619)
  at java.lang.Thread.run(Thread.java:536)

 If the server were rebooted, why would 25 or so processes start?  Any
ideas?
 Any consultants in Atlanta want to make some money tomorrow?

 Thanks for any and all help.
 nat447:# ps auxww|grep java

 root 268 2.7 9.5 253720 49036 pts/0 S 17:55 0:05


/usr/local/java/bin/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endor
 sed -classpath
 /usr/local/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar

 -Dcatalina.base=/usr/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava
.i
 o.tmpdir=/usr/local/tomcat/temp

 org.apache.catalina.startup.Bootstrap start

 -snip-

 root 317 0.0 9.5 253720 49036 pts/0 S 17:56 0:00

 /usr/local/java/b

 in/java -Djava.endorsed.dirs=/usr/local/tomcat/common/endorsed

 -classpath /usr/l
 ocal/java/lib/tools.jar:/usr/local/tomcat/bin/bootstrap.jar

 -Dcatalina.base=/usr


/local/tomcat -Dcatalina.home=/usr/local/tomcat -Djava.io.tmpdir=/usr/local/
 tomc at/temp org.apache.catalina.startup.Bootstrap start




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



Re: HttpsURLConnection, Tomcat 4.1.27, and jsse.jar

2003-10-14 Thread Lukas Bradley
A good guess, and only if the JSSE functions REQUIRED 1.3.  But I'm trying
to access the JSSE classes included with 1.4.

Lukas

Yuriy Stul [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]

 May be problem is that Tomcat 4.1.27 was compiled under Java 1.4... and
 JSSE under Java 1.3?

 Yuriy.




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



HttpsURLConnection, Tomcat 4.1.27, and jsse.jar

2003-10-12 Thread Lukas Bradley
I'm having a strange problem with Tomcat and
javax.net.ssl.HttpsURLConnection.  I'm using Tomcat 4.1.27, JDK 1.4.1_04,
and the jsse.jar containing the javax.net.ssl and other fine classes.

I've read about certain bugs located here
http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#InstallProbs
under the heading Code Using HttpsURLConnection Class Throws
ClassCastException in JSSE 1.0.x.  That is exactly the problem I am having.

However, my command line tests work fine.  The JDK works fine by itself.
There is no ClassCastException.  That means that the regular command-line
version of the HttpsURLConnection is wonderful.  The JSSE classes are
configured correctly using java.

However, if you attempt to hit the jsp located at
http://www.dollars.com/URLTest.jsp, you'll get an error message with the
aforementioned ClassCastException.  Tomcat and/or Catalina are not finding
the classes, or are having a rough go with the configuration.

Since the JSSE classes now ship with JDK 1.4, I've been having a hard time
understanding why we are getting this error.  The only two ideas I have are
(1) Tomcat is running off an old JDK (which I don't think is the case) or
(2) there is some configuration error.

Attempting to place the System.setProperty() kludge-fix in the JSP, it
still doesn't work.

Does anyone have any insight as to how the Tomcat/Catalina settings could
have the JSSE classes misconfigured?

Also read this:
http://jce.iaik.tugraz.at/mailarchive/iaik-jce/msg02392.html
And this:
http://forum.java.sun.com/thread.jsp?forum=2thread=254821

But, as you will see in the JSP, it doesn't help.  I've also tried
javax.net.ssl in the package property, and it doesn't work.

Do any and all searches for jsse tomcat ClassCastException and you'll see
stuff.  I think you might have to explicitly install the JSSE classes into
the java \lib\ext directory, which still doesn't make sense, because they
should be included in 1.4.1 anyway.

Thanks for any and all help.

Lukas










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



Re: Tag Lifecycle

2003-10-01 Thread Lukas Bradley
You're a rock star, Tim.  Thanks.

Lukas


Tim Funk [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 All the detail you need ...

 http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001

 -Tim

 Lukas Bradley wrote:

  What is the lifecycle of custom tags?  Are tag objects reused throughout
a
  page?  It seems as if my tags are not always being created.  They are
not
  *always* reused however.
 
  Lukas
 
 




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



Tag Lifecycle

2003-09-30 Thread Lukas Bradley
What is the lifecycle of custom tags?  Are tag objects reused throughout a
page?  It seems as if my tags are not always being created.  They are not
*always* reused however.

Lukas




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



Tomcat 4.1 MIME Type from web.xml

2003-09-16 Thread Lukas Bradley
In Tomcat 5.0 beta, there is a class MimeMap offering the following method:
public String getContentType(String extn) {...}

Is there a corresponding method within the Tomcat 4.1 framework?  I would
like to determine a file's MIME type as specified within the web.xml
document.

Thanks

Lukas






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



Re: Tomcat 4.1 MIME Type from web.xml

2003-09-16 Thread Lukas Bradley

 Is there a corresponding method within the Tomcat 4.1 framework?  I would
 like to determine a file's MIME type as specified within the web.xml
 document.

I'm an idiot, please don't bombard me


Servlet Context
  java.lang.String getMimeType(java.lang.String file)
Returns the MIME type of the specified file, or null if the
MIME type is not known.


Lukas




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



Re: Servlet/JSP Lifecycle and Performance

2003-09-07 Thread Lukas Bradley
 AFAIK, no such benchmarks have been made.
 Once tomcat loads a servlet, it is loaded. Tomcat currently does not
unload
 servlets due to lack of use.

Is this the case with Tomcat 5?

Lukas




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



Servlet/JSP Lifecycle and Performance

2003-09-05 Thread Lukas Bradley
All,

Where can I get a description of how Tomcat handles a Servlet lifecycle from
init() to removal from memory?  I'm interested in how long a Servlet is held
in memory, and how long it remains inactive before it is removed from the
Servlet pool.

Also, are there performance statistics of the maximum number of Servlets
used versus number of simultaneous requests?  In other words, if there are
1000 simultaneous requests, what is the performance sacrifice for having
2000 active servlets versus 200?  Assume memory and processing power is
ample.

Thanks for any and all information or comments.

Lukas




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



Re: Failed Authentication: 401 error-page strange behavior

2003-08-14 Thread Lukas Bradley
In Bugzilla with a really bad hack fix.  I'm trying to reopen the ticket.

http://nagoya.apache.org/bugzilla/buglist.cgi?email1=emailtype1=substringemailassigned_to1=1email2=emailtype2=substringemailreporter2=1bugidtype=includebug_id=changedin=votes=chfieldfrom=chfieldto=Nowchfieldvalue=product=Tomcat+4short_desc=401short_desc_type=allwordssubstrlong_desc=long_desc_type=allwordssubstrbug_file_loc=bug_file_loc_type=allwordssubstrkeywords=keywords_type=allwordsfield0-0-0=nooptype0-0-0=noopvalue0-0-0=cmdtype=doitnewqueryname=order=%27Importance%27

Each of these has bad solutions, or states it is not a bug.  The one fix
does work, but it is very hackish.

Lukas





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



Failed Authentication: 401 error-page strange behavior

2003-08-14 Thread Lukas Bradley
I'm attempting to use a combination of an error-page for 401 codes and BASIC
authentication.  My version is Tomcat 4.1.27 on Windows XP.

Without the error-page, the authentication works fine.  A username/password
dialog is presented when attempting to enter the /sponsor, /webmaster, or
/admin directories.  However, with both the security-contraint and the
custom 401 error-page, only the /Beta.jsp is shown.  That is to say, the
dialog box is never shown-- the user is directed straight to the /Beta.jsp.

I've attempted to shutdown Tomcat, close all browsers, clean their cache,
destroy all cookies, deleted compiled pages, deleted serialized sessions,
and shave my cats, all to no avail.

Does anyone have any insight?  Other error-codes (500,404) work fine.  Only
the 401.  I've searched mail archives, and this problem has been mentioned
with earlier versions, but never quite in this manner.

 The web.xml looks as follows.

   error-page
error-code401/error-code
location/Beta.jsp/location
   /error-page

 security-constraint
   web-resource-collection
 web-resource-name
   Entire Application
 /web-resource-name
 url-pattern/sponsor/*/url-pattern
 url-pattern/webmaster/*/url-pattern
 url-pattern/admin/*/url-pattern
   /web-resource-collection
   auth-constraint
   role-nameMyAdmin/role-name
   /auth-constraint
 /security-constraint

 login-config
   auth-methodBASIC/auth-method
   realm-nameMy Members-only Area/realm-name
/login-config







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



Re: Running Tomcat as Non-Root

2003-07-19 Thread Lukas Bradley
  Because then ANYONE with a user account could bind a service to those
  ports.
 ... unless there are proper access privileges on ports as on files.
 I consider the start-as-root pattern as a hack (not a bad one though ;-)

I was going to let a sleeping dog lie, but that's exactly what I think.

This is not a Java bug.  This should be an operating system configuration
issue.

Lukas




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



Re: JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Lukas Bradley

Then, the declarations and mappings for the servlets which were generated
during the precompilation must be added to the web application deployment
descriptor. Insert the ${webapp.path}/WEB-INF/generated_web.xml at the right
place inside the ${webapp.path}/WEB-INF/web.xml file. Restart the web
application (using the manager) and test it to verify it is running fine
with precompiled servlets. An appropriate token placed in the web
application deployment descriptor may also be used to automatically insert
the generated servlet declarations and mappings using Ant filtering
capabilities. This is actually how all the webapps distributed with Tomcat
are automatically compiled as part of the build process.

This is the part that is very unclear.  Please explain the use of the
webXmlFragment and how it can be used to place the mappings into a web.xml.

Lukas




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



Re: Running Tomcat as Non-Root

2003-07-18 Thread Lukas Bradley
Yes, but is this a Java problem, or is this an OS related problem/feature?

IMHO, since UNIX/LINUX is doing the restricting of port traffic, the problem
resides with the OS, not with Java.  Adding an API to shift the native
security model is out of scope.

Why don't particular flavors of the OS allow for  1024 to be non-root?

Lukas

Lawrence, Gabriel [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 So I'm going to take that as a no. No one has bothered to pester sun
 about this.

 And yes, the way things tend to work today is that people run these
 things with extra JVMs, although if its running on port 25 they'd all
 have to be running as root.

 So I realize that its possible that you could only drop privs down to a
 single user in the vm, but gee wouldn't that be hugely better then what
 we have today, where if I want to run 1024 I have to run as superuser?

 Surely you can see the benefit.
 -gabe




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



Re: Tomcat Using Log4J ?

2003-07-17 Thread Lukas Bradley
Thanks for all the information.  I tried removing Digester from WEB-INF/lib,
but then Struts isn't initializing properly.

For now, I also removed Xerces.

Here is a list of my WEB-INF/libs.

/WEB-INF/lib/activation.jar
/WEB-INF/lib/commons-beanutils.jar
/WEB-INF/lib/commons-collections.jar
/WEB-INF/lib/commons-dbcp.jar
/WEB-INF/lib/commons-fileupload.jar
/WEB-INF/lib/commons-lang.jar
/WEB-INF/lib/commons-pool.jar
/WEB-INF/lib/commons-resources.jar
/WEB-INF/lib/commons-services.jar
/WEB-INF/lib/commons-validator.jar
/WEB-INF/lib/dom.jar
/WEB-INF/lib/jakarta-oro.jar
/WEB-INF/lib/jaxen-full.jar
/WEB-INF/lib/jaxp-api.jar
/WEB-INF/lib/jdbc2_0-stdext.jar
/WEB-INF/lib/jdom.jar
/WEB-INF/lib/jstl.jar
/WEB-INF/lib/jta-spec1_0_1.jar
/WEB-INF/lib/log4j-1.2.7.jar
/WEB-INF/lib/mysql-connector-java-3.0.8-stable-bin.jar
/WEB-INF/lib/sax.jar
/WEB-INF/lib/saxpath.jar
/WEB-INF/lib/standard.jar
/WEB-INF/lib/struts.jar
/WEB-INF/lib/xalan.jar

Log4J is being loaded by a plugin detailed in Stuts.

Lukas

Jacob Kjome [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Quoting Lukas Bradley [EMAIL PROTECTED]:

   Does Tomcat 4.1.24 initialize a Log4J instance?  It seems as if
something
  is
   stepping on my Log4J properties, and I don't know where it is.  The
first
   thing my application does is start the plugin, but here is my log:
 
  It's actually Commons Digester.  When I set it to a DEBUG level, it goes
  CRAZY on the log.
 
  Is there any way to ensure that my log properties get set before
Digester
  starts?
 

 That Depends.  Where do you have Log4j; in common/lib, WEB-INF/lib, or
both?
 Is digester in your WEB-INF/lib or is it Tomcat's copy of digester which
reads
 the server.xml and other xml config files?  Note that the trouble is
usually
 the fault of commons-logging which messes things up significantly.  Do you
have
 commons-logging in your WEB-INF/lib?

 Bottom line is that, if you want Log4j logging to work properly, make sure
 log4j.jar is in WEB-INF/lib.  Then, nothing else will step on your
 configuration except for, possibly, other 3rd party libraries in
WEB-INF/lib
 that perform Log4j configuration (which is a big no, no...general
libraries
 shouldn't be performing Log4j configuration, they should leave that to
your
 application).  Put your config file in WEB-INF/classes for default log4j
 configuration or put it wherever and load it yourself.  I suggest using a
 servlet context listener to load configuration upon startup.

 Anway, until you detail the setup of your application, I can't tell you
much
 more.

 BTW, you really should remove Xerces from WEB-INF/lib.  This should be
loaded
 from common/lib.  The explanation has been detailed on the list many times
 before so I won't go into it.

 Jake

  Lukas
 
 
 
 
  -
  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]



Re: JSP Pre-compile and Deployment

2003-07-16 Thread Lukas Bradley
 You place the class files in /WEB-INF/classes, then hand-code servlet
mappings in web.xml pointing from each xxx.jsp name to the corresponding
class.

This seems pretty convoluted.  How does Tomcat handle the mappings?  Is
there not an automatic way to do this?

Lukas




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



Tomcat Using Log4J ?

2003-07-16 Thread Lukas Bradley
Does Tomcat 4.1.24 initialize a Log4J instance?  It seems as if something is
stepping on my Log4J properties, and I don't know where it is.  The first
thing my application does is start the plugin, but here is my log:

WebappLoader[]: Deploy JAR /WEB-INF/lib/xerces.jar to
c:\dev\myapp\html\WEB-INF\lib\xerces.jar
WebappLoader[]: Deploy JAR /WEB-INF/lib/xercesImpl.jar to
c:\dev\myapp\html\WEB-INF\lib\xercesImpl.jar
StandardManager[]: Seeding random number generator class
java.security.SecureRandom
StandardManager[]: Seeding of random number generator has been completed
log4j:WARN No appenders could be found for logger
(org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
Log4jPlugin - init() START
Log4jPlugin - init() COMPLETE

Any ideas?

Lukas




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



Re: Tomcat Using Log4J ?

2003-07-16 Thread Lukas Bradley
 Does Tomcat 4.1.24 initialize a Log4J instance?  It seems as if something
is
 stepping on my Log4J properties, and I don't know where it is.  The first
 thing my application does is start the plugin, but here is my log:

It's actually Commons Digester.  When I set it to a DEBUG level, it goes
CRAZY on the log.

Is there any way to ensure that my log properties get set before Digester
starts?

Lukas




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



JSP Pre-compile and Deployment

2003-07-12 Thread Lukas Bradley
Double part question:

First, when I pre-compile JSPs, what directory are the JSP class files
placed?  In WEB-INF/jsp or WEB-INF/classes?

Second, without the actual JSP on the server, can the files be reached as
normally?  Will //localhost/myfile.jsp still map correctly to the class in
Tomcat?

Thanks.

Lukas




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



Re: Anyone seen this error before?

2003-07-08 Thread Lukas Bradley
I think the problem is much simpler.  Sounds like a JSP is attempting to
access something (like myHashMap.get(null) ) and the NPE is being thrown up
to Tomcat.

How about some code?  This only happening in one spot?

Lukas

Eric J. Pinnell [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I don't really know what the developers are trying to do.  I guess my
 question is is it a problem with the JK2 connector?.  Because it comes
 up and says:

 CoyoteAdapter An exception or error occurred in the container during the
 request processing
 java.lang.NullPointerException

 The developers think that it is JK2 and wash their hands of it.  To me it
 seems like it could be any number of things that cause a NPE it's just
 Coyote that catching it.

 The system also seems to be running out of memory.  I wonder if that has
 something to do with it...  I'm going to crank it up.

 -e

 On Tue, 8 Jul 2003, Rick Roberts wrote:

  Are you trying to process a NULL value?
  Possibly from a request.getParameter()?
 
 
  -
  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]



Deploying WAR: Possible to automatically compile JSPs?

2003-07-02 Thread Lukas Bradley
When deploying a WAR file, is it possible to have Tomcat automatically
compile all the included JSP files?

Lukas




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



Tomcat web.xml web-app/error-page support

2003-06-23 Thread Lukas Bradley
Does Tomcat support the web.xml DTD web-app/error-page option?  It is parsed
in the org.apache.catalina.startup.WebRuleSet, but I've never seen any
documentation on it.

Anything out there?

Lukas




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



Re: Tomcat web.xml web-app/error-page support

2003-06-23 Thread Lukas Bradley
  Does Tomcat support the web.xml DTD web-app/error-page option? It

  is parsed in the org.apache.catalina.startup.WebRuleSet, but I've

  never seen any documentation on it.

 http://jakarta.apache.org/tomcat/faq/misc.html#error

Thanks for the quick response, Jason. I apologize for not searching
thoroughly enough. I swear I thought I looked in misc.

Lukas




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



SSL and Non-Browser Traffic

2003-05-30 Thread Lukas Bradley
For non-browser based traffic, like foreign applications that POST to a
Servlet over HTTPS, where do I place the trusted client certificate?  Since
there is no user-based authentication acceptance window, it seems our
connections are failing.

The end user has sent me the certificate, I just don't know where to place
it for Tomcat to verify.  Is this even necessary?

Lukas




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