svn commit: r703649 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-11 Thread mturk
Author: mturk
Date: Sat Oct 11 04:38:20 2008
New Revision: 703649

URL: http://svn.apache.org/viewvc?rev=703649&view=rev
Log:
Fill the missing error descriptions

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=703649&r1=703648&r2=703649&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sat Oct 11 04:38:20 
2008
@@ -302,8 +302,9 @@
 },
 { 401,
   "Unauthorized",
-  NULL,
-  NULL
+  "Access is denied due to invalid credentials",
+  "You do not have permission to view this directory or "
+  "page using the credentials that you supplied."
 },
 { 402,
   "Payment Required",
@@ -312,8 +313,9 @@
 },
 { 403,
   "Forbidden",
-  NULL,
-  NULL
+  "Access is denied",
+  "You do not have permission to view this directory or page "
+  "using the credentials that you supplied."
 },
 { 404,
   "Not Found",
@@ -323,58 +325,70 @@
 },
 { 405,
   "Method Not Allowed",
-  NULL,
-  NULL
+  "HTTP method used to access this page is not allowed",
+  "The page you are looking for cannot be displayed because an "
+  "invalid method (HTTP method) was used to attempt access."
 },
 { 406,
   "Not Acceptable",
-  NULL,
-  NULL
+  "Client browser does not accept the MIME type of the requested page",
+  "The page you are looking for cannot be opened by your browser "
+  "because it has a file name extension that your browser "
+  "does not accept."
 },
 { 407,
   "Proxy Authentication Required",
   NULL,
-  NULL
+  "The client must first authenticate itself with the proxy"
 },
 { 408,
   "Request Timeout",
   NULL,
-  NULL
+  "The client did not produce a request within the time "
+  "that the server was prepared to wait."
 },
 { 409,
   "Conflict",
   NULL,
-  NULL
+  "The request could not be completed due to a conflict with "
+  "the current state of the resource."
 },
 { 410,
   "Gone",
   NULL,
-  NULL
+  "The requested resource is no longer available at the "
+  "server and no forwarding address is known."
 },
 { 411,
   "Length Required",
   NULL,
-  NULL
+  "The server refuses to accept the request without a "
+  "defined Content-Length."
 },
 { 412,
   "Precondition Failed",
   NULL,
-  NULL
+  "The precondition given in one or more of the request "
+  "header fields evaluated to false when it was tested on the server."
 },
 { 413,
   "Request Entity Too Large",
   NULL,
-  NULL
+  "The HTTP method does not allow the data transmitted, "
+  "or the data volume exceeds the capacity limit."
 },
 { 414,
   "Request-URI Too Long",
-  NULL,
-  NULL
+  "Submitted URI too large",
+  "The length of the requested URL exceeds the capacity limit "
+  "for this server. The request cannot be processed."
 },
 { 415,
   "Unsupported Media Type",
   NULL,
-  NULL
+  "The server is refusing to service the request because the "
+  "entity of the request is in a format not supported by the "
+  "requested resource for the requested method."
 },
 { 500,
   "Internal Server Error",
@@ -385,12 +399,16 @@
 { 501,
   "Not Implemented",
   NULL,
-  NULL
+  "The server does not support the functionality required "
+  "to fulfill the request."
 },
 { 502,
   "Bad Gateway",
   NULL,
-  NULL
+  "There is a problem with the page you are looking for, "
+  "and it cannot be displayed. When the Web server (while "
+  "acting as a gateway or proxy) contacted the upstream content "
+  "server, it received an invalid response from the content server."
 },
 { 503,
   "Service Unavailable",
@@ -402,12 +420,14 @@
 { 504,
   "Gateway Timeout",
   NULL,
-  NULL
+  "The server, while acting as a gateway or proxy, "
+  "did not receive a timely response from the upstream server"
 },
 { 505,
   "HTTP Version Not Supported",
   NULL,
-  NULL
+  "The server does not support, or refuses to support, the "
+  "HTTP protocol version that was used in the request message."
 },
 { 0,
   NULL,



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



svn commit: r703650 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-11 Thread mturk
Author: mturk
Date: Sat Oct 11 04:49:02 2008
New Revision: 703650

URL: http://svn.apache.org/viewvc?rev=703650&view=rev
Log:
Make sure extension is inited the same way as filter using _

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=703650&r1=703649&r2=703650&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sat Oct 11 04:49:02 
2008
@@ -2102,13 +2102,24 @@
 
 /* Initialise jk */
 if (is_inited && !is_mapread) {
-char serverName[MAX_SERVERNAME] = { 0 };
-DWORD dwLen = sizeof(serverName);
-if (lpEcb->
-GetServerVariable(lpEcb->ConnID, SERVER_NAME, serverName,
-  &dwLen)) {
-if (dwLen > 0)
+char serverName[MAX_SERVERNAME] = "";
+char instanceId[MAX_INSTANCEID] = "";
+
+DWORD dwLen = MAX_SERVERNAME - MAX_INSTANCEID - 1;
+if (lpEcb->GetServerVariable(lpEcb->ConnID,
+SERVER_NAME, serverName, &dwLen)) {
+if (dwLen > 0) {
 serverName[dwLen - 1] = '\0';
+dwLen = MAX_INSTANCEID;
+if (lpEcb->GetServerVariable(lpEcb->ConnID,
+INSTANCE_ID, instanceId, &dwLen)) {
+if (dwLen > 0) {
+instanceId[dwLen - 1] = '\0';
+StringCbCat(serverName, MAX_SERVERNAME, "_");
+StringCbCat(serverName, MAX_SERVERNAME, instanceId);
+}
+}
+}
 if (init_jk(serverName))
 is_mapread = JK_TRUE;
 }



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



svn commit: r703665 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-11 Thread mturk
Author: mturk
Date: Sat Oct 11 07:17:14 2008
New Revision: 703665

URL: http://svn.apache.org/viewvc?rev=703665&view=rev
Log:
Cast size_t

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=703665&r1=703664&r2=703665&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sat Oct 11 07:17:14 
2008
@@ -1071,7 +1071,7 @@
   NULL, NULL);
 }
 else {
-DWORD status_str_len = strlen(status_str);
+DWORD status_str_len = (DWORD)strlen(status_str);
 /* Old style response - forces Connection: close if Tomcat 
response doesn't
specify necessary details to allow keep alive */
 rc = p->lpEcb->ServerSupportFunction(p->lpEcb->ConnID,



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



svn commit: r703667 - /tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

2008-10-11 Thread mturk
Author: mturk
Date: Sat Oct 11 07:54:42 2008
New Revision: 703667

URL: http://svn.apache.org/viewvc?rev=703667&view=rev
Log:
Add two environment vars so we can have ${JKISAPI_PATH} in .properties files

Modified:
tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c

Modified: tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c?rev=703667&r1=703666&r2=703667&view=diff
==
--- tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c (original)
+++ tomcat/connectors/trunk/jk/native/iis/jk_isapi_plugin.c Sat Oct 11 07:54:42 
2008
@@ -471,6 +471,7 @@
 (place) = def;  \
   } } while(0)
 
+static char dll_file_path[MAX_PATH];
 static char ini_file_name[MAX_PATH];
 static int using_ini_file = JK_FALSE;
 static int is_inited = JK_FALSE;
@@ -2273,18 +2274,33 @@
 LPVOID lpReserved)  // Reserved parameter for future use
 {
 BOOL fReturn = TRUE;
-char drive[_MAX_DRIVE];
-char dir[_MAX_DIR];
 char fname[MAX_PATH];
-char file_name[MAX_PATH];
 
 UNREFERENCED_PARAMETER(lpReserved);
 
 switch (ulReason) {
 case DLL_PROCESS_ATTACH:
-if (GetModuleFileName(hInst, file_name, sizeof(file_name))) {
-_splitpath(file_name, drive, dir, fname, NULL);
-_makepath(ini_file_name, drive, dir, fname, ".properties");
+if (GetModuleFileName(hInst, fname, sizeof(fname))) {
+char *p = strrchr(fname, '.');
+if (p) {
+*p = '\0';
+StringCbCopy(ini_file_name, MAX_PATH, fname);
+StringCbCat(ini_file_name, MAX_PATH, ".properties");
+}
+else {
+/* Cannot obtain file name ? */
+fReturn = JK_FALSE;
+}
+if ((p = strrchr(fname, '\\'))) {
+*(p++) = '\0';
+StringCbCopy(dll_file_path, MAX_PATH, fname);
+SetEnvironmentVariable("JKISAPI_PATH", dll_file_path);
+SetEnvironmentVariable("JKISAPI_NAME", p);
+}
+else {
+/* Cannot obtain file name ? */
+fReturn = JK_FALSE;
+}
 }
 else {
 fReturn = JK_FALSE;



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



svn commit: r703677 - in /tomcat/connectors/trunk/jk/native/common: jk_connect.c jk_global.h

2008-10-11 Thread mturk
Author: mturk
Date: Sat Oct 11 09:02:37 2008
New Revision: 703677

URL: http://svn.apache.org/viewvc?rev=703677&view=rev
Log:
Don't use default socket keepalive interval. If timeout set, use ten times its 
value, if not use 10 minutes for keepalive packets (Windows only)

Modified:
tomcat/connectors/trunk/jk/native/common/jk_connect.c
tomcat/connectors/trunk/jk/native/common/jk_global.h

Modified: tomcat/connectors/trunk/jk/native/common/jk_connect.c
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_connect.c?rev=703677&r1=703676&r2=703677&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_connect.c (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_connect.c Sat Oct 11 09:02:37 
2008
@@ -448,6 +448,29 @@
 jk_log(l, JK_LOG_DEBUG,
"socket TCP_NODELAY set to On");
 if (keepalive) {
+#if defined(WIN32) && !defined(NETWARE)
+DWORD dw;
+struct tcp_keepalive ka = { 0 }, ks = { 0 };
+if (timeout)
+ka.keepalivetime = timeout * 1;
+else
+ka.keepalivetime = 60 * 1; /* 10 minutes */
+ka.keepaliveinterval = 1000;
+ka.onoff = 1;
+if (WSAIoctl(sd, SIO_KEEPALIVE_VALS, &ka, sizeof(ka),
+ &ks, sizeof(ks), &dw, NULL, NULL)) {
+JK_GET_SOCKET_ERRNO();
+jk_log(l, JK_LOG_ERROR,
+   "failed setting SIO_KEEPALIVE_VALS (errno=%d)", errno);
+jk_close_socket(sd, l);
+JK_TRACE_EXIT(l);
+return JK_INVALID_SOCKET;  
  
+}
+if (JK_IS_DEBUG_LEVEL(l))
+jk_log(l, JK_LOG_DEBUG,
+   "socket SO_KEEPALIVE set to %d seconds",
+   ka.keepalivetime / 1000);
+#else
 set = 1;
 if (setsockopt(sd, SOL_SOCKET, SO_KEEPALIVE, (SET_TYPE)&set,
sizeof(set))) {
@@ -461,6 +484,7 @@
 if (JK_IS_DEBUG_LEVEL(l))
 jk_log(l, JK_LOG_DEBUG,
"socket SO_KEEPALIVE set to On");
+#endif
 }
 
 if (sock_buf > 0) {

Modified: tomcat/connectors/trunk/jk/native/common/jk_global.h
URL: 
http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_global.h?rev=703677&r1=703676&r2=703677&view=diff
==
--- tomcat/connectors/trunk/jk/native/common/jk_global.h (original)
+++ tomcat/connectors/trunk/jk/native/common/jk_global.h Sat Oct 11 09:02:37 
2008
@@ -117,6 +117,7 @@
 #include 
 #include 
 #include 
+#include 
 #endif /* _WINDOWS_ */
 #include 
 #include 



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



DO NOT REPLY [Bug 41504] Illegal access: this web application instance has been stopped already

2008-10-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=41504





--- Comment #7 from Paul Hamer <[EMAIL PROTECTED]>  2008-10-11 12:17:05 PST ---
To answer Mark's 2nd question: yes
I'm using Tomcat 5.5.27 on an openSuSE 10.3 Linuxbox using JDK 1.5 and I'm
running into the exact same exception after a reload via the manager servlet.
In my case it's one of my own classes (ArrayUtils) that can no longer be
loaded.

I too, am using a custom classloader. In the stacktrace below the classes
"interacao.FreePage" and "interacao.PhotoPage" were loaded by my custom
classloader. However, the ArrayUtils class should get loaded by the normal
classloader. I'll dig into my classloader, see if something goes wrong there.
If I come up with anything interesting, I'll repost.

Here's my stackdump:

11-okt-2008 20:40:56 org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already. 
Could not load nl.tohave.util.ArrayUtils.  The eventual following stack trace
is caused by an error thrown for debugging purposes as well as to attempt to
terminate the thread which caused the illegal access, and has no functional
impact.
java.lang.IllegalStateException
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at interacao.FreePage.getFormElements(FreePage.java:84)
at interacao.PhotoPage.getFormElements(PhotoPage.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
nl.tohave.merlin2.core.MerlinObjectWrapper.getEmptyForm(MerlinObjectWrapper.java:2066)
at
nl.tohave.merlin2.core.MerlinObjectWrapper.getForm(MerlinObjectWrapper.java:1995)
at
nl.tohave.merlin2.core.MerlinObjectWrapper.getForm(MerlinObjectWrapper.java:1986)
at nl.tohave.merlin2.servlet.EditorServlet.run(EditorServlet.java:153)
at
nl.tohave.merlin2.servlet.EditorServlet.service(EditorServlet.java:56)
at
nl.tohave.merlin2.servlet.MerlinServlet.service(MerlinServlet.java:160)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:204)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
nl.tohave.merlin2.serverext.tomcat55.AccessLogValve.invoke(AccessLogValve.java:148)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)


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

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