RE: Webapp classloader question.

2003-10-10 Thread Kevin Jones
But the org.apache classes are not endorsed, only the org.xml.sax and
org.w3c.dom. These packages contain mostly interfaces and while the
implemenation of the JDK comes with the org.apache classes I do not
believe these are considered part of the J2SE platform API.

JAXP comes with a specific override mechanism such that if a JAXP
implementation is found on the classpath that one can be used ahead of
any other implementation. Otherwise developers would be stuck with the
JAXP parser in the JRE. This means that a parser in mywebapp/web-inf/lib
should be used ahead of any other provided you are using
SAXParserFactory/DocumentBuilderFactory to load the parser. At least
this is my reading of the JAXP specification and certainly the behaviour
I've seen running XML apps from the command line and making sure that I
have Xerces/Xalan on the classpath for the application.

BTW I'm butting in here assuming I know the whole thread, and this is
also a subject dear to my heart as I've had so many go arounds of this
on so many different Tomcat versions.

BTW2 the Servlet specification was written with exactly this problem in
mind, i.e. making sure the 'right' XML parser was loaded

Kevin Jones

On Fri, 2003-10-10 at 18:16, Cox, Charlie wrote:
 ok, I just found this link from the archives. Sun defined that you have to
 use the 'endorsed' directory or take the Sun-supplied versions of the
 packages listed.
 http://java.sun.com/j2se/1.4.2/docs/guide/standards/index.html
 
 tomcat's classloading is enforcing this requirement explicitly since it does
 not delegate to the parent classloader first.
 
 so you can only replace the version in /endorsed
 Charlie
 
  -Original Message-
  From: Lee, William [mailto:[EMAIL PROTECTED]
  Sent: Friday, October 10, 2003 12:05 PM
  To: 'Tomcat Developers List'
  Subject: RE: Webapp classloader question.
  
  
  It seems to me that we are going for bandaid solution here. 
  By moving
  around the files, it will work for one particular webapp, but at the
  expensive of the compatibility of other webapp under the same 
  tomcat. As
  soon as we move the parser out of one webapp, we are forcing all other
  webapp using the same parser, which I believed is not the 
  right way to go.
  
  Rather, why forcing the delegate model for these two 
  particular packages
  (xerces  xalan)? Isn't it true that the endorse mechanism 
  only required
  that the endorsed directory should be traverse before the system?
  
  I still didn't see the reason how this endorsed mechanism 
  has anything to
  do with the servlet spec., and that it would force servlet 
  container to skip
  the one in webapps?
  
  Thanks again.
  William.
  
  
  -Original Message-
  From: Cox, Charlie [mailto:[EMAIL PROTECTED] 
  Sent: Friday, October 10, 2003 8:46 AM
  To: 'Tomcat Developers List'
  Subject: RE: Webapp classloader question.
  
  
  you want to put the one from endorsed into server/lib, then 
  put yours in
  WEB-INF. This way only one is visible to any tree of the 
  classloader. But
  I'm not sure if you will still end up with the JDK version 
  since the one in
  WEB-INF is not endorsed to override it.
  
  The other thing I would try is to put your version in 
  /common/endorsed with
  the tomcat version in /server/lib.
  
  btw, have you just tried replacing the version in /endorsed 
  with your newer
  one?
  
  Charlie
  
   -Original Message-
   From: Lee, William [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 09, 2003 4:54 PM
   To: 'Tomcat Developers List'
   Subject: RE: Webapp classloader question.
   
   
   This won't work since, all jar files in commons/lib,
   commons/endorsed, and
   commons/classes are all visible to the tomcat's commons 
   classloader. So,
   there is no difference whether we put the xerces jar files 
  in lib or
   endorsed, the one from webapps will be skipped.
   
   I think the question boiled down to, if we have Xerces on
   both endorsed
   and webapps, which one should be used? For tomcat, I would 
   thought that
   the order for class searching will be webapps, shared, commons
   (including endorsed), then system.
   
   I believed tomcat put endorsed before system is to
   follows the endorsed
   classloading spec.. But I also believed forcing delegate 
   model for xerces
   and xalan maybe overkill?
   
   Indeed, the tomcat's class-loader-howto document also
   indicated that the
   one from webapps should be used instead.
   
   Frankly speaking, I'm no expert on these topics, so please
   feel free to
   correct me if I mis-understanding anything here.
   
   Thanks.
   William.
   
   -Original Message-
   From: Shapira, Yoav [mailto:[EMAIL PROTECTED]
   Sent: Thursday, October 09, 2003 12:44 PM
   To: Tomcat Developers List
   Subject: RE: Webapp classloader question.
   
   
   
   Howdy,
   Tomcat 4.1.x implements the endorsed classloader spec.  It's
   compliant with
   the Servlet Specification v2.3.  What you can do

Re: Building TC5

2003-01-19 Thread Kevin Jones
Thanks,

that's worked great,

Kevin Jones

On Fri, 2003-01-17 at 20:33, Jeanfrancois Arcand wrote:
 Hi Kevin,
 
 I've just commited a fix for build.properties.default. You should try:
 
 cvs checkout jakarta-tomcat-5
 cd jakarta-tomcat-5
 ant download
 ant checkout
 ant dist
 
 I've just did it from a clean workspace and everything works fine.
 
 -- Jeanfrancois
 
 Kevin Jones wrote:
 
 Still doesn't work for me I get
 
 BUILD FAILED
 file d:\xxx\jakarta-servletapi5/jsr154/build.xml:67: srcdir
 d:\xxx\jakarta-servletapi5/jsr154/src/share does not exist
 
 where xxx is shorthand for the tomcat.source directory mentioned in the
 instructions,
 
 Kevin
 
 On Fri, 2003-01-17 at 17:30, Remy Maucherat wrote:
   
 
 Kevin Jones wrote:
 
 
 Thanks Remy,
 
 I assume you mean I should start from scratch again?
   
 
 Yes, follow these instructions: 
 http://jakarta.apache.org/tomcat/building.html
 
 Remy
 
 
 --
 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]
 
 
   
 


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




Building TC5

2003-01-17 Thread Kevin Jones
I'm trying to build TC 5 from sources and failing horribly.

Firstly I connected to cvs and checked out jakarta-tomcat-5 this
contains a buildme.txt file. Reading this, I followed the instructions,
downloaded the build.xml and ran ant.

This proceeeds to download all the appropriate files and starts the
build, but this fails when it gets to the build-tomcat-coyote
(compile.tomcat5) step. The first problem here was that the wrong value
was being specified for catalina.home so servlet-api.jar wasn't being
found. After fixing that I'm still getting compile errors telling me
that various org.apache.catalina classes can't be found.

I've seen various comments on here that building from sources is easy,
so what am I missing? :-)

Thanks,

Kevin Jones
Developmentor


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




Broken TC5 Nightly builds

2003-01-17 Thread Kevin Jones
As I've just posted I can't (yet) build TC from sources. The reason I
want to build from sources is that the nightly builds seem to be broken.
The directory is being created (so Jan 17th is there) but the files
aren't there.

The latest date for the nightly's is Jan 14th

Kevin Jones
Developmentor


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




Re: Building TC5

2003-01-17 Thread Kevin Jones
Thanks Remy,

I assume you mean I should start from scratch again?

Kevin

On Fri, 2003-01-17 at 17:12, Remy Maucherat wrote:
 Kevin Jones wrote:
  I'm trying to build TC 5 from sources and failing horribly.
  
  Firstly I connected to cvs and checked out jakarta-tomcat-5 this
  contains a buildme.txt file. Reading this, I followed the instructions,
  downloaded the build.xml and ran ant.
  
  This proceeeds to download all the appropriate files and starts the
  build, but this fails when it gets to the build-tomcat-coyote
  (compile.tomcat5) step. The first problem here was that the wrong value
  was being specified for catalina.home so servlet-api.jar wasn't being
  found. After fixing that I'm still getting compile errors telling me
  that various org.apache.catalina classes can't be found.
  
  I've seen various comments on here that building from sources is easy,
  so what am I missing? :-)
 
 The main build script is broken. Try again.
 
 I'll let Costin reapply a fixed version of his patch.
 
 Remy
 
 
 --
 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]




Re: Building TC5

2003-01-17 Thread Kevin Jones
Still doesn't work for me I get

BUILD FAILED
file d:\xxx\jakarta-servletapi5/jsr154/build.xml:67: srcdir
d:\xxx\jakarta-servletapi5/jsr154/src/share does not exist

where xxx is shorthand for the tomcat.source directory mentioned in the
instructions,

Kevin

On Fri, 2003-01-17 at 17:30, Remy Maucherat wrote:
 Kevin Jones wrote:
  Thanks Remy,
  
  I assume you mean I should start from scratch again?
 
 Yes, follow these instructions: 
 http://jakarta.apache.org/tomcat/building.html
 
 Remy
 
 
 --
 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]




RE: Strange Cookie behavior with ie 6 and subdomains

2003-01-13 Thread Kevin Jones
Unfortunately the name of the session cookie isn't configurable - it's
set by the Servlet specification to be jsessionid,

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: Michael Wyraz [mailto:[EMAIL PROTECTED]] 
 Sent: 13 January 2003 13:26
 To: [EMAIL PROTECTED]
 Subject: Strange Cookie behavior with ie 6 and subdomains
 
 
 Hi!
 
 I found a strange bug in internet explorer cookie handling 
 that could possibile
 workarounded in tomcat:
 
 I have 2 different webapps on 2 different domains (a domain 
 and a subdomain of this domain), e.g.:
 mydomain.com
 test.mydomain.com
 
 When I enter the first domain, a session cookie for this 
 domain is set.
 The session then works fine for this domain.
 Then I view a page from the second domain. IE returns the cookie
 that was set in the first domain. Tomcat does'nt know that session id
 in the second context and sets a new cookie.
 Now the strange thing: The new Cookie is never returned from 
 ie. So the
 new Session in the second domain is not valid and after each click a
 new SessionID is generated (i think IE always returns the 
 cookie set in the first domain).
 
 A possible solution:
 If the name of the session cookie would be configurable (per 
 host or per webapp),
 the hostname could added to that cookie. This would fix this 
 issue on IE.
 
 Michael.
 
 
 
 __
 
 
 
 Gesendet von Yahoo! Mail - http://mail.yahoo.de
 
 Bis zu 100 MB Speicher bei http://premiummail.yahoo.de
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: where to download tomcat 4.1 nightly builds?

2003-01-07 Thread Kevin Jones
Thanks both,

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]] 
 Sent: 06 January 2003 18:26
 To: Tomcat Developers List
 Subject: Re: where to download tomcat 4.1 nightly builds?
 
 
 Petr Jiricka wrote:
  I was able to find them for Tomcat 5:
  
  http://jakarta.apache.org/builds/jakarta-tomcat/nightly-5/
  
  but not for Tomcat 4.1.
  
  Speaking of 5.0, is it known when the next milestone/beta 
 of Tomcat 5 
  will be released ? Is there any scheduled ?
 
 Features are being added, so it got delayed.
 Tomcat 5 is supposed to be very easy to build from CVS 
 (http://jakarta.apache.org/tomcat/building.html), so IMO 
 there's little 
 point in having nightly builds.
 
 Remy
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: Unable to compile class for JSP

2003-01-07 Thread Kevin Jones
I've used 4.1.x and 4.0.x with JDK1.4 and JDK 1.4.1 and never had this
problem. 

One thing you might want to check on windows is which JRE you are using.
Sun install Java in two places, c:\j2sdk1.4.1 and c:\winnt\java (or
something similar). By default the JRE is set in the registry to be
c:\winnt\java and java.exe is copied to c:\winnt\system32. So unless you
either choose not to install the JRE, or you delete java.exe from
c:\winnt\system32 when you run java, the JRE picked up is the one
installed into c:\winnt and this one doesn't have a tools.jar.

Delete java.exe from c:\winnt\system32, set java_home to c:\j2sdk1.4.1
and add c:\j2sdk1.4.1\bin to your path, then try it again

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Costin Manolache
 Sent: 07 January 2003 00:53
 To: [EMAIL PROTECTED]
 Subject: Re: Unable to compile class for JSP
 
 
 Jeanfrancois Arcand wrote:
 
  Hum...I don't have any problems under win2k using Sun JDK 
 1.4.1 (and I
  don't remember seeing that problem with 1.4). Have you try 
 with 1.4.1? I
  will downgrade and see
 
 No, I'm just happy that I found the trick to make it work.
 ( I only tested tomcat4.1 with JDK1.4.0-b92 on w2k and xp )
 
 Costin
 
  
  -- Jeanfrancois
  
  Costin Manolache wrote:
  
 Just had the same problem - it seems JDK1.4 on windows has 
 an interesting
 behavior - it will not load javac from tools.jar unless it 
 is included in
 endorsed.
 
 I'm not a big windows user - if someone could confirm, we 
 need to change
 the scripts. I see this behavior with (at least) 1.4.0-b92.
 
 Costin
 
 
 Gary Pollreis wrote:
 
   
 
 will do - thanks for the heads up.
 
 -Original Message-
 From: Matt Parker [mailto:[EMAIL PROTECTED]]
 Sent: Monday, January 06, 2003 5:57 PM
 To: Tomcat Developers List
 Subject: Re: Unable to compile class for JSP
 
 
 you should post this to the tomcat-users list. this list 
 is for issues
 related to development on the tomcat product.
 
 
 On Mon, 2003-01-06 at 16:48, Gary Pollreis wrote:
 
 
 I have just installed Tomcat 4.1.18 under Windows 2000 
 (using Java JDK
 1.4.0).  When I try to run the examples I get
 org.apache.jasper.JasperException: Unable to compile 
 class for JSP .
 I have validated that my JAVA_HOME and CATALINA_HOME environment
 variables are correct.
 Any/all help would be appreciated.  Thanks in advance.
 
 --
 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]
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED] For additional
 commands, e-mail: mailto:[EMAIL PROTECTED]
 
 
   
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: where to download tomcat 4.1 nightly builds?

2003-01-06 Thread Kevin Jones
ditto for 5.0. Where are the nightlies gone - I've downloaded them in
the past but they seem to have disappeared off the site?

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: Andreas Schildbach [mailto:[EMAIL PROTECTED]] 
 Sent: 06 January 2003 09:10
 To: [EMAIL PROTECTED]
 Subject: where to download tomcat 4.1 nightly builds?
 
 
 hi all,
 
 where can i download the latest tomcat 4.1 nightly build?
 the jakarta download page gets me to
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/nightly/,
 which appears to be empty.
 
 regards,
 
 andreas
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




Manager App

2002-11-28 Thread Kevin Jones
I'm currently using TC 4.1.12. I've been taking advantage of the fact
that I can drop an XML file into the tomcat/webapps directory and have
this recognized as a context. However I've just started using the
manager app. It appears that when I do anything 'serious' with the
manager it includes all the contexts defined inside tomcat/webapps and
merges their details into tomcat/conf/server.xml. This means that if I
change a context in the webapps directory those changes do not get
picked up either by tomcat, or by the manager if I do a stop/start, a
restart or an undeploy/deploy.

I'm assuming this behaviour is a legacy of the fact that adding contexts
to the 'webapps' directory is a fairly recent change to TC. I also
remember seeing some discussion of the behaviour of the manager app here
a little while ago. Are there any plans to change the manager so that
changes to contexts declared in the webapps directory get merged back
into server.xml?

Thanks,

Kevin Jones
Developmentor
www.develop.com


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




RE: [VOTE] [5.0] Milestones

2002-10-03 Thread Kevin Jones

Thanks Remy,

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]] 
 Sent: 03 October 2002 11:22
 To: Tomcat Developers List
 Subject: Re: [VOTE] [5.0] Milestones
 
 
 Kevin Jones wrote:
  Not a vote, just wondered when we can expect to see the milestone 
  builds appearing?
 
 I would say sometimes next week for 5.0.0 if everyone is ok 
 with that. 
 Keep in mind this is not feature complete yet.
 
 Remy
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: [VOTE] [5.0] Milestones

2002-10-02 Thread Kevin Jones

Not a vote, just wondered when we can expect to see the milestone builds
appearing?

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: Larry Isaacs [mailto:[EMAIL PROTECTED]] 
 Sent: 30 September 2002 20:14
 To: Tomcat Developers List
 Subject: RE: [VOTE] [5.0] Milestones 
 
 
 
 
  -Original Message-
  From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, September 28, 2002 10:12 AM
  To: Tomcat Developers List
  Subject: [VOTE] [5.0] Milestones 
  
  
  Hi,
  
  Now that the first stable releases of Tomcat 4.1 are out (and
  according 
  to reports, of good overall quality), it could be appropriate 
  to start 
  releasing 5.0.x milestones.
  It should be pointed out that 5.0.x is still far from being feature 
  complete (esp the configuration code needs to be unified if 
 possible, 
  and some optimizations are needed), so the milestones should be 
  considered alpha or pre alpha until further notice.
  
  ballot
  [X] +1 Yes, start releasing milestones
  [ ] -1 No, because:
  
  
  /ballot
  
  Remy
  
  
  --
  To unsubscribe, e-mail:   
  mailto:tomcat-dev- [EMAIL PROTECTED]
  For
  additional commands, 
  e-mail: mailto:[EMAIL PROTECTED]
  
  
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: 5.0 proposal

2002-06-24 Thread Kevin Jones

FYI

JSR 152 is now in PFD

http://jcp.org/aboutJava/communityprocess/review/jsr152/index.html


Kevin Jones
Developmentor
www.develop.com


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] On Behalf Of Glenn Nielsen
 Sent: 25 June 2002 05:34
 To: Tomcat Developers List
 Subject: Re: 5.0 proposal
 
 
 Remy Maucherat wrote:
  
  [EMAIL PROTECTED] wrote:
   It seems we have 3 -1 votes so far. While majority is required, I 
   think we all agree that getting everyone ( reasonable ) 
 involved and 
   comfortable with the proposal is very important ( and one of the 
   goals of 5.0 ).
  
  +1.
  
   Christopher: I think we should add your requirement for 
 performance 
   testing to the proposal. In fact, we should add a whole section 
   about testing for 5.0. Would this satisfy you ?
  
  +1 to start a new commons subproject.
  If everyone else wants to see the bench webapp here, then 
 I'll remove 
  my -1. However, it sounds generic, and not at all dependent 
 on Tomcat, 
  so that's why I think it would be a lot better in the commons.
  
 
 +1 to add a Tomcat specific performance testing/benchmark repository.
 
 Perhaps it would be best if it were in its own repository, 
 jakarta-tomcat-benchmark ?  I will help as I have time.
 
   Glenn - I'm not sure what you ask for. The proposal adds no new 
   features (except the new servlet api), and we obviously can't 
   implement the next spec unless it's public. I understand your 
   concern about the time - but given that the code will be shared ( 
   i.e. existing code ) I don't think it should take years to get it 
   done. Is there any particular requirement you want to add to the 
   proposal ?
  
  I added some details about the changes.
  
   For everyone - the proposal is in CVS, and everyone can 
 contribute 
   to it. One of the main goals is to improve the community, 
 and that 
   means we should be more sensitive to other needs. If you have an 
   itch, please add it to the plan, as a goal for 5.0 ( some may not 
   happen in 5.0.0 ).
  
  Not many of the negative comments posted actually contained any 
  suggestions, so I didn't see much worth integrating, except Glenn's 
  comments about lack of detail.
  
 
 The latest Tomcat 5 proposal looks much better.  I am still 
 -1 for starting the work until the JCP releases JSR 152 and 
 JSR 154 for public review.
 
 There is one addition to the proposal I think we should 
 discuss at this time.  That is the organization of the CVS 
 repostories for Tomcat.
 
 The trend started a while ago was to break out common 
 components into their own repository.  
 jakarta-tomcat-connectors and jakarta-tomcat-jasper for example.
 
 Perhaps this would be the time to consider if there are 
 better ways to organize the code. The reorganization would 
 have three goals:
 
 1. Allow sharing of components between different versions of Tomcat 
 
 2. Reduce duplication and maintenance of code in multiple branches of 
one CVS repository.
 
 3. Make the code base in each repository more tightly focused on
what it does, thus making it easier for developers to find bugs 
and submit patches.
 
 As an example, there are now at least 4 different versions of 
 jasper in various repositories.
 
 jakarta-tomcat-jasper/jasper34
 jakarta-tomcat-jasper/jasper2
 jakarta-tomcat/jasper
 jakarta-tomcat-4.0/jasper
 
 Tomcat 5 would add a fifth.
 
 There are many other things that would be in common between 
 Tomcat 4 and Tomcat 5 which are not dependent on the Servlet 
 or JSP version. Moving these out of the core Tomcat CVS 
 repositories would make life easier.
 
 Thoughts?
 
 
 Regards,
 
 Glenn
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




Digest Authentication

2002-06-13 Thread Kevin Jones

I can't get Tomcat 4.1.x to authenticate a Mozilla client when using
DIGEST authentication, although it works fine with IE6. The only
difference I can see is that IE6 sends an extra 
algorithm=MD5 
attribute in the Authorization header.

Has anybody else seen this? 
Should I enter it as bug?

Thanks,

Kevin Jones
Developmentor
www.develop.com


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




Digest again

2002-06-13 Thread Kevin Jones

This is a weird one. 

I'm using Tomcat 4.1.x. If I use BASIC authentication everything works
OK
If I use DIGEST authentication and I use the memory realm

i.e. I have

  Realm className=org.apache.catalina.realm.MemoryRealm/
and 
!-- not used
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=0 resourceName=UserDatabase/
  --

then this works (in IE not Mozilla, see a previous post)

But, if I reverse the above

i.e. I have

!-- not used
  Realm className=org.apache.catalina.realm.MemoryRealm/
  --

and 
  Realm className=org.apache.catalina.realm.UserDatabaseRealm
debug=0 resourceName=UserDatabase/

then DIGEST doesn't work (BASIC still works)

Do I need to add anything else, or should I report this as a bug?

Kevin Jones
Developmentor
www.develop.com


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




RE: Tyrex exception when using tomcat 4.0.4 (b1 and b2)

2002-04-03 Thread Kevin Jones

but if the tyrex guys are retired who's changed this in TC4.0.4?

BTW what is DBCP?

Kevin Jones
Developmentor
www.develop.com


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On 
 Behalf Of Lev Assinovsky
 Sent: 03 April 2002 09:08
 To: Tomcat Developers List
 Subject: Re: Tyrex exception when using tomcat 4.0.4 (b1 and b2)
 
 
 Hi!
 I experienced the same problem.
 The matter is that TC 4.0.4bX has slightly modified 
 org.apache.naming.factory.TyrexDataSourceFactory
 class. Old one returned EnabledDataSource (didn't work 
 properly either), new one - ServerDataSource. I tried to 
 complain to Tyrex guys, but seems they are retired (a year 
 ago at least). That's why I switched to DBCP and happy now.
  
 Kevin Jones wrote:
  
  I've been using TC4 for a while now. I'm using the MS SQL 
 Server JDBC 
  drivers (and have been for a while), and install them as a 
 resource in 
  TC using the Tyrex JNDI implementation. In TC 4.0.3 
 everything works 
  fine, however in TC 4.0.4 (b1 and b2) I get exceptions.
  
  I'm simply doing the following
  
  ctx = new javax.naming.InitialContext();
  ds = 
  (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/WhitePages);
  conn = ds.getConnection();
  conn.setAutoCommit(false);
  
  and I'm getting an exception
  
  java.sql.SQLException: Commit not supported in enlisted connections.
 at 
 tyrex.jdbc.EnlistedConnection.commit(EnlistedConnection.java:154)
 at
  
 com.develop.ewebjava.lab.GetPessimistic.doGet(GetPessimistic.java:60)
  
  If I look at the class returned through getConnection I get this 
  hierarchy
  
  tyrex.jdbc.EnlistedConnection tyrex.jdbc.AbstractTyrexConnectionImpl
  java.lang.Object
  
  and for the interface hierarchy
  
  java.sql.Connection
  tyrex.tm.EnlistedResource
  
  If I run the same code in TC 4.03 then it all works fine 
 and the class 
  hierarchy looks like this
  
  com.microsoft.jdbc.sqlserver.SQLServerConnection
  com.microsoft.jdbc.base.BaseConnection
  java.lang.Object
  
  so it looks like tyrex in 4.0.4 is wrapping the JDBC 
 connection with 
  its own class. There is no change to the tyrex.jar file, 
 however the 
  TyrexDataSourceFactory and TyrexTransactionFactory classes in 
  TC/lib/naming-factory.jar have changed.
  
  I've just added this into Bugzilla, although I'm not sure 
 it's a bug 
  (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7693).
  
  If anybody could say 'do this' and it would fix the problem I'd be 
  grateful,
  
  Kevin Jones
  Developmentor
  www.develop.com
  
  --
  To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
  For 
 additional commands, 
 e-mail: 
  mailto:[EMAIL PROTECTED]
 
 -- 
 Lev AssinovskyPeterlink Web
 Programmer  St. Petersburg, Russia
 Tel/Fax: +7 812 3275343   197022 ul.Chapigina 7Á
 E-mail: [EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: Tyrex exception when using tomcat 4.0.4 (b1 and b2)

2002-04-03 Thread Kevin Jones

 I did, because the other connection type is not pooled, among 
 many things. I can revert the changes if it is a bad idea.

It's only bad because it breaks my code :-) The code I'm using is (I
think) very common, I'm simply turning autocommit off. Now, I know that
in a managed environment I wouldn't do that, but as Tomcat doesn't have
a Transaction Manager I can't see any other way to do my own transaction
management. Unless anybody shouts loudly (and can show me how to do TXs
with JDBC under Tomcat) I'd love to see the change reverted.

 From the commons. It will be used in the next Tomcat, as it 
 is a lot easier to use and configure (in addition to the 
 maintenace and visibility problems Tyrex has).

Excellent - which version of Tomcat is this going to be in (4.1?).

Thanks for the response,

Kevin Jones
Developmentor
www.develop.com


 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]] 
 Sent: 03 April 2002 16:17
 To: Tomcat Developers List
 Subject: Re: Tyrex exception when using tomcat 4.0.4 (b1 and b2)
 
 
  but if the tyrex guys are retired who's changed this in TC4.0.4?
 
 
  BTW what is DBCP?
 
 
 Remy
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




Tyrex exception when using tomcat 4.0.4 (b1 and b2)

2002-04-02 Thread Kevin Jones

I've been using TC4 for a while now. I'm using the MS SQL Server JDBC
drivers (and have been for a while), and install them as a resource in
TC using the Tyrex JNDI implementation. In TC 4.0.3 everything works
fine, however in TC 4.0.4 (b1 and b2) I get exceptions. 

I'm simply doing the following

ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource)ctx.lookup(java:comp/env/jdbc/WhitePages);
conn = ds.getConnection();
conn.setAutoCommit(false);

and I'm getting an exception

java.sql.SQLException: Commit not supported in enlisted connections.
   at tyrex.jdbc.EnlistedConnection.commit(EnlistedConnection.java:154)
   at
com.develop.ewebjava.lab.GetPessimistic.doGet(GetPessimistic.java:60)

If I look at the class returned through getConnection I get this
hierarchy

tyrex.jdbc.EnlistedConnection
tyrex.jdbc.AbstractTyrexConnectionImpl
java.lang.Object

and for the interface hierarchy

java.sql.Connection
tyrex.tm.EnlistedResource


If I run the same code in TC 4.03 then it all works fine and the class
hierarchy looks like this

com.microsoft.jdbc.sqlserver.SQLServerConnection
com.microsoft.jdbc.base.BaseConnection
java.lang.Object

so it looks like tyrex in 4.0.4 is wrapping the JDBC connection with its
own class. There is no change to the tyrex.jar file, however the
TyrexDataSourceFactory and TyrexTransactionFactory classes in
TC/lib/naming-factory.jar have changed.

I've just added this into Bugzilla, although I'm not sure it's a bug
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7693). 

If anybody could say 'do this' and it would fix the problem I'd be
grateful,

Kevin Jones
Developmentor
www.develop.com


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




RE: pageEncoding and Jasper

2002-01-31 Thread Kevin Jones

So it's only used when compiling the JSP to a servlet?

Kevin Jones
Developmentor
www.develop.com 

 -Original Message-
 From: Bill Barker [mailto:[EMAIL PROTECTED]] 
 Sent: 30 January 2002 21:07
 To: Tomcat Developers List
 Subject: Re: pageEncoding and Jasper
 
 
 
 - Original Message -
 From: Kevin Jones [EMAIL PROTECTED]
 To: 'Tomcat Developers List' [EMAIL PROTECTED]
 Sent: Wednesday, January 30, 2002 11:55 AM
 Subject: RE: pageEncoding and Jasper
 
 
   pageEncoding should be the encoding of the file 
 containing the page, 
   should not it?
 
  I assumed that the encoding would be set as part of the 
 content-type 
  header in the generated servlet, but I can't see the value 
 anywhere in 
  the servlet code.
 Your assumtion is wrong.  The pageEncoding is only used to 
 set the encoding on the Reader when the jsp page is compiled. 
  See section 3.1 of the JSP spec.
 
   do  anything. I can't use
   
%@ page contentType=text/html; charset=windows-1256 %
   
  
   Why?
 
  Because IE hates it (although being fair that seems to be a 
 limitation 
  of IE)
 
  Kevin Jones
  Developmentor
  www.develop.com
 
   -Original Message-
   From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
   On Behalf Of jean-frederic clere
   Sent: 30 January 2002 18:00
   To: Tomcat Developers List
   Subject: Re: pageEncoding and Jasper
  
  
   Kevin Jones wrote:
   
If I add a
   
%@ page pageEncoding=windows-1256 %
   
(or any pageEncoding)
   
What does Jasper do with this? I would expect this to be set on 
the content-type header but it's not.
  
  
   Jasper certainly parses the parameter
and fails if I put an invalid value in there, I just can't
   get it to
  
I have to use
   
META HTTP-EQUIV=content-type CONTENT=text/html; 
charset=windows-1256
   
Some of this might seem like a user question, but I'm more
   concerned
about how Jasper works and what it should be doing.
   
Thanks,
   
Kevin Jones
Developmentor
www.develop.com
   
--
To unsubscribe, e-mail:
   mailto:tomcat-dev- [EMAIL PROTECTED]
For
   additional commands,
   e-mail:
mailto:[EMAIL PROTECTED]
  
   --
   To unsubscribe, e-mail:
   mailto:tomcat-dev- [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]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: pageEncoding and Jasper

2002-01-31 Thread Kevin Jones

2.10.1 says

Defines the character encoding for the JSP page.
Values is of the form CHARSET which must be the IANA
value for a character encoding.
The CHARSET value of contentType is used as default if
present, or ISO-8859-1 otherwise.

What I was missing was how this is processed by the page compiler - I
think I understand now!

Kevin Jones
Developmentor
www.develop.com 

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
 Sent: 30 January 2002 21:09
 To: Tomcat Developers List
 Subject: Re: pageEncoding and Jasper
 
 
 The rules that cover this stuff are in the JSP 1.2 Spec, 
 Section 2.10.1.
 
 On Wed, 30 Jan 2002, Kevin Jones wrote:
 
  Date: Wed, 30 Jan 2002 17:41:48 -
  From: Kevin Jones [EMAIL PROTECTED]
  Reply-To: Tomcat Developers List [EMAIL PROTECTED]
  To: Tomcat-Dev [EMAIL PROTECTED]
  Subject: pageEncoding and Jasper
 
  If I add a
 
  %@ page pageEncoding=windows-1256 %
 
  (or any pageEncoding)
 
  What does Jasper do with this? I would expect this to be set on the 
  content-type header but it's not. Jasper certainly parses the 
  parameter and fails if I put an invalid value in there, I 
 just can't 
  get it to do anything. I can't use
 
 
 The pageEncoding attribute specifies the encoding to be 
 used to *read* the page itself at compile time.
 
 
  %@ page contentType=text/html; charset=windows-1256 %
 
 
 This is supposed to set the content type and character 
 encoding on the response page, as long as windows-1256 is a 
 valid character set for your JDK.  It works for me with a 
 page in the Struts example app (HEAD branch) that starts:
 
   %@ page contentType=text/html;charset=UTF-8 language=java %
 
 and the generated servlet code has the following line near 
 the beginning:
 
   response.setContentType(text/html;charset=UTF-8);
 
  I have to use
 
  META HTTP-EQUIV=content-type CONTENT=text/html; 
  charset=windows-1256
 
  Some of this might seem like a user question, but I'm more 
 concerned 
  about how Jasper works and what it should be doing.
 
 
 AFAICT, Jasper is doing the right thing.  Whether IE properly 
 deals with a character encoding attached to the content type 
 like this (as the HTTP spec requires) is another question entirely.
 
  Thanks,
 
  Kevin Jones
  Developmentor
  www.develop.com
 
 
 Craig McClanahan
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




pageEncoding and Jasper

2002-01-30 Thread Kevin Jones

If I add a 

%@ page pageEncoding=windows-1256 %

(or any pageEncoding)

What does Jasper do with this? I would expect this to be set on the
content-type header but it's not. Jasper certainly parses the parameter
and fails if I put an invalid value in there, I just can't get it to do
anything. I can't use

%@ page contentType=text/html; charset=windows-1256 %

I have to use 

META HTTP-EQUIV=content-type CONTENT=text/html;
charset=windows-1256

Some of this might seem like a user question, but I'm more concerned
about how Jasper works and what it should be doing.

Thanks,

Kevin Jones
Developmentor
www.develop.com 


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




RE: Default classes loaded by Tocmat

2001-12-27 Thread Kevin Jones

Why not implement your own JSP base class that imports the
classes/packages you need and have all your pages extend that new class.
This would also be portable across implementations!

Kevin Jones
Developmentor
www.develop.com 

 -Original Message-
 From: Anand Bashyam Narasimham [mailto:[EMAIL PROTECTED]] 
 Sent: 26 December 2001 21:35
 To: 'Tomcat Developers List'
 Subject: RE: Default classes loaded by Tocmat
 
 
 I agree and that's why I still stick to Tomcat :)
 
 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 26, 2001 1:34 PM
 To: Tomcat Developers List
 Subject: RE: Default classes loaded by Tocmat
 
 
 
 
 On Wed, 26 Dec 2001, Anand Bashyam Narasimham wrote:
 
  Date: Wed, 26 Dec 2001 12:31:26 -0800
  From: Anand Bashyam Narasimham [EMAIL PROTECTED]
  Reply-To: Tomcat Developers List [EMAIL PROTECTED]
  To: 'Tomcat Developers List' [EMAIL PROTECTED]
  Subject: RE: Default classes loaded by Tocmat
 
  Craig,
 
  I know Tomcat has always been a standards compliant implementation. 
  But
 will
  it be possible say for developers to have extensions where 
 instead of 
  writing the import statements in a whole lot of JSPs we 
 make sure the
 Class
  loader loads this as a extension to the list you've mentioned using 
  some config file read at startup.
 
  I do agree that this make it a non-portable JSP, going against the 
  spirit
 of
  Java and J2EE but today everything written on J2EE though Java is 
  almost
 60%
  not portable onto a different implementation :)
 
  Can this be done?
 
 
 Sure it can ... by you, modifying the source code yourself 
 and supporting it yourself.  I'm not going to help you, 
 however, do something this crazy.
 
 It's one thing when vendors lock you in with non-portable 
 features.  It's a different, and much sadder thing, to see 
 people willing to paint themselves into a corner like this :-(.
 
  Anand
 
 Craig
 
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [EMAIL PROTECTED]
 For 
 additional commands, 
 e-mail: mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:tomcat-dev- [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]




RE: IIS and TC4

2001-11-15 Thread Kevin Jones

Thank you,

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: GOMEZ Henri [mailto:[EMAIL PROTECTED]]
 Sent: 14 November 2001 22:30
 To: Tomcat Developers List
 Subject: RE: IIS and TC4


 sorry to ask on this list as this is really a user question,
 but I'm not on
 Tomcat-User (too much noise :-) ) so I hope you'll bear with me.

 Sure

 Is there a connector available for IIS and TC4? I've searched
 the archives
 of both lists and not come up with a definitive answer.

 AJP13 is supported in Tomcat 4.0.1 and so you could use mod_jk.

 Can I use the Tomcat 3.3 IIS connector with Tomcat 4? ditto with list
 searches.

 Yes, you could use it to make Tomcat 4 and IIS work together

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




RE: ClassCastException

2001-10-03 Thread Kevin Jones

I had exactly this problem; but I had jdbc2_0-stdext.jar not in the
jre/lib/ext but in my webapp/web-inf/lib directory. Putting
jdbc2_0-stdext.jar in common/lib along with the tyrex files solved the
problem (classloaders, you gotta love 'em)

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
 R. McClanahan
 Sent: 03 October 2001 17:20
 To: [EMAIL PROTECTED]
 Subject: Re: ClassCastException




 On Wed, 3 Oct 2001, Alessandro Pizzolotto wrote:

  Date: Wed, 3 Oct 2001 17:10:37 +0200
  From: Alessandro Pizzolotto [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: ClassCastException
 
  hehehe
  if i use this class:
  tyrex.jdbc.xa.EnabledDataSource
  instead
  javax.sql.DataSource
  the program works fine
  the problem is that EnableDataSource implements
 javax.sql.DataSource but i
  can't cast javax.sql.DataSource.
  why ???
 

 Would you happen to have a copy of jdbc2_0-stdext.jar in your system
 extensions directory ($JAVA_HOME/jre/lib/ext)?  That would cause problems
 like this -- the same sort of problem that causes Class foo is not a
 servlet errors if you have servlet.jar there.

  Alessandro

 Craig McClanahan

  - Original Message -
  From: Will Stranathan [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Wednesday, October 03, 2001 3:04 PM
  Subject: Re: ClassCastException
 
 
   Can we see the appropriate parts of server.xml and web.xml?
  
   Will Stranathan
  
   Alessandro Pizzolotto wrote:
  
this code
   
javax.naming.Context ctx = new javax.naming.InitialContext();
javax.naming.Context cto =
  (javax.naming.Context)ctx.lookup(java:/comp/env);
javax.sql.DataSource ds =
  (javax.sql.DataSource)cto.lookup(jdbc/domus);
   
produce this error
   
java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
 at org.apache.jsp.ricerca3$jsp._jspService(ricerca3$jsp.java:74)
 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
 
 org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Jsp
 Servlet.ja
  va:201)
 at
  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:1264)
 at
 
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(A
 pplication
  FilterChain.java:247)
 at
 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
 onFilterCh
  ain.java:193)
 at
 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.ja
  va:243)
 at
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
  66)
 at
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.ja
  va:215)
 at
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
  66)
 at
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2366)
 at
 
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
 e.java:164
  )
 at
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
  66)
 at
 
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
 at
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
  64)
 at
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
 Valve.java
  :163)
 at
 
 org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipel
 ine.java:5
  66)
 at
 
 org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.
 java:472)
 at
  org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 
 org.apache.catalina.connector.http.HttpProcessor.process(HttpProce
 ssor.java:
  1005)
 at
 
 org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor
 .java:1098
  )
 at java.lang.Thread.run(Thread.java:484)
   
the code not get the cast in DataSource
why ?
tanks
Alessadro
   
   
  
  
  
 
 





RE: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release

2001-09-18 Thread Kevin Jones

Excellent :-)

But where's the servlet API jar?

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
 R. McClanahan
 Sent: 18 September 2001 04:26
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release


 It's official!  The Servlet 2.3 and JSP 1.2 specifications are now final,
 and so is Apache Tomcat 4.0, which implements the new features of these
 specifications plus a host of other functionality improvements over the
 current production release (Tomcat 3.2.3).  Please read the
 RELEASE-NOTES-4.0.txt file in the top level directory of the
 distribution for the latest information on recent changes and known
 issues.  You can also browse the Tomcat 4.0 documentation bundle
 online at:

   http://jakarta.apache.org/tomcat/tomcat-4.0-doc/

 Binary distributions of Apache Tomcat 4.0 are available at:

   http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/

 Source distributions of Apache Tomcat 4.0 are available at:

   http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/src/

 Binary and source distributions of the mod_webapp connector will be posted
 on Wednesday, September 19, 2001.  If you wish to build the connector in
 the mean time, you can check out the jakarta-tomcat-connectors CVS
 repository, and follw the directions in the README.txt file in the
 webapp subdirectory.

 Craig McClanahan







RE: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release

2001-09-18 Thread Kevin Jones

 Javadocs).  I see that I forgot to put up the binary distributions of
 jakarta-servletapi-4; will do that in a sec.

That's what I meant - thanks

Kevin Jones
Developmentor
www.develop.com

 -Original Message-
 From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
 R. McClanahan
 Sent: 18 September 2001 17:37
 To: [EMAIL PROTECTED]
 Subject: RE: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release




 On Tue, 18 Sep 2001, Kevin Jones wrote:

  Date: Tue, 18 Sep 2001 08:36:55 +0100
  From: Kevin Jones [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release
 
  Excellent :-)
 
  But where's the servlet API jar?
 

 The servlet.jar file is inside the Tomcat distro (along with the
 Javadocs).  I see that I forgot to put up the binary distributions of
 jakarta-servletapi-4; will do that in a sec.

  Kevin Jones
  Developmentor
  www.develop.com
 

 Craig


   -Original Message-
   From: craigmcc@localhost [mailto:craigmcc@localhost]On Behalf Of Craig
   R. McClanahan
   Sent: 18 September 2001 04:26
   To: [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
   Subject: [ANNOUNCEMENT] Apache Tomcat 4.0 Final Release
  
  
   It's official!  The Servlet 2.3 and JSP 1.2 specifications
 are now final,
   and so is Apache Tomcat 4.0, which implements the new
 features of these
   specifications plus a host of other functionality
 improvements over the
   current production release (Tomcat 3.2.3).  Please read the
   RELEASE-NOTES-4.0.txt file in the top level directory of the
   distribution for the latest information on recent changes and known
   issues.  You can also browse the Tomcat 4.0 documentation bundle
   online at:
  
 http://jakarta.apache.org/tomcat/tomcat-4.0-doc/
  
   Binary distributions of Apache Tomcat 4.0 are available at:
  
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/
  
   Source distributions of Apache Tomcat 4.0 are available at:
  
  
http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/src/
 
  Binary and source distributions of the mod_webapp connector will be
posted
  on Wednesday, September 19, 2001.  If you wish to build the connector in
  the mean time, you can check out the jakarta-tomcat-connectors CVS
  repository, and follw the directions in the README.txt file in the
  webapp subdirectory.
 
  Craig McClanahan
 
 
 






RE: Form based logon problems in T4B6

2001-07-26 Thread Kevin Jones

Sorry Craig,

I missed this post.

I'll try the latest nightly, if it doesn't work I'll try and create a small
web-app that shows it,

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 25 July 2001 23:06
 To: [EMAIL PROTECTED]
 Subject: RE: Form based logon problems in T4B6




 On Wed, 25 Jul 2001, Kevin Jones wrote:

  OK
 

 Hmm, without a reproducible test case, I don't know how to debug this,
 because it works for me.  Can you create a simple web application that
 illustrates the problem, and add it to the bug report as an attachment.

 Craig


  Kevin Jones
  DevelopMentor
  www.develop.com
 
   -Original Message-
   From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
   Sent: 25 July 2001 00:10
   To: Tomcat-Dev
   Subject: Re: Form based logon problems in T4B6
  
  
   Sounds like a bug introduced when the functionality was
 modified recently,
   to do redirects instead of forwards.  Could you do me a favor
 and file a
   bug report so it gets tracked?
  
   Thanks,
   Craig
  
  
   On Tue, 24 Jul 2001, Kevin Jones wrote:
  
I can't get form based logon to work reliably in Beta6 (in
 fact I've had
problems for a while)
   
I have a webapp (called course) and a sub directory (gjava) which is
protected. I'm using form based logon with the username and
 password in
tomcat-users.xml.
   
i) If I try and access a resource in \course\gjava I get the
   logon page, if
I enter a valid username and password everything works.
   
ii) If I try and access a resource in \course\gjava I get the
   logon page, if
I enter an invalid username and password I get the logon page
   again - *not*
the error page.
   
iii) If I try and access a resource in \course\gjava I get the
   logon page,
if I enter a valid username and password everything works. But
   if I hit the
back button and then enter an invalid username/password I
 get redirected
here http://localhost/course/gjava/j_security_check and get
 a 404 error
   
iv) If I try and access a resource in \course\gjava I get the
   logon page, if
I enter an invalid username and password I get the logon page
   again - *not*
the error page. If I now enter the correct password I get the
   error page,
   
Kevin Jones
DevelopMentor
www.develop.com
   
   
  
 
 





RE: Form based logon problems in T4B6

2001-07-26 Thread Kevin Jones

I've tried the latest nightly and I still get the same problem. I've
attached a webapp for you to try.

Could be I'm doing something stupid of course

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 26 July 2001 20:26
 To: [EMAIL PROTECTED]
 Subject: RE: Form based logon problems in T4B6




 On Wed, 25 Jul 2001, Craig R. McClanahan wrote:

 
 
  On Wed, 25 Jul 2001, Kevin Jones wrote:
 
   OK
  
 
  Hmm, without a reproducible test case, I don't know how to debug this,
  because it works for me.  Can you create a simple web application that
  illustrates the problem, and add it to the bug report as an attachment.
 

 I don't know for sure if it was the same as Kevin's problem, but I did
 just find a failure case -- if the error page was in the protected area,
 you'd get the same sort of symptoms.  Just patched it, will be fixed in
 nightly build 20010727 (i.e. tonight).

 Craig


  Craig
 
 
   Kevin Jones
   DevelopMentor
   www.develop.com
  
-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 00:10
To: Tomcat-Dev
Subject: Re: Form based logon problems in T4B6
   
   
Sounds like a bug introduced when the functionality was
 modified recently,
to do redirects instead of forwards.  Could you do me a
 favor and file a
bug report so it gets tracked?
   
Thanks,
Craig
   
   
On Tue, 24 Jul 2001, Kevin Jones wrote:
   
 I can't get form based logon to work reliably in Beta6
 (in fact I've had
 problems for a while)

 I have a webapp (called course) and a sub directory
 (gjava) which is
 protected. I'm using form based logon with the username
 and password in
 tomcat-users.xml.

 i) If I try and access a resource in \course\gjava I get the
logon page, if
 I enter a valid username and password everything works.

 ii) If I try and access a resource in \course\gjava I get the
logon page, if
 I enter an invalid username and password I get the logon page
again - *not*
 the error page.

 iii) If I try and access a resource in \course\gjava I get the
logon page,
 if I enter a valid username and password everything works. But
if I hit the
 back button and then enter an invalid username/password I
 get redirected
 here http://localhost/course/gjava/j_security_check and
 get a 404 error

 iv) If I try and access a resource in \course\gjava I get the
logon page, if
 I enter an invalid username and password I get the logon page
again - *not*
 the error page. If I now enter the correct password I get the
error page,

 Kevin Jones
 DevelopMentor
 www.develop.com


   
  
  
 
 


 test.zip


RE: Form based logon problems in T4B6

2001-07-25 Thread Kevin Jones

OK

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 25 July 2001 00:10
 To: Tomcat-Dev
 Subject: Re: Form based logon problems in T4B6


 Sounds like a bug introduced when the functionality was modified recently,
 to do redirects instead of forwards.  Could you do me a favor and file a
 bug report so it gets tracked?

 Thanks,
 Craig


 On Tue, 24 Jul 2001, Kevin Jones wrote:

  I can't get form based logon to work reliably in Beta6 (in fact I've had
  problems for a while)
 
  I have a webapp (called course) and a sub directory (gjava) which is
  protected. I'm using form based logon with the username and password in
  tomcat-users.xml.
 
  i) If I try and access a resource in \course\gjava I get the
 logon page, if
  I enter a valid username and password everything works.
 
  ii) If I try and access a resource in \course\gjava I get the
 logon page, if
  I enter an invalid username and password I get the logon page
 again - *not*
  the error page.
 
  iii) If I try and access a resource in \course\gjava I get the
 logon page,
  if I enter a valid username and password everything works. But
 if I hit the
  back button and then enter an invalid username/password I get redirected
  here http://localhost/course/gjava/j_security_check and get a 404 error
 
  iv) If I try and access a resource in \course\gjava I get the
 logon page, if
  I enter an invalid username and password I get the logon page
 again - *not*
  the error page. If I now enter the correct password I get the
 error page,
 
  Kevin Jones
  DevelopMentor
  www.develop.com
 
 





Strange looping behaviour in B6

2001-07-24 Thread Kevin Jones

I have a web application under development that's using tag libraries. In my
WEB-INF/lib directory I have a bunch of .jar files. I also have a bunch of
.jar.old files (I've renamed the old jars rather than replace them). If I
leave the .jar.old files in the lib directory TC4B6 goes into a reloading
loop for that context.

My server.xml looks like this

Context path=/course docBase=c:/webapps/coursesapp debug=9
reloadable=true
  Logger className=org.apache.catalina.logger.SystemOutLogger
timestamp=true/
  Loader checkInterval=3 /
/Context

and the context is getting reloaded every 3 seconds without me doing
anything. If I take the .jar.old files out the behaviour stops!

If you can't repro this I'll happily send you the entire webapp (it's big)
and/or work on reproing this on a simpler scale,

Kevin Jones
DevelopMentor
www.develop.com




Form based logon problems in T4B6

2001-07-24 Thread Kevin Jones

I can't get form based logon to work reliably in Beta6 (in fact I've had
problems for a while)

I have a webapp (called course) and a sub directory (gjava) which is
protected. I'm using form based logon with the username and password in
tomcat-users.xml.

i) If I try and access a resource in \course\gjava I get the logon page, if
I enter a valid username and password everything works.

ii) If I try and access a resource in \course\gjava I get the logon page, if
I enter an invalid username and password I get the logon page again - *not*
the error page.

iii) If I try and access a resource in \course\gjava I get the logon page,
if I enter a valid username and password everything works. But if I hit the
back button and then enter an invalid username/password I get redirected
here http://localhost/course/gjava/j_security_check and get a 404 error

iv) If I try and access a resource in \course\gjava I get the logon page, if
I enter an invalid username and password I get the logon page again - *not*
the error page. If I now enter the correct password I get the error page,

Kevin Jones
DevelopMentor
www.develop.com




RE: New Tomcat 4 installer nightly

2001-07-17 Thread Kevin Jones

 - The JAVA_HOME env variable is no longer needed (instead, it looks in the
 registry to get the JDK path).

The problem with this is that when you install the JDK you end up with two
JREs. So Java developers may have JAVA_HOME pointed at c:\jdk1.3.1 (say) and
the registry is pointing at c:\program files\JavaSoft\JRE\1.3.1 (or
similar). This means that adding jars to c:\jdk1.3.1\jre\lib\ext would not
work if tomcat is looking for the JRE through the registry.

I would prefer to see a check for JAVA_HOME and if that's not set then look
in the registry. Or, if both the registry and JAVA_HOME is set, offer the
user the choice. If you've already done this then ignore my ramblings!

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
 Sent: 17 July 2001 06:10
 To: [EMAIL PROTECTED]
 Subject: New Tomcat 4 installer nightly


 Hi,

 I did lots of updates to the installer script, and the result is available
 here :
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/nightly/jakart
 a-tomcat-4
 .0-20010716.exe

 Changes from the first installer include :
 - The JAVA_HOME env variable is no longer needed (instead, it looks in the
 registry to get the JDK path).
 - Includes the latest security fix.
 - Added links to edit the config files.
 - Won't delete the configuration and logs when uninstalling
 (unless you ask
 the uninstaller to do so).
 - Won't overwrite the configuration files if some are present. That makes
 upgrading to a new build easier (but more work will be done in that area).
 - Fix the minimum installation.

 I think it's solid enough so that we can release the upcoming
 4.0b6 packaged
 with it.

 Remy





Problem starting latest nightly

2001-07-17 Thread Kevin Jones

I've just downloaded the latest nightly (20010716), and I can't get it to
start.

I have a context entry in server.xml that looks like this

Context path=/AddressBook docBase=AddressBook debug=9
reloadable=true
Loader checkInterval=3
lassname=org.apache.catalina.loader.StandardLoader/
/Context

and I get the following error

ERROR reading .\conf\server.xml
At Line 199 /Server/Service/Engine/Host/Context/Loader/ checkInterval=3
classname=org.apache.catalina.loader.StandardLoader

Catalina.start: java.lang.ClassNotFoundException:
org.apache.catalina.WebappLoader
java.lang.ClassNotFoundException: org.apache.catalina.WebappLoader
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:1122)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:987)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:130)
at
org.apache.catalina.startup.CreateLoaderAction.start(Catalina.java:918)
... lots of XML mapper stuff ...
at org.apache.catalina.startup.Catalina.start(Catalina.java:687)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:657)
at org.apache.catalina.startup.Catalina.process(Catalina.java:178)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Method.java:311)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)

And indeed org.apache.catalina.WebappLoader doesn't exist although
org.apache.catalina.loader.WebappLoader does

Looking in Catalina.java I see an entry like this

mapper.addRule(prefix + /Loader, new
CreateLoaderAction(org.apache.catalina.WebappLoader, className));

I assume this should be

mapper.addRule(prefix + /Loader, new
CreateLoaderAction(org.apache.catalina.loader.WebappLoader, className));

Kevin Jones
DevelopMentor
www.develop.com




RE: Problem starting latest nightly

2001-07-17 Thread Kevin Jones

Thanks Craig,

what's the difference between the two (WebappLoader and StandardLoader)? and
should I care?

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 17 July 2001 17:34
 To: Tomcat-Dev
 Subject: Re: Problem starting latest nightly




 On Tue, 17 Jul 2001, Kevin Jones wrote:

  I've just downloaded the latest nightly (20010716), and I can't
 get it to
  start.
 
  I have a context entry in server.xml that looks like this
 
  Context path=/AddressBook docBase=AddressBook debug=9
  reloadable=true
  Loader checkInterval=3
  lassname=org.apache.catalina.loader.StandardLoader/
  /Context
 

 Thanks Kevin.  I just fixed the default class name in Catalina.java (as
 you identified below).  Now, if you don't specify a className attribute:

   Loader checkInterval=3/

 you correctly get a WebappLoader instance.  If you really want to use
 StandardLoader instead, you have to use className instead of
 classname, which is why you ran into this bug.

 Craig

  and I get the following error
 
  ERROR reading .\conf\server.xml
  At Line 199 /Server/Service/Engine/Host/Context/Loader/ checkInterval=3
  classname=org.apache.catalina.loader.StandardLoader
 
  Catalina.start: java.lang.ClassNotFoundException:
  org.apache.catalina.WebappLoader
  java.lang.ClassNotFoundException: org.apache.catalina.WebappLoader
  at
 
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
 lassLoader
  .java:1122)
  at
 
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
 lassLoader
  .java:987)
  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
  at java.lang.Class.forName0(Native Method)
  at java.lang.Class.forName(Class.java:130)
  at
  org.apache.catalina.startup.CreateLoaderAction.start(Catalina.java:918)
  ... lots of XML mapper stuff ...
  at org.apache.catalina.startup.Catalina.start(Catalina.java:687)
  at
 org.apache.catalina.startup.Catalina.execute(Catalina.java:657)
  at
 org.apache.catalina.startup.Catalina.process(Catalina.java:178)
  at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
  at java.lang.reflect.Method.invoke(Method.java:311)
  at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:202)
 
  And indeed org.apache.catalina.WebappLoader doesn't exist although
  org.apache.catalina.loader.WebappLoader does
 
  Looking in Catalina.java I see an entry like this
 
  mapper.addRule(prefix + /Loader, new
  CreateLoaderAction(org.apache.catalina.WebappLoader, className));
 
  I assume this should be
 
  mapper.addRule(prefix + /Loader, new
  CreateLoaderAction(org.apache.catalina.loader.WebappLoader,
 className));
 
  Kevin Jones
  DevelopMentor
  www.develop.com
 
 





RE: Missing CGIServlet from nightly build

2001-06-19 Thread Kevin Jones

Thanks John.

Does this make the nightlies unusable?

Is there a plan to move to 1.3?

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Reilly, John [mailto:[EMAIL PROTECTED]]
 Sent: 19 June 2001 13:28
 To: '[EMAIL PROTECTED]'
 Subject: RE: Missing CGIServlet from nightly build
 
 
 
 
  I'm trying to use the Tomcat nightly's, and found that the
  org.apache.catalina.servlets.CGIServlet class is missing from 
  the 16th, 17th
  and 18th June builds, although it (an its related classes) is 
  in the earlier
  nightlys,
 
 As far as I know the build environment for the nightly builds is 
 still using
 jdk1.2 but CGIServlet requires 1.3 - therefore it is not built.
 
 jr



RE: Missing CGIServlet from nightly build

2001-06-19 Thread Kevin Jones

The full exception was a ClassNotFoundException. From the 18th June nightly
CGIServlet.class is definitely not in catalina.jar

I've just downloaded the latest nightly and it's fine.

Thank you,

Kevin Jones
DevelopMentor
www.develop.com






Missing CGIServlet from nightly build

2001-06-18 Thread Kevin Jones

I'm trying to use the Tomcat nightly's, and found that the
org.apache.catalina.servlets.CGIServlet class is missing from the 16th, 17th
and 18th June builds, although it (an its related classes) is in the earlier
nightlys,

Kevin Jones
DevelopMentor
www.develop.com




Beta5 Release

2001-05-15 Thread Kevin Jones

Is there a plan to release Tomcat 4.0 Beta 5 this week? Craig hinted this
would happen,

Kevin Jones
DevelopMentor
www.develop.com




RE: Class Reloading

2001-05-13 Thread Kevin Jones

This now works in the latest nightly drop, thanks guys,

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Kevin Jones [mailto:[EMAIL PROTECTED]]
 Sent: 11 May 2001 22:44
 To: [EMAIL PROTECTED]
 Subject: RE: Class Reloading


  But, other than efficiency concerns, it should still work if the
  particular class is *only* found in WEB-INF/classes and *not* in any of
  the WEB-INF/lib/*.jar files, right?

 I don't think so. The class I'm trying to reload is in web-inf/classes, it
 is not in any of the jars in web-inf/lib (is this what you mean?).

 I believe (I've yet to test this) that the only way reloading works
 currently (for me) is if I have no jars in web-inf/lib,

 Kevin Jones
 DevelopMentor
 www.develop.com

  -Original Message-
  From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
  Sent: 11 May 2001 18:58
  To: Tomcat-Dev
  Subject: Re: Class Reloading
 
 
  Thanks Kevin ... I think it's safe to assume that Beta 4 still has this
  issue :-(.
 
  But, other than efficiency concerns, it should still work if the
  particular class is *only* found in WEB-INF/classes and *not* in any of
  the WEB-INF/lib/*.jar files, right?
 
  NOTE:  automatic reloading is currently supported only for unpacked
  classes in WEB-INF/lib.
 
  Craig
 
 
  On Fri, 11 May 2001, Kevin Jones wrote:
 
   Sorry it's taken me a week to get back to you on this.
  Class-reloading is
   not working in the latest nightly build. I know why, but don't
  know what the
   fix is.
  
   The problem is in StandardClassLoader::loadClass. This method
  checks that
   the class exists, if it does it wants to add it to the
  classCache HashMap.
   To do this loadCLass has a loop that loops around all the
 'repositories'
   These repositories are the .jar files in the web-inf lib
  directory. In the
   loop it does this
  
   classCache.put(name, new ClassCacheEntry
(clazz, classUrl,
 classUrlConnection.getLastModified()));
  
   but the loop never breaks, so if you have 4 jars in your lib
  directory code
   loops 5 times (once for the classes sub dir and once for each
  jar) and the
   'last' jar in wins. So the classes in my classes directory
 get added as
  
  
  jar:jndi:/localhost/AddressBook/WEB-INF/lib/xerces.jar!/com/devel
  op/ewebjav
   a/lab/Browse.class
  
   The code should check which 'repository' the class is in and
  only add that
   entry to the directory. Of course removing all the jars or
  putting a break
   after the first loop (a brutal but effective solution in my
  case) fixes the
   problem.
  
   Hope this helps,
  
   Kevin Jones
   DevelopMentor
   www.develop.com
  
  
 





Class Reloading

2001-05-11 Thread Kevin Jones

Sorry it's taken me a week to get back to you on this. Class-reloading is
not working in the latest nightly build. I know why, but don't know what the
fix is.

The problem is in StandardClassLoader::loadClass. This method checks that
the class exists, if it does it wants to add it to the classCache HashMap.
To do this loadCLass has a loop that loops around all the 'repositories'
These repositories are the .jar files in the web-inf lib directory. In the
loop it does this

classCache.put(name, new ClassCacheEntry
 (clazz, classUrl,
  classUrlConnection.getLastModified()));

but the loop never breaks, so if you have 4 jars in your lib directory code
loops 5 times (once for the classes sub dir and once for each jar) and the
'last' jar in wins. So the classes in my classes directory get added as

jar:jndi:/localhost/AddressBook/WEB-INF/lib/xerces.jar!/com/develop/ewebjav
a/lab/Browse.class

The code should check which 'repository' the class is in and only add that
entry to the directory. Of course removing all the jars or putting a break
after the first loop (a brutal but effective solution in my case) fixes the
problem.

Hope this helps,

Kevin Jones
DevelopMentor
www.develop.com




RE: Class Reloading

2001-05-11 Thread Kevin Jones

 But, other than efficiency concerns, it should still work if the
 particular class is *only* found in WEB-INF/classes and *not* in any of
 the WEB-INF/lib/*.jar files, right?

I don't think so. The class I'm trying to reload is in web-inf/classes, it
is not in any of the jars in web-inf/lib (is this what you mean?).

I believe (I've yet to test this) that the only way reloading works
currently (for me) is if I have no jars in web-inf/lib,

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 11 May 2001 18:58
 To: Tomcat-Dev
 Subject: Re: Class Reloading


 Thanks Kevin ... I think it's safe to assume that Beta 4 still has this
 issue :-(.

 But, other than efficiency concerns, it should still work if the
 particular class is *only* found in WEB-INF/classes and *not* in any of
 the WEB-INF/lib/*.jar files, right?

 NOTE:  automatic reloading is currently supported only for unpacked
 classes in WEB-INF/lib.

 Craig


 On Fri, 11 May 2001, Kevin Jones wrote:

  Sorry it's taken me a week to get back to you on this.
 Class-reloading is
  not working in the latest nightly build. I know why, but don't
 know what the
  fix is.
 
  The problem is in StandardClassLoader::loadClass. This method
 checks that
  the class exists, if it does it wants to add it to the
 classCache HashMap.
  To do this loadCLass has a loop that loops around all the 'repositories'
  These repositories are the .jar files in the web-inf lib
 directory. In the
  loop it does this
 
  classCache.put(name, new ClassCacheEntry
   (clazz, classUrl,
classUrlConnection.getLastModified()));
 
  but the loop never breaks, so if you have 4 jars in your lib
 directory code
  loops 5 times (once for the classes sub dir and once for each
 jar) and the
  'last' jar in wins. So the classes in my classes directory get added as
 
 
 jar:jndi:/localhost/AddressBook/WEB-INF/lib/xerces.jar!/com/devel
 op/ewebjav
  a/lab/Browse.class
 
  The code should check which 'repository' the class is in and
 only add that
  entry to the directory. Of course removing all the jars or
 putting a break
  after the first loop (a brutal but effective solution in my
 case) fixes the
  problem.
 
  Hope this helps,
 
  Kevin Jones
  DevelopMentor
  www.develop.com
 
 





class reloading

2001-05-04 Thread Kevin Jones

I can't get servlet re-loading to work in TC4b3. Looking at the code -

Loader creates a thread that sleeps until the time set in server.xml
expires. This thread calls StandardClassLoader.modified

The modified call checks the classCache to see if there are any entries
(code is here)

if (classCache.size()  1)
{
return (false);
}

Checking through the code classes are added to the cache in the loadClass
function.

Near the end of that function is this code

try
{
File file = new File(pathname);
if (file.exists()  file.canRead())
{
if (debug = 3)
{
log(Caching from ' + file.getAbsolutePath() +
' modified ' +
(new java.sql.Timestamp(file.lastModified())) +
');
}
classCache.put(name, new ClassCacheEntry(clazz, file,
file.lastModified()));
}
} catch(AccessControlException ace)

Printing out the value of 'pathname' just before this code executes gives

jndi:/localhost/AddressBook/WEB-INF/classes\com\develop\ewebjava\lab\Browse
.class,

which means that the 'file' doesn't exist and so doesn't get added to the
cache.

Should that 'jndi:/localhost' be there ?

This is with the latest nightly build BTW,

Kevin Jones
DevelopMentor
www.develop.com




RE: loader.html

2001-05-03 Thread Kevin Jones

 OK, you've caught me.

:-)

The reason I wanted the doc is to do with the re-loader problem I'm having.
I wanted to know if I'd configured the loader correctly

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 02 May 2001 02:59
 To: [EMAIL PROTECTED]
 Subject: RE: loader.html




 On Tue, 1 May 2001, Kevin Jones wrote:

  webapps\ROOT\docs\config\context.html says
 
  Loader - Configure a class loader associated with this Context.
  where the HTML looks like this
  a href=loader.htmlLoader/a - Configure a class loader associated
 with
  this strongContext/strong
 
  Kevin Jones
  DevelopMentor
  www.develop.com
 

 OK, you've caught me.

 There are roughly four of these configuration doc files that have not
 been
 written yet (which is why I've left the bug report complaining about
 this
 open).  I'll get to them soonest.

 Craig




Session Persistence

2001-03-31 Thread Kevin Jones

How do I enable the persistence manager in Beta 2. There's no entry in the
server.xml file, and I couldn't see anything in the docs.

Thanks,

Kevin Jones
DevelopMentor
www.develop.com




RE: [ANNOUNCE] Tomcat 4.0 Beta 2

2001-03-30 Thread Kevin Jones

Bonza job guys,

thank you :-)

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 31 March 2001 08:27
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: [ANNOUNCE] Tomcat 4.0 Beta 2
 
 
 I'm pleased to announce the availability of the Beta 2 release of the
 next generation of the Tomcat servlet container, at:
 
 http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b2/
 
 Tomcat 4.0 beta 2 has many new features, including:
 
 * Tomcat 4.0 can now run web applications out of an unpacked
   directory or directly from a WAR file.
 
 * Web applications are now run under the control of a Java
   SecurityManager that can support fine-grained control over each
 web-app's access to system resources.
 
 * You can now specify a DefaultContext element in the server
   configuration file (server.xml) that defines default configuration  
 information for contexts that are automatically configured.
 
 * An example Filter implementation that supports on-the-fly GZIP
   compression for clients that support it.
 
 * A servlet that implements all of the NCSA documented
   functionality for server side includes (*.shtml) except for   the
 "exec" capability.
 
 * Standard resource factories for JavaMail related resources
   accessible via a JNDI InitialContext, compatible with J2EE
   Specification requirements.
 
 * Reflects the most up-to-date changes in the Servlet 2.3 and
   JSP 1.2 APIs that have been approved by the JSR-053 expert
   group, and will appear in the next published version of the
   corresponding specifications.
 
 In addition, the following major bug fixes are included:
 
 * Fixes for two reported security vulnerabilities (a "cross site
   scripting vulnerability" plus a "URL decoding vulnerability")
 
 * The JSP servlet (Jasper) that compiles and executes JSP pages
   now uses its own classloader its associated XML parser, which
   avoids potential conflicts with parsers included with a web
   application.
 
 * Bug fix updates for directory listings, the WebDAV support,
   binding to a single IP address (if requested), incorrectly
   named access log files, URL decoding improvements, form-based
   authentication, HTTP/1.1 chunking, isUserInRole(), JSP page
   parsing problems, and many other patches.
 
 See the Tomcat 4.0 Beta 2 Release Notes (RELEASE-NOTES-4.0-B2.txt)
 that are included in the top-level directory of the release for more
 detailed information.
 
 Craig McClanahan



RE: problems building the tomcat Source

2001-03-28 Thread Kevin Jones

do you have tools.jar on your classpath?

c:\jdk1.3\lib\tools.jar

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Anil [mailto:[EMAIL PROTECTED]]
 Sent: 28 March 2001 10:23
 To: [EMAIL PROTECTED]
 Subject: problems building the tomcat Source
 
 
 I have been trying to build the Source for Tomcat but an error creeps up.
 
   Exception in thread "main" java.lang.NoClassDefFoundError:
 sun/tools/javac/Main
   at 
 org.apache.tools.ant.taskdefs.Javac.doClassicCompile(Javac.java:218)
   at org.apache.tools.ant.taskdefs.Javac.execute(Target.java:120)
 
 
 I have downloaded and installed
  jdk1.3
 tomcat source 3.1.1
 jakarta-ant
 jakarta-tools
 all in the same directory.
 running on Win98 system
 
 
 Anybody has any Idea what the problem could be. Any help would will be
 appreciated
 
 Thanks
 
 Anil Oommen
 Technical Member
 [EMAIL PROTECTED]
 



RE: FW: Tomcat 4 service

2001-03-28 Thread Kevin Jones

 There is some basic code aimed at allowing the creation of such a beast in
 the "service" directory of the source repository.  Besides just being able
 to start and stop Tomcat as a service, one of the goals is to interact
 with the connector startup so we can run Tomcat 4 on port 80 without
 having to be root.  This will require a couple of changes to the
 Connector interface as well as a Tomcat-4 specific version of the service
 startup stuff.

 It would be great if you wanted to work on this!

I'll take a look, but I'm slightly confused (not unusual :-) ) You say above
about non-roots not being able to run Tomcat on port 80. This is NT/W2K
we're talking about right? Or is there some connection between the service
code and *nix?

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 28 March 2001 22:19
 To: Tomcat-Dev
 Subject: Re: FW: Tomcat 4 service




 On Wed, 28 Mar 2001, Kevin Jones wrote:

  I posted this to tomcat-user with no response.
 
  Does such a beast exist? If not I'll volunteer to port the
 Tomcat 3.2 code.
  Just point me at it!

 There is some basic code aimed at allowing the creation of such a beast in
 the "service" directory of the source repository.  Besides just being able
 to start and stop Tomcat as a service, one of the goals is to interact
 with the connector startup so we can run Tomcat 4 on port 80 without
 having to be root.  This will require a couple of changes to the
 Connector interface as well as a Tomcat-4 specific version of the service
 startup stuff.

 It would be great if you wanted to work on this!

 
  Kevin Jones
  DevelopMentor
  www.develop.com
 

 Craig


   -Original Message-
   From: Kevin Jones [mailto:[EMAIL PROTECTED]]
   Sent: 27 March 2001 22:44
   To: Tomcat-User
   Subject: Tomcat 4 service
  
  
   I have tomcat 3.2 running as a service under W2K. I seem to
 remember that
   this wasn't available for Tomcat 4 (running it as a service that
   is), or is
   the code now available?
  
   Thanks,
  
   Kevin Jones
   DevelopMentor
   www.develop.com
 
 





Listeners

2001-03-27 Thread Kevin Jones

Tomcat 4.0 stops configuring listeners if one of the listeners in the list
isn't present, should it carry on configuring the rest of the listeners it
finds? The spec is silent on this and it seems odd that if somebody (maybe
accidentally) deletes a listener class all other following listeners are not
configured (any listener preceding the missing listener would already have
been initialised).

I've also raised this as a bug,

Thanks,

Kevin




RE: Listeners

2001-03-27 Thread Kevin Jones

 Here's the rationale for this behavior (and the fact that Tomcat also
 marks the app unavailable if it didn't initialize all the listeners and
 filters successfully):

But it doesn't, at least not in the latest nightly. I have a listener
configured and the class file is missing. Tomcat seems not to have
initialised any of the listeners but the application is still available.

 Let's say you are implementing user authentication yourself, and using
 filters.  You specify connection information to a database in your filter
 params, but mistype the password so that the connection cannot be
 established, so your filter's init() method throws an exception.  If
 Tomcat just logged this as a warning and went on deploying your app, it
 would now be running with *no* authentication, potentially exposing
 sensitive information.  Is that what you *really* want to have happen?

 One might argue missing listeners would be less severe a risk than missing
 filters, but IMHO that isn't the container's judgement to make -- the user
 has an incomplete application deployed; better to make them go fix it
 rather than trying to run only part of it.

But it is a judgement the container is making - In my app it doesn't matter
much if the filters/listeners are missing. I would argue that for listeners
the behaviour should be the same as for load-on-startup servlets and that
the principle of least surprise would be applied. I would guess that
initially most listeners would be ported from load-on-startup servlets (mine
are), of one of those servlets was missing the application still started,
and the servlets still executed. Least surprise tells me that listeners
should behave the same way. Is there some way we could configure this in
server.xml or do you think that is overkill.

BTW should we also add a note in the spec. about this?

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 28 March 2001 04:14
 To: Tomcat-Dev
 Subject: Re: Listeners




 On Tue, 27 Mar 2001, Kevin Jones wrote:

  Tomcat 4.0 stops configuring listeners if one of the listeners
 in the list
  isn't present, should it carry on configuring the rest of the
 listeners it
  finds? The spec is silent on this and it seems odd that if
 somebody (maybe
  accidentally) deletes a listener class all other following
 listeners are not
  configured (any listener preceding the missing listener would
 already have
  been initialised).
 

 Here's the rationale for this behavior (and the fact that Tomcat also
 marks the app unavailable if it didn't initialize all the listeners and
 filters successfully):

 Let's say you are implementing user authentication yourself, and using
 filters.  You specify connection information to a database in your filter
 params, but mistype the password so that the connection cannot be
 established, so your filter's init() method throws an exception.  If
 Tomcat just logged this as a warning and went on deploying your app, it
 would now be running with *no* authentication, potentially exposing
 sensitive information.  Is that what you *really* want to have happen?

 One might argue missing listeners would be less severe a risk than missing
 filters, but IMHO that isn't the container's judgement to make -- the user
 has an incomplete application deployed; better to make them go fix it
 rather than trying to run only part of it.

  I've also raised this as a bug,
 
  Thanks,
 
  Kevin
 
 

 Craig





FW: Tomcat 4 service

2001-03-27 Thread Kevin Jones

I posted this to tomcat-user with no response.

Does such a beast exist? If not I'll volunteer to port the Tomcat 3.2 code.
Just point me at it!

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Kevin Jones [mailto:[EMAIL PROTECTED]]
 Sent: 27 March 2001 22:44
 To: Tomcat-User
 Subject: Tomcat 4 service


 I have tomcat 3.2 running as a service under W2K. I seem to remember that
 this wasn't available for Tomcat 4 (running it as a service that
 is), or is
 the code now available?

 Thanks,

 Kevin Jones
 DevelopMentor
 www.develop.com




RE: Xalan Tomcat: sealing violation

2001-03-26 Thread Kevin Jones

Robert,

this is a well known issue that is being worked on. Check back on the list
over the last couple of days for another discussion of this :-)

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Robert Petersen [mailto:[EMAIL PROTECTED]]
 Sent: 26 March 2001 11:20
 To: [EMAIL PROTECTED]
 Subject: Xalan  Tomcat: sealing violation


 First - I may have posted this to the wrong list, if so please
 let me know a more appropriate place to post this.

 I think there is a bug in the way Tomcat (or the JVM) handles
 class loading of classes.  The problem is this, I have a servlet
 (filter actually) that attempts to do some XSLT transformations.
 When the filter tries to get a TransformerFactory a security
 exception is thrown, java.lang.SecurityException: sealing
 violation.  (The entire stack trace is at the bottom)
 The root of the problem is when the class loader is trying to
 load a org.xml.sax.SAXException.  The resource is correct in that
 the code source url returned is "file:C:/Program Files/Apache
 Group/tomcat/webapps/jdst/WEB-INF/lib/xalan.jar"  the is the
 xalan.jar file bundled with my webapp.  The problem arises when
 the class loader tries to get the package with a call to
 "getPackage(pkgname);"  The class loader doesn't have this
 package and asks it's parent to see if it can find the package,
 and sure enough the parent has a package object from org.xml.sax.
  The problem is this package was loaded earlier and it's url is
 "file:C:/Program Files/Apache Group/tomcat/lib/crimson.jar", so
 when the class loader is checking if the package is sealed it
 compares the two urls, finds they are not the same and throws the
 exception.

 A big assumption I have is that what I am doing is legal, I
 assume that the intention of the class loading systems is so that
 the base tomcat code can access it's classes with out worry,
 using whatever version of the classes it likes and that web apps
 can load their own version of classes without effecting the
 behavior of tomcat or other web apps.  Is this correct?

 Now you can avoid this problem simply by not asking the package
 if it is sealed against the code source url.  Is this safe?

 If you do that though another sort of configuration separation
 problem happens, in the crimson.jar file the property
 "javax.xml.parsers.DocumentBuilderFactory" is set to
 "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl", so if I ask
 for a new TransformerFactory then I get an instance of
 "org.apache.crimson.jaxp.DocumentBuilderFactoryImpl", if I don't
 want that type of object I can set the property to my own class,
 e.g. "org.apache.xalan.processor.TransformerFactoryImpl" but now
 all the other web apps are forced to deal with my class.  Worse
 yet, some other webapp could come along and switch the property
 on me.  So it appears that there is no sort of "configuration
 layering" which I think is a problem.

 Any help would be appreciated.

 Thanks,
 Robert Petersen

 Stack Trace:
 java.lang.SecurityException: sealing violation
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:225)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:217)
   at
 org.apache.catalina.loader.StandardClassLoader.findClass(StandardC
 lassLoader.java:648)
   at
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
 lassLoader.java:987)
   at
 org.apache.catalina.loader.StandardClassLoader.loadClass(StandardC
 lassLoader.java:906)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
   at com.orangefood.xsltfilter.Filter.doFilter(Filter.java:40)
   at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(Applicati
onFilterChain.java:180)
   at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapp
 erValve.java:251)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
   at
 org.apache.catalina.core.StandardContextValve.invoke(StandardConte
 xtValve.java:196)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
   at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2041)
   at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValv
 e.java:161)
   at
 org.apache.catalina.valves.ValveBase.invokeNext(ValveBase.java:242)
   at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:414)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:975)
   at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngine
 Valve.java:159)
   at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:977)
   at
 o

RE: Still have XML loading problems

2001-03-25 Thread Kevin Jones

 The Jasper page compiler needs to have access to all of the bean classes
 that you might have placed in WEB-INF/classes and WEB-INF/lib.  This could
 be "faked" by setting up yet another class loader that simulates the
 "real" webapp class loader (in terms of what repositories it gives you
 visibility to), or by making the special Jasper class loader a sibling of
 the webapp class loader (rather than a child), and adding the WEB-INF
 repositories to it as well.

 This will work as long as you don't create an object in the Jasper class
 loader and then expect it to be visible in the webapp class loader (or
 vice versa) -- you get class cast exceptions at that point.

Craig, can we do this for now - it will solve these problems in the short
term and we can then think about re-writing Jasper?

Kevin Jones
DevelopMentor
www.develop.com





RE: Still have XML loading problems

2001-03-24 Thread Kevin Jones

 I'm interested in seeing if we can gather enough folks to start a "Jasper
 2.0" effort, on a completely fresh slate.  The design of this would take
 into account the two input syntaxes and everything we've learned, and the
 implementation could implement many obvious optimizations that would speed
 up the runtime code as well.

 What do you think?

I think this is a great idea - I'd certainly be interested,

Kevin Jones
DevelopMentor
www.develop.com






Still have XML loading problems

2001-03-23 Thread Kevin Jones

Craig,

I'm playing with the 22nd March drop of Catalina, and I've come across a
scenario where the new classloading architecture doesn't quite work.

I'm using Xerces and Xalan (although Xalan is irrelevant to this). If I
access a servlet that uses XML and I don't put Xerces in my
web-app/myapp/lib my code fails (exactly what I'd expect). If I put
Xerces.jar into web-app/myapp/lib it works, again what I'd expect.

However, if I put my XML code into an application listener then Jasper fails
to load - I get a Security Exception, sealing violation, while it's load the
'jsp' servlet. It seems that what's happening is that my listener loads,
loads Xerces and executes OK. The jsp Servlet then tries to load
crimson/JAXP and *bang* sealing violation.

Sorry about this - the XML stuff had been going so well until then!

Kevin Jones
DevelopMentor
www.develop.com




RE: Still have XML loading problems

2001-03-23 Thread Kevin Jones

Yep 1.3

 I think the only workaround for this is to ship our own copy of
 the JAXP JAR
 files, with the "sealed" attribute removed.  I'm also going to be
 talking with
 the JAXP folks about removing that in their next release.

:-(

What would happen if you made a special case of the JSP servlet and loaded
it early?
Could you preload jasper somewhere else?

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 23 March 2001 19:05
 To: Kevin Jones
 Cc: Tomcat-Dev
 Subject: Re: Still have XML loading problems


 Kevin Jones wrote:

  Craig,
 
  I'm playing with the 22nd March drop of Catalina, and I've come across a
  scenario where the new classloading architecture doesn't quite work.
 
  I'm using Xerces and Xalan (although Xalan is irrelevant to this). If I
  access a servlet that uses XML and I don't put Xerces in my
  web-app/myapp/lib my code fails (exactly what I'd expect). If I put
  Xerces.jar into web-app/myapp/lib it works, again what I'd expect.
 
  However, if I put my XML code into an application listener then
 Jasper fails
  to load - I get a Security Exception, sealing violation, while
 it's load the
  'jsp' servlet. It seems that what's happening is that my listener loads,
  loads Xerces and executes OK. The jsp Servlet then tries to load
  crimson/JAXP and *bang* sealing violation.
 

 I will bet you're using a JDK 1.3 platform, right?  It turns out
 that all the
 changes we made are very effective for JDK 1.2, but the 1.3 version of
 URLClassLoader still doesn't like it.  :-(

 
  Sorry about this - the XML stuff had been going so well until then!
 

 I think the only workaround for this is to ship our own copy of
 the JAXP JAR
 files, with the "sealed" attribute removed.  I'm also going to be
 talking with
 the JAXP folks about removing that in their next release.


 
  Kevin Jones
  DevelopMentor
  www.develop.com

 Craig





RE: Still have XML loading problems

2001-03-23 Thread Kevin Jones

 It (the JSP servlet) is loaded early already.

 It (and its XML parser) are now loaded by another classloader (not sure
 that was
 true on the 22nd -- if your Tomcat 4.0 has "jasper-compiler.jar" and
 "jasper-runtime.jar" separated, then it is for you).

I have jasper-compiler.jar in 'jasper' and jasper-runtime.jar in 'lib'

 The problem is the following scenario:

 * JSP servlet loads early, parses TLDs from the web.xml file (which
   causes some JAXP parser classes to be loaded).

 * You do something with Xerces that causes Xerces classes to
   be loaded, from your webapps class loader (parent of the one
   used by the JSP servlet).

 * You do something with a JSP page that causes more parser
   classes to be loaded (from the JSP servlet's classloader), including
   a class with the same fully qualified name as one of the Xerces
   classes you just loaded.

 * Under 1.2 this worked.  Under 1.3 it gives sealing violation errors


I'm not seeing this sequence (I don't think)

* I'm loading Xerces in my listener (in fact all I'm doing is using the
DocumentBuilder and DocumentBuilderFactory), in the contextInitialized
method, this is getting loaded first.

* JSP servlet is trying to load - in it's init() method I get the exception

No TLDs but I see a call to TldLocationsCache.init

This is part of the trace I'm seeing

ContextConfig[/KRJ]: Added certificates - request attribute Valve
xmlSetupListener: enter contextInitialized
xmlSetupListener: leave contextInitialized
StandardWrapper[/KRJ:default]: Loading container servlet default
default: init
StandardWrapper[/KRJ:invoker]: Loading container servlet invoker
invoker: init
StandardWrapper[/KRJ:jsp]: Using Jasper classloader for servlet jsp
jsp: init
StandardContext[/KRJ]: Servlet /KRJ threw load() exception
javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:791)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3135)

... lines omitted for brevity ...

- Root Cause -
java.lang.SecurityException: sealing violation
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader
.java:646)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:1013)
at
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader
.java:912)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCa
che.java:161)


 The only other possible workaround I can think if is to exhaustively
 load every
 single class file out of jaxp.jar and crimson.jar at startup time.  That
 seems
 horrendously wasteful of memory (especially when you consider that this
 has to
 be done for each web app).


Agreed

Kevin Jones
DevelopMentor
www.develop.com





RE: Still have XML loading problems

2001-03-23 Thread Kevin Jones

Craig,

bear with my ignorance of how Catalina works at this point.
I'm assuming that the JSP servlet compiles the 'raw' JSP-XML-Java and then
compiles this to a .class file.

Why does the Jasper class-loader delegate to the web-apps classloader, isn't
the Jasper step entirely independent. If so, couldn't the JSP servlet create
its own CL that doesn't delegate to the webapps loader, but delegates
straight to the shared classloader. In fact we could take tools.jar off-of
the classpath and make it available to this classloader only.

So the Jasper CL would pick up tools.jar, crimson.jar and jaxp.jar and
everything from my webapp lib and classes, but doesn't delegate to the
webapp CL. This should have the effect of making Jasper independent of my
webapp CL.

The other CLs would work the same.

It makes the CL architecture slightly more complicated (but it already is
complicated).

Will this work?

Another thought. If Jasper is a two step process (.jsp-XML, XML-Java) as
step 1, java-.class as step 2, only the first step needs an XML parser, can
we isolate that first step with a separate CL?

Kevin (waiting to be shot down in flames) Jones





Taglibs and Manifests

2001-02-25 Thread Kevin Jones

The current beta-1 of TC4 requires that taglib jar files contain a manifest.
TC3.2 doesn't.

Is this a requirement anywhere? I've checked the JSP specs and the JAR
guide.

Thanks,

Kevin Jones
DevelopMentor
www.develop.com


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




[REPOST] Using Xerces in my Application

2001-02-02 Thread Kevin Jones

I posted this about a week ago with no luck. Anybody care to comment?

I'm trying to use Xerces in my web application. To do this I put the jar
file into WEB-INF/lib. However whenever I try and parse any XML I get a
'sealing' exception. I've just read the recent thread on this and it implies
that I can only have one XML parser within Tomcat, or at least that if the
class names clash (which they will) things may not work as expected.

Can I use Xerces either alongside Crimson? If so, where do I put it. It
doesn't work in WEB-INF/lib and only works in tomcat/lib as a replacement
for crimson.

Reading the sealing discussion I get the impression that using Xerces should
be OK as long as the class loader doesn't try and use two classes with the
same name from different jars, (or am I way off the mark here?). So
shouldn't xerces become the 'default' XML parser for my application?

What if I want to use a different parser (such as Oracle's) will it work (I
haven't tried this BTW)?

Kevin Jones
DevelopMentor
www.develop.com


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




RE: do filters work ...

2001-02-02 Thread Kevin Jones

I have filters working fine on TC 4.0b1

Is demo the name of your web application?

If so your web.xml file should look like this

filter-mapping
   filter-nameprePost/filter-name
   url-pattern/*/url-pattern
/filter-mapping

filter-mapping
   filter-namehelloWorld/filter-name
   url-pattern/hello.jsp/url-pattern
/filter-mapping

Even if demo is asubdirectory I would try the first filter mapping here
(i.e. filter everything) and see if that works,


Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Grobe, Gary [mailto:[EMAIL PROTECTED]]
 Sent: 02 February 2001 18:27
 To: '[EMAIL PROTECTED]'
 Subject: do filters work ...


 I'm sending this to the dev group since I'm dealing w/ tomcat4.0
 (catalina)
 issues and not sure how far along filters are. I can't seem to get my
 filters to work so I have a basic HelloWorld that I'm using. The output of
 the jsp is what my problem is.


 Everything seems to come up fine (running in stand-alone)

 ~/logs/catalina.out shows:
  catalina.out ---
 Starting service Tomcat-Apache
 Apache Tomcat/4.0-b1

 A shutdown would show:

 Stopping service Tomcat-Standalone
 Stopping service Tomcat-Apache
 Starting service Tomcat-Standalone
 Apache Tomcat/4.0-b1


 In my ~logs/localhost_access*, the first GET (of my ~/demo/hello.jsp)
 returns a 200 (after that it's a 302, anyway to force a non-cached GET?).

 

 The output of the hello.jsp:

 _ this is supposed to be an hr

 null

 Check console output!

 _ this is supposed to be an hr


 - my hello.jsp -

 html
 head
titleTesting Filters/title
 /head

 body
hr
   p%=request.getAttribute("hello")%/p
   pCheck console output!/p
hr
 /body
 /html

  my filter HelloWorld.java --

 package filters;

 import javax.servlet.*;

 public class HelloWorld extends GenericFilter
 {
private FilterConfig FilterConfig;

public void doFilter(final ServletRequest request,
  final ServletResponse response,
  FilterChain chain) throws java.io.IOException,
  javax.servlet.ServletException {

   System.out.println("Entering HelloWorld Filter");

   request.setAttribute("hello", "Hello World!");

   chain.doFilter(request, response);

   System.out.println("Entering HelloWorld Filter");

}
 }

  my generic filter GenericFilter.java -

 package filters;

 import javax.servlet.*;

 public class GenericFilter implements javax.servlet.Filter
 {
private FilterConfig filterConfig;

public void doFilter(final ServletRequest request,
  final ServletResponse response,
  FilterChain chain)
  throws java.io.IOException, javax.servlet.ServletException {

   chain.doFilter(request, response);
}

public void setFilterConfig(final FilterConfig filterConfig) {
   this.filterConfig = filterConfig;
}

public FilterConfig getFilterConfig() {
   return filterConfig;
}
 }

  my web.xml 

 ?xml version="1.0" encoding="ISO-8859-1"?

 !DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"

 web-app

filter
   filter-nameprePost/filter-name
   filter-classfilters.PrePostFilter/filter-class
/filter

filter
   filter-namehelloWorld/filter-name
   filter-classfilters.HelloWorld/filter-class
/filter

filter-mapping
   filter-nameprePost/filter-name
   url-pattern/demo/*/url-pattern
/filter-mapping

filter-mapping
   filter-namehelloWorld/filter-name
   url-pattern/demo/hello.jsp/url-pattern
/filter-mapping

!--servlet
   servlet-nameInsertApp/servlet-name
   servlet-classservlets.insertapp.InsertApp/servlet-class
  init-param
  param-namedebug/param-name
  param-value2/param-value
   /init-param
/servlet

servlet-mapping
   servlet-nameInsertApp/servlet-name
   url-pattern/InsertApp/url-pattern
/servlet-mapping--

 /web-app

 

 On a side note: any docs on configuring catalinas, like, how to get it out
 of stand-alone mode, and the configuration differences is has of previous
 tomcat's (i.e. httpd.conf, etc...)

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


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




RE: Filter Chains slow first time it is called

2001-01-31 Thread Kevin Jones

I've just taken a closer look at this, it's a browser problem.

IE 5.5 has really trouble with content types. Even though I'm setting the
type to text/html (in a filter) but at some point I've used IE 5.5 to get
the data without the filter. The servlet returns text/xml. It seems that
IE5.5 is struggling to reconcile this (that's all I can think of).

Netscape has no problems (for once :-) ),

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: 31 January 2001 19:21
 To: [EMAIL PROTECTED]
 Subject: Re: Filter Chains slow first time it is called


 Kevin Jones wrote:

  Subject says it all really.
 
  The first time a filter chain is executed for a servlet, it
 takes about 30
  seconds for the response to get back to the client.
 

 It would be surprising if this is related to initializing the
 filter chain --
 after all, the chain is constructed for every single request (not just the
 first one).  Are you sure there isn't anything application
 specific that takes
 a long time to initialize?

 
  This doesn't happen everytime but enough to be repeatable.
 
  I'm using Beta 1. I've set the app to be reloadable (with a
 reload time of
  3) and I'm logging to the console if that helps,
 

 Logs and a test case (even if it doesn't repeat evey single time) would be
 quite useful in investigating this.

 
  Kevin Jones
  DevelopMentor
  www.develop.com
 

 Craig



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


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




FW: Using Xerces in my Application

2001-01-28 Thread Kevin Jones

Sorry about the cross-post. I posted this is user and I meant to post it
here. Could you guys post any replies here please?

Thanks

Kevin Jones
DevelopMentor
www.develop.com

 -Original Message-
 From: Kevin Jones [mailto:[EMAIL PROTECTED]]
 Sent: 27 January 2001 08:25
 To: Tomcat-User
 Subject: Using Xerces in my Application


 I'm trying to use Xerces in my web application. To do this I put
 the jar file into WEB-INF/lib. However whenever I try and parse
 any XML I get a 'sealing' exception. I've just read the recent
 thread on this and it implies that I can only have one XML parser
 within Tomcat, or at least that if the class names clash (which
 they will) things may not work as expected.

 Can I use Xerces either alongside Crimson? If so, where do I put
 it. It doesn't work in WEB-INF/lib and only works in tomcat/lib
 as a replacement for crimson.

 Reading the sealing discussion I get the impression that using
 Xerces should be OK as long as the class loader doesn't try and
 use two classes with the same name from different jars, (or am I
 way off the mark here?). So shouldn't xerces become the 'default'
 XML parser for my application?

 What if I want to use a different parser (such as Oracle's) will
 it work (I haven't tried this BTW)?

 Kevin Jones
 DevelopMentor
 www.develop.com


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