DO NOT REPLY [Bug 41578] New: - Avoid SimplePool.get/put synchronization in JspFactoryImpl

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41578

   Summary: Avoid SimplePool.get/put synchronization in
JspFactoryImpl
   Product: Tomcat 6
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P4
 Component: Jasper
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Only 1 instance of the JspFactory object (JspFactoryImpl) is created.
Consequently there is a single SimplePool of PageContext objects for all JSP
requests and so every JSP request must synchronize on the lock inside SimplePool
when getting and releasing a PageContext instance. Moreover, the pool has a
fixed capacity and after that, the code in JspFactoryImpl will first acquire the
lock to see if there are any free objects in the pool, failing which a new
PageContext object is created.

Instead of a single process-wide pool, a per thread pool of PageContext objects
can be used by JspFactoryImpl.

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

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



DO NOT REPLY [Bug 41578] - Avoid SimplePool.get/put synchronization in JspFactoryImpl

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41578





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 00:03 ---
Created an attachment (id=19556)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19556&action=view)
Use a per-thread pool of PageContext objects instead of a process-wide pool.

A version of SimplePool that didn't use locks would probably be more memory
efficient than using an ArrayList (for the thread-local pool).

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

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



DO NOT REPLY [Bug 41580] New: - Avoid invoking ByteChunk.getLength repeatedly in loops

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41580

   Summary: Avoid invoking ByteChunk.getLength repeatedly in loops
   Product: Tomcat 6
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P5
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


The NetBeans Profiler indicated that ByteChunk.getLength was being invoked many
thousands of time during a simple microbenchmark. Profiling a single request to
a simple hello.jsp showed that ByteChunk.getLength was being called 60 times.
Most of these came from for loops.

This can be avoided by simply using
int length = bc.getLength();
for (int i = 0; i < length; i++)
instead of
for (int i =0; i < bc.getLength(); i++)

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

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



DO NOT REPLY [Bug 41580] - Avoid invoking ByteChunk.getLength repeatedly in loops

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41580





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 02:00 ---
Created an attachment (id=19557)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19557&action=view)
Reduce ByteChunk.getLength invocations

After applying this patch, the number of ByteChunk.getLength invocations for a
single request to hello.jsp reduced from 60 to 12.

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

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



DO NOT REPLY [Bug 41538] - Unable to run Tomcat as a Windows service under JDK 1.6

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41538





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 02:14 ---
Some information on why this issue may occur on some systems...

The jakarta_service code uses a LOAD_WITH_ALTERED_SEARCH_PATH option when
loading jvm.dll (and all its dependent DLLs).
See the following link for details on what is done when the jvm.dll is loaded by
the jakarta_service code:
  Dynamic-Link Library Search Order, 
  http://msdn2.microsoft.com/en-us/library/ms682586.aspx

The behavior depends on:
- the OS version
- the registry value HKLM\System\CurrentControlSet\Control\Session
Manager\SafeDllSearchMode
- the content of the directory specified for jvm.dll, the current directory, the
system directory, the 16-bit system directory, the Windows directory, the
directories that are listed in the PATH environment variable. 

There are many ways it can go wrong ...
So I suggest that anyone encountering this issue, use the Filemon tool from:
http://www.microsoft.com/technet/sysinternals/FileAndDisk/Filemon.mspx
Launch it before starting the tomcat service, stopping capture after the service
start has failed then save the log and have a look at the log to guess which DLL
fails to load and if the search path used is correct.
I heavily suspect issues to come from DLL search path including bad versions of
some DLLs (and very likely JDK1.5 DLLs while trying to load JDK1.6 DLLs).


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

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



svn commit: r505241 - in /tomcat/tc6.0.x/trunk/bin: setclasspath.bat tool-wrapper.bat

2007-02-09 Thread jfclere
Author: jfclere
Date: Fri Feb  9 02:22:58 2007
New Revision: 505241

URL: http://svn.apache.org/viewvc?view=rev&rev=505241
Log:
Don add tools.jar if it doesn exist.

Modified:
tomcat/tc6.0.x/trunk/bin/setclasspath.bat
tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat

Modified: tomcat/tc6.0.x/trunk/bin/setclasspath.bat
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/setclasspath.bat?view=diff&rev=505241&r1=505240&r2=505241
==
--- tomcat/tc6.0.x/trunk/bin/setclasspath.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/setclasspath.bat Fri Feb  9 02:22:58 2007
@@ -51,7 +51,9 @@
 rem Set standard CLASSPATH
 rem Note that there are no quotes as we do not want to introduce random
 rem quotes into the CLASSPATH
+if not exist "%JAVA_HOME%\bin\tools.jar" goto noJavac
 set CLASSPATH=%JAVA_HOME%\lib\tools.jar
+:noJavac
 
 rem Set standard command for invoking Java.
 rem Note that NT requires a window name argument when using start.

Modified: tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat?view=diff&rev=505241&r1=505240&r2=505241
==
--- tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat (original)
+++ tomcat/tc6.0.x/trunk/bin/tool-wrapper.bat Fri Feb  9 02:22:58 2007
@@ -43,7 +43,12 @@
 call "%CATALINA_HOME%\bin\setclasspath.bat"
 
 rem Add on extra jar files to CLASSPATH
+if "%CLASSPATH%" == "" goto noclasspath
 set 
CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar
+goto :okclasspath
+:noclasspath
+set CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\lib\servlet-api.jar
+:okclasspath
 
 rem Get remaining unshifted command line arguments and save them in the
 set CMD_LINE_ARGS=



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



svn commit: r505244 - /tomcat/tc6.0.x/trunk/bin/setclasspath.sh

2007-02-09 Thread jfclere
Author: jfclere
Date: Fri Feb  9 02:33:43 2007
New Revision: 505244

URL: http://svn.apache.org/viewvc?view=rev&rev=505244
Log:
Don't add tools.jar if it is not existing.

Modified:
tomcat/tc6.0.x/trunk/bin/setclasspath.sh

Modified: tomcat/tc6.0.x/trunk/bin/setclasspath.sh
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/bin/setclasspath.sh?view=diff&rev=505244&r1=505243&r2=505244
==
--- tomcat/tc6.0.x/trunk/bin/setclasspath.sh (original)
+++ tomcat/tc6.0.x/trunk/bin/setclasspath.sh Fri Feb  9 02:33:43 2007
@@ -68,8 +68,17 @@
 JAVA_ENDORSED_DIRS="$BASEDIR"/endorsed
 
 # Set standard CLASSPATH
+if [ "$1" = "javac" ] ; then
+  if [ ! -f "$JAVA_HOME"/lib/tools.jar ]; then
+echo "Can't find tools.jar in JAVA_HOME"
+echo "Need a JDK to run javac"
+exit 1
+  fi
+fi
 if [ "$1" = "debug" -o "$1" = "javac" ] ; then
-  CLASSPATH="$JAVA_HOME"/lib/tools.jar
+  if [ -f "$JAVA_HOME"/lib/tools.jar ]; then
+CLASSPATH="$JAVA_HOME"/lib/tools.jar
+  fi
 fi
 
 # OSX hack to CLASSPATH



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



DO NOT REPLY [Bug 41581] New: - getServletContext() implementation is inefficient

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41581

   Summary: getServletContext() implementation is inefficient
   Product: Tomcat 6
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P4
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


This is StandardWrapperFacade's implementation of getServletContext()

public ServletContext getServletContext() {
ServletContext theContext = config.getServletContext();
if ((theContext != null) &&
(theContext instanceof ApplicationContext))
theContext = ((ApplicationContext) theContext).getFacade();
return (theContext);
}

Every JSP request ends up calling getServletContext() at least twice. JSP
compilation also calls getServletContext(). A servlet's context does not change.
StandardWrapperFacade can cache the context and need not recalculate it 
everytime.

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

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



DO NOT REPLY [Bug 41581] - getServletContext() implementation is inefficient

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41581





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 02:45 ---
Created an attachment (id=19558)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19558&action=view)
Cache the context object for use in StandardWrapperFacade.getServletContext()


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

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



DO NOT REPLY [Bug 41584] New: - Avoid invoking System.getSecurityManager repeatedly

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41584

   Summary: Avoid invoking System.getSecurityManager repeatedly
   Product: Tomcat 6
   Version: unspecified
  Platform: Other
OS/Version: other
Status: NEW
  Severity: enhancement
  Priority: P4
 Component: Catalina
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: [EMAIL PROTECTED]


Invoking System.getSecurityManager while processing requests affects performance
and should be avoided. The presence/absence of the Java SecurityManager can be
determined and cached during startup and this value can be used thereafter.

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

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



DO NOT REPLY [Bug 41584] - Avoid invoking System.getSecurityManager repeatedly

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41584





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 05:36 ---
Created an attachment (id=19562)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19562&action=view)
Patch that reduces System.getSecurityManager() invocations when processing
requests

I didn't want to introduce cross-package dependencies and so I defined the same
variable - IS_SECURITY_MANAGER_ENABLED - in multiple top-level Constants.java
files.

I wasn't too sure about changing WebappClassLoader.java,
SecurityClassLoad.java, SecurityConfig.java and so left those
getSecurityManager() calls unchanged.

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

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



DO NOT REPLY [Bug 41578] - Avoid SimplePool.get/put synchronization in JspFactoryImpl

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41578





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 07:23 ---
This does change the memory usage, so this needs more work and/or options (this
change would use far more memory, since it's per thread and not bounded, while
the current one uses a global limit of 100 page contexts).

About the other optimizations, they should be done by the JIT although it
doesn't hurt to help it a bit. I could maybe estimate the time I would spend
committing them would be equivalent to the total CPU time saved across all
Tomcat users over a year.

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

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



svn commit: r505344 - /tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

2007-02-09 Thread pero
Author: pero
Date: Fri Feb  9 08:13:21 2007
New Revision: 505344

URL: http://svn.apache.org/viewvc?view=rev&rev=505344
Log:
Hups, must close the buffer output before underlying stream. Sorry!

Modified:
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java

Modified: 
tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java?view=diff&rev=505344&r1=505343&r2=505344
==
--- tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
(original)
+++ tomcat/jasper/tc5.5.x/src/share/org/apache/jasper/compiler/JDTCompiler.java 
Fri Feb  9 08:13:21 2007
@@ -394,17 +394,17 @@
 } catch (IOException ioe) {
 log.error("Compilation error", ioe);
 } finally {
-if (fout != null)
+if (bos != null)
 try {
-fout.close();
+bos.close();
 } catch (IOException ignore) {
 }
-if (bos != null)
+if (fout != null)
 try {
-bos.close();
+fout.close();
 } catch (IOException ignore) {
 }
-}
+   }
 }
 }
 }



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



DO NOT REPLY [Bug 41577] - images under ssl fail to load

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41577





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 08:34 ---
I reproduced this on Tomcat 6.09 as well.

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

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



Re: FYI: jk 1.2.20 core on iSeries v5R3

2007-02-09 Thread Rainer Jung

Hi Henri,

do you have any information, if the crash problem for iSeries has been 
resolved by the format string fix? Anything else we need to do before 
1.2.21?


Regards,

Rainer

Henri Gomez wrote:

the problem on iSeries with the sprintf is very common since on this
64bits boxes integer and pointers are very different (32 bits int and
128 bits pointers).

The Apache 2 with modified mod_jk should be tested today so I could
tell you if the patches solve the problem.

Regards

2007/2/2, Eric Wertman <[EMAIL PROTECTED]>:

I did rebuild the sources as prefork,  it seems to have stopped the
problem.  I did also make those 2 corrections you pointed out earlier in
the thread.

Eric Wertman wrote:


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



DO NOT REPLY [Bug 30028] - session attributes Map may become inconsistent start causing "strange" problems

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30028


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |




--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 09:50 ---
Hi,

I'm reopening this bug, since i'm also having problems with this issue, and I
really think that someone could take a better look at this. I don't think the
bug is invalid.

I can see the problem happening when my application or tomcat itself tries to
invalidate a session, the problem happens in the method expire():

StandardWrapperValve[action]: Servlet.service() for servlet action threw 
exception
java.lang.ArrayIndexOutOfBoundsException: -6
at java.util.AbstractCollection.toArray(AbstractCollection.java:177)
at
org.apache.catalina.session.StandardSession.keys(StandardSession.java:1523)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:706)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:632)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1051)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:149)
at
br.com.digitro.supervisor.webapp.controller.actions.LogOutAction.execute(LogOutAction.java:31)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)


As you can see, this -6 is the result of a call to the size() method of
attributes.keySet().

Please, let's not use the spec as an excuse for not doing things the right way.
The spec clearly says that the developer has the responsibility for
synchronizing access to "session resources", but doesn't say anything about the
session itself.

The container can and should synchronize the access to the session attribute
map, it would avoid many strange problems. Another side effect of this problem
is that tomcat isn't even able to invalidate expired sessions in this situation.



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

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



DO NOT REPLY [Bug 30028] - session attributes Map may become inconsistent start causing "strange" problems

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=30028


[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




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

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



DO NOT REPLY [Bug 41577] - images under ssl fail to load

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41577





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 15:36 ---
The problem does not occur with Mozilla Firefox.  Additional note on ie6: the 
browser I performed the test with was set to default security and advanced 
options settings.

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

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



svn commit: r505593 - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/ catalina/connector/ catalina/core/ catalina/loader/ catalina/security/ catalina/session/ coyote/ coyote/http11/ jasper/ jasper

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 16:54:56 2007
New Revision: 505593

URL: http://svn.apache.org/viewvc?view=rev&rev=505593
Log:
- Set of minor optimizations.
- Unify usage of the security manager flag.
- Submitted by Arvind Srinivasan.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Constants.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Request.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/RequestFacade.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/ResponseFacade.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationContextFacade.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterChain.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterConfig.java

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationFilterFactory.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ContainerBase.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/loader/WebappLoader.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/security/SecurityUtil.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/ManagerBase.java
tomcat/tc6.0.x/trunk/java/org/apache/catalina/session/StandardSession.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/Constants.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/Http11Processor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/Constants.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JspRuntimeContext.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspRuntimeLibrary.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/security/SecurityUtil.java
tomcat/tc6.0.x/trunk/java/org/apache/naming/Constants.java

tomcat/tc6.0.x/trunk/java/org/apache/naming/resources/DirContextURLConnection.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java?view=diff&rev=505593&r1=505592&r2=505593
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/Globals.java Fri Feb  9 
16:54:56 2007
@@ -330,4 +330,11 @@
 
Boolean.valueOf(System.getProperty("org.apache.catalina.STRICT_SERVLET_COMPLIANCE",
 "false")).booleanValue();
 
 
+/**
+ * Has security been turned on?
+ */
+public static final boolean IS_SECURITY_ENABLED =
+(System.getSecurityManager() != null);
+
+
 }

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Constants.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Constants.java?view=diff&rev=505593&r1=505592&r2=505593
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Constants.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Constants.java Fri 
Feb  9 16:54:56 2007
@@ -39,11 +39,5 @@
 public static final int PROCESSOR_IDLE = 0;
 public static final int PROCESSOR_ACTIVE = 1;
 
-/**
- * Security flag.
- */
-public static final boolean SECURITY = 
-(System.getSecurityManager() != null);
-
 
 }

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java?view=diff&rev=505593&r1=505592&r2=505593
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/OutputBuffer.java 
Fri Feb  9 16:54:56 2007
@@ -27,6 +27,7 @@
 
 import org.apache.coyote.ActionCode;
 import org.apache.coyote.Response;
+import org.apache.catalina.Globals;
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.buf.C2BConverter;
 
@@ -499,7 +500,7 @@
 conv = (C2BConverter) encoders.get(enc);
 if (conv == null) {
 
-if (System.getSecurityManager() != null){
+if (Globals.IS_SECURITY_ENABLED){
 try{
 conv = (C2BConverter)AccessController.doPrivileged(
 new PrivilegedExceptionAction(){

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/c

DO NOT REPLY [Bug 41577] - images under ssl fail to load

2007-02-09 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41577





--- Additional Comments From [EMAIL PROTECTED]  2007-02-09 15:58 ---
This could be the (old) IE cache bug over SSL.

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

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



svn commit: r505604 - in /tomcat/tc6.0.x/trunk/java/org/apache: catalina/connector/ coyote/ajp/ coyote/http11/ jk/common/ tomcat/util/http/

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 17:32:10 2007
New Revision: 505604

URL: http://svn.apache.org/viewvc?view=rev&rev=505604
Log:
- Set of minor optimizations.
- Use getLength() less often.
- Submitted by Arvind Srinivasan.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java

tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java

tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalOutputBuffer.java
tomcat/tc6.0.x/trunk/java/org/apache/jk/common/MsgAjp.java
tomcat/tc6.0.x/trunk/java/org/apache/tomcat/util/http/Parameters.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?view=diff&rev=505604&r1=505603&r2=505604
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 
Fri Feb  9 17:32:10 2007
@@ -505,8 +505,9 @@
 throws Exception {
 
 ByteChunk bc = uri.getByteChunk();
+int length = bc.getLength();
 CharChunk cc = uri.getCharChunk();
-cc.allocate(bc.getLength(), -1);
+cc.allocate(length, -1);
 
 String enc = connector.getURIEncoding();
 if (enc != null) {
@@ -540,10 +541,10 @@
 byte[] bbuf = bc.getBuffer();
 char[] cbuf = cc.getBuffer();
 int start = bc.getStart();
-for (int i = 0; i < bc.getLength(); i++) {
+for (int i = 0; i < length; i++) {
 cbuf[i] = (char) (bbuf[i + start] & 0xff);
 }
-uri.setChars(cbuf, 0, bc.getLength());
+uri.setChars(cbuf, 0, length);
 
 }
 
@@ -559,16 +560,17 @@
 
 ByteChunk bc = mb.getByteChunk();
 CharChunk cc = mb.getCharChunk();
-cc.allocate(bc.getLength(), -1);
+int length = bc.getLength();
+cc.allocate(length, -1);
 
 // Default encoding: fast conversion
 byte[] bbuf = bc.getBuffer();
 char[] cbuf = cc.getBuffer();
 int start = bc.getStart();
-for (int i = 0; i < bc.getLength(); i++) {
+for (int i = 0; i < length; i++) {
 cbuf[i] = (char) (bbuf[i + start] & 0xff);
 }
-mb.setChars(cbuf, 0, bc.getLength());
+mb.setChars(cbuf, 0, length);
 
 }
 

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java?view=diff&rev=505604&r1=505603&r2=505604
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpAprProcessor.java Fri 
Feb  9 17:32:10 2007
@@ -598,8 +598,9 @@
 
 // Set the given bytes as the content
 ByteChunk bc = (ByteChunk) param;
-bodyBytes.setBytes(bc.getBytes(), bc.getStart(), bc.getLength());
-request.setContentLength(bc.getLength());
+int length = bc.getLength();
+bodyBytes.setBytes(bc.getBytes(), bc.getStart(), length);
+request.setContentLength(length);
 first = false;
 empty = false;
 replay = true;

Modified: tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java?view=diff&rev=505604&r1=505603&r2=505604
==
--- tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/coyote/ajp/AjpProcessor.java Fri Feb  
9 17:32:10 2007
@@ -586,8 +586,9 @@
 
 // Set the given bytes as the content
 ByteChunk bc = (ByteChunk) param;
-bodyBytes.setBytes(bc.getBytes(), bc.getStart(), bc.getLength());
-request.setContentLength(bc.getLength());
+int length = bc.getLength();
+bodyBytes.setBytes(bc.getBytes(), bc.getStart(), length);
+request.setContentLength(length);
 first = false;
 empty = false;
 replay = true;

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/coyote/http11/InternalAprOutputBuffer.java?view=diff&rev=505604&r1=505603&r2=505604
===

svn commit: r505610 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 17:53:06 2007
New Revision: 505610

URL: http://svn.apache.org/viewvc?view=rev&rev=505610
Log:
- Indent (sorry, the class was too hard to work with).

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java?view=diff&rev=505610&r1=505609&r2=505610
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java Fri 
Feb  9 17:53:06 2007
@@ -46,56 +46,50 @@
 private static final String SPEC_VERSION = "2.1";
 private static final boolean USE_POOL = 
 
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL",
 "true")).booleanValue();
+private static final boolean THREAD_LOCAL_POOL = 
+
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.THREAD_LOCAL_POOL",
 "true")).booleanValue();
 
 private SimplePool pool = new SimplePool( 100 );
-
-public PageContext getPageContext(Servlet servlet,
- ServletRequest request,
-  ServletResponse response,
-  String errorPageURL,
-  boolean needsSession,
- int bufferSize,
-  boolean autoflush) {
-
-   if( Constants.IS_SECURITY_ENABLED ) {
-   PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
-   (JspFactoryImpl)this, servlet, request, response, errorPageURL,
-needsSession, bufferSize, autoflush);
-   return (PageContext)AccessController.doPrivileged(dp);
-   } else {
-   return internalGetPageContext(servlet, request, response,
- errorPageURL, needsSession,
- bufferSize, autoflush);
-   }
+
+public PageContext getPageContext(Servlet servlet, ServletRequest request,
+ServletResponse response, String errorPageURL, boolean 
needsSession,
+int bufferSize, boolean autoflush) {
+
+if( Constants.IS_SECURITY_ENABLED ) {
+PrivilegedGetPageContext dp = new PrivilegedGetPageContext(
+(JspFactoryImpl)this, servlet, request, response, 
errorPageURL,
+needsSession, bufferSize, autoflush);
+return (PageContext)AccessController.doPrivileged(dp);
+} else {
+return internalGetPageContext(servlet, request, response,
+errorPageURL, needsSession,
+bufferSize, autoflush);
+}
 }
 
 public void releasePageContext(PageContext pc) {
-   if( pc == null )
-   return;
+if( pc == null )
+return;
 if( Constants.IS_SECURITY_ENABLED ) {
 PrivilegedReleasePageContext dp = new PrivilegedReleasePageContext(
-(JspFactoryImpl)this,pc);
+(JspFactoryImpl)this,pc);
 AccessController.doPrivileged(dp);
 } else {
 internalReleasePageContext(pc);
-   }
+}
 }
 
 public JspEngineInfo getEngineInfo() {
 return new JspEngineInfo() {
-   public String getSpecificationVersion() {
-   return SPEC_VERSION;
-   }
-   };
+public String getSpecificationVersion() {
+return SPEC_VERSION;
+}
+};
 }
 
-private PageContext internalGetPageContext(Servlet servlet,
-  ServletRequest request,
-  ServletResponse response, 
-  String errorPageURL, 
-  boolean needsSession,
-  int bufferSize, 
-  boolean autoflush) {
+private PageContext internalGetPageContext(Servlet servlet, ServletRequest 
request,
+ServletResponse response, String errorPageURL, boolean 
needsSession,
+int bufferSize, boolean autoflush) {
 try {
 PageContext pc;
 if( USE_POOL ) {
@@ -118,69 +112,59 @@
 
 private void internalReleasePageContext(PageContext pc) {
 pc.release();
-   if (USE_POOL && (pc instanceof PageContextImpl)) {
-   pool.put( pc );
-   }
+if (USE_POOL && (pc instanceof PageContextImpl)) {
+pool.put( pc );
+}
 }
 
 private class PrivilegedGetPageContext imple

svn commit: r505616 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 18:18:19 2007
New Revision: 505616

URL: http://svn.apache.org/viewvc?view=rev&rev=505616
Log:
- Missing from patch.

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java?view=diff&rev=505616&r1=505615&r2=505616
==
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/connector/Response.java Fri 
Feb  9 18:18:19 2007
@@ -268,7 +268,7 @@
 
 cookies.clear();
 
-if (Constants.SECURITY || Connector.RECYCLE_FACADES) {
+if (Globals.IS_SECURITY_ENABLED || Connector.RECYCLE_FACADES) {
 if (facade != null) {
 facade.clear();
 facade = null;



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



svn commit: r505617 - /tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 18:19:57 2007
New Revision: 505617

URL: http://svn.apache.org/viewvc?view=rev&rev=505617
Log:
- As suggested in 41578, experiment with a thread local pool, but in a simpler 
way (and with an upper bound).

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java?view=diff&rev=505617&r1=505616&r2=505617
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/runtime/JspFactoryImpl.java Fri 
Feb  9 18:19:57 2007
@@ -46,10 +46,10 @@
 private static final String SPEC_VERSION = "2.1";
 private static final boolean USE_POOL = 
 
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.USE_POOL",
 "true")).booleanValue();
-private static final boolean THREAD_LOCAL_POOL = 
-
Boolean.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.THREAD_LOCAL_POOL",
 "true")).booleanValue();
+private static final int POOL_SIZE = 
+
Integer.valueOf(System.getProperty("org.apache.jasper.runtime.JspFactoryImpl.POOL_SIZE",
 "8")).intValue();
 
-private SimplePool pool = new SimplePool( 100 );
+private ThreadLocal localPool = new 
ThreadLocal();
 
 public PageContext getPageContext(Servlet servlet, ServletRequest request,
 ServletResponse response, String errorPageURL, boolean 
needsSession,
@@ -92,9 +92,14 @@
 int bufferSize, boolean autoflush) {
 try {
 PageContext pc;
-if( USE_POOL ) {
-pc = (PageContext) pool.get();
-if( pc == null ) {
+if (USE_POOL) {
+PageContextPool pool = localPool.get();
+if (pool == null) {
+pool = new PageContextPool();
+localPool.set(pool);
+}
+pc = pool.get();
+if (pc == null) {
 pc = new PageContextImpl();
 }
 } else {
@@ -113,7 +118,7 @@
 private void internalReleasePageContext(PageContext pc) {
 pc.release();
 if (USE_POOL && (pc instanceof PageContextImpl)) {
-pool.put( pc );
+localPool.get().put(pc);
 }
 }
 
@@ -162,6 +167,34 @@
 factory.internalReleasePageContext(pageContext);
 return null;
 }
+}
+
+protected final class PageContextPool  {
+
+private PageContext[] pool;
+
+private int current = -1;
+
+public PageContextPool() {
+this.pool = new PageContext[POOL_SIZE];
+}
+
+public void put(PageContext o) {
+if (current < (POOL_SIZE - 1)) {
+current++;
+pool[current] = o;
+}
+}
+
+public PageContext get() {
+PageContext item = null;
+if (current >= 0) {
+item = pool[current];
+current--;
+}
+return item;
+}
+
 }
 
 public JspApplicationContext getJspApplicationContext(ServletContext 
context) {



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



svn commit: r505618 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java

2007-02-09 Thread remm
Author: remm
Date: Fri Feb  9 18:30:04 2007
New Revision: 505618

URL: http://svn.apache.org/viewvc?view=rev&rev=505618
Log:
- Set of minor optimizations.
- getServletContext is used often.
- Submitted by Arvind Srinivasan.

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java?view=diff&rev=505618&r1=505617&r2=505618
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapperFacade.java 
Fri Feb  9 18:30:04 2007
@@ -59,6 +59,12 @@
 private ServletConfig config = null;
 
 
+/**
+ * Wrapped context (facade).
+ */
+private ServletContext context = null;
+
+
 // -- ServletConfig Methods
 
 
@@ -68,11 +74,12 @@
 
 
 public ServletContext getServletContext() {
-ServletContext theContext = config.getServletContext();
-if ((theContext != null) &&
-(theContext instanceof ApplicationContext))
-theContext = ((ApplicationContext) theContext).getFacade();
-return (theContext);
+if (context == null) {
+context = config.getServletContext();
+if ((context != null) && (context instanceof ApplicationContext))
+context = ((ApplicationContext) context).getFacade();
+}
+return (context);
 }
 
 



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



Unable to build jasper-compiler.jar for Tomcat 5.5

2007-02-09 Thread M Coffee
Could someone point me to directions on how to build jasper-compiler.jar?

This is the first time I've tried to build Tomcat, and while the build for 
Tomcat appeared to go
well (there are many jars, but there were errors in getting eclipse files from
http://sunsite.informatik.rwth-aachen.de/eclipse/downloads/ so that part of the 
build failed),
there was no build for the jasper-compiler.jar.  I would like to build j-c.jar 
to add extra
debugging information to DefaultErrorHandler.java.

I got the source distribution for Tomcat 5.5.12, because that is the version we 
are running. 
There is source for jasper-compiler.jar, but no jasper-compiler.jar.  When I 
try to run the ant
build in the Jasper2 directory, following the BUILDING.txt instructions in that 
directory, it
doesn't work with the following errors:

--
E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2>ant -v jsp20el.dist
Apache Ant version 1.7.0 compiled on December 13 2006
Buildfile: build.xml
Detected Java version: 1.5 in: C:\Program Files\Java\jdk1.5.0_04\jre
Detected OS: Windows 2000
parsing buildfile E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\buil
d.xml with URI = file:/E:/apache-tomcat-5.5.12-src/jakarta-tomcat-jasper/jasper2
/build.xml
Project base dir set to: E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jaspe
r2
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apach
e/tools/ant/antlib.xml. It could not be found.
 [property] Loading C:\Documents and Settings\Administrator.CITRIX_RAID\build.pr
operties
 [property] Unable to find property file: C:\Documents and Settings\Administrato
r.CITRIX_RAID\build.properties
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\bu
ild.properties
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2\bu
ild.properties.sample
Override ignored for property "catalina.home"
 [property] Loading E:\apache-tomcat-5.5.12-src\jakarta-tomcat-5\build\build.pro
perties
 [property] Unable to find property file: E:\apache-tomcat-5.5.12-src\jakarta-to
mcat-5\build\build.properties
Override ignored for property "catalina.home"
Property "api.home" has not been set
Property "api.home" has not been set
Property "jasper-compiler-jdt.jar" has not been set
Property "xerces.jar" has not been set
Property "xercesImpl.jar" has not been set
Property "xml-apis.jar" has not been set
Property "commons-el.jar" has not been set
Property "commons-collections.jar" has not been set
Property "commons-logging.jar" has not been set
Property "commons-daemon-launcher.jar" has not been set
Property "junit.jar" has not been set
Property "xerces.jar" has not been set
Property "xercesImpl.jar" has not been set
Property "xml-apis.jar" has not been set
Property "commons-collections.jar" has not been set
Property "commons-launcher.jar" has not been set

BUILD FAILED
Target "jsp20el.dist" does not exist in the project "Jasper2".
at org.apache.tools.ant.Project.tsort(Project.java:1821)
at org.apache.tools.ant.Project.topoSort(Project.java:1729)
at org.apache.tools.ant.Project.topoSort(Project.java:1692)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExe
cutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 2 seconds
E:\apache-tomcat-5.5.12-src\jakarta-tomcat-jasper\jasper2>
---

I'm using ant 1.7.0 and jdk 1.5.

Most of those jars exist, but I expected one of the build scripts to set them.  
Do they need to be
explicitly set in the jasper build.properties file?

Hope someone can help,

M Coffee



 

Never Miss an Email
Stay connected with Yahoo! Mail on your mobile.  Get started!
http://mobile.yahoo.com/services?promote=mail

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