svn commit: r491603 - in /tomcat/tc6.0.x/trunk: java/org/apache/jasper/servlet/JspServletWrapper.java webapps/docs/changelog.xml

2007-01-01 Thread markt
Author: markt
Date: Mon Jan  1 09:56:46 2007
New Revision: 491603

URL: http://svn.apache.org/viewvc?view=rev&rev=491603
Log:
Port fix from TC5 for displaying JSP source after an exception in an included 
file

Modified:
tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java?view=diff&rev=491603&r1=491602&r2=491603
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java 
Mon Jan  1 09:56:46 2007
@@ -520,7 +520,7 @@
 
 // Read both files in, so we can inspect them
 String[] jspLines = readFile
-(this.ctxt.getResourceAsStream(this.ctxt.getJspFile()));
+(this.ctxt.getResourceAsStream(detail.getJspFileName()));
 
 String[] javaLines = readFile
 (new FileInputStream(this.ctxt.getServletJavaFileName()));

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=491603&r1=491602&r2=491603
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jan  1 09:56:46 2007
@@ -14,6 +14,16 @@
   
 
 
+
+  
+
+  
+When displaying JSP source after an exception, handle included files.
+(markt)
+  
+
+  
+
 
   
 



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



svn commit: r491614 - in /tomcat/tc6.0.x/trunk: java/org/apache/jasper/compiler/ java/org/apache/jasper/servlet/ webapps/docs/

2007-01-01 Thread markt
Author: markt
Date: Mon Jan  1 10:55:08 2007
New Revision: 491614

URL: http://svn.apache.org/viewvc?view=rev&rev=491614
Log:
Port fix from TC5 to display the JSP source when a compilation error occurs

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JavacErrorDetail.java
tomcat/tc6.0.x/trunk/java/org/apache/jasper/servlet/JspServletWrapper.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java?view=diff&rev=491614&r1=491613&r2=491614
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/DefaultErrorHandler.java 
Mon Jan  1 10:55:08 2007
@@ -67,22 +67,23 @@
 StringBuffer buf = new StringBuffer();
 
 for (int i=0; i < details.length; i++) {
+buf.append("\n");
 if (details[i].getJspBeginLineNumber() >= 0) {
 args = new Object[] {
 new Integer(details[i].getJspBeginLineNumber()), 
 details[i].getJspFileName() };
+buf.append("\n");
 buf.append(Localizer.getMessage("jsp.error.single.line.number",
 args));
-buf.append("\n"); 
+buf.append("\n");
+buf.append(details[i].getErrorMessage());
+buf.append("\n");
+buf.append(details[i].getJspExtract());
 }
-
-buf.append(
-Localizer.getMessage("jsp.error.corresponding.servlet"));
-buf.append(details[i].getErrorMessage());
-buf.append("\n\n");
 }
-
-throw new 
JasperException(Localizer.getMessage("jsp.error.unable.compile") + "\n\n" + 
buf);
+buf.append("\n\nStacktrace:");
+throw new JasperException(
+Localizer.getMessage("jsp.error.unable.compile") + ": " + buf);
 }
 
 /**

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java?view=diff&rev=491614&r1=491613&r2=491614
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java 
(original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/ErrorDispatcher.java 
Mon Jan  1 10:55:08 2007
@@ -23,6 +23,7 @@
 import java.util.ArrayList;
 
 import org.apache.jasper.JasperException;
+import org.apache.jasper.JspCompilationContext;
 import org.xml.sax.SAXException;
 
 /**
@@ -501,8 +502,25 @@
  * @return JavacErrorDetail The error details
  * @throws JasperException
  */
-public static JavacErrorDetail createJavacError(String fname, Node.Nodes 
page, 
-StringBuffer errMsgBuf, int lineNum) throws JasperException {
+public static JavacErrorDetail createJavacError(String fname,
+Node.Nodes page, StringBuffer errMsgBuf, int lineNum)
+throws JasperException {
+return createJavacError(fname, page, errMsgBuf, lineNum, null);
+}
+
+
+/**
+ * @param fname
+ * @param page
+ * @param errMsgBuf
+ * @param lineNum
+ * @param ctxt
+ * @return JavacErrorDetail The error details
+ * @throws JasperException
+ */
+public static JavacErrorDetail createJavacError(String fname,
+Node.Nodes page, StringBuffer errMsgBuf, int lineNum,
+JspCompilationContext ctxt) throws JasperException {
 JavacErrorDetail javacError;
 // Attempt to map javac error line number to line in JSP page
 ErrorVisitor errVisitor = new ErrorVisitor(lineNum);
@@ -514,7 +532,8 @@
 lineNum,
 errNode.getStart().getFile(),
 errNode.getStart().getLineNumber(),
-errMsgBuf);
+errMsgBuf,
+ctxt);
 } else {
 /*
  * javac error line number cannot be mapped to JSP page

Modified: tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler.java?view=diff&rev=491614&r1=491613&r2=491614
==
--- tomcat/tc6.0.x/trunk/java/org/apache/jasper/compiler/JDTCompiler

svn commit: r491619 - in /tomcat/tc6.0.x/trunk: java/org/apache/catalina/core/ApplicationDispatcher.java webapps/docs/changelog.xml

2007-01-01 Thread markt
Author: markt
Date: Mon Jan  1 11:31:29 2007
New Revision: 491619

URL: http://svn.apache.org/viewvc?view=rev&rev=491619
Log:
Port RD thread safety patch from TC5

Modified:

tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml

Modified: 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java?view=diff&rev=491619&r1=491618&r2=491619
==
--- 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 
(original)
+++ 
tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/ApplicationDispatcher.java 
Mon Jan  1 11:31:29 2007
@@ -100,6 +100,48 @@
 }
 }
 
+
+/**
+ * Used to pass state when the request dispatcher is used. Using instance
+ * variables causes threading issues and state is too complex to pass and
+ * return single ServletRequest or ServletResponse objects.
+ */
+private class State {
+State(ServletRequest request, ServletResponse response,
+boolean including) {
+this.outerRequest = request;
+this.outerResponse = response;
+this.including = including;
+}
+
+/**
+ * The outermost request that will be passed on to the invoked servlet.
+ */
+ServletRequest outerRequest = null;
+
+
+/**
+ * The outermost response that will be passed on to the invoked 
servlet.
+ */
+ServletResponse outerResponse = null;
+
+/**
+ * The request wrapper we have created and installed (if any).
+ */
+ServletRequest wrapRequest = null;
+
+
+/**
+ * The response wrapper we have created and installed (if any).
+ */
+ServletResponse wrapResponse = null;
+
+/**
+ * Are we performing an include() instead of a forward()?
+ */
+boolean including = false;
+}
+
 // --- Constructors
 
 
@@ -131,7 +173,6 @@
 this.context = (Context) wrapper.getParent();
 this.requestURI = requestURI;
 this.servletPath = servletPath;
-this.origServletPath = servletPath;
 this.pathInfo = pathInfo;
 this.queryString = queryString;
 this.name = name;
@@ -153,30 +194,12 @@
 private static Log log = LogFactory.getLog(ApplicationDispatcher.class);
 
 /**
- * The request specified by the dispatching application.
- */
-private ServletRequest appRequest = null;
-
-
-/**
- * The response specified by the dispatching application.
- */
-private ServletResponse appResponse = null;
-
-
-/**
  * The Context this RequestDispatcher is associated with.
  */
 private Context context = null;
 
 
 /**
- * Are we performing an include() instead of a forward()?
- */
-private boolean including = false;
-
-
-/**
  * Descriptive information about this implementation.
  */
 private static final String info =
@@ -190,18 +213,6 @@
 
 
 /**
- * The outermost request that will be passed on to the invoked servlet.
- */
-private ServletRequest outerRequest = null;
-
-
-/**
- * The outermost response that will be passed on to the invoked servlet.
- */
-private ServletResponse outerResponse = null;
-
-
-/**
  * The extra path information for this RequestDispatcher.
  */
 private String pathInfo = null;
@@ -218,13 +229,13 @@
  */
 private String requestURI = null;
 
+
 /**
  * The servlet path for this RequestDispatcher.
  */
 private String servletPath = null;
 
-private String origServletPath = null;
-
+
 /**
  * The StringManager for this package.
  */
@@ -246,18 +257,6 @@
 private Wrapper wrapper = null;
 
 
-/**
- * The request wrapper we have created and installed (if any).
- */
-private ServletRequest wrapRequest = null;
-
-
-/**
- * The response wrapper we have created and installed (if any).
- */
-private ServletResponse wrapResponse = null;
-
-
 // - Properties
 
 
@@ -323,11 +322,11 @@
 }
 
 // Set up to handle the specified request and response
-setup(request, response, false);
+State state = new State(request, response, false);
 
 if (Globals.STRICT_SERVLET_COMPLIANCE) {
 // Check SRV.8.2 / SRV.14.2.5.1 compliance
-checkSameObjects();
+checkSameObjects(request, response);
 }
 
 // Identify the HTTP-specific request and response objects (if any)
@@ -344,7 +343,7 @@
 if ( log.isDebugEnabled() )
 

svn commit: r491620 - in /tomcat/tc6.0.x/trunk/webapps/docs: changelog.xml index.xml project.xml virtual-hosting-howto.xml

2007-01-01 Thread markt
Author: markt
Date: Mon Jan  1 11:42:37 2007
New Revision: 491620

URL: http://svn.apache.org/viewvc?view=rev&rev=491620
Log:
Add virtual hosting howto to TC6 docs (copied from TC5)

Added:
tomcat/tc6.0.x/trunk/webapps/docs/virtual-hosting-howto.xml   (with props)
Modified:
tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc6.0.x/trunk/webapps/docs/index.xml
tomcat/tc6.0.x/trunk/webapps/docs/project.xml

Modified: tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml?view=diff&rev=491620&r1=491619&r2=491620
==
--- tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/changelog.xml Mon Jan  1 11:42:37 2007
@@ -34,6 +34,13 @@
   
 
   
+  
+
+  
+Add a virtual hosting how-to contributed by Hassan Schroeder. (markt)
+  
+
+  
 
 
   

Modified: tomcat/tc6.0.x/trunk/webapps/docs/index.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/index.xml?view=diff&rev=491620&r1=491619&r2=491620
==
--- tomcat/tc6.0.x/trunk/webapps/docs/index.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/index.xml Mon Jan  1 11:42:37 2007
@@ -100,7 +100,16 @@
 Monitoring and Management -
 Enabling JMX Remote support, and using tools to monitor and manage Apache 
Tomcat.
 Logging -
-Confuguring logging in Apache Tomcat.
+Configuring logging in Apache Tomcat.
+Apache Portable Runtime -
+Using APR to provide superior performance, scalability and better
+integration with native server technologies.
+Virtual Hosting -
+Configuring vitual hosting in Apache Tomcat.
+Advanced IO -
+Extensions available over regular, blocking IO.
+Additional Components -
+Obtaining additional, optional components.
 
 
 

Modified: tomcat/tc6.0.x/trunk/webapps/docs/project.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/project.xml?view=diff&rev=491620&r1=491619&r2=491620
==
--- tomcat/tc6.0.x/trunk/webapps/docs/project.xml (original)
+++ tomcat/tc6.0.x/trunk/webapps/docs/project.xml Mon Jan  1 11:42:37 2007
@@ -44,8 +44,9 @@
   href="monitoring.html"/>
 
 
-
-
+
+
 
 

Added: tomcat/tc6.0.x/trunk/webapps/docs/virtual-hosting-howto.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/webapps/docs/virtual-hosting-howto.xml?view=auto&rev=491620
==
--- tomcat/tc6.0.x/trunk/webapps/docs/virtual-hosting-howto.xml (added)
+++ tomcat/tc6.0.x/trunk/webapps/docs/virtual-hosting-howto.xml Mon Jan  1 
11:42:37 2007
@@ -0,0 +1,107 @@
+
+
+]>
+
+
+&project;
+
+  
+Virtual Hosting and Tomcat
+  
+
+
+
+  
+
+  For the sake of this how-to, assume you have a development host with two
+  host names, ren and stimpy. Let's also assume
+  one instance of Tomcat running, so $CATALINA_HOME refers to
+  wherever it's installed, perhaps /usr/local/tomcat.
+
+
+  Also, this how-to uses Unix-style path separators and commands; if you're
+  on Windows modify accordingly. 
+
+  
+
+  
+
+  At the simplest, edit the Engine portion
+  of your server.xml file to look like this:
+
+
+
+
+
+
+
+
+  Consult the configuration documentation for other attributes of the
+  Engine and 
+  Hostelements.
+
+  
+
+  
+
+  Create directories for each of the virtual hosts:
+
+
+mkdir $CATALINA_HOME/webapps/ren
+mkdir $CATALINA_HOME/webapps/stimpy
+
+  
+
+  
+
+  
+Within your Context, create a META-INF directory and then
+place your Context definition in it in a file named
+context.xml. i.e.
+$CATALINA_HOME/webapps/ren/ROOT/META-INF/context.xml
+This makes deployment easier, particularly if you're distributing a WAR
+file.
+  
+
+
+  
+Create a structure under $CATALINA_HOME/conf/Catalina
+corresponding to your virtual hosts, e.g.:
+  
+  
+mkdir $CATALINA_HOME/conf/Catalina/ren
+mkdir $CATALINA_HOME/conf/Catalina/stimpy
+  
+  
+Note that the ending directory name "Catalina" represents the
+name attribute of the
+Engine element as shown above.
+  
+  
+Now, for your default webapps, add:
+  
+  
+$CATALINA_HOME/conf/Catalina/ren/ROOT.xml
+$CATALINA_HOME/conf/Catalina/stimpy/ROOT.xml
+  
+  
+If you want to use the Tomcat manager webapp for each host, you'll also
+

DO NOT REPLY [Bug 40877] - JK1 and IIS6: Problem with multithreading / shared memory

2007-01-01 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40877


[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||WORKSFORME




--- Additional Comments From [EMAIL PROTECTED]  2007-01-01 17:56 ---
Hi Mladen & Team, 

The newer version of JK Redirector 1.2.20 is performing very well and doing a
fantastic job as we didn't have any issues so far after deploying the newer
version 2 weeks back. I would like to thank you and the whole Tomcat Jakarta
Redirector Development/Test Team for doing such an excellent job. 

Thanks. 


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

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