DO NOT REPLY [Bug 26229] New: - request.getRemoteUser() = null

2004-01-18 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=26229

request.getRemoteUser() = null

   Summary: request.getRemoteUser() = null
   Product: Tomcat 4
   Version: 4.1.29
  Platform: PC
OS/Version: Windows XP
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Connector:Coyote HTTP/1.1
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]


I have made a new installation of Tomcat 4.1.29 on my new DELL laptop running 
XP.

I have copied the project to the new laptop and try set it up to work as on my 
work machine.

I am not able to get the login to work. I am using the  in 
my web.xml.

At first I could not get the FORM login to work only BASIC. Then I changed the 
FORM action to <%= response.encodeURL("j_security_check") %>, and I was able 
use FORM login.

The next problem is that the auth is only accepted for the page that activated 
the FORM page. For example /public/* contains 
test.jsp and test2.jsp and when I link to test.jsp the FORM page is called. 
When succesfully logged in the request.getRemoteUser() is correct. But when I 
then link from there to test2.jsp the request.getRemoteUser() is NULL and the 
FORM page is called again.

Please let me know if I sould send more info.

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



DO NOT REPLY [Bug 26229] - request.getRemoteUser() = null

2004-01-18 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=26229

request.getRemoteUser() = null





--- Additional Comments From [EMAIL PROTECTED]  2004-01-18 13:20 ---
Also when I have logged on to a page and press F5 (refresh) the FORM page is 
called and remoteUser is NULL.

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



Bug report for Tomcat 3 [2004/01/18]

2004-01-18 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
| 2350|Ver|Nor|2001-06-27|ServletConfig.getInitParameter() requires url-patt|
| 2478|Opn|Cri|2001-07-06|Passing Session variables between JSP's and Servle|
| 4551|Opn|Nor|2001-10-31|Ctx( /tt01 ): IOException in: R( /tt01 + /com/abc/|
| 4980|New|Min|2001-11-20|Startup message indicates incorrect log file  |
| 4994|New|Nor|2001-11-21|Tomcat needs a mechanism for clean and certain shu|
| 5064|New|Cri|2001-11-25|Socket write error when include files is more than|
| 5108|New|Maj|2001-11-26|Docs for Tomcat 3.2.x appear to be for Tomcat 3.3 |
| 5137|New|Nor|2001-11-27|Null pointer in class loader after attempting to r|
| 5160|Unc|Maj|2001-11-28|'IllegalStateException'   |
| 5331|New|Nor|2001-12-09|getPathInfo vs URL normalization  |
| 5510|New|Blk|2001-12-19|How to call ejb deployed in JBoss from Tomcat serv|
| 5756|New|Nor|2002-01-08|jspc.bat exits with wrong ERRORLEVEL  |
| 5797|New|Nor|2002-01-10|UnCatched ? StringIndexOutOfBoundsException: Strin|
| 6027|New|Maj|2002-01-25|Tomcat  Automatically shuts down as service   |
| 6168|New|Blk|2002-02-01|IllegalStateException |
| 6451|New|Cri|2002-02-14|Stackoverflow |
| 6478|New|Enh|2002-02-14|Default Tomcat Encoding   |
| 6488|Ver|Maj|2002-02-15|Error: 304. Apparent bug in default ErrorHandler c|
| 6648|New|Nor|2002-02-25|jakarta-servletapi build with java 1.4 javadoc err|
| 6702|New|Cri|2002-02-27|win 2k services not working   |
| 6796|New|Cri|2002-03-01|Tomcat dies periodically  |
| 6989|New|Maj|2002-03-08|Unable to read tld file during parallel JSP compil|
| 7008|Opn|Maj|2002-03-10|facade.HttpServletRequestFacade.getParameter(HttpS|
| 7013|New|Cri|2002-03-10|Entering a servlet path with non-ISO8859-1 charact|
| 7227|New|Nor|2002-03-19| directive don't work |
| 7236|New|Blk|2002-03-19|Permission denied to do thread.stop   |
| 7626|New|Nor|2002-03-29|classloader not working properly  |
| 7652|New|Cri|2002-04-01|Tomcat stalls periodically|
| 7762|New|Enh|2002-04-05|stdout logfile handling   |
| 7785|New|Blk|2002-04-06|tomcat bug in context reloading   |
| 7789|New|Maj|2002-04-06|JSP Cookie Read/Write Fails With DNS Names|
| 7863|New|Maj|2002-04-09|I have a problem when running Tomcat with IIS |
| 8154|New|Nor|2002-04-16|logrotate script in RPM rotates non-existing file |
| 8187|New|Cri|2002-04-17|Errors when Tomcat used with MS Access database   |
| 8239|New|Cri|2002-04-18|Resource temporary unavailable|
| 8263|New|Cri|2002-04-18|url-pattern easy to circumvent|
| 8634|New|Nor|2002-04-30|no way to specify different modules.xml file  |
| 8992|New|Blk|2002-05-10|IE6/XP: Limitation of POST Area within HTTP reques|
| 9086|New|Enh|2002-05-14|NPE org.apache.tomcat.core.ServerSession.setAttrib|
| 9250|New|Maj|2002-05-20|outOfMemoryError  |
| 9367|New|Maj|2002-05-23|HttpSessionBindingEvent not thrown for HttpSession|
| 9390|New|Nor|2002-05-24|jasper compilation error in tomcat|
| 9480|New|Nor|2002-05-29|Data connection pooling   |
| 9607|New|Maj|2002-06-04|precompile JSP|
| 9737|New|Nor|2002-06-10|ArrayIndexOutOfBoundsException when sending just p|
|1|New|Cri|2002-06-19|IOException Broken Pipe when authenticating JDBCRe|
|10047|New|Cri|2002-06-20|IllegalStateException |
|10202|New|Maj|2002-06-25|Tomcat is not responding in time  |
|10357|Unc|Blk|2002-06-30|java.lang.IllegalArgumentException: Short Read|
|10406|New|Cri|2002-07-02|IllegalStateException |
|11087|New|Blk|2002-07-23|IllegalStateException |
|11105|New|Nor|2002

Bug report for Tomcat 4 [2004/01/18]

2004-01-18 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  218|Unc|Nor|2000-11-02|IIS & in-process tomcat BugRat Report#333 |
| 3614|Opn|Nor|2001-09-14|bug in manager webapp |
| 3755|Opn|Nor|2001-09-20|freezes at shutdown   |
| 3888|Opn|Blk|2001-09-30|WebappClassLoader: Lifecycle error : CL stopped   |
| 4091|Opn|Nor|2001-10-11|custom host with unpackWARs="true" don't expand wa|
| 4138|Opn|Nor|2001-10-12|Processor threads have inconsistent ClassLoader st|
| 4352|Ass|Nor|2001-10-22|JDBCRealm does not work with CLIENT-CERT auth-meth|
| 5329|New|Nor|2001-12-08|NT Service exits startup before Tomcat is finished|
| 5598|Opn|Maj|2001-12-27|(JSP Problem) RequestDispatcher doesn't include HT|
| 5704|Ass|Maj|2002-01-05|CgiServlet corrupting images? |
| 5715|Opn|Nor|2002-01-07|response.setContentType() in Filter.doFilter not c|
| 5795|New|Enh|2002-01-10|Catalina Shutdown relies on localhost causing prob|
| 5829|New|Enh|2002-01-13|StandardManager needs to cope with sessions throwi|
| 5858|New|Enh|2002-01-15|Add tomcat dir to java.library.path   |
| 5952|Opn|Nor|2002-01-22|Refence to $JAVACMD  in tomcat.conf incorrect in R|
| 5985|New|Enh|2002-01-23|Tomcat should perform a more restrictive validatio|
| 5998|Opn|Maj|2002-01-24|Exception hiding when a JspExceptioin is thrown by|
| 6218|Opn|Nor|2002-02-04|Relative links broken for servlets|
| 6229|New|Enh|2002-02-04|Need way to specify where to write catalina.out   |
| 6399|New|Nor|2002-02-12|unknown protocol: https   |
| 6408|New|Enh|2002-02-12|Starting tomcat from a cygwin bash shell using 'st|
| 6582|New|Min|2002-02-20|Sample code does not match behavior   |
| 6600|Opn|Enh|2002-02-20|enodeURL adds 'jsession' when 'isRequestedSessionI|
| 6614|New|Enh|2002-02-21|Have Bootstrap and StandardClassLoader use the sam|
| 6659|New|Nor|2002-02-25|HttpUtils.getRequestURL gives incorrect URL with w|
| 6671|New|Enh|2002-02-25|Simple custom tag example uses old declaration sty|
| 7043|New|Enh|2002-03-12|database user and password for JDBC Based Store   |
| 7190|New|Nor|2002-03-18|GenericServlet spurious log's in init(), destroy()|
| 7207|New|Nor|2002-03-18|Redeployment Problem under Tomcat 4.0.2   |
| 7360|New|Nor|2002-03-22|res-sharing-scope not supported   |
| 7366|New|Enh|2002-03-22|ISAPI Redirector Replacement  |
| 7374|New|Enh|2002-03-22|Apache Tomcat/4.0.1 message on standard output|
| 7571|New|Nor|2002-03-28|DataInputStream readLong() Problem|
| 7588|New|Nor|2002-03-28|Session cannot be established if there are multipl|
| 7676|New|Enh|2002-04-02|Allow name property to use match experssions in  without className in server.xml produces N|
|10982|New|Min|2002-07-19|JNDI URL Handler class is missing in naming-resour|
|11008|New|Blk|2002-07-20|Win32/cygwin compile report + patch (gcc 3.1.1 com|
|11042|New|Min|2002-07-22|Misleading comment in server.xml  |
|11069|Opn|Enh|2002-07-23|Tomcat not flag error if tld is outside of /WEB-IN|
|11129|New|Enh|2002-07-24|New valve for putting the sessionIDs in the reques|
|11158|New|Maj|2002-07-25|WebappClassLoader does'nt find any class in an ext|
|11197|New|Nor|2002-07-26|Filters and JSP.3.2   |
|11248|New|Enh|2002-07-29|DefaultServlet doesn't send expires header|
|11364|Opn|Maj|2002-08-01|jk2 appears to forward all virtual host requests t|
|11489|New|Enh|2002-08-06|Scanning JAR files in WEB-INF/lib without temp dir|
|11542|New|Nor|2002-08-07|cannot transfer jsp files with webdav default inst|
|11561|New|Maj|2002-08-08|JNDI problem with jdk1.4  |
|11645|New|Nor|2002-08-13|RequestStream and HttpRequestStream throw an IOExc|
|11662|New|Maj|2002-08-13|GlobalResources unavailable in DefaultContext |
|11679|New|Min|2002-08-14|"anonymous bind failed" exceptions occur if connec|
|11753|New|Maj|2002-08-15|Synchronous startu

Bug report for Watchdog [2004/01/18]

2004-01-18 Thread bugzilla
+---+
| Bugzilla Bug ID   |
| +-+
| | Status: UNC=Unconfirmed NEW=New ASS=Assigned|
| | OPN=ReopenedVER=Verified(Skipped Closed/Resolved)   |
| |   +-+
| |   | Severity: BLK=Blocker CRI=CriticalMAJ=Major |
| |   |   MIN=Minor   NOR=Normal  ENH=Enhancement   |
| |   |   +-+
| |   |   | Date Posted |
| |   |   |  +--+
| |   |   |  | Description  |
| |   |   |  |  |
|  278|Unc|Nor|2000-12-04|Bug in GetParameterValuesTestServlet.java file Bug|
|  279|Unc|Nor|2000-12-04|Logical Error in GetParameterValuesTestServlet Bug|
|  469|Unc|Nor|2001-01-17|in example-taglib.tld "urn" should be "uri" BugRat|
|  470|Unc|Nor|2001-01-17|FAIL positiveForward.jsp and positiveInclude.jsp B|
| 9634|New|Enh|2002-06-05|No tests exist for ServletContext.getResourcePaths|
|10703|New|Enh|2002-07-11|Need to test getRequestURI after RequestDispatcher|
|11336|New|Enh|2002-07-31|Test wrapped path methods with RD.foward()|
|11663|New|Maj|2002-08-13|JSP precompile tests rely on Jasper specific behav|
|11664|New|Maj|2002-08-13|A sweep is needed of all Watchdog 4.0 tag librarie|
|11665|New|Maj|2002-08-13|ServletToJSPErrorPageTest and ServletToServletErro|
|11666|New|Maj|2002-08-13|SetBufferSize_1TestServlet is invalid.|
|14004|New|Maj|2002-10-28|Incorrent behaviour of all attribute-related lifec|
|15504|New|Nor|2002-12-18|JSP positiveGetValues test relies on order preserv|
|24649|New|Nor|2003-11-12|getRemoteHost fails when agent has uppercase chara|
+-+---+---+--+--+
| Total   14 bugs   |
+---+

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



DO NOT REPLY [Bug 26229] - request.getRemoteUser() = null

2004-01-18 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=26229

request.getRemoteUser() = null





--- Additional Comments From [EMAIL PROTECTED]  2004-01-18 15:53 ---
Sorry. The following is a mistake:
**
"Also when I have logged on to a page and press F5 (refresh) the FORM page is 
called and remoteUser is NULL."
**

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



Body encoding problem with TC 5.0.18 alpha

2004-01-18 Thread olaf . hahnl
I have a problem with Tomcat 5, which might turn out to be a bug.

I just send a page (with UTF-8 encoding) from my servlet which contains
some special characters (in this case ° and §) in the value for a hidden
form field (see example below).
Requesting the content with IE 6 or Mozilla 1.5 through a tunnel from TC
4.1.19 I am seeing the following (special characters are encoded in two
characters) and everything works just fine in the browser. Using TC 5.0.16
or 5.0.18 alpha the special characters are sent as they would when being
ISO-encoded I believe. The browser tries to interpret the page and the
special characters as UTF-8, so nothing works and the page-functionality
breaks. If I manually switch the encoding in the browser to ISO, it works
again.

So my question is, was there any intentional change in between TC 4.1 and
TC5 regarding this issue, is this an already known problem or could this be
a bug, or a fault on my side?

I tried to search the archives and found quite a lot which deals with
character encoding, but nothing which seem to match, I apologize if I
missed something.

Any help is appreciated.

Regards,
Olaf


Example:

Tomcat 4.1.19

Content-Type: text/html;charset=UTF-8


...

cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets CGIServlet.java

2004-01-18 Thread markt
markt   2004/01/18 09:46:32

  Modified:catalina/src/share/org/apache/catalina/servlets
CGIServlet.java
  Log:
  - Fix bug 12361. Support CGI scripts in unpacked WARs.
Scripts are extracted to the context work directory before execution.
  
  Revision  ChangesPath
  1.13  +101 -10   
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
  
  Index: CGIServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- CGIServlet.java   15 Jan 2004 00:57:59 -  1.12
  +++ CGIServlet.java   18 Jan 2004 17:46:32 -  1.13
  @@ -66,6 +66,7 @@
   import java.io.BufferedReader;
   import java.io.BufferedWriter;
   import java.io.File;
  +import java.io.FileOutputStream;
   import java.io.IOException;
   import java.io.InputStream;
   import java.io.InputStreamReader;
  @@ -90,6 +91,7 @@
   import javax.servlet.http.HttpSession;
   
   import org.apache.catalina.Globals;
  +import org.apache.catalina.util.IOTools;
   
   
   /**
  @@ -313,6 +315,9 @@
   /** the command to use with the script */
   private String cgiExecutable = "perl";
   
  +/** object used to ensure multiple threads don't try to expand same file */
  +static Object expandFileLock = new Object();
  +
   /**
* Sets instance variables.
* 
  @@ -721,6 +726,9 @@
   /** real file system directory of the enclosing servlet's web app */
   private String webAppRootDir = null;
   
  +/** tempdir for context - used to expand scripts in unexpanded wars */
  +private File tmpDir = null;
  +
   /** derived cgi environment */
   private Hashtable env = null;
   
  @@ -782,6 +790,7 @@
   protected void setupFromContext(ServletContext context) {
   this.context = context;
   this.webAppRootDir = context.getRealPath("/");
  +this.tmpDir = (File) context.getAttribute(Globals.WORK_DIR_ATTR);
   }
   
   
  @@ -934,11 +943,8 @@
   + ", scriptname=" + scriptname + ", cginame=" + cginame);
   }
   return new String[] { path, scriptname, cginame, name };
  -
   }
   
  -
  -
   /**
* Constructs the CGI environment to be supplied to the invoked CGI
* script; relies heavliy on Servlet API methods and findCGI
  @@ -977,6 +983,12 @@
   sPathTranslatedOrig =
   sPathTranslatedOrig == null ? "" : sPathTranslatedOrig;
   
  +if (webAppRootDir == null ) {
  +// The app has not been deployed in exploded form
  +webAppRootDir = tmpDir.toString();
  +expandCGIScript();
  +} 
  +
   sCGINames = findCGI(sPathInfoOrig,
   webAppRootDir,
   contextPath,
  @@ -1117,6 +1129,85 @@
   
   }
   
  +/**
  + * Extracts requested resource from web app archive to context work 
  + * directory to enable CGI script to be executed.
  + */
  +protected void expandCGIScript() {
  +StringBuffer srcPath = new StringBuffer();
  +StringBuffer destPath = new StringBuffer();
  +InputStream is = null;
  +
  +// paths depend on mapping
  +if (cgiPathPrefix == null ) {
  +srcPath.append(pathInfo);
  +is = context.getResourceAsStream(srcPath.toString());
  +destPath.append(tmpDir);
  +destPath.append(pathInfo);
  +} else {
  +// essentially same search algorithm as findCGI()
  +srcPath.append(cgiPathPrefix);
  +StringTokenizer pathWalker =
  +new StringTokenizer (pathInfo, "/");
  +// start with first element
  +while (pathWalker.hasMoreElements() && (is == null)) {
  +srcPath.append("/");
  +srcPath.append(pathWalker.nextElement());
  +is = context.getResourceAsStream(srcPath.toString());
  +}
  +destPath.append(tmpDir);
  +destPath.append("/");
  +destPath.append(srcPath);
  +}
  +
  +if (is == null) {
  +// didn't find anything, give up now
  +if (debug >= 2) {
  +log("expandCGIScript: source '" + srcPath + "' not found");
  +}
  + return;
  +}
  +
  +File f = new File(destPath.toString());
  +if (f.exists()) {
  +// Don't need to expand if 

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets CGIServlet.java

2004-01-18 Thread markt
markt   2004/01/18 09:48:11

  Modified:catalina/src/share/org/apache/catalina/servlets
CGIServlet.java
  Log:
  - Fix bug 12361. Support CGI scripts in unpacked WARs.
Scripts are extracted to the context work directory before execution.
  - Remove unused imports - thanks to Eclipse.
  
  Revision  ChangesPath
  1.17  +102 -19   
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java
  
  Index: CGIServlet.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/CGIServlet.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- CGIServlet.java   15 Jan 2004 00:56:53 -  1.16
  +++ CGIServlet.java   18 Jan 2004 17:48:11 -  1.17
  @@ -62,18 +62,13 @@
   
   package org.apache.catalina.servlets;
   
  -import java.lang.Process;
   import java.io.File;
  -import java.io.Writer;
  -import java.io.Reader;
  -import java.io.PrintWriter;
  +import java.io.FileOutputStream;
   import java.io.BufferedWriter;
   import java.io.BufferedReader;
   import java.io.InputStream;
  -import java.io.OutputStream;
   import java.io.InputStreamReader;
   import java.io.OutputStreamWriter;
  -import java.io.BufferedInputStream;
   import java.io.BufferedOutputStream;
   import java.io.IOException;
   import java.net.URLEncoder;
  @@ -93,9 +88,8 @@
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
   import javax.servlet.http.Cookie;
  -import org.apache.catalina.Context;
   import org.apache.catalina.Globals;
  -import org.apache.catalina.Wrapper;
  +import org.apache.catalina.util.IOTools;
   // import org.apache.catalina.util.StringManager;
   
   
  @@ -317,10 +311,13 @@
*/
   private String cgiPathPrefix = null;
   
  -
   /** the executable to use with the script */
   private String cgiExecutable = "perl";
   
  +/** object used to ensure multiple threads don't try to expand same file */
  +static Object expandFileLock = new Object();
  +
  +
   /**
* Sets instance variables.
* 
  @@ -731,6 +728,9 @@
   /** real file system directory of the enclosing servlet's web app */
   private String webAppRootDir = null;
   
  +/** tempdir for context - used to expand scripts in unexpanded wars */
  +private File tmpDir = null;
  +
   /** derived cgi environment */
   private Hashtable env = null;
   
  @@ -792,6 +792,7 @@
   protected void setupFromContext(ServletContext context) {
   this.context = context;
   this.webAppRootDir = context.getRealPath("/");
  +this.tmpDir = (File) context.getAttribute(Globals.WORK_DIR_ATTR);
   }
   
   
  @@ -944,11 +945,8 @@
   + ", scriptname=" + scriptname + ", cginame=" + cginame);
   }
   return new String[] { path, scriptname, cginame, name };
  -
   }
   
  -
  -
   /**
* Constructs the CGI environment to be supplied to the invoked CGI
* script; relies heavliy on Servlet API methods and findCGI
  @@ -992,6 +990,12 @@
   sPathTranslatedOrig =
   sPathTranslatedOrig == null ? "" : sPathTranslatedOrig;
   
  +if (webAppRootDir == null ) {
  +// The app has not been deployed in exploded form
  +webAppRootDir = tmpDir.toString();
  +expandCGIScript();
  +} 
  +
   sCGINames = findCGI(sPathInfoOrig,
   webAppRootDir,
   contextPath,
  @@ -1131,6 +1135,85 @@
   
   }
   
  +/**
  + * Extracts requested resource from web app archive to context work 
  + * directory to enable CGI script to be executed.
  + */
  +protected void expandCGIScript() {
  +StringBuffer srcPath = new StringBuffer();
  +StringBuffer destPath = new StringBuffer();
  +InputStream is = null;
  +
  +// paths depend on mapping
  +if (cgiPathPrefix == null ) {
  +srcPath.append(pathInfo);
  +is = context.getResourceAsStream(srcPath.toString());
  +destPath.append(tmpDir);
  +destPath.append(pathInfo);
  +} else {
  +// essentially same search algorithm as findCGI()
  +srcPath.append(cgiPathPrefix);
  +StringTokenizer pathWalker =
  +new StringTokenizer (pathInfo, "/");
  +// start with first element
  +while (pathWalker.hasMoreElements() && (is == null)) {
  +srcPath.append("/");
  +srcPath.append(pathWalker.nextElement());
  +

DO NOT REPLY [Bug 12361] - Can not run CGI scripts from packed WAR application

2004-01-18 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=12361

Can not run CGI scripts from packed WAR application

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-01-18 17:59 ---
You can always configure tomcat to unpack the WARs after deployment.

However, I have just committed changes to the CGI servlet to support execution 
of scripts from unexploded WARs. This will be available in the next versions 
of TC4 and TC5. The scripts are extracted to the work directory for the 
context.

This behaviour is automatic. Sufficient control exists by enabling/disabling 
the CGI servlet and controlling whether the app is deployed in unexploded form 
or not.

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



cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardSession.java

2004-01-18 Thread markt
markt   2004/01/18 12:37:52

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  - Fix bug 12363. valueBound() must be called before the object is made available
  via getAttribute() .
  Submitted by: Pablo Morales
  
  Revision  ChangesPath
  1.28  +18 -15
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- StandardSession.java  31 Dec 2003 21:24:56 -  1.27
  +++ StandardSession.java  18 Jan 2004 20:37:52 -  1.28
  @@ -1283,6 +1283,14 @@
   throw new IllegalArgumentException
   (sm.getString("standardSession.setAttribute.iae"));
   
  +// Construct an event with the new value
  +HttpSessionBindingEvent event = new HttpSessionBindingEvent
  +((HttpSession) this, name, value);
  +
  +// Call the valueBound() method if necessary
  +if (value instanceof HttpSessionBindingListener)
  +((HttpSessionBindingListener) value).valueBound(event);
  +
   // Replace or add this attribute
   Object unbound = null;
   synchronized (attributes) {
  @@ -1292,21 +1300,16 @@
   
   // Call the valueUnbound() method if necessary
   if ((unbound != null) &&
  -(unbound instanceof HttpSessionBindingListener)) {
  +(unbound instanceof HttpSessionBindingListener)) {
   ((HttpSessionBindingListener) unbound).valueUnbound
  -  (new HttpSessionBindingEvent((HttpSession) this, name));
  +(new HttpSessionBindingEvent((HttpSession) this, name));
   }
   
  -// Call the valueBound() method if necessary
  -HttpSessionBindingEvent event = null;
  +// Replace the current event with one containing 
  +// the old value if necesary
   if (unbound != null)
  -event = new HttpSessionBindingEvent
  -((HttpSession) this, name, unbound);
  -else
  -event = new HttpSessionBindingEvent
  -((HttpSession) this, name, value);
  -if (value instanceof HttpSessionBindingListener)
  -((HttpSessionBindingListener) value).valueBound(event);
  +event = new HttpSessionBindingEvent((HttpSession) this,
  +name, unbound);
   
   // Notify interested application event listeners
   Context context = (Context) manager.getContainer();
  
  
  

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



cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session StandardSession.java

2004-01-18 Thread markt
markt   2004/01/18 12:38:35

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  - Fix bug 12363. valueBound() must be called before the object is made available
  via getAttribute() .
  Submitted by: Pablo Morales
  - Port from TC5.
  
  Revision  ChangesPath
  1.37  +18 -16
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java
  
  Index: StandardSession.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/session/StandardSession.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- StandardSession.java  29 Apr 2003 21:57:58 -  1.36
  +++ StandardSession.java  18 Jan 2004 20:38:35 -  1.37
  @@ -65,7 +65,6 @@
   package org.apache.catalina.session;
   
   
  -import java.beans.PropertyChangeListener;
   import java.beans.PropertyChangeSupport;
   import java.io.IOException;
   import java.io.NotSerializableException;
  @@ -1251,6 +1250,14 @@
   throw new IllegalArgumentException
   (sm.getString("standardSession.setAttribute.iae"));
   
  +// Construct an event with the new value
  +HttpSessionBindingEvent event = new HttpSessionBindingEvent
  +((HttpSession) this, name, value);
  +
  +// Call the valueBound() method if necessary
  +if (value instanceof HttpSessionBindingListener)
  +((HttpSessionBindingListener) value).valueBound(event);
  +
   // Replace or add this attribute
   Object unbound = null;
   synchronized (attributes) {
  @@ -1260,21 +1267,16 @@
   
   // Call the valueUnbound() method if necessary
   if ((unbound != null) &&
  -(unbound instanceof HttpSessionBindingListener)) {
  +(unbound instanceof HttpSessionBindingListener)) {
   ((HttpSessionBindingListener) unbound).valueUnbound
  -  (new HttpSessionBindingEvent((HttpSession) this, name));
  +(new HttpSessionBindingEvent((HttpSession) this, name));
   }
   
  -// Call the valueBound() method if necessary
  -HttpSessionBindingEvent event = null;
  +// Replace the current event with one containing 
  +// the old value if necesary
   if (unbound != null)
  -event = new HttpSessionBindingEvent
  -((HttpSession) this, name, unbound);
  -else
  -event = new HttpSessionBindingEvent
  -((HttpSession) this, name, value);
  -if (value instanceof HttpSessionBindingListener)
  -((HttpSessionBindingListener) value).valueBound(event);
  +event = new HttpSessionBindingEvent((HttpSession) this,
  +name, unbound);
   
   // Notify interested application event listeners
   Context context = (Context) manager.getContainer();
  
  
  

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



DO NOT REPLY [Bug 12363] - StandardSession.setAttribute() does not conform to the servlet spec

2004-01-18 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=12363

StandardSession.setAttribute() does not conform to the servlet spec

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2004-01-18 20:40 ---
Thanks.

This has been fixed in CVS and will be included in the next releases of TC4 
and TC5.

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



DO NOT REPLY [Bug 26231] New: - jk2_child_init called before make_child completes (in prefork MPM)

2004-01-18 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=26231

jk2_child_init called before make_child completes (in prefork MPM)

   Summary: jk2_child_init called before make_child completes (in
prefork MPM)
   Product: Tomcat 5
   Version: 5.0.16
  Platform: PC
OS/Version: Linux
Status: NEW
  Severity: Normal
  Priority: Other
 Component: Native:JK
AssignedTo: [EMAIL PROTECTED]
ReportedBy: [EMAIL PROTECTED]


I have built Apache 2.0.48 with the prefork MPM, and mod_jk2 using the tomcat
5.0.16 source tarball.  When I start apache, I see some errors of the form:

jk2_init() Can't find child 23459 in none of the 256 scoreboard slots

I've traced this error to the jk2_child_init function in
native2/server/mod_jk2.c. By adding additional logging calls to mod_jk2.c and
the apache prefork.c file, I've verified that these messages are issued when
jk2_child_init is called AFTER make_child (from prefork.c) is invoked, and
BEFORE it completes.  I think this is pretty good evidence of a race condition.

I'm not familiar enough with the Apache codebase to figure out why this is
happening, but I think it ought to be corrected nevertheless.  (The only way I'm
sure I could fix this is by putting a little delay and retry in jk2_child_init
when the process can't be found in the apache scoreboard, but that seems tacky.)

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



Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardSession.java

2004-01-18 Thread Remy Maucherat
[EMAIL PROTECTED] wrote:
markt   2004/01/18 12:37:52

  Modified:catalina/src/share/org/apache/catalina/session
StandardSession.java
  Log:
  - Fix bug 12363. valueBound() must be called before the object is made available
  via getAttribute() .
  Submitted by: Pablo Morales
My hair splitting detector is beeping.

This session code will need to be optimized, BTW.

Rémy

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


RE: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session StandardSession.java

2004-01-18 Thread Mark Thomas
Resending from right account.

> My hair splitting detector is beeping.
> 
> This session code will need to be optimized, BTW.

Will do. Tomorrow OK?

> 
> Rémy



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



DO NOT REPLY [Bug 26183] - ServletResponse#reset() method and cookie session control problem on tomcat4.1.24

2004-01-18 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=26183

ServletResponse#reset() method and cookie session control problem on tomcat4.1.24

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-01-19 02:53 ---
Hello,
Thank you for response and I'm sorry for Reopen bug.

My point is 'response.reset()', not 'session.invalidate()'.
This problem occur when 'response.reset()' method call after create new session.
This happen also when the first access to session, access to session after 
session timeout ...
So for other example, the first request, call following JSP(JSP only for easy).


<%
session.setAttribute("SessionData","dummy");
response.reset();
%>


And the next request, 'session.getAttribute("SessionData")' return null.

The reason is as having explained last time.

Is this behavior specification ?

regards,
Naru Hayashi from Japan

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



Hi

2004-01-18 Thread shachor
 Test =)
ibqifoxdbrckejsasue
--
Test, yep.

--  Virus Warning Message (on the network)

nbpvt.exe is removed from here because it contains a virus.

---  Virus Warning Message (on the network)
(B
(BFound virus WORM_BAGLE.A in file nbpvt.exe
(BThe file is deleted.
(B
(BTherefore we removed the attachment-file
(Bby Mail Server and sent the message to you.
(B
(B(Japanese)
$BK\%a!<%k$KE:IU$5$l$F$$$?%U%!%$%k$K%&%#%k%9$,[EMAIL PROTECTED](B
$B$=$N$?$a!"%a!<%k%5!<%P$K$h$C$FE:IU%U%!%$%k$r-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Hi

2004-01-18 Thread shachor
--  Virus Warning Message (on the network)

Found virus WORM_BAGLE.A in file enqtlewh.exe
The file enqtlewh.exe is moved to /var/log/virus/virYFJbEVGKa.

This is a machine-generated message, please do not reply via email. If you have 
questions, please contact the Lucent Help Desk at +1 888 300 0770.

-
 Test =)
afvtxdxyo
--
Test, yep.

--  Virus Warning Message (on the network)

enqtlewh.exe is removed from here because it contains a virus.

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

Hi

2004-01-18 Thread shachor
--  Virus Warning Message (on the network)

Found virus WORM_BAGLE.A in file gcannlmxl.exe
The file gcannlmxl.exe is moved to /var/log/virus/virROB.ckb8S.

This is a machine-generated message, please do not reply via email. If you have 
questions, please contact the Lucent Help Desk at +1 888 300 0770.

-
 Test =)
blxwocdepddmpfne
--
Test, yep.

--  Virus Warning Message (on the network)

gcannlmxl.exe is removed from here because it contains a virus.

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

Hi

2004-01-18 Thread Costin . Manolache
--  Virus Warning Message (on the network)

Found virus WORM_BAGLE.A in file drti.exe
The file drti.exe is moved to /var/log/virus/virUVA9nob8S.

This is a machine-generated message, please do not reply via email. If you have 
questions, please contact the Lucent Help Desk at +1 888 300 0770.

-
 Test =)
csefpbrouhsmgqu
--
Test, yep.

--  Virus Warning Message (on the network)

drti.exe is removed from here because it contains a virus.

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

Hi

2004-01-18 Thread Craig . McClanahan
--  Virus Warning Message (on the network)

Found virus WORM_BAGLE.A in file yeavidnpeo.exe
The file yeavidnpeo.exe is moved to /var/log/virus/virVGS8uN8Wz.

This is a machine-generated message, please do not reply via email. If you have 
questions, please contact the Lucent Help Desk at +1 888 300 0770.

-
 Test =)
ebnaeysnhdwgpbibvp
--
Test, yep.

--  Virus Warning Message (on the network)

yeavidnpeo.exe is removed from here because it contains a virus.

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