JBossWeb SVN: r446 - trunk/webapps/docs.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-25 16:42:23 -0500 (Mon, 25 Feb 2008)
New Revision: 446
Modified:
trunk/webapps/docs/changelog.xml
Log:
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-02-21 23:05:58 UTC (rev 445)
+++ trunk/webapps/docs/changelog.xml 2008-02-25 21:42:23 UTC (rev 446)
@@ -26,7 +26,7 @@
Fix licensing problems with two xsd files. (remm)
</fix>
<update>
- Update commons-logging to version 1.1.1 and the NSIS installer to 2.34.
+ Update to NSIS 2.35, and allow building it using Wine. (remm)
(markt)
</update>
<update>
@@ -38,7 +38,7 @@
<subsection name="Catalina">
<changelog>
<fix>
- Fix BZ 43588 - hard coded 127.0.0.1 for localhost. It requires localhost to be defined correctly in the machine. (jfclere)
+ <bug>43588</bug>: hard coded 127.0.0.1 for localhost. It requires localhost to be defined correctly in the machine. (jfclere)
</fix>
<fix>
Prevent cookie logic to escape quotes where the value is already a quoted-string. (jfclere)
@@ -248,11 +248,11 @@
<bug>43515</bug>: Fix bug in Manager application that may have caused
problems when listing contexts. Patch provided by Lucas Galfaso. (markt)
</fix>
- </changelog>
<fix>
Fix ManagerServlet.exipreSession throws Exceptions as iterate longer
session lists at production servers. (pero)
</fix>
+ </changelog>
</subsection>
</section>
16 years, 2 months
JBossWeb SVN: r445 - 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-02-21 18:05:58 -0500 (Thu, 21 Feb 2008)
New Revision: 445
Modified:
trunk/java/org/apache/jasper/JspCompilationContext.java
trunk/java/org/apache/jasper/compiler/Compiler.java
trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
trunk/webapps/docs/changelog.xml
Log:
- Optimize handling of tags in JARs.
Modified: trunk/java/org/apache/jasper/JspCompilationContext.java
===================================================================
--- trunk/java/org/apache/jasper/JspCompilationContext.java 2008-02-19 18:49:23 UTC (rev 444)
+++ trunk/java/org/apache/jasper/JspCompilationContext.java 2008-02-21 23:05:58 UTC (rev 445)
@@ -284,7 +284,25 @@
public URL getResource(String res) throws MalformedURLException {
- return context.getResource(canonicalURI(res));
+ URL result = null;
+
+ if (res.startsWith("/META-INF/")) {
+ // This is a tag file packaged in a jar that is being compiled
+ URL jarUrl = tagFileJarUrls.get(res);
+ if (jarUrl == null) {
+ jarUrl = tagFileJarUrl;
+ }
+ if (jarUrl != null) {
+ result = new URL(jarUrl.toExternalForm() + res.substring(1));
+ }
+ } else if (res.startsWith("jar:file:")) {
+ // This is a tag file packaged in a jar that is being checked
+ // for a dependency
+ result = new URL(res);
+ } else {
+ result = context.getResource(canonicalURI(res));
+ }
+ return result;
}
public Set getResourcePaths(String path) {
@@ -559,7 +577,7 @@
public void compile() throws JasperException, FileNotFoundException {
createCompiler();
- if (isPackagedTagFile || jspCompiler.isOutDated()) {
+ if (jspCompiler.isOutDated()) {
try {
jspCompiler.removeGeneratedFiles();
jspLoader = null;
Modified: trunk/java/org/apache/jasper/compiler/Compiler.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/Compiler.java 2008-02-19 18:49:23 UTC (rev 444)
+++ trunk/java/org/apache/jasper/compiler/Compiler.java 2008-02-21 23:05:58 UTC (rev 445)
@@ -23,6 +23,7 @@
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
+import java.net.JarURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.util.Iterator;
@@ -376,7 +377,12 @@
return false;
}
URLConnection uc = jspUrl.openConnection();
- jspRealLastModified = uc.getLastModified();
+ if (uc instanceof JarURLConnection) {
+ jspRealLastModified =
+ ((JarURLConnection) uc).getJarEntry().getTime();
+ } else {
+ jspRealLastModified = uc.getLastModified();
+ }
uc.getInputStream().close();
} catch (Exception e) {
return true;
@@ -427,9 +433,15 @@
return true;
}
- URLConnection includeUconn = includeUrl.openConnection();
- long includeLastModified = includeUconn.getLastModified();
- includeUconn.getInputStream().close();
+ URLConnection iuc = includeUrl.openConnection();
+ long includeLastModified = 0;
+ if (iuc instanceof JarURLConnection) {
+ includeLastModified =
+ ((JarURLConnection) iuc).getJarEntry().getTime();
+ } else {
+ includeLastModified = iuc.getLastModified();
+ }
+ iuc.getInputStream().close();
if (includeLastModified > targetLastModified) {
return true;
Modified: trunk/java/org/apache/jasper/compiler/TagFileProcessor.java
===================================================================
--- trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2008-02-19 18:49:23 UTC (rev 444)
+++ trunk/java/org/apache/jasper/compiler/TagFileProcessor.java 2008-02-21 23:05:58 UTC (rev 445)
@@ -619,9 +619,18 @@
TagFileInfo tagFileInfo = n.getTagFileInfo();
if (tagFileInfo != null) {
String tagFilePath = tagFileInfo.getPath();
- JspCompilationContext ctxt = compiler.getCompilationContext();
- if (ctxt.getTagFileJarUrl(tagFilePath) == null) {
- // Omit tag file dependency info on jar files for now.
+ if (tagFilePath.startsWith("/META-INF/")) {
+ // For tags in JARs, add the TLD and the tag as a dependency
+ String[] location =
+ compiler.getCompilationContext().getTldLocation(
+ tagFileInfo.getTagInfo().getTagLibrary().getURI());
+ // Add TLD
+ pageInfo.addDependant("jar:" + location[0] + "!/" +
+ location[1]);
+ // Add Tag
+ pageInfo.addDependant("jar:" + location[0] + "!" +
+ tagFilePath);
+ } else {
pageInfo.addDependant(tagFilePath);
}
Class c = loadTagFile(compiler, tagFilePath, n.getTagInfo(),
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-02-19 18:49:23 UTC (rev 444)
+++ trunk/webapps/docs/changelog.xml 2008-02-21 23:05:58 UTC (rev 445)
@@ -225,6 +225,9 @@
<bug>43925</bug>: Optimize allocation style for bodies (this removes the no-GC mode, however),
submitted by Brian Remmington. (remm)
</fix>
+ <fix>
+ <bug>43741</bug>: Improve handling of tags inside JARs. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Webapps">
16 years, 2 months
JBossWeb SVN: r444 - in trunk/res/procrun: ia64 and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-02-19 13:49:23 -0500 (Tue, 19 Feb 2008)
New Revision: 444
Modified:
trunk/res/procrun/amd64/jbossweb.exe
trunk/res/procrun/amd64/jbosswebw.exe
trunk/res/procrun/ia64/jbossweb.exe
trunk/res/procrun/ia64/jbosswebw.exe
Log:
Add resource modified binaries for x64 and ia64
Modified: trunk/res/procrun/amd64/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/amd64/jbosswebw.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/ia64/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/ia64/jbosswebw.exe
===================================================================
(Binary files differ)
16 years, 2 months
JBossWeb SVN: r443 - trunk/res/procrun.
by jbossweb-commits@lists.jboss.org
Author: mladen.turk(a)jboss.com
Date: 2008-02-19 12:29:14 -0500 (Tue, 19 Feb 2008)
New Revision: 443
Modified:
trunk/res/procrun/jbossweb.exe
trunk/res/procrun/jbosswebw.exe
Log:
Add modified resources procrun binaries. The code is the same only the resouces changed. x86 for now
Modified: trunk/res/procrun/jbossweb.exe
===================================================================
(Binary files differ)
Modified: trunk/res/procrun/jbosswebw.exe
===================================================================
(Binary files differ)
16 years, 2 months
JBossWeb SVN: r442 - trunk/java/org/apache/catalina/core.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-18 10:17:37 -0500 (Mon, 18 Feb 2008)
New Revision: 442
Modified:
trunk/java/org/apache/catalina/core/AprLifecycleListener.java
trunk/java/org/apache/catalina/core/LocalStrings.properties
Log:
- Remove displaying the accept filter flag, since it's not the same as the deferred accept feature.
Modified: trunk/java/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- trunk/java/org/apache/catalina/core/AprLifecycleListener.java 2008-02-18 12:35:38 UTC (rev 441)
+++ trunk/java/org/apache/catalina/core/AprLifecycleListener.java 2008-02-18 15:17:37 UTC (rev 442)
@@ -189,7 +189,7 @@
}
// Log APR flags
log.info(sm.getString("aprListener.flags", Library.APR_HAVE_IPV6, Library.APR_HAS_SENDFILE,
- Library.APR_HAS_SO_ACCEPTFILTER, Library.APR_HAS_RANDOM));
+ Library.APR_HAS_RANDOM));
return true;
}
Modified: trunk/java/org/apache/catalina/core/LocalStrings.properties
===================================================================
--- trunk/java/org/apache/catalina/core/LocalStrings.properties 2008-02-18 12:35:38 UTC (rev 441)
+++ trunk/java/org/apache/catalina/core/LocalStrings.properties 2008-02-18 15:17:37 UTC (rev 442)
@@ -22,7 +22,7 @@
aprListener.aprDestroy=Failed shutdown of Apache Portable Runtime
aprListener.sslInit=Failed to initialize the SSLEngine.
aprListener.tcnValid=Loaded Apache Tomcat Native library {0}.
-aprListener.flags=APR capabilities: IPv6 [{0}], sendfile [{1}], accept filters [{2}], random [{3}].
+aprListener.flags=APR capabilities: IPv6 [{0}], sendfile [{1}], random [{2}].
containerBase.addDefaultMapper=Exception configuring default mapper of class {0}
containerBase.alreadyStarted=Container {0} has already been started
containerBase.notConfigured=No basic Valve has been configured
16 years, 2 months
JBossWeb SVN: r441 - in trunk/res: procrun and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-18 07:35:38 -0500 (Mon, 18 Feb 2008)
New Revision: 441
Added:
trunk/res/procrun/amd64/jbossweb.exe
trunk/res/procrun/amd64/jbosswebw.exe
trunk/res/procrun/ia64/jbossweb.exe
trunk/res/procrun/ia64/jbosswebw.exe
trunk/res/procrun/jbossweb.exe
trunk/res/procrun/jbosswebw.exe
Removed:
trunk/res/procrun/amd64/jboss-web.exe
trunk/res/procrun/amd64/jboss-webw.exe
trunk/res/procrun/ia64/jboss-web.exe
trunk/res/procrun/ia64/jboss-webw.exe
trunk/res/procrun/jboss-web.exe
trunk/res/procrun/jboss-webw.exe
Modified:
trunk/res/jboss-web.nsi
Log:
- Rename service exe (it is tied to the service name for certain operations).
Modified: trunk/res/jboss-web.nsi
===================================================================
--- trunk/res/jboss-web.nsi 2008-02-18 12:27:06 UTC (rev 440)
+++ trunk/res/jboss-web.nsi 2008-02-18 12:35:38 UTC (rev 441)
@@ -34,7 +34,7 @@
!define MUI_HEADERIMAGE_BITMAP header.bmp
!define MUI_WELCOMEFINISHPAGE_BITMAP side_left.bmp
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\webapps\ROOT\RELEASE-NOTES.txt"
- !define MUI_FINISHPAGE_RUN $INSTDIR\bin\jboss-webw.exe
+ !define MUI_FINISHPAGE_RUN $INSTDIR\bin\jbosswebw.exe
!define MUI_FINISHPAGE_RUN_PARAMETERS //MR//JBossWeb
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
@@ -155,7 +155,7 @@
InstallRetry:
ClearErrors
- nsExec::ExecToLog '"$INSTDIR\bin\jboss-web.exe" //IS//JBossWeb --DisplayName "JBoss Web" --Description "JBoss Web @VERSION@ Server - http://labs.jboss.com/jbossweb/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\jboss-web.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
+ nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //IS//JBossWeb --DisplayName "JBoss Web" --Description "JBoss Web @VERSION@ Server - http://labs.jboss.com/jbossweb/" --LogPath "$INSTDIR\logs" --Install "$INSTDIR\bin\jbossweb.exe" --Jvm "$2" --StartPath "$INSTDIR" --StopPath "$INSTDIR"'
Pop $0
StrCmp $0 "0" InstallOk
MessageBox MB_ABORTRETRYIGNORE|MB_ICONSTOP \
@@ -182,9 +182,9 @@
Call findJVMPath
Pop $2
- nsExec::ExecToLog '"$INSTDIR\bin\jboss-web.exe" //US//JBossWeb --Startup auto'
+ nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //US//JBossWeb --Startup auto'
; Bahave like Apache Httpd (put the icon in try on login)
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "JBossWebMonitor" '"$INSTDIR\bin\jboss-webw.exe" //MS//JBossWeb'
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "JBossWebMonitor" '"$INSTDIR\bin\jbosswebw.exe" //MS//JBossWeb'
ClearErrors
@@ -246,12 +246,12 @@
"$INSTDIR"
CreateShortCut "$SMPROGRAMS\JBoss Web 2.1\Monitor JBoss Web.lnk" \
- "$INSTDIR\bin\jboss-webw.exe" \
+ "$INSTDIR\bin\jbosswebw.exe" \
'//MS//JBossWeb' \
"$INSTDIR\jboss-web.ico" 0 SW_SHOWNORMAL
CreateShortCut "$SMPROGRAMS\JBoss Web 2.1\Configure JBoss Web.lnk" \
- "$INSTDIR\bin\jboss-webw.exe" \
+ "$INSTDIR\bin\jbosswebw.exe" \
'//ES//JBossWeb' \
"$INSTDIR\jboss-web.ico" 0 SW_SHOWNORMAL
@@ -266,8 +266,8 @@
SectionEnd
Section -post
- nsExec::ExecToLog '"$INSTDIR\bin\jboss-web.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\jboss-web.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 --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'
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -585,15 +585,15 @@
Delete "$INSTDIR\Uninstall.exe"
; Stop JBoss Web service monitor if running
- nsExec::ExecToLog '"$INSTDIR\bin\jboss-webw.exe" //MQ//JBossWeb'
+ nsExec::ExecToLog '"$INSTDIR\bin\jbosswebw.exe" //MQ//JBossWeb'
; Delete JBoss Web service
- nsExec::ExecToLog '"$INSTDIR\bin\jboss-web.exe" //DS//JBossWeb'
+ nsExec::ExecToLog '"$INSTDIR\bin\jbossweb.exe" //DS//JBossWeb'
ClearErrors
DeleteRegKey HKCR "JSPFile"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\JBoss Web 2.1"
DeleteRegKey HKLM "SOFTWARE\JBoss.org\JBoss Web\2.1"
- DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "ApacheJBossWebMonitor"
+ DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "JBossWebMonitor"
RMDir /r "$SMPROGRAMS\JBoss Web 2.1"
Delete "$INSTDIR\jboss-web.ico"
Delete "$INSTDIR\LICENSE"
Deleted: trunk/res/procrun/amd64/jboss-web.exe
===================================================================
(Binary files differ)
Deleted: trunk/res/procrun/amd64/jboss-webw.exe
===================================================================
(Binary files differ)
Added: trunk/res/procrun/amd64/jbossweb.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/amd64/jbossweb.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/res/procrun/amd64/jbosswebw.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/amd64/jbosswebw.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/res/procrun/ia64/jboss-web.exe
===================================================================
(Binary files differ)
Deleted: trunk/res/procrun/ia64/jboss-webw.exe
===================================================================
(Binary files differ)
Added: trunk/res/procrun/ia64/jbossweb.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/ia64/jbossweb.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/res/procrun/ia64/jbosswebw.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/ia64/jbosswebw.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/res/procrun/jboss-web.exe
===================================================================
(Binary files differ)
Deleted: trunk/res/procrun/jboss-webw.exe
===================================================================
(Binary files differ)
Added: trunk/res/procrun/jbossweb.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/jbossweb.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/res/procrun/jbosswebw.exe
===================================================================
(Binary files differ)
Property changes on: trunk/res/procrun/jbosswebw.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 2 months
JBossWeb SVN: r440 - trunk/java/org/jboss/web/rewrite.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-18 07:27:06 -0500 (Mon, 18 Feb 2008)
New Revision: 440
Modified:
trunk/java/org/jboss/web/rewrite/RewriteCond.java
trunk/java/org/jboss/web/rewrite/RewriteRule.java
trunk/java/org/jboss/web/rewrite/RewriteValve.java
trunk/java/org/jboss/web/rewrite/Substitution.java
Log:
- Cleanups using generics (ok, it's not very useful ...).
Modified: trunk/java/org/jboss/web/rewrite/RewriteCond.java
===================================================================
--- trunk/java/org/jboss/web/rewrite/RewriteCond.java 2008-02-15 23:04:17 UTC (rev 439)
+++ trunk/java/org/jboss/web/rewrite/RewriteCond.java 2008-02-18 12:27:06 UTC (rev 440)
@@ -112,7 +112,7 @@
this.testString = testString;
}
- public void parse(Map maps) {
+ public void parse(Map<String, RewriteMap> maps) {
test = new Substitution();
test.setSub(testString);
test.parse(maps);
@@ -172,7 +172,7 @@
protected Substitution test = null;
- protected ThreadLocal condition = new ThreadLocal();
+ protected ThreadLocal<Condition> condition = new ThreadLocal<Condition>();
/**
* This makes the test case-insensitive, i.e., there is no difference between
@@ -199,7 +199,7 @@
if (nocase) {
value = value.toLowerCase();
}
- Condition condition = (Condition) this.condition.get();
+ Condition condition = this.condition.get();
if (condition == null) {
if (condPattern.startsWith("<")) {
LexicalCondition ncondition = new LexicalCondition();
Modified: trunk/java/org/jboss/web/rewrite/RewriteRule.java
===================================================================
--- trunk/java/org/jboss/web/rewrite/RewriteRule.java 2008-02-15 23:04:17 UTC (rev 439)
+++ trunk/java/org/jboss/web/rewrite/RewriteRule.java 2008-02-18 12:27:06 UTC (rev 440)
@@ -31,13 +31,13 @@
protected RewriteCond[] conditions = new RewriteCond[0];
- protected ThreadLocal pattern = new ThreadLocal();
+ protected ThreadLocal<Pattern> pattern = new ThreadLocal<Pattern>();
protected Substitution substitution = null;
protected String patternString = null;
protected String substitutionString = null;
- public void parse(Map maps) {
+ public void parse(Map<String, RewriteMap> maps) {
// Parse the substitution
if (!"-".equals(substitutionString)) {
substitution = new Substitution();
@@ -71,7 +71,7 @@
* @return null if no rewrite took place
*/
public CharSequence evaluate(CharSequence url, Resolver resolver) {
- Pattern pattern = (Pattern) this.pattern.get();
+ Pattern pattern = this.pattern.get();
if (pattern == null) {
// Parse the pattern
int flags = 0;
Modified: trunk/java/org/jboss/web/rewrite/RewriteValve.java
===================================================================
--- trunk/java/org/jboss/web/rewrite/RewriteValve.java 2008-02-15 23:04:17 UTC (rev 439)
+++ trunk/java/org/jboss/web/rewrite/RewriteValve.java 2008-02-18 12:27:06 UTC (rev 440)
@@ -73,7 +73,7 @@
/**
* If rewriting occurs, the whole request will be processed again.
*/
- protected ThreadLocal invoked = new ThreadLocal();
+ protected ThreadLocal<Boolean> invoked = new ThreadLocal<Boolean>();
/**
@@ -93,7 +93,7 @@
/**
* Maps to be used by the rules.
*/
- protected Map maps = new Hashtable();
+ protected Map<String, RewriteMap> maps = new Hashtable<String, RewriteMap>();
public void addLifecycleListener(LifecycleListener listener) {
@@ -249,9 +249,9 @@
}
public void stop() throws LifecycleException {
- Iterator values = maps.values().iterator();
+ Iterator<RewriteMap> values = maps.values().iterator();
while (values.hasNext()) {
- RewriteMap map = (RewriteMap) values.next();
+ RewriteMap map = values.next();
if (map instanceof Lifecycle) {
((Lifecycle) map).stop();
}
Modified: trunk/java/org/jboss/web/rewrite/Substitution.java
===================================================================
--- trunk/java/org/jboss/web/rewrite/Substitution.java 2008-02-15 23:04:17 UTC (rev 439)
+++ trunk/java/org/jboss/web/rewrite/Substitution.java 2008-02-18 12:27:06 UTC (rev 440)
@@ -104,9 +104,9 @@
public String getSub() { return sub; }
public void setSub(String sub) { this.sub = sub; }
- public void parse(Map maps) {
+ public void parse(Map<String, RewriteMap> maps) {
- ArrayList elements = new ArrayList();
+ ArrayList<SubstitutionElement> elements = new ArrayList<SubstitutionElement>();
int pos = 0;
int percentPos = 0;
int dollarPos = 0;
@@ -149,7 +149,7 @@
if (!(-1 < open && open < colon && colon < close)) {
throw new IllegalArgumentException(sub);
}
- newElement.map = (RewriteMap) maps.get(sub.substring(open + 1, colon));
+ newElement.map = maps.get(sub.substring(open + 1, colon));
if (newElement.map == null) {
throw new IllegalArgumentException(sub + ": No map: " + sub.substring(open + 1, colon));
}
16 years, 2 months
JBossWeb SVN: r439 - trunk/webapps/docs.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-15 18:04:17 -0500 (Fri, 15 Feb 2008)
New Revision: 439
Modified:
trunk/webapps/docs/aio.xml
Log:
- Sync with the API simplifications.
Modified: trunk/webapps/docs/aio.xml
===================================================================
--- trunk/webapps/docs/aio.xml 2008-02-15 19:44:04 UTC (rev 438)
+++ trunk/webapps/docs/aio.xml 2008-02-15 23:04:17 UTC (rev 439)
@@ -42,7 +42,7 @@
<subsection name="CometEvent">
<p>
- Servlets which implement the <code>org.apache.catalina.CometProcessor</code>
+ Servlets which implement the <code>org.jboss.web.comet.CometProcessor</code>
interface will have their event method invoked rather than the usual service
method, according to the event which occurred. The event object gives
access to the usual request and response objects, which may be used in the
@@ -68,7 +68,7 @@
must continue reading while data is reported available. When encountering a read error,
the servlet should report it by propagating the exception properly. Throwing
an exception will cause the error event to be invoked, and the connection
- will be closed.
+ will be closed.
Alternately, it is also possible to catch any exception, perform clean up
on any data structure the servlet may be using, and using the close method
of the event. It is not allowed to attempt reading data from the request
@@ -78,12 +78,17 @@
<li>EventType.END - End may be called to end the processing of the request. Fields that have
been initialized in the begin method should be reset. After this event has
been processed, the request and response objects, as well as all their dependent
- objects will be recycled and used to process other requests.</li>
+ objects will be recycled and used to process other requests. In particular,
+ this event will be called if the HTTP session associated with the connection
+ times out, if the web application is reloaded, if the server is shutdown, or
+ if the Comet connection was closed asynchronously.</li>
<li>EventType.ERROR - Error will be called by the container in the case where an IO exception
or a similar unrecoverable error occurs on the connection. Fields that have
been initialized in the begin method should be reset. After this event has
been processed, the request and response objects, as well as all their dependent
objects will be recycled and used to process other requests.</li>
+ <li>TIMEOUT - the connection timed out, but the connection will not be closed unless
+ the servlet uses the close method of the event</li>
<li>EventType.EVENT - Event will be called by the container after the resume() method is called,
during which any operations can be performed, including closing the Comet connection
using the close() method.</li>
@@ -94,32 +99,8 @@
</ul>
<p>
- There are some event subtypes which allow finer processing of events (note: some of these
- events require usage of the org.apache.catalina.valves.CometConnectionManagerValve valve):
- </p>
-
- <p>
- EventType.END event sub types:
- <ul>
- <li>EventSubType.WEBAPP_RELOAD - the web application is being reloaded</li>
- <li>EventSubType.SERVER_SHUTDOWN - the server is shutting down</li>
- <li>EventSubType.SESSION_END - the servlet ended the session</li>
- </ul>
- </p>
- <p>
- EventType.ERROR event sub types:
- <ul>
- <li>EventSubType.TIMEOUT - the connection timed out; note that this ERROR type is not fatal, and
- the connection will not be closed unless the servlet uses the close method of the event</li>
- <li>EventSubType.CLIENT_DISCONNECT - the client connection was closed</li>
- <li>EventSubType.IOEXCEPTION - an IO exception occurred, such as invalid content, for example,
- an invalid chunk block</li>
- </ul>
- </p>
-
- <p>
As described above, the typical lifecycle of a Comet request will consist in a series of
- events such as: BEGIN -> READ -> READ -> READ -> ERROR/TIMEOUT. At any time, the servlet
+ events such as: BEGIN -> READ -> READ -> READ -> TIMEOUT. At any time, the servlet
may end processing of the request by using the close method of the event object.
</p>
@@ -130,13 +111,13 @@
(during the processing of an event), the container will not call an END event.
If this method is called asynchronously, an END event will be sent to the
servlet (note that this event will be sent whenever another event would have
- been sent, such as a READ or ERROR/TIMEOUT event).
+ been sent, such as a READ or TIMEOUT event).
</p>
<p>
The setTimeout() method sets the timeout in milliseconds of idle time on the connection.
The timeout is reset every time data is received from the connection. If a timeout occurs, the
- servlet will receive an ERROR/TIMEOUT event which will not result in automatically closing
+ servlet will receive an TIMEOUT event which will not result in automatically closing
the event (the event may be closed using the close() method).
</p>
@@ -224,7 +205,7 @@
throws IOException, ServletException {
HttpServletRequest request = event.getHttpServletRequest();
HttpServletResponse response = event.getHttpServletResponse();
- if (event.getEventType() == CometEvent.EventType.BEGIN) {
+ if (event.getType() == CometEvent.EventType.BEGIN) {
log("Begin for session: " + request.getSession(true).getId());
PrintWriter writer = response.getWriter();
writer.println("<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">");
16 years, 2 months
JBossWeb SVN: r438 - in trunk: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-15 14:44:04 -0500 (Fri, 15 Feb 2008)
New Revision: 438
Modified:
trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
trunk/webapps/docs/changelog.xml
Log:
Modified: trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
===================================================================
--- trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2008-02-15 19:07:24 UTC (rev 437)
+++ trunk/java/org/apache/catalina/connector/CoyoteAdapter.java 2008-02-15 19:44:04 UTC (rev 438)
@@ -693,6 +693,10 @@
int start = uriBC.getStart();
int end = uriBC.getEnd();
+ // An empty URL is not acceptable
+ if (start == end)
+ return false;
+
// URL * is acceptable
if ((end - start == 1) && b[start] == (byte) '*')
return true;
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2008-02-15 19:07:24 UTC (rev 437)
+++ trunk/webapps/docs/changelog.xml 2008-02-15 19:44:04 UTC (rev 438)
@@ -152,6 +152,9 @@
<fix>
Fix possible NPE processing session expires. (fhanik)
</fix>
+ <fix>
+ Avoid verbose exception with empty URLs. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
16 years, 2 months
JBossWeb SVN: r437 - trunk.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2008-02-15 14:07:24 -0500 (Fri, 15 Feb 2008)
New Revision: 437
Modified:
trunk/dist.xml
Log:
- On Unix, use Wine to build the installer using NSIS (bye bye M$).
Modified: trunk/dist.xml
===================================================================
--- trunk/dist.xml 2008-02-15 18:21:00 UTC (rev 436)
+++ trunk/dist.xml 2008-02-15 19:07:24 UTC (rev 437)
@@ -66,18 +66,6 @@
<delete dir="${tomcat.deployer}"/>
<delete dir="${tomcat.dist}" failonerror="false"/>
- <!-- This is why releasing must be done on a Windows box:
- otherwise this check fails and the .exe distro is not generated -->
- <condition property="execute.installer">
- <and>
- <os family="windows" />
- <available file="${nsis.exe}" />
- <available file="${nsis.installoptions.dll}" />
- <available file="${nsis.nsexec.dll}" />
- <available file="${nsis.nsisdl.dll}" />
- </and>
- </condition>
-
</target>
@@ -226,8 +214,9 @@
<!-- ================= DIST: Create Windows Installer =================== -->
<target name="installer"
- description="Create Windows 32-bit installer" if="execute.installer">
- <echo message="Builds a Windows installer based on Nullsoft Installer"/>
+ description="Create Windows 32-bit installer" unless="skip.installer">
+
+ <echo message="Builds a Windows installer based on Nullsoft Installer"/>
<copy todir="${tomcat.dist}">
<fileset dir="res" />
</copy>
@@ -246,10 +235,15 @@
<filter token="VERSION_NUMBER" value="${version.number}"/>
<copy file="res/jboss-web.nsi" tofile="${tomcat.dist}/jboss-web.nsi" filtering="true" overwrite="true"/>
- <exec dir="${tomcat.dist}" executable="${nsis.exe}">
+ <exec dir="${tomcat.dist}" executable="${nsis.exe}" os="windows">
<arg value="/DNSISDIR=${nsis.home}" />
<arg value="jboss-web.nsi" />
</exec>
+ <exec dir="${tomcat.dist}" executable="wine" osfamily="unix">
+ <arg value="${nsis.exe}" />
+ <arg value="/DNSISDIR=${nsis.home}" />
+ <arg value="jboss-web.nsi" />
+ </exec>
<move file="${tomcat.dist}/jboss-web-installer.exe" tofile="${tomcat.release}/v${version}/bin/${final.name}.exe" />
16 years, 2 months