DO NOT REPLY [Bug 16759] - ISAPI_REDIRECTOR Handles %2F improperly

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16759

ISAPI_REDIRECTOR Handles %2F improperly

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-02-08 01:33 ---
Fixed again, it seems the good one.. :)

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java

2003-02-07 Thread luehe
luehe   2003/02/07 16:59:32

  Modified:jasper2/src/share/org/apache/jasper/runtime
PageContextImpl.java
  Log:
  Cleanup:
  - Removed unnecessary class casts
  - Added localizable error code for attempt to access session scope in page that
does not participate in any session
  
  Revision  ChangesPath
  1.41  +170 -192  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- PageContextImpl.java  4 Feb 2003 23:38:46 -   1.40
  +++ PageContextImpl.java  8 Feb 2003 00:59:31 -   1.41
  @@ -111,60 +111,92 @@
* @author Hans Bergsten
* @author Pierre Delisle
* @author Mark Roth
  + * @author Jan Luehe
*/
   public class PageContextImpl extends PageContext implements VariableResolver {
   
   // Logger
   private static Log log = LogFactory.getLog(PageContextImpl.class);
   
  -/**
  - * The expression evaluator, for evaluating EL expressions.
  - */
  -private static ExpressionEvaluatorImpl expressionEvaluator
  +// The expression evaluator, for evaluating EL expressions.
  +private static ExpressionEvaluatorImpl elExprEval
= new ExpressionEvaluatorImpl();
   
  -/**
  - * The variable resolver, for evaluating EL expressions.
  - */
  -private VariableResolverImpl variableResolver
  - = new VariableResolverImpl(this);
  +// The variable resolver, for evaluating EL expressions.
  +private VariableResolverImpl variableResolver;
   
  -PageContextImpl(JspFactory factory) {
  -this.factory = factory;
  -}
  +private BodyContentImpl[] outs;
  +private int depth;
   
  -public void initialize(Servlet servlet, ServletRequest request,
  -   ServletResponse response, String errorPageURL,
  -   boolean needsSession, int bufferSize,
  -   boolean autoFlush)
  -throws IOException, IllegalStateException, IllegalArgumentException
  -{
  - _initialize(servlet, request, response, errorPageURL, needsSession, 
bufferSize, autoFlush);
  -}
  +// per-servlet state
  +private Servlet servlet;
  +private ServletConfig config;
  +private ServletContext context;
  +private JspFactory factory;
  +private boolean needsSession;
  +private String errorPageURL;
  +private boolean autoFlush;
  +private int  bufferSize;
  +
  +// page-scope attributes
  +private transient Hashtable  attributes;
  +
  +// per-request state
  +private transient ServletRequest request;
  +private transient ServletResponse response;
  +private transient Object page;
  +private transient HttpSession session;
  +private boolean isIncluded;
   
  -private void _initialize(Servlet servlet, ServletRequest request,
  -   ServletResponse response, String errorPageURL,
  -   boolean needsSession, int bufferSize,
  -   boolean autoFlush)
  -throws IOException, IllegalStateException, IllegalArgumentException
  -{
  +// initial output stream
  +private transient JspWriter out;
  +private transient JspWriterImpl baseOut;
   
  - // initialize state
  +/*
  + * Constructor.
  + */
  +PageContextImpl(JspFactory factory) {
  +this.factory = factory;
  + this.variableResolver = new VariableResolverImpl(this);
  + this.outs = new BodyContentImpl[0];
  + this.attributes = new Hashtable(16);
  + this.depth = -1;
  +}
  +
  +public void initialize(Servlet servlet,
  +ServletRequest request,
  +   ServletResponse response,
  +String errorPageURL,
  +   boolean needsSession,
  +int bufferSize,
  +   boolean autoFlush) throws IOException {
  +
  + _initialize(servlet, request, response, errorPageURL, needsSession,
  + bufferSize, autoFlush);
  +}
  +
  +private void _initialize(Servlet servlet,
  +  ServletRequest request,
  +  ServletResponse response,
  +  String errorPageURL,
  +  boolean needsSession,
  +  int bufferSize,
  +  boolean autoFlush) throws IOException {
   
  - this.servlet  = servlet;
  - this.config   = servlet.getServletConfig();
  - this.context  = config.getServletContext();
  + // initialize state
  + this

DO NOT REPLY [Bug 16778] - jsp:include doesn't work in tag file

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16778

jsp:include doesn't work in tag file

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime JspRuntimeLibrary.java

2003-02-07 Thread luehe
luehe   2003/02/07 16:07:32

  Modified:jasper2/src/share/org/apache/jasper/runtime
JspRuntimeLibrary.java
  Log:
  Fixed 16778: jsp:include doesn't work in tag file
  
  Revision  ChangesPath
  1.16  +6 -5  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java
  
  Index: JspRuntimeLibrary.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/JspRuntimeLibrary.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspRuntimeLibrary.java22 Jan 2003 20:08:25 -  1.15
  +++ JspRuntimeLibrary.java8 Feb 2003 00:07:32 -   1.16
  @@ -71,6 +71,7 @@
   import javax.servlet.RequestDispatcher;
   import javax.servlet.ServletException;
   import javax.servlet.ServletRequest;
  +import javax.servlet.ServletResponse;
   import javax.servlet.ServletContext;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
  @@ -946,8 +947,8 @@
* @exception IOException if thrown by the included servlet
* @exception ServletException if thrown by the included servlet
*/
  -public static void include(HttpServletRequest request,
  -   HttpServletResponse response,
  +public static void include(ServletRequest request,
  +   ServletResponse response,
  String relativePath,
  Writer out,
  boolean flush)
  
  
  

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties

2003-02-07 Thread kinman
kinman  2003/02/07 16:06:41

  Modified:jasper2/src/share/org/apache/jasper Constants.java
   jasper2/src/share/org/apache/jasper/compiler Generator.java
JspReader.java JspUtil.java Parser.java
Validator.java
   jasper2/src/share/org/apache/jasper/resources
messages.properties
  Log:
  - Implement \$ escape sequence in template text and attributes.
  - Rewrite template text parser.
  - Fix some minor bugs.
  Note: \$ escape sequence in JSP document (XML syntax) not implemented yet.
  
  Revision  ChangesPath
  1.13  +7 -0  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java
  
  Index: Constants.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Constants.java22 Jan 2003 21:13:50 -  1.12
  +++ Constants.java8 Feb 2003 00:06:40 -   1.13
  @@ -224,5 +224,12 @@
*/
   public static final String TEMP_VARIABLE_NAME_PREFIX =
   "_jspx_temp";
  +
  +/**
  + * A replacement char for "\$".
  + * XXX This is a hack to avoid changing EL interpreter to recognize "\$"
  + */
  +public static final char ESC='\u001b';
  +public static final String ESCStr="'\\u001b'";
   }
   
  
  
  
  1.161 +15 -4 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java
  
  Index: Generator.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v
  retrieving revision 1.160
  retrieving revision 1.161
  diff -u -r1.160 -r1.161
  --- Generator.java5 Feb 2003 23:39:20 -   1.160
  +++ Generator.java8 Feb 2003 00:06:40 -   1.161
  @@ -786,9 +786,14 @@
   
   if (attr.isExpression() || attr.isELInterpreterInput()) {
if (attr.isELInterpreterInput()) {
  + boolean replaceESC = v.indexOf(Constants.ESC) > 0;
v = JspUtil.interpreterCall(this.isTagFile,
  - attr.getValue(), expectedType, defaultPrefix,
  + v, expectedType, defaultPrefix,
"_jspx_fnmap", false );
  + // XXX ESC replacement hack
  + if (replaceESC) {
  + v = "(" + v + ").replace(" + Constants.ESCStr + ", '$')";
  + }
}
if (encode) {
return "java.net.URLEncoder.encode(\"\" + " + v + ")";
  @@ -2507,8 +2512,14 @@
}
} else if (attr.isELInterpreterInput()) {
   // run attrValue through the expression interpreter
  + boolean replaceESC = attrValue.indexOf(Constants.ESC) > 0;
   attrValue = JspUtil.interpreterCall(this.isTagFile,
attrValue, c[0], n.getPrefix(), "_jspx_fnmap", false );
  + // XXX hack: Replace ESC with '$'
  + if (replaceESC) {
  + attrValue = "(" + attrValue + ").replace(" +
  + Constants.ESCStr + ", '$')";
  + }
   } else {
attrValue = convertString(
   c[0], attrValue, localName,
  
  
  
  1.16  +9 -35 
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java
  
  Index: JspReader.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspReader.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JspReader.java3 Feb 2003 23:11:58 -   1.15
  +++ JspReader.java8 Feb 2003 00:06:40 -   1.16
  @@ -172,41 +172,12 @@
   }
   
   /**
  - * Gets Content until the next potential JSP element.  Because all elements
  - * begin with a '<' we can just move until we see the next one.
  + * Back up the current cursor by one char, assumes current.cursor > 0,
  + * and that the char to be pushed back is not '\n'.
*/
  -String nextContent() {
  -int cur_cursor = current.cursor;
  - int len = current.stream.length;
  - char ch;
  -
  - if (peekChar() == '\n') {
  - current.line++;
  - current.col = 0;
  - }
  - else current.col++;
  - 
  - // pure obsfuscated genius!
  -while ((++current.cursor < len) && 
  - ((ch = current.stream[current.cursor]) != '<')) {
  -
  - if (ch == '$') {
  - // XXX Make this backward compatible with JSP1.2.
  - if ((current.cursor+1 < len) &&
  -  

DO NOT REPLY [Bug 14200] - TLDs under WEB-INF are not scanned for URI mappings

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=14200

TLDs under WEB-INF are not scanned for URI mappings

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 23:34 ---
I did port the changes back to TC 4.1, but they were not picked up by TC 4.1.18.
They have been picked up by TC 4.1.19, though.

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




cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common HandlerRequest.java

2003-02-07 Thread remm
remm2003/02/07 15:18:44

  Modified:jk/java/org/apache/jk/common HandlerRequest.java
  Log:
  - There is a problem with therad with attributes when Tomcat is used in process
(as the threads used aren't created by Tomcat, it causes class casts).
  
  Revision  ChangesPath
  1.24  +15 -6 
jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java
  
  Index: HandlerRequest.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/HandlerRequest.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- HandlerRequest.java   28 Jan 2003 05:42:24 -  1.23
  +++ HandlerRequest.java   7 Feb 2003 23:18:44 -   1.24
  @@ -330,7 +330,10 @@
   throws IOException
   {
   int type=msg.getByte();
  -ThreadWithAttributes twa=(ThreadWithAttributes)Thread.currentThread();
  +ThreadWithAttributes twa = null;
  +if (Thread.currentThread() instanceof ThreadWithAttributes) {
  +twa = (ThreadWithAttributes) Thread.currentThread();
  +}
   Object control=ep.getControl();
   
   MessageBytes tmpMB=(MessageBytes)ep.getNote( tmpBufNote );
  @@ -344,11 +347,15 @@
   switch( type ) {
   case JK_AJP13_FORWARD_REQUEST:
   try {
  -twa.setCurrentStage(control, "JkDecode");
  +if (twa != null) {
  +twa.setCurrentStage(control, "JkDecode");
  +}
   decodeRequest( msg, ep, tmpMB );
  -twa.setCurrentStage(control, "JkService");
  -twa.setParam(control,
  -((Request)ep.getRequest()).unparsedURI().toString());
  +if (twa != null) {
  +twa.setCurrentStage(control, "JkService");
  +twa.setParam(control,
  + ((Request)ep.getRequest()).unparsedURI());
  +}
   } catch( Exception ex ) {
   log.error( "Error decoding request ", ex );
   msg.dump( "Incomming message");
  @@ -366,7 +373,9 @@
 next.getClass().getName());
   
   int err= next.invoke( msg, ep );
  -twa.setCurrentStage(control, "JkDone");
  +if (twa != null) {
  +twa.setCurrentStage(control, "JkDone");
  +}
   
   if( log.isDebugEnabled() )
   log.debug( "Invoke returned " + err );
  
  
  

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




DO NOT REPLY [Bug 16224] - Unable to use page scope in action

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16224

Unable to use page scope in   action

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 22:42 ---
Kevin,

what you are seeing is the expected behaviour.

Notice that a tag file has its own JspContext called a JSP Context
Wrapper, which is separate from the JSP context of the invoking page
(called the Invoking JSP Context).

Acording to JSP.8.3 ("Semantics of Tag Files") in JSP 2.0 PFD2, for
each invocation of the tag, the JSP Context Wrapper must present a
clean page scope containing no initial elements. All scopes other than
the page scope must be identical to those in the Invoking JSP Context
and must be modified accordingly when updates are made to those scopes
in the JSP Context Wrapper. Any modifications to the page scope,
however, must not affect the Invoking JSP Context.

If you want the scoped variable named "desc" to be available in the
Invoking JSP context after the tag invocation, you need to either provide a
'scope' attribute with value "request", "session", or "application" to
the  action in your tag file (as you did), or add this
variable declaration to your tag file:

  <%@ variable name-given='desc' scope="AT_END" %>

in which case variable synchronization as described in JSP.8.9.1 will
take place.

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties

2003-02-07 Thread luehe
luehe   2003/02/07 12:16:18

  Modified:jasper2/src/share/org/apache/jasper/compiler
JspDocumentParser.java
   jasper2/src/share/org/apache/jasper/resources
messages.properties
  Log:
  Added translation error for invalid standard actions in XML syntax
  (translation error is already being thrown in standard syntax)
  
  Revision  ChangesPath
  1.37  +129 -111  
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java
  
  Index: JspDocumentParser.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- JspDocumentParser.java1 Feb 2003 02:41:13 -   1.36
  +++ JspDocumentParser.java7 Feb 2003 20:16:18 -   1.37
  @@ -221,9 +221,6 @@
   
Mark start = new Mark(path, locator.getLineNumber(),
  locator.getColumnNumber());
  - Attributes attrsCopy = null;
  -
  - Node node = null;
   
// XXX - As of JSP 2.0, xmlns: can appear in any node (not just
// ).  The spec still needs clarification here.
  @@ -231,6 +228,7 @@
// is valid from that point forward.  Redefinitions cause an
// error.  This isn't quite consistent with how xmlns: normally
// works.
  + Attributes attrsCopy = null;
try {
attrsCopy = addCustomTagLibraries(attrs);
} catch (JasperException je) {
  @@ -239,108 +237,12 @@
locator, je );
}
   
  - if (qName.equals(JSP_ROOT)) {
  -// give the  element the original attributes set
  -// (attrs) instead of the copy without the xmlns: elements 
  -// (attrsCopy)
  - node = new Node.JspRoot(new AttributesImpl(attrs), start, current);
  - if (isTop) {
  - pageInfo.setHasJspRoot(true);
  - }
  - } else if (qName.equals(JSP_PAGE_DIRECTIVE)) {
  - if (isTagFile) {
  - throw new SAXParseException(
  - Localizer.getMessage("jsp.error.action.istagfile", qName),
  - locator);
  - }
  - node = new Node.PageDirective(attrsCopy, start, current);
  - String imports = attrs.getValue("import");
  - // There can only be one 'import' attribute per page directive
  - if (imports != null) {
  - ((Node.PageDirective) node).addImport(imports);
  - }
  - } else if (qName.equals(JSP_INCLUDE_DIRECTIVE)) {
  - node = new Node.IncludeDirective(attrsCopy, start, current);
  - processIncludeDirective(attrsCopy.getValue("file"), node);
  - } else if (qName.equals(JSP_DECLARATION)) {
  - node = new Node.Declaration(start, current);
  - } else if (qName.equals(JSP_SCRIPTLET)) {
  - node = new Node.Scriptlet(start, current);
  - } else if (qName.equals(JSP_EXPRESSION)) {
  - node = new Node.Expression(start, current);
  - } else if (qName.equals(JSP_USE_BEAN)) {
  - node = new Node.UseBean(attrsCopy, start, current);
  - } else if (qName.equals(JSP_SET_PROPERTY)) {
  - node = new Node.SetProperty(attrsCopy, start, current);
  - } else if (qName.equals(JSP_GET_PROPERTY)) {
  - node = new Node.GetProperty(attrsCopy, start, current);
  - } else if (qName.equals(JSP_INCLUDE)) {
  - node = new Node.IncludeAction(attrsCopy, start, current);
  - } else if (qName.equals(JSP_FORWARD)) {
  - node = new Node.ForwardAction(attrsCopy, start, current);
  - } else if (qName.equals(JSP_PARAM)) {
  - node = new Node.ParamAction(attrsCopy, start, current);
  - } else if (qName.equals(JSP_PARAMS)) {
  - node = new Node.ParamsAction(start, current);
  - } else if (qName.equals(JSP_PLUGIN)) {
  - node = new Node.PlugIn(attrsCopy, start, current);
  - } else if (qName.equals(JSP_TEXT)) {
  - node = new Node.JspText(start, current);
  - } else if (qName.equals(JSP_BODY)) {
  - node = new Node.JspBody(start, current);
  - } else if (qName.equals(JSP_ATTRIBUTE)) {
  - node = new Node.NamedAttribute(attrsCopy, start, current);
  - } else if (qName.equals(JSP_OUTPUT)) {
  - node = new Node.JspOutput(attrsCopy, start, current);
  - } else if (qName.equals(JSP_TAG_DIRECTIVE)) {
  - if (!isTagFile) {
  - throw new SAXParseException(
  - Localizer.getMessage("jsp.error.action.isnottagfile",
  -  qName),
  - locator);
  - }
  - node = new Node.TagDirective(attrsCopy, start, current);
  - String imports = attrs.getValue("import");
  - // There can only be one 'import' attribute per

DO NOT REPLY [Bug 3815] - JspServlets produces NullPointerException

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=3815

JspServlets produces NullPointerException





--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 20:11 ---
Created an attachment (id=4776)
JspServlet concurrency patch.

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




DO NOT REPLY [Bug 3815] - JspServlets produces NullPointerException

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=3815

JspServlets produces NullPointerException

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 20:04 ---
During some load testing I have done, I have observed a similar exception.
I'm not sure that this bug has anything to do with errors in user code,
otherwise we would see user code in the stack trace, no ?

More likely, this is related to bug 14077 "JSP class corruption when compiling
page on SMP server", as I have encountered this problem on an SMP system.

My environment included

   Tomcat 4.0.4 
   Sun E420R with 4 CPUs
   Solaris 2.8

After doing some investigation of JspServlet.java, there are some very
clear race conditions that can happen which cause all sorts of funky
exceptions including the NPE originally filed, when Tomcat is loaded down 
heavily with multiple requests. 

I have created a patch that has eliminated the problem entirely for me.

What it tries to do is prevent a single JSP from being loaded concurrently
from multiple threads. Besides fixing this immediate problem, It also
appears to alleviate the Jasper MT problems in bug 14077. 

I can now run Tomcat and heavily load it down with requests, touch all
the JSPs to force them to recompile, and no errors occur.

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




DO NOT REPLY [Bug 16449] - Race condition when compiling jsp pages

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16449

Race condition when compiling jsp pages





--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 19:39 ---

I noticed this bug had a few votes now and was wondering if there was any 
chance that the patch would be applied.  If not, please close the bug so I know 
not to wait for the patch in the next release.

thanks,

John

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




cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Compiler.java

2003-02-07 Thread luehe
luehe   2003/02/07 11:19:26

  Modified:jasper2/src/share/org/apache/jasper/compiler Compiler.java
  Log:
  fixed cause of NPE in JspDocumentParser
  
  Revision  ChangesPath
  1.50  +17 -15
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.49
  retrieving revision 1.50
  diff -u -r1.49 -r1.50
  --- Compiler.java 30 Jan 2003 20:13:56 -  1.49
  +++ Compiler.java 7 Feb 2003 19:19:25 -   1.50
  @@ -199,24 +199,26 @@
JspConfig jspConfig = options.getJspConfig();
JspConfig.JspProperty jspProperty =
jspConfig.findJspProperty(ctxt.getJspFile());
  - if (jspProperty != null) {
  - // If the current uri is matched by a pattern specified in
  - // a jsp-property-group in web.xml, initialize pageInfo with
  - // those properties.
  - if (jspProperty.isXml() != null) {
  - pageInfo.setIsXmlSpecified(true);
  - }
  - if (jspProperty.isELIgnored() != null) {
  - pageInfo.setELIgnoredSpecified(true);
  - }
  - pageInfo.setIsXml(JspUtil.booleanValue(jspProperty.isXml()));
  - pageInfo.setPageEncoding(jspProperty.getPageEncoding());
  - pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));
  - 
pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
  +
  + // If the current uri is matched by a pattern specified in
  + // a jsp-property-group in web.xml, initialize pageInfo with
  + // those properties.
  + if (jspProperty.isXml() != null) {
  + pageInfo.setIsXmlSpecified(true);
  + }
  + if (jspProperty.isELIgnored() != null) {
  + pageInfo.setELIgnoredSpecified(true);
  + }
  + pageInfo.setIsXml(JspUtil.booleanValue(jspProperty.isXml()));
  + pageInfo.setPageEncoding(jspProperty.getPageEncoding());
  + pageInfo.setELIgnored(JspUtil.booleanValue(jspProperty.isELIgnored()));
  + 
pageInfo.setScriptingInvalid(JspUtil.booleanValue(jspProperty.isScriptingInvalid()));
  + if (jspProperty.getIncludePrelude() != null) {
pageInfo.setIncludePrelude(jspProperty.getIncludePrelude());
  + }
  + if (jspProperty.getIncludeCoda() != null) {
pageInfo.setIncludeCoda(jspProperty.getIncludeCoda());
}
  -
   String javaFileName = ctxt.getServletJavaFileName();
   
   // Setup the ServletWriter
  
  
  

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




DO NOT REPLY [Bug 16285] - Japser (JSPC) can't generate appropriate package structure

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16285

Japser (JSPC) can't generate appropriate package structure





--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 19:05 ---
Created an attachment (id=4775)
Generate correct package name

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




MOD_JK2 Connector possibly corrupting javascript files (mod_jk2-2.0.43.dll)

2003-02-07 Thread Andrew Milkowski
Dear participants of this list.

My environment is:

OS  : Windows XP
Web Server  : Apache 2.0.43
Tomcat  : 4.1.18
Connector   : mod_jk2 (mod_jk2-2.0.43.dll)

I have deployed a sample application, that includes some dhtml javascript
(HM_ScriptDOM.js)
for simplicity I placed this file in the example context

when accessing this javascript by not going thru the connector:
http://127.0.0.1:8080/examples/HM_ScriptDOM.js
behavior is as expected, no corruption occurs and some simple error is
thrown due to undefined variables

However hitting the same uri via a connector:
http://127.0.0.1/examples/HM_ScriptDOM.js seemes to be corrupting
this javascript file

Wonder if this is an environmental error, or indeed a serious defect

Attaching all relevant files that might help diagnose problem, wonder if any
of you came across this problem

for space reasons I couldnt attach HM_ScriptDOM.js, but that readily can be
obtained from
http://helikon.muze.nl/cgi-bin/cvsweb/ariadne/www/widgets/menu/HM_ScriptDOM.
js?sortby=author

regards



#
# Based upon the NCSA server configuration files originally by Rob McCool.
#
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs-2.0/> for detailed information about
# the directives.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# The configuration directives are grouped into three basic sections:
#  1. Directives that control the operation of the Apache server process as a
# whole (the 'global environment').
#  2. Directives that define the parameters of the 'main' or 'default' server,
# which responds to requests that aren't handled by a virtual host.
# These directives also provide default values for the settings
# of all virtual hosts.
#  3. Settings for virtual hosts, which allow Web requests to be sent to
# different IP addresses or hostnames and have them handled by the
# same Apache server process.
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
# with ServerRoot set to "C:/Apache/Apache2" will be interpreted by the
# server as "C:/Apache/Apache2/logs/foo.log".
#
# NOTE: Where filenames are specified, you must use forward slashes
# instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
# If a drive letter is omitted, the drive on which Apache.exe is located
# will be used by default.  It is recommended that you always supply
# an explicit drive letter in absolute paths, however, to avoid
# confusion.
#

### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the LockFile documentation (available
# at http://httpd.apache.org/docs-2.0/mod/mpm_common.html#lockfile>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "C:/Apache/Apache2"

#
# ScoreBoardFile: File used to store internal server process information.
# If unspecified (the default), the scoreboard will be stored in an
# anonymous shared memory segment, and will be unavailable to third-party
# applications.
# If specified, ensure that no two invocations of Apache share the same
# scoreboard file. The scoreboard file MUST BE STORED ON A LOCAL DISK.
#
#ScoreBoardFile logs/apache_runtime_status

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
#
PidFile logs/httpd.pid

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
## 

# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxRequestsPerChild: maximum  number of requests a serve

DO NOT REPLY [Bug 15077] - NPE when reloading servlets in org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:686)

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=15077

NPE when reloading servlets in  
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:686)

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 15:19 ---
Hi

I have tried the Apache Tomcat/4.1.18-LE-jdk14 and the problem is still 
happening. I have applied the patch I suggested you in my previous comment and 
the reloading is working fine.

regards


2003-02-07 15:59:37 KIX Executive:  DESTROY
2003-02-07 15:59:38 KIX Executive:  DESTROY
2003-02-07 15:59:38 WebappLoader[/primer]: Deploying class repositories to work 
directory C:\Program Files\Apache Group\Tomcat 4.1.18
\work\Standalone\localhost\primer
2003-02-07 15:59:38 WebappLoader[/primer]: Deploy class files /WEB-INF/classes 
to C:\IWK\KIX\KIX\WEB-INF\classes
2003-02-07 15:59:38 WebappLoader[/primer]: Deploy JAR /WEB-INF/lib/percobol.jar 
to C:\IWK\KIX\KIX\WEB-INF\lib\percobol.jar
2003-02-07 15:59:38 WebappLoader[/primer]: Reloading checks are enabled for 
this Context
2003-02-07 15:59:38 StandardWrapper[/primer:default]: Chargement du conteneur 
(container) de servlet default
2003-02-07 15:59:38 StandardWrapper[/primer:invoker]: Chargement du conteneur 
(container) de servlet invoker
2003-02-07 15:59:38 StandardManager[/primer]: Alimentation de la classe du 
générateur de nombre aléatoire java.security.SecureRandom
2003-02-07 15:59:38 StandardManager[/primer]: L'alimentation du générateur de 
nombre aléatoire est terminé
2003-02-07 15:59:38 StandardContext[/primer]: Le rechargement de ce contexte 
est terminé
2003-02-07 16:00:37 KIX Executive:  INIT
2003-02-07 16:00:37 KIX Executive: MAPSET :WEB-INF\maps
2003-02-07 16:00:37 KIX Executive: VSAM_HOME :C:/tmp/database
2003-02-07 16:00:38 KIX Executive:  INIT
2003-02-07 16:00:39 KIX Executive: ID 100D70A3D4C1122B6C63C584AAE528FA, new: 
true
2003-02-07 16:00:39 KIX Executive: Created: Fri Feb 07 16:00:38 CET 2003
2003-02-07 16:00:39 KIX Executive: Last Accessed: Fri Feb 07 16:00:38 CET 2003
2003-02-07 16:00:39 KIX Executive: TRANSID :null
2003-02-07 16:00:39 KIX Executive: AID :ENTER
2003-02-07 16:00:39 KIX Executive: COMMAND :menu
2003-02-07 16:00:39 KIX Executive: PROGRAM : INVMENU
2003-02-07 16:00:39 ApplicationDispatcher[/primer] Exception d'allocation pour 
la servlet INVMENU Kixlet
java.lang.NullPointerException
at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:686)
at org.apache.catalina.core.ApplicationDispatcher.invoke
(ApplicationDispatcher.java:653)
at org.apache.catalina.core.ApplicationDispatcher.doForward
(ApplicationDispatcher.java:432)
at org.apache.catalina.core.ApplicationDispatcher.forward
(ApplicationDispatcher.java:356)
at com.pac.kixlet.KIXExecutive.doPost(KIXExecutive.java:306)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2407)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:64

DO NOT REPLY [Bug 16878] New: - Exception while using (TYPE_SCROLL_INSENSITIVE) ResultSet in Tomcat 4.0

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16878

Exception while using (TYPE_SCROLL_INSENSITIVE) ResultSet in Tomcat 4.0

   Summary: Exception while using (TYPE_SCROLL_INSENSITIVE)
ResultSet in Tomcat 4.0
   Product: Tomcat 4
   Version: 4.0.3 Final
  Platform: Other
OS/Version: Windows NT/2K
Status: UNCONFIRMED
  Severity: Major
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


My program
   Test.java
  1. public static void main(String[] args) throws Exception
  2. {
  3.  Class.forname("sun.jdbc.odbc.JdbcOdbcDriver");
  4.  Connection con=DriverManager.getConnection("jdbc:odbc:test","sa","");
 5.Statement st=con.createStatement
(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
   System.out.println("Success");
 }
With jre 1.4.0_01, in the DOS prompt, this program stoppig at 
line :5.  
With jre 1.4.1._01
I am executing this program successfully in the DOS prompt. But not in 
the Tomcat 4.0.
 
This is detailed description of error:   
With jre 1.4.0_01 

An unexpected exception has been detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D366658
Function=[Unknown.]
Library=(N/A)

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(JdbcOdbc.java:4676)
at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr
(JdbcOdbcResultSet.java:4473)
at sun.jdbc.odbc.JdbcOdbcResultSet.initialize
(JdbcOdbcResultSet.java:171)
at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet
(JdbcOdbcStatement.java:423)
- locked <02AD8108> (a sun.jdbc.odbc.JdbcOdbcStatement)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery
(JdbcOdbcStatement.java:253)
at Test.getCount(Test.java:28)
at org.apache.jsp.test$jsp._jspService(test$jsp.java:60)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.CertificatesValve.invoke
(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
at org.apache.catalina.core.Standar

DO NOT REPLY [Bug 16877] New: - Null pointer exception when misspelling attribute name in server.xml .

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16877

Null pointer exception when misspelling attribute name in server.xml .

   Summary: Null pointer exception when misspelling attribute name
in server.xml .
   Product: Tomcat 4
   Version: 4.1.18
  Platform: All
OS/Version: Other
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Catalina:Modules
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


If you write 'path' e.g. as 'Path'  in Context in server.xml.
I.e. 



DO NOT REPLY [Bug 16874] - Same session for two different clients as a result of a lack in synchronization during recycling sessions

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16874

Same session for two different clients as a result of a lack in synchronization during 
recycling sessions

[EMAIL PROTECTED] changed:

   What|Removed |Added

Summary|Same session of two |Same session for two
   |different clients as a  |different clients as a
   |result of a lack in |result of a lack in
   |synchronization during  |synchronization during
   |recycling sessions  |recycling sessions

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




Re: Need review -- WIN32 procrun

2003-02-07 Thread jean-frederic clere
Mladen Turk wrote:



-Original Message-
From: jean-frederic clere 

Sorry I have missed my explainations:
The InitClass/StartupClass/Shutdown/DestroyClass should be 
methods of one class 
that provide the service.
Init must return after finishing (blocking).
Startup that is more complicated in the Daemon it returns and 
the threads are 
created inside the Startup method. But if we call a main it 
will not return... Shutdown must return. Destroy ... Well 
should also return and block.



Do we don't need to call both start classes, or just InitClass or
StartupClass.


I think we need just one class and that class needs an Init and a Startup method.



The problem is if we call the blocking first, that has to be in the
separate thread,


Why? - has a service to be unblocking ?
I have ReportManager(SERVICE_START_PENDING) in my service code to prevent the 
"service control manager" deciding the service is not working.

so you don't know when that class has actually done it's initialization.

But if we call only one of them inside the service, then we can in that
case skip
signaling when the init class finishes if it creates some threads and
then returns.

The class calling method doedn't need to be main. It can be any void
method with String[] arguments.




Basically do we need to call that (InitClass and StartupClass) from 
separate threads.

2. What do you mean by changing the user after the call to 

InitClass?

The idea is to make sure that a Web application is runned on 
non-privileged user 
(like httpd). The idea is that the OS should prevent 
"critical" file beeing 
modified or read in a Web application.




OK, but that's applicable only if the TC is started withouth JVM (--Java
java).


Of course ;-)


We'll also need to create the user account for that like IUSR_HOSTNAME
so that the service
can run as LocalSystem, and redirected TC as that user.
That restricted user account has to be created during TC installation,
and behave like the account
that launches IIS process.

MT.


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




DO NOT REPLY [Bug 16874] New: - Same session of two different clients as a result of a lack in synchronization during recycling sessions

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16874

Same session of two different clients as a result of a lack in synchronization during 
recycling sessions

   Summary: Same session of two different clients as a result of a
lack in synchronization during recycling sessions
   Product: Tomcat 4
   Version: 4.1.18
  Platform: Other
OS/Version: Other
Status: NEW
  Severity: Critical
  Priority: Other
 Component: Catalina
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


The expire(boolean notify) method of StandardSession is not safely synchronized.

public void expire(boolean notify) {

// Mark this session as "being expired" if needed
if (expiring)
return;
expiring = true;

...

expiring = false;

}

In my opinion, it is possible that the expire() method can call twice. As a
result of that, the same session object will be added in the recycled list twice.
So the generateSession() of the ManagerBase will get the same session object
twice. As the result the same session will be shared by different clients!

So it were nice, if somebody with more background can review the source files
and comment this issue.

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




RE: Need review -- WIN32 procrun

2003-02-07 Thread Mladen Turk


> -Original Message-
> From: jean-frederic clere 
> 
> Sorry I have missed my explainations:
> The InitClass/StartupClass/Shutdown/DestroyClass should be 
> methods of one class 
> that provide the service.
> Init must return after finishing (blocking).
> Startup that is more complicated in the Daemon it returns and 
> the threads are 
> created inside the Startup method. But if we call a main it 
> will not return... Shutdown must return. Destroy ... Well 
> should also return and block.
> 

Do we don't need to call both start classes, or just InitClass or
StartupClass.

The problem is if we call the blocking first, that has to be in the
separate thread,
so you don't know when that class has actually done it's initialization.

But if we call only one of them inside the service, then we can in that
case skip
signaling when the init class finishes if it creates some threads and
then returns.

The class calling method doedn't need to be main. It can be any void
method with String[] arguments.


> > Basically do we need to call that (InitClass and StartupClass) from 
> > separate threads.
> > 
> > 2. What do you mean by changing the user after the call to 
> InitClass?
> 
> The idea is to make sure that a Web application is runned on 
> non-privileged user 
> (like httpd). The idea is that the OS should prevent 
> "critical" file beeing 
> modified or read in a Web application.
> 


OK, but that's applicable only if the TC is started withouth JVM (--Java
java).
We'll also need to create the user account for that like IUSR_HOSTNAME
so that the service
can run as LocalSystem, and redirected TC as that user.
That restricted user account has to be created during TC installation,
and behave like the account
that launches IIS process.

MT.


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




Re: Need review -- WIN32 procrun

2003-02-07 Thread Remy Maucherat
jean-frederic clere wrote:

Mladen Turk wrote:




-Original Message-
From: jean-frederic clere


It has:
--StartupClass -> called when hit Service start. --ShutdownClass -> 
called when you hit Stop service...


The idea is the following:
--InitClass -> called when starting
Change user to a non-privileged user (like nobody/nodoby I have seen 
something like that in cygwin so that must also exist in win32 API). 
--StartupClass  -> really start the service. --ShutdownClass -> 
shutdown the service (something like a suspend). --DestroyClass  -> 
cleanup.



Couple of questions:

1. Is the InitClass present during entire service life cycle, or it
returns after the call?



Sorry I have missed my explainations:
The InitClass/StartupClass/Shutdown/DestroyClass should be methods of 
one class that provide the service.
Init must return after finishing (blocking).
Startup that is more complicated in the Daemon it returns and the 
threads are created inside the Startup method. But if we call a main it 
will not return...
Shutdown must return.
Destroy ... Well should also return and block.

I think there's a small misunderstanding. I don't plan to use procrun at 
the moment for Tomcat 4.1. I'll start with Tomcat 5, where there's only 
the Bootstrap class (no BootstrapService), which, I might add, may very 
well go away, replaced by some fancy JMX loader.
Anyway, for now, to use the service mode in TC 5, you have to use 
different command line parameters ("startd" and "stopd").

We can backport procrun to TC 4.1 later.

Basically do we need to call that (InitClass and StartupClass) from
separate threads.

2. What do you mean by changing the user after the call to InitClass?



The idea is to make sure that a Web application is runned on 
non-privileged user (like httpd). The idea is that the OS should prevent 
"critical" file beeing modified or read in a Web application.

I really doubt you can do that. Maybe Cygwin is using some custom code 
there.

Remy


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



Re: Need review -- WIN32 procrun

2003-02-07 Thread jean-frederic clere
Mladen Turk wrote:



-Original Message-
From: jean-frederic clere 

It has:
--StartupClass -> called when hit Service start. --ShutdownClass -> 
called when you hit Stop service...

The idea is the following:
--InitClass -> called when starting
Change user to a non-privileged user (like nobody/nodoby I 
have seen something 
like that in cygwin so that must also exist in win32 API). 
--StartupClass  -> really start the service. --ShutdownClass 
-> shutdown the service (something like a suspend). 
--DestroyClass  -> cleanup.



Couple of questions:

1. Is the InitClass present during entire service life cycle, or it
returns after the call?


Sorry I have missed my explainations:
The InitClass/StartupClass/Shutdown/DestroyClass should be methods of one class 
that provide the service.
Init must return after finishing (blocking).
Startup that is more complicated in the Daemon it returns and the threads are 
created inside the Startup method. But if we call a main it will not return...
Shutdown must return.
Destroy ... Well should also return and block.

Basically do we need to call that (InitClass and StartupClass) from
separate threads.

2. What do you mean by changing the user after the call to InitClass?


The idea is to make sure that a Web application is runned on non-privileged user 
(like httpd). The idea is that the OS should prevent "critical" file beeing 
modified or read in a Web application.


3. Can those classes follow the class;method[;params] priciple?


Sure. But probably one class is enough.



MT.






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




Bug reports for tomcat4.0.5

2003-02-07 Thread chenk
Hi,

I am doing research on the bug reports in Bugzilla.

Would someone like to tell me that why I can't find the bug reports for tomcat 
4.0.5 in bugzilla report system for Apache? If it is possible, where can I 
find them?

Thanks,

Kai



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




DO NOT REPLY [Bug 16680] - Internal Server Error on HttpSession.setAttribute()

2003-02-07 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://nagoya.apache.org/bugzilla/show_bug.cgi?id=16680

Internal Server Error on HttpSession.setAttribute()





--- Additional Comments From [EMAIL PROTECTED]  2003-02-07 09:07 ---
The only time when the major version number is changed is when there's a new
version of the Servlet API.
BTW, Tomcat 4.1 can work with the old HTTP/1.1 connector Tomcat 4.0 was using.
It could be used for your testing purposes.

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




Re: [TOMCAT 4.1.18] StandardSession.setId() found incohesive

2003-02-07 Thread Remy Maucherat
jean-frederic clere wrote:

Daniel Rall wrote:


Developers, I'd like your input on why setId() has the side effects
that it does, and your suggestions on what solution I should implement
which would be acceptable to both Tomcat 4 and 5, and cleanly usable
by myself.  The issue I filed includes the Valve implementation which
excercises the setId() method, and hacks around its side effects.



TRACKING ISSUE: http://issues.apache.org/bugzilla/show_bug.cgi?id=16822


OBSERVED BEHAVIOR: ManagerBase.createSession() calls
StandardSession.setId() as the last thing it does before returning a
newly created session.



In Tomcat5 I have added a createEmptySession() that should solve the 
problem.

It's a question of timing. Since I've allowed Glenn's API changes for 
the deployer in 4.1.19, then it's probably ok to backport your fix now, 
as we're not trying to stabilize in preparation for a new stable release 
(yet).

Remy


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



Re: [TOMCAT 4.1.18] StandardSession.setId() found incohesive

2003-02-07 Thread jean-frederic clere
Daniel Rall wrote:

Developers, I'd like your input on why setId() has the side effects
that it does, and your suggestions on what solution I should implement
which would be acceptable to both Tomcat 4 and 5, and cleanly usable
by myself.  The issue I filed includes the Valve implementation which
excercises the setId() method, and hacks around its side effects.



TRACKING ISSUE: http://issues.apache.org/bugzilla/show_bug.cgi?id=16822


OBSERVED BEHAVIOR: ManagerBase.createSession() calls
StandardSession.setId() as the last thing it does before returning a
newly created session.


In Tomcat5 I have added a createEmptySession() that should solve the problem.


 StandardSession.setId() exhibits the
undocumented side effect of firing a session creation event, iterating
over all HttpSessionListeners registered with the current web context
and notifying them of its "creation":

public void setId(String id) {

if ((this.id != null) && (manager != null))
manager.remove(this);

this.id = id;

if (manager != null)
manager.add(this);

// Notify interested session event listeners
fireSessionEvent(Session.SESSION_CREATED_EVENT, null);

// Notify interested application event listeners
Context context = (Context) manager.getContainer();
Object listeners[] = context.getApplicationListeners();
if (listeners != null) {
HttpSessionEvent event =
new HttpSessionEvent(getSession());
for (int i = 0; i < listeners.length; i++) {
if (!(listeners[i] instanceof HttpSessionListener))
continue;
HttpSessionListener listener =
(HttpSessionListener) listeners[i];
try {
fireContainerEvent(context,
   "beforeSessionCreated",
   listener);
listener.sessionCreated(event);
fireContainerEvent(context,
   "afterSessionCreated",
   listener);
} catch (Throwable t) {
try {
fireContainerEvent(context,
   "afterSessionCreated",
   listener);
} catch (Exception e) {
;
}
// FIXME - should we do anything besides log these?
log(sm.getString("standardSession.sessionEvent"), t);
}
}
}

}

A second call to setId() will again fire a session creation event for
the existing session.  Here's some trace from making a single request
when calling setId() explicitly:

2003-02-03 17:46:43,113 [Ajp13Processor[17025][4]] INFO  default - Adding
session org.apache.catalina.session.StandardSessionFacade@4977e2 with id of
2EA4840C7D4D6C7F3FF76F1F95C575D5
2003-02-03 17:46:43,175 [Ajp13Processor[17025][4]] INFO  default - Adding
session org.apache.catalina.session.StandardSessionFacade@4977e2 with id of
C6C908E127E6230CC81AE70E10D914A4

My web application's list of active sessions (stored as a Map of
StandardSessionFacade objects keyed by session ID) will look as
follows:

Session creation event fired as ManagerBase sets the initial ID by
calling StandardSession.setId() during its createSession() method
  |
  |
  v
.__.
| Key  | Value |
`--'
| ID A | Facade A --> Session A (ID A) |
`--'
  |
  |
Second session creation event fired as SessionIdValve resets the ID,
calling setId() for a second time (this time explicitly).
  |
  |
  v
.__.
| Key  | Value |
`--'
| ID A | Facade A --> Session A (ID A) |
| ID B | Facade A --> Session A (ID B) |
`--'

The entry keyed by session ID A will not be removed from our list of
active sessions when Session A expires, as the session now has an ID
of B.


USE CASE: When creating a new session, I must set the session
identifier (or manipulate it after the initial generation from a
Valve) using request-specific inputs.

Specifically, I must re-use any session identifier supplied by the
client via its JSESSIONID cookie if that session identifier is not
already in use.  Because the Servlet API dictates that the session
cookie is always named JSESSIONID, this is a must have for support of
wildcard cookie domains across hosts which share a common base domain
name.

For instance, if I have host1.domain.com and host2.domain.com, and set
the cookie domain of sessions cookie to the wildcard ".d

Re: Need review -- WIN32 procrun

2003-02-07 Thread jean-frederic clere
Mladen Turk wrote:



-Original Message-
From: jean-frederic clere 
[mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 06, 2003 6:48 PM
To: Tomcat Developers List
Subject: Re: Need review -- WIN32 procrun



It's jakarta-commons-sandbox/component_name, actually.
As JF proposed, I would see it in
jakarta-commons-sandbox/daemon/src/native/nt/procrun




It will be but... :(.

 Access denied: Insufficient Karma
(mturk|jakarta-commons-sandbox/daemon/src/native/nt/procrun/)




BTW, be sure to include the binaries in the CVS (yes, I know it's
against the rules, but they happen to be impossible to 

build without 

VC++, so I can't integrate in the build process).


I will try to get it build with cygwin. (at home ;-)).




The mingw32 builds that (I've tested it with DevC++). You'll need to
change the intptr_t to int *, and of course add the -lshlwapi and
-DPROCRUN_CONSOLE




Should we add #ifdef CYGWIN in the source?


 

It would be nice to have --InitClass and --DestroyClass 
options so that the 
BootstrapService of catalina can be used.



It has:
--StartupClass -> called when hit Service start.
--ShutdownClass -> called when you hit Stop service...


The idea is the following:
--InitClass -> called when starting
Change user to a non-privileged user (like nobody/nodoby I have seen something 
like that in cygwin so that must also exist in win32 API).
--StartupClass  -> really start the service.
--ShutdownClass -> shutdown the service (something like a suspend).
--DestroyClass  -> cleanup.



MT.






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