JBossWeb SVN: r623 - in trunk: res and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-14 10:44:21 -0400 (Wed, 14 May 2008)
New Revision: 623
Modified:
trunk/bin/catalina.bat
trunk/bin/catalina.sh
trunk/res/jboss-web.nsi
trunk/webapps/docs/changelog.xml
Log:
- Port two minor patches.
- Fix changelog (I was adding things to the CR2 changelog).
Modified: trunk/bin/catalina.bat
===================================================================
--- trunk/bin/catalina.bat 2008-05-14 12:07:31 UTC (rev 622)
+++ trunk/bin/catalina.bat 2008-05-14 14:44:21 UTC (rev 623)
@@ -134,7 +134,7 @@
set JPDA_SUSPEND=n
:gotJpdaSuspend
if not "%JPDA_OPTS%" == "" goto gotJpdaOpts
-set JPDA_OPTS=-Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
+set JPDA_OPTS=-agentlib:jdwp=transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=%JPDA_SUSPEND%
:gotJpdaOpts
shift
:noJpda
Modified: trunk/bin/catalina.sh
===================================================================
--- trunk/bin/catalina.sh 2008-05-14 12:07:31 UTC (rev 622)
+++ trunk/bin/catalina.sh 2008-05-14 14:44:21 UTC (rev 623)
@@ -210,7 +210,7 @@
JPDA_SUSPEND="n"
fi
if [ -z "$JPDA_OPTS" ]; then
- JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
+ JPDA_OPTS="-agentlib:jdwp=transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=$JPDA_SUSPEND"
fi
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
shift
Modified: trunk/res/jboss-web.nsi
===================================================================
--- trunk/res/jboss-web.nsi 2008-05-14 12:07:31 UTC (rev 622)
+++ trunk/res/jboss-web.nsi 2008-05-14 14:44:21 UTC (rev 623)
@@ -264,7 +264,7 @@
Section -post
nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //US//JBossWeb --Classpath "$INSTDIR\bin\bootstrap.jar" --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop --StartMode jvm --StopMode jvm'
- nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //US//JBossWeb --JvmOptions "-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\common\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=$INSTDIR\conf\logging.properties" --StdOutput auto --StdError auto'
+ nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //US//JBossWeb --JvmOptions "-Dcatalina.home=$INSTDIR#-Dcatalina.base=$INSTDIR#-Djava.endorsed.dirs=$INSTDIR\endorsed#-Djava.io.tmpdir=$INSTDIR\temp#-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager#-Djava.util.logging.config.file=$INSTDIR\conf\logging.properties" --StdOutput auto --StdError auto'
WriteUninstaller "$INSTDIR\Uninstall.exe"
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-14 12:07:31 UTC (rev 622)
+++ trunk/webapps/docs/changelog.xml 2008-05-14 14:44:21 UTC (rev 623)
@@ -16,6 +16,40 @@
<body>
+<section name="JBoss Web 2.1.1.CR3 (remm)">
+ <subsection name="General">
+ <changelog>
+ <fix>
+ <bug>44988</bug>: Use new Java 5 syntax for debugger options. Patch provided by Cedrik Lime. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <bug>42934</bug>: Trigger contextInitialized() before sessionDidActivate(). (markt)
+ </fix>
+ <add>
+ Initial ClusterListener implementation for mod_cluster support. (remm)
+ </add>
+ </changelog>
+ </subsection>
+ <subsection name="Coyote">
+ <changelog>
+ </changelog>
+ </subsection>
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>44986</bug>: Case insensitive comparison of charsets. (markt)
+ </fix>
+ <fix>
+ <bug>42943</bug>: Make sure the nested element is inside a <jsp:text> element. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 2.1.1.CR2 (remm)">
<subsection name="General">
<changelog>
@@ -55,9 +89,6 @@
<fix>
<bug>44021</bug>: Add support to manger and deployer for wars and dirs that use # to denote multi-level contexts. (markt)
</fix>
- <fix>
- <bug>42934</bug>: Trigger contextInitialized() before sessionDidActivate(). (markt)
- </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -81,12 +112,6 @@
<fix>
<jboss-jira>JBCTS-776</jboss-jira>: NPE regression in EL type handling. (remm)
</fix>
- <fix>
- <jboss-jira>JBAS-5518</jboss-jira>: Case insensitive comparison of charsets. (remm)
- </fix>
- <fix>
- <bug>42943</bug>: Make sure the nested element is inside a <jsp:text> element. (markt)
- </fix>
</changelog>
</subsection>
</section>
16 years, 7 months
JBossWeb SVN: r622 - trunk/java/org/apache/jasper/compiler.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-14 08:07:31 -0400 (Wed, 14 May 2008)
New Revision: 622
Modified:
trunk/java/org/apache/jasper/compiler/Validator.java
Log:
- Cleaner patch for charset case sensitivity in a rare case.
Modified: trunk/java/org/apache/jasper/compiler/Validator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-14 08:15:19 UTC (rev 621)
+++ trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-14 12:07:31 UTC (rev 622)
@@ -323,12 +323,12 @@
*
* @throws JasperException in case of page encoding mismatch
*/
- private String comparePageEncodings(String pageDirEnc,
+ private String comparePageEncodings(String thePageDirEnc,
Node.PageDirective pageDir) throws JasperException {
Node.Root root = pageDir.getRoot();
- String configEnc = root.getJspConfigPageEncoding();
- pageDirEnc = pageDirEnc.toUpperCase();
+ String configEnc = root.getJspConfigPageEncoding().toUpperCase();
+ String pageDirEnc = thePageDirEnc.toUpperCase();
/*
* Compare the 'pageEncoding' attribute of the page directive with
@@ -337,8 +337,9 @@
* "UTF-16LE" as identical.
*/
if (configEnc != null) {
- if (!pageDirEnc.equalsIgnoreCase(configEnc)
- && (!pageDirEnc.startsWith("UTF-16") || !configEnc.startsWith("UTF-16"))) {
+ if (!pageDirEnc.equals(configEnc)
+ && (!pageDirEnc.startsWith("UTF-16") || !configEnc
+ .startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.config_pagedir_encoding_mismatch",
configEnc, pageDirEnc);
@@ -355,9 +356,10 @@
* identical.
*/
if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || root.isBomPresent()) {
- String pageEnc = root.getPageEncoding();
- if (!pageDirEnc.equalsIgnoreCase(pageEnc)
- && (!pageDirEnc.startsWith("UTF-16") || !pageEnc.startsWith("UTF-16"))) {
+ String pageEnc = root.getPageEncoding().toUpperCase();
+ if (!pageDirEnc.equals(pageEnc)
+ && (!pageDirEnc.startsWith("UTF-16") || !pageEnc
+ .startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.prolog_pagedir_encoding_mismatch",
pageEnc, pageDirEnc);
16 years, 7 months
JBossWeb SVN: r621 - trunk/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2008-05-14 04:15:19 -0400 (Wed, 14 May 2008)
New Revision: 621
Modified:
trunk/webapps/docs/config/http.xml
Log:
Add a note that we don't support it.
Modified: trunk/webapps/docs/config/http.xml
===================================================================
--- trunk/webapps/docs/config/http.xml 2008-05-13 22:30:41 UTC (rev 620)
+++ trunk/webapps/docs/config/http.xml 2008-05-14 08:15:19 UTC (rev 621)
@@ -102,7 +102,7 @@
settings for HTTPS than the default Java connector.<br/>
Other values for this attribute are, but not limited to:<br/>
<code>org.apache.coyote.http11.Http11Protocol</code> - same as HTTP/1.1<br/>
- <code>org.apache.coyote.http11.Http11NioProtocol</code> - non blocking Java connector<br/>
+ <code>org.apache.coyote.http11.Http11NioProtocol</code> - non blocking Java connector, not supported in JBossWeb<br/>
<code>org.apache.coyote.http11.Http11AprProtocol</code> - the APR connector.<br/>
Take a look at our <a href="#Connector Comparison">Connector Comparison</a> chart.
The configuration for both Java connectors are identical, both for http and https. <br/>
16 years, 7 months
JBossWeb SVN: r620 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 18:30:41 -0400 (Tue, 13 May 2008)
New Revision: 620
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Error state will stop requests until the next periodic event.
- Cleanup and some comments.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 18:13:00 UTC (rev 619)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 22:30:41 UTC (rev 620)
@@ -50,7 +50,6 @@
import org.apache.catalina.Service;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.StandardContext;
-import org.apache.catalina.core.StandardServer;
import org.apache.catalina.util.StringManager;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.buf.CharChunk;
@@ -75,41 +74,65 @@
StringManager.getManager(Constants.Package);
- // ---------------------------------------------- Constants
+ // -------------------------------------------------------------- Constants
protected enum State { OK, ERROR };
- // ---------------------------------------------- Properties
+ // ----------------------------------------------------------------- Fields
+ /**
+ * URL encoder used to generate requests bodies.
+ */
+ protected UEncoder encoder = new UEncoder();
+
+
+ /**
+ * State of the node. If a communication error occurs with the
+ * frontend proxy, the configuration will be refreshed.
+ */
+ protected State state = State.OK;
+
+
+ // ------------------------------------------------------------- Properties
+
+
+ /**
+ * Port on which the proxy is listening for balancer control commands.
+ */
protected int proxyPort = 8000;
public int getProxyPort() { return proxyPort; }
public void setProxyPort(int proxyPort) { this.proxyPort = proxyPort; }
+ /**
+ * Address on which the proxy is listening for balancer control commands.
+ * Default is localhost.
+ */
protected InetAddress proxyAddress = null;
public InetAddress getProxyAddress() { return proxyAddress; }
public void setAddress(InetAddress proxyAddress) { this.proxyAddress = proxyAddress; }
+ // FIXME: probably useless
protected String proxyURL = "/";
public String getProxyURL() { return proxyURL; }
public void setProxyURL(String proxyURL) { this.proxyURL = proxyURL; }
+ /**
+ * Connection timeout for communication with the proxy.
+ */
protected int socketTimeout = 5000;
public int getSocketTimeout() { return socketTimeout; }
public void setSocketTimeout(int socketTimeout) { this.socketTimeout = socketTimeout; }
- protected UEncoder encoder = new UEncoder();
- protected State state = State.OK;
-
-
// ---------------------------------------------- LifecycleListener Methods
+
/**
* Acknowledge the occurrence of the specified event.
* Note: Will never be called when the listener is associated to a Server,
@@ -143,6 +166,7 @@
}
+
/**
* Primary entry point for startup and shutdown events.
*
@@ -183,13 +207,33 @@
}
+ /**
+ * Retrieves the full proxy configuration.
+ *
+ * @return the proxy confguration
+ */
public String getProxyConfiguration() {
HashMap<String, String> parameters = new HashMap<String, String>();
// Send DUMP * request
return sendRequest("DUMP", true, parameters);
+ /*
+ response: HTTP/1.1 200 OK
+ response:
+ node: [1:1] JVMRoute: node1 Domain: [bla] Host: 127.0.0.1 Port: 8009 Type: ajp
+ host: 1 [] vhost: 1 node: 1
+ context: 1 [/] vhost: 1 node: 1 status: 1
+ context: 2 [/myapp] vhost: 1 node: 1 status: 1
+ context: 3 [/host-manager] vhost: 1 node: 1 status: 1
+ context: 4 [/docs] vhost: 1 node: 1 status: 1
+ context: 5 [/manager] vhost: 1 node: 1 status: 1
+ */
}
+ /**
+ * Send commands to the front end server assocaited with the startup of the
+ * node.
+ */
protected void startServer(Server server) {
Service[] services = server.findServices();
for (int i = 0; i < services.length; i++) {
@@ -208,6 +252,10 @@
}
+ /**
+ * Send commands to the front end server associated with the shutdown of the
+ * node.
+ */
protected void stopServer(Server server) {
Service[] services = server.findServices();
for (int i = 0; i < services.length; i++) {
@@ -225,7 +273,12 @@
}
}
-
+
+ /**
+ * Send the configuration for the specified engine to the proxy.
+ *
+ * @param engine
+ */
protected void config(Engine engine) {
System.out.println("Config: " + engine.getName());
// Collect configuration from the connectors and service and call CONFIG
@@ -261,6 +314,11 @@
}
+ /**
+ * Remove all contexts from the specified engine.
+ *
+ * @param engine
+ */
protected void removeAll(Engine engine) {
System.out.println("Stop: " + engine.getName());
@@ -272,6 +330,12 @@
}
+ /**
+ * Send a periodic status request. If in error state, the listener will attempt to refresh
+ * the configuration on the front end server.
+ *
+ * @param engine
+ */
protected void status(Engine engine) {
if (state != State.OK) {
state = State.OK;
@@ -292,6 +356,11 @@
}
+ /**
+ * Add a new context.
+ *
+ * @param context
+ */
protected void addContext(Context context) {
System.out.println("Deploy context: " + context.getPath() + " to Host: " + context.getParent().getName() + " State: " + ((StandardContext) context).getState());
((Lifecycle) context).addLifecycleListener(this);
@@ -308,6 +377,11 @@
}
+ /**
+ * Remove a context.
+ *
+ * @param context
+ */
protected void removeContext(Context context) {
System.out.println("Undeploy context: " + context.getPath() + " to Host: " + context.getParent().getName() + " State: " + ((StandardContext) context).getState());
((Lifecycle) context).removeLifecycleListener(this);
@@ -322,6 +396,11 @@
}
+ /**
+ * Start a context.
+ *
+ * @param context
+ */
protected void startContext(Context context) {
Container parent = context.getParent();
System.out.println("Start context: " + context.getPath() + " to Host: " + parent.getName());
@@ -336,6 +415,11 @@
}
+ /**
+ * Stop a context.
+ *
+ * @param context
+ */
protected void stopContext(Context context) {
Container parent = context.getParent();
System.out.println("Stop context: " + context.getPath() + " to Host: " + parent.getName());
@@ -350,11 +434,23 @@
}
+ /**
+ * Return the JvmRoute for the specified context.
+ *
+ * @param context
+ * @return
+ */
protected String getJvmRoute(Context context) {
return ((Engine) context.getParent().getParent()).getJvmRoute();
}
-
+
+ /**
+ * Return the host and its alias list with which the context is associated.
+ *
+ * @param context
+ * @return
+ */
protected String getHost(Context context) {
StringBuffer result = new StringBuffer();
Host host = (Host) context.getParent();
@@ -368,6 +464,13 @@
}
+ /**
+ * Find the most likely connector the proxy server should connect to, or
+ * accept connections from.
+ *
+ * @param connectors
+ * @return
+ */
protected Connector findProxyConnector(Connector[] connectors) {
int pos = 0;
int maxThreads = 0;
@@ -389,6 +492,13 @@
return connectors[pos];
}
+
+ /**
+ * Return the address on which the connector is bound.
+ *
+ * @param connector
+ * @return
+ */
protected String getAddress(Connector connector) {
InetAddress inetAddress =
(InetAddress) IntrospectionUtils.getProperty(connector.getProtocolHandler(), "address");
@@ -400,7 +510,25 @@
}
}
+
+ /**
+ * Send HTTP request, with the specified list of parameters. If an IO error occurs, the error state will
+ * be set. If the front end server reports an error, will mark as error state. Other unexpected exceptions
+ * will be thrown and the error state will be set.
+ *
+ * @param command
+ * @param wildcard
+ * @param parameters
+ * @return the response body as a String; null if in error state or a normal error occurs
+ */
protected String sendRequest(String command, boolean wildcard, HashMap<String, String> parameters) {
+
+ // If there was an error, do nothing until the next periodic event, where the whole configuration
+ // will be refreshed
+ if (state != State.OK) {
+ return null;
+ }
+
Reader reader = null;
Writer writer = null;
CharChunk keyCC = null;
@@ -435,30 +563,6 @@
String requestLine = command + " " + ((wildcard) ? "*" : proxyURL) + " HTTP/1.0";
int contentLength = keyCC.getLength();
- /*
- URL url = new URL("http", (proxyAddress == null) ? "127.0.0.1" : proxyAddress.toString(), proxyPort, (wildcard) ? "*" : proxyURL);
- System.out.println(url.toString() + " Request body: " + new String(keyCC.getBuffer(), keyCC.getStart(), keyCC.getLength()));
- connection = (HttpURLConnection) url.openConnection();
- connection.setRequestMethod(command);
- //connection.addRequestProperty("Content-type", "application/x-www-form-urlencoded");
- connection.setFixedLengthStreamingMode(keyCC.getLength());
- connection.setDoOutput(true);
- connection.setDoInput(true);
- connection.setUseCaches(false);
- connection.connect();*/
-
- /*
-response: HTTP/1.1 200 OK
-response:
-node: [1:1] JVMRoute: node1 Domain: [øcx97;x97;¿À°] Host: 127.0.0.1 Port: 8009 Type: ajp
-host: 1 [] vhost: 1 node: 1
-context: 1 [/] vhost: 1 node: 1 status: 1
-context: 2 [/myapp] vhost: 1 node: 1 status: 1
-context: 3 [/host-manager] vhost: 1 node: 1 status: 1
-context: 4 [/docs] vhost: 1 node: 1 status: 1
-context: 5 [/manager] vhost: 1 node: 1 status: 1
- */
-
writer = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()));
writer.write(requestLine);
writer.write("\r\n");
@@ -518,7 +622,9 @@
state = State.ERROR;
}
}
+
return null;
+
}
16 years, 7 months
JBossWeb SVN: r619 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 14:13:00 -0400 (Tue, 13 May 2008)
New Revision: 619
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Handle errors (if error, then clear and restore the configuration).
- Add a JMX friendly hook for getting the dump of the proxy configuration.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 16:20:12 UTC (rev 618)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 18:13:00 UTC (rev 619)
@@ -46,9 +46,11 @@
import org.apache.catalina.LifecycleEvent;
import org.apache.catalina.LifecycleListener;
import org.apache.catalina.Server;
+import org.apache.catalina.ServerFactory;
import org.apache.catalina.Service;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.core.StandardContext;
+import org.apache.catalina.core.StandardServer;
import org.apache.catalina.util.StringManager;
import org.apache.tomcat.util.IntrospectionUtils;
import org.apache.tomcat.util.buf.CharChunk;
@@ -159,20 +161,7 @@
}
} else if (Lifecycle.AFTER_START_EVENT.equals(event.getType())) {
if (source instanceof Server) {
- Service[] services = ((Server) source).findServices();
- for (int i = 0; i < services.length; i++) {
- services[i].getContainer().addContainerListener(this);
- ((Lifecycle) services[i].getContainer()).addLifecycleListener(this);
- config((Engine) services[i].getContainer());
- Container[] children = services[i].getContainer().findChildren();
- for (int j = 0; j < children.length; j++) {
- children[j].addContainerListener(this);
- Container[] children2 = children[j].findChildren();
- for (int k = 0; k < children2.length; k++) {
- addContext((Context) children2[k]);
- }
- }
- }
+ startServer((Server) source);
} else {
return;
}
@@ -181,20 +170,7 @@
// Stop a webapp
stopContext((Context) source);
} else if (source instanceof Server) {
- Service[] services = ((Server) source).findServices();
- for (int i = 0; i < services.length; i++) {
- services[i].getContainer().removeContainerListener(this);
- ((Lifecycle) services[i].getContainer()).removeLifecycleListener(this);
- removeAll((Engine) services[i].getContainer());
- Container[] children = services[i].getContainer().findChildren();
- for (int j = 0; j < children.length; j++) {
- children[j].removeContainerListener(this);
- Container[] children2 = children[j].findChildren();
- for (int k = 0; k < children2.length; k++) {
- removeContext((Context) children2[k]);
- }
- }
- }
+ stopServer((Server) source);
} else {
return;
}
@@ -207,6 +183,49 @@
}
+ public String getProxyConfiguration() {
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ // Send DUMP * request
+ return sendRequest("DUMP", true, parameters);
+ }
+
+
+ protected void startServer(Server server) {
+ Service[] services = server.findServices();
+ for (int i = 0; i < services.length; i++) {
+ services[i].getContainer().addContainerListener(this);
+ ((Lifecycle) services[i].getContainer()).addLifecycleListener(this);
+ config((Engine) services[i].getContainer());
+ Container[] children = services[i].getContainer().findChildren();
+ for (int j = 0; j < children.length; j++) {
+ children[j].addContainerListener(this);
+ Container[] children2 = children[j].findChildren();
+ for (int k = 0; k < children2.length; k++) {
+ addContext((Context) children2[k]);
+ }
+ }
+ }
+ }
+
+
+ protected void stopServer(Server server) {
+ Service[] services = server.findServices();
+ for (int i = 0; i < services.length; i++) {
+ services[i].getContainer().removeContainerListener(this);
+ ((Lifecycle) services[i].getContainer()).removeLifecycleListener(this);
+ removeAll((Engine) services[i].getContainer());
+ Container[] children = services[i].getContainer().findChildren();
+ for (int j = 0; j < children.length; j++) {
+ children[j].removeContainerListener(this);
+ Container[] children2 = children[j].findChildren();
+ for (int k = 0; k < children2.length; k++) {
+ removeContext((Context) children2[k]);
+ }
+ }
+ }
+ }
+
+
protected void config(Engine engine) {
System.out.println("Config: " + engine.getName());
// Collect configuration from the connectors and service and call CONFIG
@@ -241,7 +260,7 @@
sendRequest("CONFIG", false, parameters);
}
-
+
protected void removeAll(Engine engine) {
System.out.println("Stop: " + engine.getName());
@@ -254,15 +273,22 @@
protected void status(Engine engine) {
- System.out.println("Status: " + engine.getName());
+ if (state != State.OK) {
+ state = State.OK;
+ // Something went wrong in a status at some point, so fully restore the configuration
+ stopServer(ServerFactory.getServer());
+ startServer(ServerFactory.getServer());
+ } else {
+ System.out.println("Status: " + engine.getName());
- Connector connector = findProxyConnector(engine.getService().findConnectors());
- HashMap<String, String> parameters = new HashMap<String, String>();
- parameters.put("JVMRoute", engine.getJvmRoute());
- parameters.put("Load", "1");
+ Connector connector = findProxyConnector(engine.getService().findConnectors());
+ HashMap<String, String> parameters = new HashMap<String, String>();
+ parameters.put("JVMRoute", engine.getJvmRoute());
+ parameters.put("Load", "1");
- // Send STATUS request
- sendRequest("STATUS", false, parameters);
+ // Send STATUS request
+ sendRequest("STATUS", false, parameters);
+ }
}
@@ -272,7 +298,8 @@
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", getJvmRoute(context));
- parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Alias", getHost(context));
// Send ENABLE-APP if state is started
if (context.isStarted()) {
@@ -287,7 +314,8 @@
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", getJvmRoute(context));
- parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Alias", getHost(context));
// Send REMOVE-APP
sendRequest("REMOVE-APP", false, parameters);
@@ -300,7 +328,8 @@
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", getJvmRoute(context));
- parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Alias", getHost(context));
// Send ENABLE-APP
sendRequest("ENABLE-APP", false, parameters);
@@ -313,7 +342,8 @@
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", getJvmRoute(context));
- parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Context", ("".equals(context.getPath())) ? "/" : context.getPath());
+ parameters.put("Alias", getHost(context));
// Send STOP-APP
sendRequest("STOP-APP", false, parameters);
@@ -325,6 +355,19 @@
}
+ protected String getHost(Context context) {
+ StringBuffer result = new StringBuffer();
+ Host host = (Host) context.getParent();
+ result.append(host.getName());
+ String[] aliases = host.findAliases();
+ for (int i = 0; i < aliases.length; i++) {
+ result.append(',');
+ result.append(aliases[i]);
+ }
+ return result.toString();
+ }
+
+
protected Connector findProxyConnector(Connector[] connectors) {
int pos = 0;
int maxThreads = 0;
@@ -439,7 +482,8 @@
}
}
//System.out.println("Response body: " + result.toString());
- // FIXME: probably parse away the request header; generate an error if not 200 ?
+ // FIXME: probably parse away the request header
+ // FIXME: generate an IOE or similar if not 200, or simply mark as error ?
ok = true;
return result.toString();
16 years, 7 months
JBossWeb SVN: r618 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 12:20:12 -0400 (Tue, 13 May 2008)
New Revision: 618
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Timeout.
- Add load to STATUS.
- Add state field.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 15:40:30 UTC (rev 617)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 16:20:12 UTC (rev 618)
@@ -75,7 +75,10 @@
// ---------------------------------------------- Constants
+
+ protected enum State { OK, ERROR };
+
// ---------------------------------------------- Properties
@@ -94,7 +97,13 @@
public void setProxyURL(String proxyURL) { this.proxyURL = proxyURL; }
+ protected int socketTimeout = 5000;
+ public int getSocketTimeout() { return socketTimeout; }
+ public void setSocketTimeout(int socketTimeout) { this.socketTimeout = socketTimeout; }
+
+
protected UEncoder encoder = new UEncoder();
+ protected State state = State.OK;
// ---------------------------------------------- LifecycleListener Methods
@@ -250,6 +259,7 @@
Connector connector = findProxyConnector(engine.getService().findConnectors());
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", engine.getJvmRoute());
+ parameters.put("Load", "1");
// Send STATUS request
sendRequest("STATUS", false, parameters);
@@ -352,6 +362,7 @@
Writer writer = null;
CharChunk keyCC = null;
Socket connection = null;
+ boolean ok = false;
try {
// First, encode the POST body
Iterator<String> keys = parameters.keySet().iterator();
@@ -363,7 +374,9 @@
}
keyCC = encoder.encodeURL(key, 0, key.length());
keyCC.append('=');
- keyCC = encoder.encodeURL(value, 0, value.length());
+ if (value != null) {
+ keyCC = encoder.encodeURL(value, 0, value.length());
+ }
if (keys.hasNext()) {
keyCC.append('&');
}
@@ -375,6 +388,7 @@
} else {
connection = new Socket(proxyAddress, proxyPort);
}
+ connection.setSoTimeout(socketTimeout);
String requestLine = command + " " + ((wildcard) ? "*" : proxyURL) + " HTTP/1.0";
int contentLength = keyCC.getLength();
@@ -389,6 +403,18 @@
connection.setDoInput(true);
connection.setUseCaches(false);
connection.connect();*/
+
+ /*
+response: HTTP/1.1 200 OK
+response:
+node: [1:1] JVMRoute: node1 Domain: [øcx97;x97;¿À°] Host: 127.0.0.1 Port: 8009 Type: ajp
+host: 1 [] vhost: 1 node: 1
+context: 1 [/] vhost: 1 node: 1 status: 1
+context: 2 [/myapp] vhost: 1 node: 1 status: 1
+context: 3 [/host-manager] vhost: 1 node: 1 status: 1
+context: 4 [/docs] vhost: 1 node: 1 status: 1
+context: 5 [/manager] vhost: 1 node: 1 status: 1
+ */
writer = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()));
writer.write(requestLine);
@@ -414,6 +440,7 @@
}
//System.out.println("Response body: " + result.toString());
// FIXME: probably parse away the request header; generate an error if not 200 ?
+ ok = true;
return result.toString();
} catch (IOException e) {
@@ -443,6 +470,9 @@
// Ignore
}
}
+ if (!ok) {
+ state = State.ERROR;
+ }
}
return null;
}
16 years, 7 months
JBossWeb SVN: r617 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 11:40:30 -0400 (Tue, 13 May 2008)
New Revision: 617
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Add explicit exception for null attribute value.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 14:43:47 UTC (rev 616)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 15:40:30 UTC (rev 617)
@@ -358,6 +358,9 @@
while (keys.hasNext()) {
String key = keys.next();
String value = parameters.get(key);
+ if (value == null) {
+ throw new IllegalStateException("Value for attribute " + key + " cannot be null");
+ }
keyCC = encoder.encodeURL(key, 0, key.length());
keyCC.append('=');
keyCC = encoder.encodeURL(value, 0, value.length());
16 years, 7 months
JBossWeb SVN: r616 - trunk/java/org/jboss/web/cluster.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 10:43:47 -0400 (Tue, 13 May 2008)
New Revision: 616
Modified:
trunk/java/org/jboss/web/cluster/ClusterListener.java
Log:
- Add code to make HTTP/1.0 requests using straight sockets (HttpUrlConnection is not an appropriate HTTP client,
and exposing HttpClient to webapps is not that great an idea).
- Move sending config to after start.
Modified: trunk/java/org/jboss/web/cluster/ClusterListener.java
===================================================================
--- trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 11:50:48 UTC (rev 615)
+++ trunk/java/org/jboss/web/cluster/ClusterListener.java 2008-05-13 14:43:47 UTC (rev 616)
@@ -24,8 +24,17 @@
package org.jboss.web.cluster;
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.Reader;
+import java.io.Writer;
import java.net.InetAddress;
+import java.net.Socket;
import java.util.HashMap;
+import java.util.Iterator;
import org.apache.catalina.Container;
import org.apache.catalina.ContainerEvent;
@@ -42,6 +51,8 @@
import org.apache.catalina.core.StandardContext;
import org.apache.catalina.util.StringManager;
import org.apache.tomcat.util.IntrospectionUtils;
+import org.apache.tomcat.util.buf.CharChunk;
+import org.apache.tomcat.util.buf.UEncoder;
import org.jboss.logging.Logger;
@@ -77,7 +88,15 @@
public InetAddress getProxyAddress() { return proxyAddress; }
public void setAddress(InetAddress proxyAddress) { this.proxyAddress = proxyAddress; }
+
+ protected String proxyURL = "/";
+ public String getProxyURL() { return proxyURL; }
+ public void setProxyURL(String proxyURL) { this.proxyURL = proxyURL; }
+
+ protected UEncoder encoder = new UEncoder();
+
+
// ---------------------------------------------- LifecycleListener Methods
/**
@@ -126,7 +145,11 @@
if (source instanceof Context) {
// Start a webapp
startContext((Context) source);
- } else if (source instanceof Server) {
+ } else {
+ return;
+ }
+ } else if (Lifecycle.AFTER_START_EVENT.equals(event.getType())) {
+ if (source instanceof Server) {
Service[] services = ((Server) source).findServices();
for (int i = 0; i < services.length; i++) {
services[i].getContainer().addContainerListener(this);
@@ -180,7 +203,12 @@
// Collect configuration from the connectors and service and call CONFIG
Connector connector = findProxyConnector(engine.getService().findConnectors());
HashMap<String, String> parameters = new HashMap<String, String>();
- parameters.put("JVMRoute", engine.getJvmRoute());
+ if (engine.getJvmRoute() == null) {
+ // FIXME: automagical JVM route (some hash of address + port + engineName ?)
+ throw new IllegalStateException("JVMRoute must be set");
+ } else {
+ parameters.put("JVMRoute", engine.getJvmRoute());
+ }
boolean reverseConnection =
Boolean.TRUE.equals(IntrospectionUtils.getProperty(connector.getProtocolHandler(), "reverseConnection"));
boolean ssl =
@@ -201,28 +229,30 @@
}
// Send CONFIG request
- // FIXME: By default, connect on localhost on some predefined port ?
+ sendRequest("CONFIG", false, parameters);
}
protected void removeAll(Engine engine) {
System.out.println("Stop: " + engine.getName());
- // FIXME: send STATUS
+
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", engine.getJvmRoute());
- // FIXME: Send REMOVE-APP * request
+ // Send REMOVE-APP * request
+ sendRequest("REMOVE-APP", true, parameters);
}
protected void status(Engine engine) {
System.out.println("Status: " + engine.getName());
- // FIXME: send STATUS
+
Connector connector = findProxyConnector(engine.getService().findConnectors());
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", engine.getJvmRoute());
- // FIXME: Send STATUS request
+ // Send STATUS request
+ sendRequest("STATUS", false, parameters);
}
@@ -230,12 +260,14 @@
System.out.println("Deploy context: " + context.getPath() + " to Host: " + context.getParent().getName() + " State: " + ((StandardContext) context).getState());
((Lifecycle) context).addLifecycleListener(this);
- boolean started = (((StandardContext) context).getState() == 1);
HashMap<String, String> parameters = new HashMap<String, String>();
parameters.put("JVMRoute", getJvmRoute(context));
parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
- // FIXME: send ENABLE-APP if state is started
+ // Send ENABLE-APP if state is started
+ if (context.isStarted()) {
+ sendRequest("ENABLE-APP", false, parameters);
+ }
}
@@ -247,7 +279,8 @@
parameters.put("JVMRoute", getJvmRoute(context));
parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
- // FIXME: send REMOVE-APP
+ // Send REMOVE-APP
+ sendRequest("REMOVE-APP", false, parameters);
}
@@ -259,7 +292,8 @@
parameters.put("JVMRoute", getJvmRoute(context));
parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
- // FIXME: send ENABLE-APP
+ // Send ENABLE-APP
+ sendRequest("ENABLE-APP", false, parameters);
}
@@ -271,7 +305,8 @@
parameters.put("JVMRoute", getJvmRoute(context));
parameters.put("context", ("".equals(context.getPath())) ? "/" : context.getPath());
- // FIXME: send STOP-APP
+ // Send STOP-APP
+ sendRequest("STOP-APP", false, parameters);
}
@@ -306,10 +341,108 @@
(InetAddress) IntrospectionUtils.getProperty(connector.getProtocolHandler(), "address");
if (inetAddress == null) {
// FIXME: Return local address ? This is hard ...
- return null;
+ return "127.0.0.1";
} else {
return inetAddress.toString();
}
}
+
+ protected String sendRequest(String command, boolean wildcard, HashMap<String, String> parameters) {
+ Reader reader = null;
+ Writer writer = null;
+ CharChunk keyCC = null;
+ Socket connection = null;
+ try {
+ // First, encode the POST body
+ Iterator<String> keys = parameters.keySet().iterator();
+ while (keys.hasNext()) {
+ String key = keys.next();
+ String value = parameters.get(key);
+ keyCC = encoder.encodeURL(key, 0, key.length());
+ keyCC.append('=');
+ keyCC = encoder.encodeURL(value, 0, value.length());
+ if (keys.hasNext()) {
+ keyCC.append('&');
+ }
+ }
+
+ // Then, connect to the proxy
+ if (proxyAddress == null) {
+ connection = new Socket("127.0.0.1", proxyPort);
+ } else {
+ connection = new Socket(proxyAddress, proxyPort);
+ }
+
+ String requestLine = command + " " + ((wildcard) ? "*" : proxyURL) + " HTTP/1.0";
+ int contentLength = keyCC.getLength();
+ /*
+ URL url = new URL("http", (proxyAddress == null) ? "127.0.0.1" : proxyAddress.toString(), proxyPort, (wildcard) ? "*" : proxyURL);
+ System.out.println(url.toString() + " Request body: " + new String(keyCC.getBuffer(), keyCC.getStart(), keyCC.getLength()));
+ connection = (HttpURLConnection) url.openConnection();
+ connection.setRequestMethod(command);
+ //connection.addRequestProperty("Content-type", "application/x-www-form-urlencoded");
+ connection.setFixedLengthStreamingMode(keyCC.getLength());
+ connection.setDoOutput(true);
+ connection.setDoInput(true);
+ connection.setUseCaches(false);
+ connection.connect();*/
+ writer = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()));
+ writer.write(requestLine);
+ writer.write("\r\n");
+ writer.write("Content-Length: " + contentLength + "\r\n");
+ writer.write("User-Agent: ClusterListener/1.0\r\n");
+ writer.write("\r\n");
+ writer.write(keyCC.getBuffer(), keyCC.getStart(), keyCC.getLength());
+ writer.write("\r\n");
+ writer.flush();
+
+ // Read the response to a string
+ reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
+ StringBuffer result = new StringBuffer();
+ char[] buf = new char[512];
+ while (true) {
+ int n = reader.read(buf);
+ if (n <= 0) {
+ break;
+ } else {
+ result.append(buf, 0, n);
+ }
+ }
+ //System.out.println("Response body: " + result.toString());
+ // FIXME: probably parse away the request header; generate an error if not 200 ?
+ return result.toString();
+
+ } catch (IOException e) {
+ log.error("Error sending: " + command, e);
+ } finally {
+ if (keyCC != null) {
+ keyCC.recycle();
+ }
+ if (writer != null) {
+ try {
+ writer.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ if (connection != null) {
+ try {
+ connection.close();
+ } catch (IOException e) {
+ // Ignore
+ }
+ }
+ }
+ return null;
+ }
+
+
}
16 years, 7 months
JBossWeb SVN: r615 - in trunk: java/org/apache/jasper/compiler and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 07:50:48 -0400 (Tue, 13 May 2008)
New Revision: 615
Modified:
trunk/java/org/apache/catalina/core/StandardContext.java
trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
trunk/java/org/apache/jasper/compiler/Validator.java
trunk/webapps/docs/changelog.xml
Log:
- Two Tomcat ports, and a bugfix for charset case sensitivity in a rare case.
Modified: trunk/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-13 10:29:12 UTC (rev 614)
+++ trunk/java/org/apache/catalina/core/StandardContext.java 2008-05-13 11:50:48 UTC (rev 615)
@@ -4291,15 +4291,6 @@
getCluster().registerManager(manager);
}
-
- // Start manager
- if ((manager != null) && (manager instanceof Lifecycle)) {
- ((Lifecycle) getManager()).start();
- }
-
- // Start ContainerBackgroundProcessor thread
- super.threadStart();
-
mainOk = true;
}
@@ -4360,14 +4351,28 @@
lifecycle.fireLifecycleEvent(AFTER_START_EVENT, null);
}
- // Configure and call application event listeners and filters
+ // Configure and call application event listeners
if (ok) {
if (!listenerStart()) {
log.error( "Error listenerStart");
ok = false;
}
}
+
+ // Start manager
+ if (ok && (manager != null) && (manager instanceof Lifecycle)) {
+ ok = false;
+ ((Lifecycle) getManager()).start();
+ ok = true;
+ }
+
+ // Start ContainerBackgroundProcessor thread
if (ok) {
+ super.threadStart();
+ }
+
+ // Configure and call application filters
+ if (ok) {
if (!filterStart()) {
log.error( "Error filterStart");
ok = false;
Modified: trunk/java/org/apache/jasper/compiler/JspDocumentParser.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/JspDocumentParser.java 2008-05-13 10:29:12 UTC (rev 614)
+++ trunk/java/org/apache/jasper/compiler/JspDocumentParser.java 2008-05-13 11:50:48 UTC (rev 615)
@@ -278,8 +278,11 @@
return;
}
+ String currentPrefix = getPrefix(current.getQName());
+
// jsp:text must not have any subelements
- if (JSP_URI.equals(uri) && TEXT_ACTION.equals(current.getLocalName())) {
+ if (JSP_URI.equals(uri) && TEXT_ACTION.equals(current.getLocalName())
+ && "jsp".equals(currentPrefix)) {
throw new SAXParseException(
Localizer.getMessage("jsp.error.text.has_subelement"),
locator);
@@ -1175,11 +1178,7 @@
}
}
- String prefix = "";
- int colon = qName.indexOf(':');
- if (colon != -1) {
- prefix = qName.substring(0, colon);
- }
+ String prefix = getPrefix(qName);
Node.CustomTag ret = null;
if (tagInfo != null) {
@@ -1366,9 +1365,8 @@
*/
private void checkPrefix(String uri, String qName) {
- int index = qName.indexOf(':');
- if (index != -1) {
- String prefix = qName.substring(0, index);
+ String prefix = getPrefix(qName);
+ if (prefix.length() > 0) {
pageInfo.addPrefix(prefix);
if ("jsp".equals(prefix) && !JSP_URI.equals(uri)) {
pageInfo.setIsJspPrefixHijacked(true);
@@ -1376,6 +1374,14 @@
}
}
+ private String getPrefix(String qName) {
+ int index = qName.indexOf(':');
+ if (index != -1) {
+ return qName.substring(0, index);
+ }
+ return "";
+ }
+
/*
* Gets SAXParser.
*
Modified: trunk/java/org/apache/jasper/compiler/Validator.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-13 10:29:12 UTC (rev 614)
+++ trunk/java/org/apache/jasper/compiler/Validator.java 2008-05-13 11:50:48 UTC (rev 615)
@@ -328,6 +328,7 @@
Node.Root root = pageDir.getRoot();
String configEnc = root.getJspConfigPageEncoding();
+ pageDirEnc = pageDirEnc.toUpperCase();
/*
* Compare the 'pageEncoding' attribute of the page directive with
@@ -336,9 +337,8 @@
* "UTF-16LE" as identical.
*/
if (configEnc != null) {
- if (!pageDirEnc.equals(configEnc)
- && (!pageDirEnc.startsWith("UTF-16") || !configEnc
- .startsWith("UTF-16"))) {
+ if (!pageDirEnc.equalsIgnoreCase(configEnc)
+ && (!pageDirEnc.startsWith("UTF-16") || !configEnc.startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.config_pagedir_encoding_mismatch",
configEnc, pageDirEnc);
@@ -356,9 +356,8 @@
*/
if ((root.isXmlSyntax() && root.isEncodingSpecifiedInProlog()) || root.isBomPresent()) {
String pageEnc = root.getPageEncoding();
- if (!pageDirEnc.equals(pageEnc)
- && (!pageDirEnc.startsWith("UTF-16") || !pageEnc
- .startsWith("UTF-16"))) {
+ if (!pageDirEnc.equalsIgnoreCase(pageEnc)
+ && (!pageDirEnc.startsWith("UTF-16") || !pageEnc.startsWith("UTF-16"))) {
err.jspError(pageDir,
"jsp.error.prolog_pagedir_encoding_mismatch",
pageEnc, pageDirEnc);
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-05-13 10:29:12 UTC (rev 614)
+++ trunk/webapps/docs/changelog.xml 2008-05-13 11:50:48 UTC (rev 615)
@@ -55,6 +55,9 @@
<fix>
<bug>44021</bug>: Add support to manger and deployer for wars and dirs that use # to denote multi-level contexts. (markt)
</fix>
+ <fix>
+ <bug>42934</bug>: Trigger contextInitialized() before sessionDidActivate(). (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
@@ -78,6 +81,12 @@
<fix>
<jboss-jira>JBCTS-776</jboss-jira>: NPE regression in EL type handling. (remm)
</fix>
+ <fix>
+ <jboss-jira>JBAS-5518</jboss-jira>: Case insensitive comparison of charsets. (remm)
+ </fix>
+ <fix>
+ <bug>42943</bug>: Make sure the nested element is inside a <jsp:text> element. (markt)
+ </fix>
</changelog>
</subsection>
</section>
16 years, 7 months
JBossWeb SVN: r614 - in trunk/test/webapps: snoop and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-05-13 06:29:12 -0400 (Tue, 13 May 2008)
New Revision: 614
Added:
trunk/test/webapps/snoop/
trunk/test/webapps/snoop/snoop.jsp
Log:
- Snoop servlet useful for testing the cluster listener.
Added: trunk/test/webapps/snoop/snoop.jsp
===================================================================
--- trunk/test/webapps/snoop/snoop.jsp (rev 0)
+++ trunk/test/webapps/snoop/snoop.jsp 2008-05-13 10:29:12 UTC (rev 614)
@@ -0,0 +1,85 @@
+<html>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<body bgcolor="white">
+<h1> Request Information </h1>
+<font size="4">
+JSP Request Method: <%= request.getMethod() %>
+<br>
+Request URI: <%= request.getRequestURI() %>
+<br>
+Request Protocol: <%= request.getProtocol() %>
+<br>
+Servlet path: <%= request.getServletPath() %>
+<br>
+Path info: <%= request.getPathInfo() %>
+<br>
+Query string: <%= request.getQueryString() %>
+<br>
+Content length: <%= request.getContentLength() %>
+<br>
+Content type: <%= request.getContentType() %>
+<br>
+Server name: <%= request.getServerName() %>
+<br>
+Server port: <%= request.getServerPort() %>
+<br>
+Remote user: <%= request.getRemoteUser() %>
+<br>
+Remote address: <%= request.getRemoteAddr() %>
+<br>
+Remote host: <%= request.getRemoteHost() %>
+<br>
+Authorization scheme: <%= request.getAuthType() %>
+<br>
+Locale: <%= request.getLocale() %>
+</font>
+
+<h1> Params Information </h1>
+<font size="4">
+<%
+ java.util.Enumeration enumlist = request.getParameterNames();
+ while (enumlist.hasMoreElements()) {
+ String name = (String) enumlist.nextElement();
+ String value = request.getParameter(name);
+ out.println(name + ": " + value + "<br>");
+ }
+%>
+</font>
+
+<h1> Cluster Information </h1>
+<font size="4">
+JVMRoute: ${param.JVMRoute}
+<br>
+Reversed: ${param.Reversed}
+<br>
+Host: ${param.Host}
+<br>
+Port: ${param.Port}
+<br>
+Type: ${param.Type}
+<br>
+context: ${param.context}
+</font>
+
+<hr>
+The browser you are using is
+<%= request.getHeader("User-Agent") %>
+<hr>
+</body>
+</html>
16 years, 7 months