[Tomcat Wiki] Update of "SSLWithFORMFallback6" by VegarNeshaug

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by VegarNeshaug:
http://wiki.apache.org/tomcat/SSLWithFORMFallback6

The comment on the change is:
Added start() and stop() delegation

--
  }
  }
  
+ @Override
+ public void start() throws LifecycleException {
+ super.start();
+ formAuthenticator.start();
+ sslAuthenticator.start();
+ }
+ 
+ @Override
+ public void stop() throws LifecycleException {
+ super.stop();
+ formAuthenticator.stop();
+ sslAuthenticator.stop();
+ }
+ 
  // I'd rather not have the below, but it is necessary for the
  // authenticators to work properly.
  @Override

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



DO NOT REPLY [Bug 44494] Requests greater than 8k being truncated.

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44494


Andrew Savory <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #53 from Andrew Savory <[EMAIL PROTECTED]>  2008-05-13 04:31:05 PST 
---
Since this bug effectively means tomcat 6.0.16 is unable to reliably handle
requests, perhaps it should be publicised more widely, and the 6.0.16 release
pulled (or replaced with 6.0.16.1)?


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 44986] New: JSP compilation exception with pageEncoding=" utf-8" and file with byte order marks

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44986

   Summary: JSP compilation exception with pageEncoding="utf-8"  and
file with byte order marks
   Product: Tomcat 6
   Version: unspecified
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


JSP-File has byte order marks. If the attribute is set to "UTF-8" (upper case)
or the file has no byte order marks, the compilation workes fine. 

{code} 
12:32:16,946 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception 
org.apache.jasper.JasperException: /dialog.jsp(2,0) Page-encoding specified in
XML prolog (UTF-8) is different from that specified in page directive (utf-8) 
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
 
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) 
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:236) 
at
org.apache.jasper.compiler.Validator$DirectiveVisitor.comparePageEncodings(Validator.java:362)
 
at
org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:197) 
at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338) 
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2388) 
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2394) 
at org.apache.jasper.compiler.Node$Root.accept(Node.java:489) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2338) 
at org.apache.jasper.compiler.Validator.validate(Validator.java:1700) 
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273) 
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566) 
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:316) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
 
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
 
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)
 
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
 
at de.cit.jsp.control.DispatchServlet.forward(DispatchServlet.java:286) 
at de.cit.jsp.control.DispatchServlet.doGet(DispatchServlet.java:272) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
at
de.cit.util.javax.servlet.ValidationFilter.doFilter(ValidationFilter.java:108) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
at
de.cit.util.javax.servlet.jsp.XHtmlContentTypeFilter.doFilter(XHtmlContentTypeFilter.java:36)
 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
 
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
 
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) 
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) 
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 
at
org.jboss.web.tomcat.service.jca.Cache

DO NOT REPLY [Bug 44988] New: JPDA_OPTS in catalina.sh / catalina. bat is using old JDWP semantics

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44988

   Summary: JPDA_OPTS in catalina.sh / catalina.bat is using old
JDWP semantics
   Product: Tomcat 6
   Version: 6.0.16
  Platform: All
OS/Version: All
Status: NEW
  Keywords: JDK1.5
  Severity: minor
  Priority: P4
 Component: Native:Integration
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Since Java 5, the recommended option to start a JVM in debug mode has changed
from
-Xdebug -Xrunjdwp:...
to
-agentlib:jdwp=...
as described in
http://java.sun.com/j2se/1.5.0/docs/guide/jpda/conninv.html#Invocation

Since Tomcat 6 requires Java 5, this change should be propagated in catalina.sh
(line 212) / catalina.bat (line 152):
change "JPDA_OPTS=-Xdebug -Xrunjdwp:" to "JPDA_OPTS=-agentlib:jdwp="

Note that this change should not be back-ported to Tomcat 5.x, since this
version runs with Java 1.4.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Manage connection

2008-05-13 Thread Liang Xiao Zhu

Hi everyone!

I am wondering, how can i manage connection? What I want to do is 
simplely filter connections, such as when I have 50 request I want the 
follow connections will be refused. I am using a NIO protocol for to do 
that, in fact, I am looking at a Http11NioProcessor.java and 
Http11NioProtocol.java, and I can capture the request, but I dont know 
how I can refuse the request. I mean, how I can build a response when 
the user with request 51 will be refused.


Thanks in advance!!!

Regards

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



DO NOT REPLY [Bug 44989] New: using NIO connector with compression consumes all CPU

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44989

   Summary: using NIO connector with compression consumes all CPU
   Product: Tomcat 6
   Version: 6.0.16
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: critical
  Priority: P1
 Component: Connectors
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=21957)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21957)
JConsole overview

Hi, i migrated from version 6.0.14 to version 6.0.16, and configured tomcat to
use NIO connector and compression on, with that i'm getting a thread name
'http-exec-80-2' that consumes 49-50% of CPU, and the thread
'http-80-ClientPoller' that consumes 46-48% of CPU, with this i have a jvm that
consumes 100% o my CPU.

uname -a output: 
Linux 2.6.23.1-10.fc7 #1 SMP Fri Oct 19 15:39:08 EDT 2007 i686 i686 i386
GNU/Linux 

java -version output:
java version "1.5.0_15"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04)
Java HotSpot(TM) Server VM (build 1.5.0_15-b04, mixed mode)

http-exec-80-2 stack:
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:806)
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:164)
java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95)
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:122)
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:390)
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1079)
org.apache.coyote.Response.action(Response.java:183)
org.apache.coyote.Response.finish(Response.java:305)
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
org.apache.catalina.connector.Response.finishResponse(Response.java:492)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:310)
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
java.lang.Thread.run(Thread.java:595)

sometimes the stack of http-exec-80-2 is just changing from this to above:
org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:620)
org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:46)
org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:803)
org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:126)
org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:164)
java.util.zip.GZIPOutputStream.finish(GZIPOutputStream.java:95)
org.apache.coyote.http11.filters.GzipOutputFilter.end(GzipOutputFilter.java:122)
org.apache.coyote.http11.InternalNioOutputBuffer.endRequest(InternalNioOutputBuffer.java:390)
org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:1079)
org.apache.coyote.Response.action(Response.java:183)
org.apache.coyote.Response.finish(Response.java:305)
org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:276)
org.apache.catalina.connector.Response.finishResponse(Response.java:492)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:310)
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:879)
org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:719)
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2080)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
java.lang.Thread.run(Thread.java:595)

http-80-ClientPoller stack:
sun.nio.ch.PollArrayWrapper.poll0(Native Method)
sun.nio.ch.PollArrayWrapper.poll(PollArrayWrapper.java:100)
sun.nio.ch.PollSelectorImpl.doSelect(PollSelectorImpl.java:56)
sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:69)
sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:1473)
java.lang.Thread.run(Thread.java:595)

attached are the screenshots of JConsole from where you can see the graphs...


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.


DO NOT REPLY [Bug 44989] using NIO connector with compression consumes all CPU

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44989





--- Comment #1 from Clóvis Wichoski <[EMAIL PROTECTED]>  2008-05-13 07:39:10 
PST ---
Created an attachment (id=21958)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21958)
JConsole TopThreads


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 44989] using NIO connector with compression consumes all CPU

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44989


Filip Hanik <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |NEEDINFO




--- Comment #2 from Filip Hanik <[EMAIL PROTECTED]>  2008-05-13 08:03:51 PST ---
Hi there, many thanks for the report.
I would like to ask you for two things

1. Test the latest 6.0.x trunk, there has been changes in the exact code you
are refering to

fairly simple to build
(build with JDK 1.5)

svn co http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk
cd trunk
ant download
ant

output ends up in output/build


and if that doesn't change your scenario, make sure we are not running into a
JDK/NIO bug on linux, so test with the latest 1.6 JVM

best
Filip


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



URL decoding of plus (aka space) isn't done

2008-05-13 Thread Doug Donohoe

I'm tracking down a bug in Wicket that appears in Tomcat (also Jetty).  The
issue is this:

I'm submitting a URL with spaces and pluses in it.  It is URL encoded (using
java.net.URLEncoder) as follows:

http://localhost:8080/bugs/home/message/message+with+spaces+and%2Bsome%2Bpluses/

On both Tomcat and Jetty, the request.getServletPath() call returns this:

/home/message/message+with+spaces+and+some+plusses=bug/

Only the %2B (+) encodings are URL-decoded.  The + (space) encodings are
left as-is.  As you can see, through this process some information is lost
(what the original pluses were).

This happens in Tomcat in CoyoteAdapter:393:

req.getURLDecoder().convert(decodedURI, false);

The 'false' is for the "query" param, which when false, skips converting of
+

Jetty's code is similar - it just ignores '+' altogether.

My question is this.  If it is correct to URL encode spaces with +, which
doesn't Tomcat (or Jetty) decode them?  Or is the java.net.URLEncoder doing
this incorrectly?  Are + only allowed in the query string portion?   There
seems to be an impedance mismatch between what a client will allow in a URL
versus what the server is expecting.  Anyone have any insight into this? 

Thanks,

-Doug
-- 
View this message in context: 
http://www.nabble.com/URL-decoding-of-plus-%28aka-space%29-isn%27t-done-tp17211711p17211711.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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



Re: URL decoding of plus (aka space) isn't done

2008-05-13 Thread Doug Donohoe

To answer my own question:

I looked at the RFC (http://www.ietf.org/rfc/rfc2396.txt) and it appears
that '+' is only reserved for query strings.  The use of java.net.URLEncoder
for path-portions of a URL (or even an entire URL) is incorrect.

-Doug


Doug Donohoe wrote:
> 
> I'm tracking down a bug in Wicket that appears in Tomcat (also Jetty). 
> The issue is this:
> 
> I'm submitting a URL with spaces and pluses in it.  It is URL encoded
> (using java.net.URLEncoder) as follows:
> 
> http://localhost:8080/bugs/home/message/message+with+spaces+and%2Bsome%2Bpluses/
> 
> On both Tomcat and Jetty, the request.getServletPath() call returns this:
> 
> /home/message/message+with+spaces+and+some+plusses=bug/
> 
> Only the %2B (+) encodings are URL-decoded.  The + (space) encodings are
> left as-is.  As you can see, through this process some information is lost
> (what the original pluses were).
> 
> This happens in Tomcat in CoyoteAdapter:393:
> 
> req.getURLDecoder().convert(decodedURI, false);
> 
> The 'false' is for the "query" param, which when false, skips converting
> of +
> 
> Jetty's code is similar - it just ignores '+' altogether.
> 
> My question is this.  If it is correct to URL encode spaces with +, which
> doesn't Tomcat (or Jetty) decode them?  Or is the java.net.URLEncoder
> doing this incorrectly?  Are + only allowed in the query string portion?  
> There seems to be an impedance mismatch between what a client will allow
> in a URL versus what the server is expecting.  Anyone have any insight
> into this? 
> 
> Thanks,
> 
> -Doug
> 

-- 
View this message in context: 
http://www.nabble.com/URL-decoding-of-plus-%28aka-space%29-isn%27t-done-tp17211711p17212048.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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



Re: Manage connection

2008-05-13 Thread Mark Thomas

Liang Xiao Zhu wrote:

Hi everyone!

I am wondering, how can i manage connection? What I want to do is 
simplely filter connections, such as when I have 50 request I want the 
follow connections will be refused. I am using a NIO protocol for to do 
that, in fact, I am looking at a Http11NioProcessor.java and 
Http11NioProtocol.java, and I can capture the request, but I dont know 
how I can refuse the request. I mean, how I can build a response when 
the user with request 51 will be refused.


Thanks in advance!!!


This is a question for the users list, not the dev list.

Mark


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



[Tomcat Wiki] Update of "GettingStarted" by Jun Lu

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by Jun Lu:
http://wiki.apache.org/tomcat/GettingStarted

--
  
  == Getting your first webapp up and running ==
   * [http://tomcat.apache.org/tomcat-5.5-doc/appdev/index.html Introduction in 
the Application Developer Guide]
+  * [http://tomcat.jaxmao.org/appdev/index.html 应用开发人员指南] 
Chinese translation of the Application Developer Guide
  
  == Useful links ==
  

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



[Tomcat Wiki] Update of "FrontPage" by Jun Lu

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by Jun Lu:
http://wiki.apache.org/tomcat/FrontPage

--
   * '''["UsingPhp"]''' - Using PHP with Tomcat 4 or later.
   * '''["WhatIsComet"]''' - What is the Tomcat Comet API.
   * '''["6xFeatures"]''' - Feature list for 6.x release.
+  * '''["DocumentInOtherLanguages"]''' - List of Tomcat documents in other 
languages.
  
  
  The old Tomcat Wiki content can be found at TomcatProjectPages.

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



[Tomcat Wiki] Update of "DocumentInOtherLanguages" by Jun Lu

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by Jun Lu:
http://wiki.apache.org/tomcat/DocumentInOtherLanguages

New page:
Here is a list of Tomcat documents in other languages.

 * [http://tomcat.jaxmao.org/appdev/index.html Tomcat 5.5 中文应用手册] 
Chinese translation of Tomcat 5.5 document

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



[Tomcat Wiki] Update of "DocumentInOtherLanguages" by Jun Lu

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by Jun Lu:
http://wiki.apache.org/tomcat/DocumentInOtherLanguages

--
+ == Document in Other Languages ==
+ 
  Here is a list of Tomcat documents in other languages.
  
   * [http://tomcat.jaxmao.org/appdev/index.html Tomcat 5.5 中文应用手册] 
Chinese translation of Tomcat 5.5 document

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



[Tomcat Wiki] Update of "DocumentInOtherLanguages" by Jun Lu

2008-05-13 Thread Apache Wiki
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change 
notification.

The following page has been changed by Jun Lu:
http://wiki.apache.org/tomcat/DocumentInOtherLanguages

--
  
  Here is a list of Tomcat documents in other languages.
  
-  * [http://tomcat.jaxmao.org/appdev/index.html Tomcat 5.5 中文应用手册] 
Chinese translation of Tomcat 5.5 document
+  * [http://tomcat.jaxmao.org/ Tomcat 5.5 中文应用手册] Chinese 
translation of Tomcat 5.5 document
  

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



svn commit: r655992 - in /tomcat/trunk/bin: catalina.bat catalina.sh

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 13:13:22 2008
New Revision: 655992

URL: http://svn.apache.org/viewvc?rev=655992&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44988
Use Java 5 syntax to start debugger.
Patch provided by Cédrik Lime.

Modified:
tomcat/trunk/bin/catalina.bat
tomcat/trunk/bin/catalina.sh

Modified: tomcat/trunk/bin/catalina.bat
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=655992&r1=655991&r2=655992&view=diff
==
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Tue May 13 13:13:22 2008
@@ -149,7 +149,7 @@
 set JPDA_SUSPEND=n
 :gotJpdaSuspend
 if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
-set JPDA_OPTS=-Xdebug 
-Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+set 
JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
 :gotJpdaOpts
 shift
 :noJpda

Modified: tomcat/trunk/bin/catalina.sh
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.sh?rev=655992&r1=655991&r2=655992&view=diff
==
--- tomcat/trunk/bin/catalina.sh (original)
+++ tomcat/trunk/bin/catalina.sh Tue May 13 13:13:22 2008
@@ -210,7 +210,7 @@
 JPDA_SUSPEND="n"
   fi
   if [ -z "$JPDA_OPTS" ]; then
-JPDA_OPTS="-Xdebug 
-Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
+
JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
   fi
   CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
   shift



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



svn commit: r655993 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 13:15:19 2008
New Revision: 655993

URL: http://svn.apache.org/viewvc?rev=655993&view=rev
Log:
Propose patch for 44988

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=655993&r1=655992&r2=655993&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 13 13:15:19 2008
@@ -166,3 +166,10 @@
   http://svn.apache.org/viewvc?rev=654640&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44988
+  Use new Java 5 syntax for debugger options
+  Patch provided by Cédrik Lime
+  http://svn.apache.org/viewvc?rev=655992&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 44988] JPDA_OPTS in catalina.sh / catalina. bat is using old JDWP semantics

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44988





--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-13 13:15:33 PST ---
Thanks for the patch.

I have applied it to trunk and proposed it for 6.0.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r656018 - /tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 14:19:07 2008
New Revision: 656018

URL: http://svn.apache.org/viewvc?rev=656018&view=rev
Log:
Code clean-up. Remove unused code, parameters, etc.

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=656018&r1=656017&r2=656018&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Tue May 13 
14:19:07 2008
@@ -27,7 +27,6 @@
 import javax.el.ExpressionFactory;
 import javax.el.FunctionMapper;
 import javax.servlet.jsp.tagext.FunctionInfo;
-import javax.servlet.jsp.tagext.JspFragment;
 import javax.servlet.jsp.tagext.PageData;
 import javax.servlet.jsp.tagext.TagAttributeInfo;
 import javax.servlet.jsp.tagext.TagData;
@@ -543,8 +542,7 @@
 // request-time expression
 throwErrorIfExpression(n, "name", "jsp:param");
 n.setValue(getJspAttribute(null, "value", null, null, n
-.getAttributeValue("value"), java.lang.String.class, n,
-false));
+.getAttributeValue("value"), n, false));
 visitBody(n);
 }
 
@@ -561,16 +559,14 @@
 JspUtil.checkAttributes("Include action", n, includeActionAttrs,
 err);
 n.setPage(getJspAttribute(null, "page", null, null, n
-.getAttributeValue("page"), java.lang.String.class, n,
-false));
+.getAttributeValue("page"), n, false));
 visitBody(n);
-};
+}
 
 public void visit(Node.ForwardAction n) throws JasperException {
 JspUtil.checkAttributes("Forward", n, forwardActionAttrs, err);
 n.setPage(getJspAttribute(null, "page", null, null, n
-.getAttributeValue("page"), java.lang.String.class, n,
-false));
+.getAttributeValue("page"), n, false));
 visitBody(n);
 }
 
@@ -585,7 +581,7 @@
 String value = n.getAttributeValue("value");
 
 n.setValue(getJspAttribute(null, "value", null, null, value,
-java.lang.Object.class, n, false));
+n, false));
 
 boolean valueSpecified = n.getValue() != null;
 
@@ -620,8 +616,7 @@
 err.jspError(n, "jsp.error.usebean.noSession");
 
 Node.JspAttribute jattr = getJspAttribute(null, "beanName", null,
-null, n.getAttributeValue("beanName"),
-java.lang.String.class, n, false);
+null, n.getAttributeValue("beanName"), n, false);
 n.setBeanName(jattr);
 if (className != null && jattr != null)
 err.jspError(n, "jsp.error.usebean.notBoth");
@@ -658,13 +653,11 @@
 err.jspError(n, "jsp.error.plugin.nocode");
 
 Node.JspAttribute width = getJspAttribute(null, "width", null,
-null, n.getAttributeValue("width"), java.lang.String.class,
-n, false);
+null, n.getAttributeValue("width"), n, false);
 n.setWidth(width);
 
 Node.JspAttribute height = getJspAttribute(null, "height", null,
-null, n.getAttributeValue("height"),
-java.lang.String.class, n, false);
+null, n.getAttributeValue("height"), n, false);
 n.setHeight(height);
 
 visitBody(n);
@@ -739,8 +732,7 @@
 for (int i = 0; i < attrSize; i++) {
 jspAttrs[i] = getJspAttribute(null, attrs.getQName(i),
 attrs.getURI(i), attrs.getLocalName(i), attrs
-.getValue(i), java.lang.Object.class, n,
-false);
+.getValue(i), n, false);
 }
 n.setJspAttributes(jspAttrs);
 }
@@ -860,14 +852,12 @@
 if ("name".equals(attrs.getLocalName(i))) {
 n.setNameAttribute(getJspAttribute(null, attrs.getQName(i),
 attrs.getURI(i), attrs.getLocalName(i), attrs
-.getValue(i), java.lang.String.class, n,
-false));
+.getValue(i), n, false));
 } else {
 if (jspAttrIndex < jspAttrSize) {
 jspAttrs[jspAttrIndex++] = getJspAttribute(null, attrs
 .getQName(i), attrs.getURI(i), attrs
-.getLocalName(i), attrs.getValue(i),
-   

DO NOT REPLY [Bug 44992] New: Troubles with ApplicationContext. getResource and the WoodStox Parser

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44992

   Summary: Troubles with ApplicationContext.getResource and the
WoodStox Parser
   Product: Tomcat 5
   Version: 5.5.17
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: normal
  Priority: P2
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I am having problems with Tomcat, Glassfish and the Woodstox Parser.

When calling servletContext.getResource with a WSDL file name which is a
resource in the webapp, the following is returned 
jndi:/localhost/myWebApp/WEB-INF/wsdl/StockQuoteService.wsdl

I see that Tomcat has its own UrlStreamHandler, DirContextUrlStreamHandler.

Now Woodstox wants to create an URL on
jndi:/localhost/myWebApp/WEB-INF/wsdl/StockQuoteService.wsdl
I guess for validation.

The java.net.Url constructor code eventually calls parseUrl and fails with a
MalformedUrlException

DirContextURLStreamHandler did not override that method and the invocation went
up to URLStreamHandler which threw the MalformedUrlException.


I don't quite understand why this Custom UrlStreamHandler is used instead of
say a file:/// formatted URL


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 44992] Troubles with ApplicationContext. getResource and the WoodStox Parser

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44992


Doug Drechsel <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r656024 - /tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 14:40:59 2008
New Revision: 656024

URL: http://svn.apache.org/viewvc?rev=656024&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44986
Convert to upper case before comparing encoding names

Modified:
tomcat/trunk/java/org/apache/jasper/compiler/Validator.java

Modified: tomcat/trunk/java/org/apache/jasper/compiler/Validator.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/jasper/compiler/Validator.java?rev=656024&r1=656023&r2=656024&view=diff
==
--- tomcat/trunk/java/org/apache/jasper/compiler/Validator.java (original)
+++ tomcat/trunk/java/org/apache/jasper/compiler/Validator.java Tue May 13 
14:40:59 2008
@@ -322,11 +322,12 @@
  * 
  * @throws JasperException in case of page encoding mismatch
  */
-private String comparePageEncodings(String pageDirEnc,
+private String comparePageEncodings(String thePageDirEnc,
 Node.PageDirective pageDir) throws JasperException {
 
 Node.Root root = pageDir.getRoot();
-String configEnc = root.getJspConfigPageEncoding();
+String configEnc = root.getJspConfigPageEncoding().toUpperCase();
+String pageDirEnc = thePageDirEnc.toUpperCase();
 
 /*
  * Compare the 'pageEncoding' attribute of the page directive with
@@ -354,7 +355,7 @@
  * identical.
  */
 if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || 
root.isBomPresent()) {
-String pageEnc = root.getPageEncoding();
+String pageEnc = root.getPageEncoding().toUpperCase();
 if (!pageDirEnc.equals(pageEnc)
 && (!pageDirEnc.startsWith("UTF-16") || !pageEnc
 .startsWith("UTF-16"))) {



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



svn commit: r656025 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 14:44:07 2008
New Revision: 656025

URL: http://svn.apache.org/viewvc?rev=656025&view=rev
Log:
Propose fix for 44986

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=656025&r1=656024&r2=656025&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 13 14:44:07 2008
@@ -173,3 +173,9 @@
   http://svn.apache.org/viewvc?rev=655992&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44986
+  Page encoding consistency checks should be case insensitive
+  http://svn.apache.org/viewvc?rev=656024&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 44986] JSP compilation exception with pageEncoding="utf-8 " and file with byte order marks

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44986





--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-13 14:44:12 PST ---
Thanks for the report. This has been fixed in trunk with an alternative patch
that converts the encodings to upper case before comparison. The patch has been
proposed for 6.0.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



DO NOT REPLY [Bug 44992] Troubles with ApplicationContext. getResource and the WoodStox Parser

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44992


Mark Thomas <[EMAIL PROTECTED]> changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME




--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-13 15:15:23 PST ---
This works for me with the latest 6.0.x and 5.5.x

There may be an issue with both the parser and Tomcat calling
URL.setURLStreamHandlerFactory() although in that case I'd expect you to see an
error in the logs somewhere.

For the record parseUrl() has nothing to do with the exception you are seeing.
The exception is thrown by the constructor of java.net.URL (not java.net.Url)
when it can't find an appropriate protocol handler


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



svn commit: r656035 - in /tomcat/trunk/java/org/apache/tomcat/util/net/jsse: JSSESocketFactory.java res/LocalStrings.properties

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 15:32:17 2008
New Revision: 656035

URL: http://svn.apache.org/viewvc?rev=656035&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968
Provide more information when keystore load fails

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=656035&r1=656034&r2=656035&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Tue May 13 15:32:17 2008
@@ -321,13 +321,18 @@
 
 ks.load(istream, pass.toCharArray());
 } catch (FileNotFoundException fnfe) {
+log.error(sm.getString("jsse.keystore_load_failed", type, path,
+fnfe.getMessage()));
 throw fnfe;
 } catch (IOException ioe) {
+log.error(sm.getString("jsse.keystore_load_failed", type, path,
+ioe.getMessage()));
 throw ioe;  
 } catch(Exception ex) {
-log.error("Exception trying to load keystore " +path,ex);
-throw new IOException("Exception trying to load keystore " +
-  path + ": " + ex.getMessage() );
+String msg = sm.getString("jsse.keystore_load_failed", type, path,
+ex.getMessage());
+log.error(msg);
+throw new IOException(msg);
 } finally {
 if (istream != null) {
 try {

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties?rev=656035&r1=656034&r2=656035&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties 
Tue May 13 15:32:17 2008
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 jsse.alias_no_key_entry=Alias name {0} does not identify a key entry
+jsse.keystore_load_failed=Failed to load keystore type {0} with path {1} due 
to {2}



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



svn commit: r656036 - /tomcat/tc6.0.x/trunk/STATUS.txt

2008-05-13 Thread markt
Author: markt
Date: Tue May 13 15:33:42 2008
New Revision: 656036

URL: http://svn.apache.org/viewvc?rev=656036&view=rev
Log:
Propose fix for 44968

Modified:
tomcat/tc6.0.x/trunk/STATUS.txt

Modified: tomcat/tc6.0.x/trunk/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=656036&r1=656035&r2=656036&view=diff
==
--- tomcat/tc6.0.x/trunk/STATUS.txt (original)
+++ tomcat/tc6.0.x/trunk/STATUS.txt Tue May 13 15:33:42 2008
@@ -179,3 +179,9 @@
   http://svn.apache.org/viewvc?rev=656024&view=rev
   +1: markt
   -1: 
+
+* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968
+  Provide more information when keystore load fails
+  http://svn.apache.org/viewvc?rev=656035&view=rev
+  +1: markt
+  -1: 



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



DO NOT REPLY [Bug 44968] say in error message which keystore causes the problems

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44968





--- Comment #1 from Mark Thomas <[EMAIL PROTECTED]>  2008-05-13 15:34:16 PST ---
Service name and port are a little tricky. I have added type and path.

This has been committed to trunk and proposed for 6.0.x


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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



Re: svn commit: r656035 - in /tomcat/trunk/java/org/apache/tomcat/util/net/jsse: JSSESocketFactory.java res/LocalStrings.properties

2008-05-13 Thread Filip Hanik - Dev Lists

-1,

this code change here

-log.error("Exception trying to load keystore " +path,ex);
-throw new IOException("Exception trying to load keystore " +
-  path + ": " + ex.getMessage() );
+String msg = sm.getString("jsse.keystore_load_failed", type, path,
+ex.getMessage());
+log.error(msg);
+throw new IOException(msg);



loses the stack trace from the original error, and it is never logged either

Filip

[EMAIL PROTECTED] wrote:

Author: markt
Date: Tue May 13 15:32:17 2008
New Revision: 656035

URL: http://svn.apache.org/viewvc?rev=656035&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=44968
Provide more information when keystore load fails

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java

tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java?rev=656035&r1=656034&r2=656035&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java 
Tue May 13 15:32:17 2008
@@ -321,13 +321,18 @@
 
 ks.load(istream, pass.toCharArray());

 } catch (FileNotFoundException fnfe) {
+log.error(sm.getString("jsse.keystore_load_failed", type, path,
+fnfe.getMessage()));
 throw fnfe;
 } catch (IOException ioe) {
+log.error(sm.getString("jsse.keystore_load_failed", type, path,
+ioe.getMessage()));
 throw ioe;  
 } catch(Exception ex) {

-log.error("Exception trying to load keystore " +path,ex);
-throw new IOException("Exception trying to load keystore " +
-  path + ": " + ex.getMessage() );
+String msg = sm.getString("jsse.keystore_load_failed", type, path,
+ex.getMessage());
+log.error(msg);
+throw new IOException(msg);
 } finally {
 if (istream != null) {
 try {

Modified: 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties?rev=656035&r1=656034&r2=656035&view=diff
==
--- 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties 
(original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/res/LocalStrings.properties 
Tue May 13 15:32:17 2008
@@ -14,3 +14,4 @@
 # limitations under the License.
 
 jsse.alias_no_key_entry=Alias name {0} does not identify a key entry

+jsse.keystore_load_failed=Failed to load keystore type {0} with path {1} due 
to {2}



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



  



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



Tomcat stops invalidating sessions after session expiry.

2008-05-13 Thread pg1691

Tomcat Version 6.014 on Linux.

We have implemented HttpSessionListener in our application.  In that
listener we are doing some special code on sessionDestroyed(mainly closing
connection with oracle database). But after some time tomcat stops calling
that sessionDestroyed method of listener for all session.


When we look sessions in tomcat manager we can see couples of sessions are
expired (we have 30 minute session timeout). We are able to invalidate all
sessions except first expired session using tomcat manager. Even though we
try multiple time to invalidate first expired (problem session) it does not
invalidate. And due to that session tomcat stops invalidate other session
expired after that problem session.

Can you please guide me how to kill that problem session or fix tomcat such
that it invalidates all expired sessions.


Thanks for your help.

-- 
View this message in context: 
http://www.nabble.com/Tomcat-stops-invalidating-sessions-after-session-expiry.-tp17221836p17221836.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


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



svn commit: r656084 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java

2008-05-13 Thread fhanik
Author: fhanik
Date: Tue May 13 18:58:27 2008
New Revision: 656084

URL: http://svn.apache.org/viewvc?rev=656084&view=rev
Log:
save a few cpu cycles to avoid exceptions being thrown when a key is invalid

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=656084&r1=656083&r2=656084&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue 
May 13 18:58:27 2008
@@ -193,8 +193,7 @@
 protected class BlockPoller extends Thread {
 protected boolean run = true;
 protected Selector selector = null;
-protected ConcurrentLinkedQueue events =
-new ConcurrentLinkedQueue();
+protected ConcurrentLinkedQueue events = new 
ConcurrentLinkedQueue();
 public void disable() { run = false; selector.wakeup();}
 protected AtomicInteger wakeupCounter = new AtomicInteger(0);
 public void cancelKey(final NioChannel socket, final SelectionKey key) 
{
@@ -232,6 +231,8 @@
 try {
 if (sk == null) {
 sk = ch.register(selector, ops, key);
+} else if (!sk.isValid()) {
+   cancel(sk,key,ops);
 } else {
 sk.interestOps(sk.interestOps() | ops);
 }
@@ -260,12 +261,17 @@
 if 
(SelectionKey.OP_WRITE==(ops&SelectionKey.OP_WRITE)) 
countDown(key.getWriteLatch());
 if 
(SelectionKey.OP_READ==(ops&SelectionKey.OP_READ))countDown(key.getReadLatch());
 } else {
-sk.interestOps(sk.interestOps() & (~ops));
-if 
(SelectionKey.OP_WRITE==(ops&SelectionKey.OP_WRITE)) 
countDown(key.getWriteLatch());
-if 
(SelectionKey.OP_READ==(ops&SelectionKey.OP_READ))countDown(key.getReadLatch());
-if (sk.interestOps()==0) {
-sk.cancel();
-sk.attach(null);
+if (sk.isValid()) {
+   sk.interestOps(sk.interestOps() & (~ops));
+   if 
(SelectionKey.OP_WRITE==(ops&SelectionKey.OP_WRITE)) 
countDown(key.getWriteLatch());
+   if 
(SelectionKey.OP_READ==(ops&SelectionKey.OP_READ))countDown(key.getReadLatch());
+   if (sk.interestOps()==0) {
+   sk.cancel();
+   sk.attach(null);
+   }
+}else {
+   sk.cancel();
+   sk.attach(null);
 }
 }
 }catch (CancelledKeyException cx) {
@@ -321,8 +327,7 @@
 continue;
 }
 
-Iterator iterator =
-keyCount > 0 ? selector.selectedKeys().iterator() : 
null;
+Iterator iterator = keyCount > 0 ? 
selector.selectedKeys().iterator() : null;
 
 // Walk through the collection of ready keys and dispatch
 // any active event.



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



svn commit: r656089 - /tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java

2008-05-13 Thread fhanik
Author: fhanik
Date: Tue May 13 19:29:56 2008
New Revision: 656089

URL: http://svn.apache.org/viewvc?rev=656089&view=rev
Log:
tab police

Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java?rev=656089&r1=656088&r2=656089&view=diff
==
--- tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java 
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/NioBlockingSelector.java Tue 
May 13 19:29:56 2008
@@ -232,7 +232,7 @@
 if (sk == null) {
 sk = ch.register(selector, ops, key);
 } else if (!sk.isValid()) {
-   cancel(sk,key,ops);
+cancel(sk,key,ops);
 } else {
 sk.interestOps(sk.interestOps() | ops);
 }
@@ -266,12 +266,12 @@
if 
(SelectionKey.OP_WRITE==(ops&SelectionKey.OP_WRITE)) 
countDown(key.getWriteLatch());
if 
(SelectionKey.OP_READ==(ops&SelectionKey.OP_READ))countDown(key.getReadLatch());
if (sk.interestOps()==0) {
-   sk.cancel();
-   sk.attach(null);
+   sk.cancel();
+   sk.attach(null);
}
 }else {
-   sk.cancel();
-   sk.attach(null);
+sk.cancel();
+sk.attach(null);
 }
 }
 }catch (CancelledKeyException cx) {



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



Tomcat Truststore Reloading

2008-05-13 Thread Vegar Neshaug
Hi,

As far as I know, Tomcat does not support truststore reloading.This is
unpractical with an active truststore. Which class(es) would be suitable for
changing so as to implement truststore reloading?

Regards,

Vegar


DO NOT REPLY [Bug 44994] New: JSP EL condition expression fails when nested : ${a ? b ? x: y: z}

2008-05-13 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=44994

   Summary: JSP EL condition expression fails when nested: ${a ? b ?
x: y: z}
   Product: Tomcat 6
   Version: 6.0.16
  Platform: Sun
OS/Version: Solaris
Status: NEW
  Severity: normal
  Priority: P2
 Component: Jasper
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


A JSP Expression Language (EL) conditional expression cannot have another
conditional expression as its "true" expression.

The following fails:
  ${0 lt a ? 1 lt a ? "many": "one": "none"}

It throws the following exception (the 19th character is the second question
mark):
  org.apache.el.parser.ParseException: Encountered "?" at line 1, column 19.
  Was expecting one of:
"." ...
"[" ...
...
   
org.apache.el.parser.ELParser.generateParseException(ELParser.java:1890)
org.apache.el.parser.ELParser.jj_consume_token(ELParser.java:1770)
org.apache.el.parser.ELParser.Choice(ELParser.java:220)

The expression succeeds if brackets are added around the inner conditional
expression:
  ${0 lt a ? (1 lt a ? "many": "one"): "none"}

I assume the bug is in ELParser.jjt (in
apache-tomcat-6.0.16-src/java/org/apache/el/parser/). It uses Or(), instead of
Choice(), for the "true" expression.

WRONG:   Or() ( Or()  Choice() #Choice(3))*
RIGHT:   Or() ( Choice()  Choice() #Choice(3))*


Diff:
107c107
<   Or() ( Or()  Choice() #Choice(3))*
---
>   Or() ( Choice()  Choice() #Choice(3))*

This bug was not present in Tomcat 5.5.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug.

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