DO NOT REPLY [Bug 11879] - session shared between applications
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11879. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11879 session shared between applications [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 07:09 --- *** This bug has been marked as a duplicate of 4690 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 4690] - sessions not scoped according to spec section 7.3
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4690. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4690 sessions not scoped according to spec section 7.3 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 07:09 --- *** Bug 11879 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11878] - bad SEESIONS.ser file breaks Catalina
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11878. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11878 bad SEESIONS.ser file breaks Catalina [EMAIL PROTECTED] changed: What|Removed |Added Severity|Major |Minor Status|NEW |RESOLVED Resolution||WORKSFORME --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 07:11 --- I cannot reproduce this, sorry. Something must go wrong during the serialization process, and you'll have to find what it is. It is a specific case, so I'm downgrading the severity. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java mbeans-descriptors.xml
amyroh 2002/08/21 01:18:21 Modified:catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java mbeans-descriptors.xml Log: Add xmlNamespaceAware and xmlValidation attributes to StandardHostMBean. Revision ChangesPath 1.2 +30 -26 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java Index: MBeanFactory.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- MBeanFactory.java 18 Jul 2002 16:48:00 - 1.1 +++ MBeanFactory.java 21 Aug 2002 08:18:20 - 1.2 @@ -181,7 +181,7 @@ } - + /** * Little convenience method to remove redundant code * when retrieving the path string @@ -196,7 +196,7 @@ return t; } - + /** * Create a new AccessLoggerValve. * @@ -373,8 +373,8 @@ return (oname.toString()); } - - + + /** * Create a new HttpConnector * @@ -429,7 +429,7 @@ } - + /** * Create a new HttpsConnector * @@ -480,12 +480,12 @@ Object arglist4[] = new Object[1]; arglist4[0] = new Boolean(true); meth4.invoke(retobj, arglist4); -// Set factory -Class serverSocketFactoryCls = +// Set factory +Class serverSocketFactoryCls = Class.forName(org.apache.catalina.net.ServerSocketFactory); -Class coyoteServerSocketFactoryCls = +Class coyoteServerSocketFactoryCls = Class.forName(org.apache.coyote.tomcat4.CoyoteServerSocketFactory); -Constructor factoryConst = +Constructor factoryConst = coyoteServerSocketFactoryCls.getConstructor(null); Object factoryObj = factoryConst.newInstance(null); Class partypes5 [] = new Class[1]; @@ -506,12 +506,12 @@ service.addConnector((Connector)retobj); } catch (Exception e) { // FIXME -// disply error message +// disply error message // the user needs to use keytool to configure SSL first // addConnector will fail otherwise return null; } - + // Return the corresponding MBean name ManagedBean managed = registry.findManagedBean(CoyoteConnector); ObjectName oname = @@ -882,7 +882,9 @@ * @exception Exception if an MBean cannot be created or registered */ public String createStandardHost(String parent, String name, - String appBase, boolean unpackWARs) + String appBase, boolean unpackWARs, + boolean xmlNamespaceAware, + boolean xmlValidation) throws Exception { // Create a new StandardHost instance @@ -890,6 +892,8 @@ host.setName(name); host.setAppBase(appBase); host.setUnpackWARs(unpackWARs); +host.setXmlNamespaceAware(xmlNamespaceAware); +host.setXmlValidation(xmlValidation); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); @@ -987,7 +991,7 @@ Server server = ServerFactory.getServer(); Service service = server.findService(pname.getKeyProperty(service)); Engine engine = (Engine) service.getContainer(); -if (type.equals(Context)) { +if (type.equals(Context)) { Host host = (Host) engine.findChild(pname.getKeyProperty(host)); String pathStr = getPathStr(pname.getKeyProperty(path)); Context context = (Context) host.findChild(pathStr); @@ -1046,7 +1050,7 @@ return (oname.toString()); } - + /** * Create a new UserDatabaseRealm. * @@ -1085,10 +1089,10 @@ ObjectName oname = MBeanUtils.createObjectName(managed.getDomain(), realm); return (oname.toString()); - + } - + /** * Create a new Web Application Loader. * @@ -1139,7 +1143,7 @@ Service service = server.findService(serviceName); String port = oname.getKeyProperty(port); String address = oname.getKeyProperty(address); - + Connector conns[] = (Connector[]) service.findConnectors(); for (int i = 0; i conns.length; i++) { @@ -1149,7 +1153,7 @@
cvs commit: jakarta-tomcat-catalina/webapps/admin/host host.jsp
amyroh 2002/08/21 01:19:17 Modified:webapps/admin/WEB-INF/classes/org/apache/webapp/admin ApplicationResources_en.properties ApplicationResources_es.properties webapps/admin/WEB-INF/classes/org/apache/webapp/admin/host AddHostAction.java EditHostAction.java HostForm.java SaveHostAction.java webapps/admin/host host.jsp Log: Add xmlNamespaceAware and xmlValidation properties to Host admin page. Revision ChangesPath 1.4 +2 -0 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties Index: ApplicationResources_en.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_en.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ApplicationResources_en.properties16 Aug 2002 19:00:35 - 1.3 +++ ApplicationResources_en.properties21 Aug 2002 08:19:17 - 1.4 @@ -128,6 +128,8 @@ host.wars=Unpack WARs host.aliases=Aliases host.alias.name=Alias Name +host.xmlNamespaceAware=XML Namespace Aware +host.xmlValidation=XML Validation error.aliasName.exists=liAlias already exists/li error.aliasName.required=liAlias name is required/li context.properties=Context Properties 1.4 +8 -6 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties Index: ApplicationResources_es.properties === RCS file: /home/cvs/jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/ApplicationResources_es.properties,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ApplicationResources_es.properties16 Aug 2002 19:00:35 - 1.3 +++ ApplicationResources_es.properties21 Aug 2002 08:19:17 - 1.4 @@ -129,6 +129,8 @@ host.wars=Desempaquetar WARs host.aliases=Aliases host.alias.name=Alias Nombre +host.xmlNamespaceAware=XML Namespace Aware +host.xmlValidation=XML Validation error.aliasName.exists=liAlias ya existe/li error.aliasName.required=liAlias nombre requiredo/li context.properties=Propiedades del contexto @@ -257,7 +259,7 @@ error.rolePattern.required=liSe requiere el modelo de la busqueda del papel./li error.userPassword.required=liSe requiere la palabra de paso del utilizador./li error.userPattern.required=liSe requiere el patr=n del usuario./li -error.userSearch.required=liSe requiere la b·squeda del usuario./li +error.userSearch.required=liSe requiere la b+squeda del usuario./li error.userPattern.userSearch.defined=liUserPattern o userSearch se deben especificar no ambos./li error.contextFactory.required=liSe requiere la factory del contexto./li error.connPassword.required=liSe requiere la palabra de paso de la conexion./li @@ -312,16 +314,16 @@ resources.error.entryType.notimpl=liValidaci=n para este tipo no puesto en ejecucio'n todavfa./li resources.error.url.required=liSe requiere el URL de Datasource./li resources.error.driverClass.required=liSe requiere la clase del conductor de JDBC./li -resources.error.active.required=liSe requieren las conexiones activas m¯ximas./li -resources.error.idle.required=liSe requieren las conexiones ociosas m¯ximas./li -resources.error.wait.required=liLa espera m¯xima para una conexi=n se requiere./li +resources.error.active.required=liSe requieren las conexiones activas m»ximas./li +resources.error.idle.required=liSe requieren las conexiones ociosas m»ximas./li +resources.error.wait.required=liLa espera m»xima para una conexi=n se requiere./li resources.error.mailhost.required=limail.smtp.host is required./li -resources.integer.error=liError inv¯lido del n+mero entero./li +resources.integer.error=liError inv»lido del n+mero entero./li resources.actions.userdb.create=Cree La Nueva Base de datos Del Usuario resources.actions.userdb.edit=Corrija La Base de datos Del Usuario resources.actions.userdb.delete=Bases de datos Del Usuario De la Cancelaci=n resources.userdb.location=Localizaci=n -resources.userdb.factory=F¯brica +resources.userdb.factory=F»brica resources.treeBuilder.userdbs=Bases de datos Del Usuario resources.error.path.required=liPath requerido/li resources.error.jndiName.required=liJNDI Nombre requerido/li 1.2 +18 -16 jakarta-tomcat-catalina/webapps/admin/WEB-INF/classes/org/apache/webapp/admin/host/AddHostAction.java Index: AddHostAction.java === RCS file:
Re: build err on tc 4.1.9
Quoting Amy Roh [EMAIL PROTECTED]: Henri Gomez wrote: I've got the following error when building TC 4.1.9 build-main: [javac] Compiling 161 source files to /usr/src/redhat/BUILD/tomcat4-4.1.9/jakarta-tomcat-4.1.9-src/webapps/build/admin/WEB-INF/classes [javac] Found 2 semantic errors compiling What's the problem with javax/sql/DataSource for a MBeanServer ? There shouldn't be a problem. I don't understand why the error given the message. H. Does anyone else get this? Hum, it seems to be a problem with jikes 1.16, didn't have such problem with jikes 1.15 or javac (IBM SDK 1.3.1) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 10563] - Multiple compiles for multiple requests
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10563. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10563 Multiple compiles for multiple requests [EMAIL PROTECTED] changed: What|Removed |Added Component|Jasper 2|Jasper --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 10:19 --- Oops - I raised this against jasper2, it was meant to be against normal jasper. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] New: - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps Summary: JspC does not work for webapps Product: Tomcat 4 Version: 4.1.9 Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Jasper 2 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I have tried this for jasper2 from the 4_1_9 tag and from cvs head (2002/08/21). For a simple webapp with JSPs in subdirectories, a command like: java org.apache.jasper.JspC -d gensrc -webapp webapp creates all the java files in the top directory of gensrc. Any subdirectories in the webapp are created - but they are all empty. If you have index.jsp in each subdirectory - then you only get a single index.jsp in the top level of gensrc. For a more complex webapp, the name mungling gets totally confused. I have not been able to reproduce this on a small simple webapp - so these reports are for my real webapp.Using the same JspC command line about I get the following error message: 2002-08-21 11:24:38 - The file argument '/home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp/wap/pages/accountLogon.jsp' does not exist error:/home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp/wap/pages/accountLogon.jsp However that file does exist. More over if I look in the gensrc directory it has created an empty directory called: gensrc/home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp/wap/pages Somehow it has got the absolute file path of the webapp /home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp into the package path? I have tried running JspC with default paths and absolute paths. Same results. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11191] - Error while runing an app using a JDBC connection configured as JNDI resource
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11191. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11191 Error while runing an app using a JDBC connection configured as JNDI resource [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||DUPLICATE --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 10:37 --- 4.1.9 and prior versions of the admin tool incorrectly made a JNDI Resource with a parameter called user. the parameter should be called username. works on latest CVS download *** This bug has been marked as a duplicate of 11775 *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11775] - Admin app looking for wrong attribute user in Data Sources config
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11775. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11775 Admin app looking for wrong attribute user in Data Sources config [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 10:37 --- *** Bug 11191 has been marked as a duplicate of this bug. *** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: [4.1.9] Fix for major bugs
Remy, The stack trace was caused because TC4 was installed in a path with spaces. After that I tried in a path without spaces and it still didn't work. I think there's two bugs here. One is the URL's should be encoded, but two, I should never have come across the first bug because the classes are being searched for in the wrong location. The actual issue is that with RMI, the classloader is not using the java.rmi.server.codebase parameter to search for the class. The class is available for download in \Tomcat\webapps\app\com\..\...\???.class, but it is being looked for in \Tomcat\webapps\app\WEB-INF\classes and \Tomcat\webapps\app\WEB-INF\lib\*.jar. The client should be looking at http://server/app/com/../.../???.class and shouldn't get this exception: Caused by: java.security.AccessControlException: access denied (java.io.FilePermission C:\Tomcat\webapps\spweb\WEB-INF\- read) Try the test case that is attached to the bug. It shows this bug. I don't mind this being fixed after the first stable 4.1.x release, but I am unable to put any version of TC4 into production at the moment because of this. Hope this explains my problem a bit better. Cheers. Dave. Here's the stack trace (The bottom bit is the important bit). 21 Aug 2002 11:27:03,014 FATALCriticalException - RMI failed: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: access to class loader denied at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292) at sun.rmi.transport.Transport$1.run(Transport.java:148) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:144) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7 01) at java.lang.Thread.run(Thread.java:536) at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteC all.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) at com.staffplanner.utils.rmi.StaffplannerRemoteImpl_Stub.executeTask(Unknown Source) at com.staffplanner.utils.rmi.RemoteController.execute(RemoteController.java:77 ) at com.staffplanner.utils.rmi.RemoteServer.callRemote(RemoteServer.java:56) at com.staffplanner.utils.rmi.RemoteServer.callRemote(RemoteServer.java:38) at com.staffplanner.utils.rmi.XNServer.getNextFosKey(XNServer.java:21) at com.staffplanner.kernel.employees.Employee.getDefaultEposKeyNumber(Employee. java:1348) at com.staffplanner.pages.employees.EmployeeMaintenancePage$EmployeeMaintenance Data.init(EmployeeMaintenancePage.java:326) at com.staffplanner.pages.employees.EmployeeMaintenancePage.getScreenData(Emplo yeeMaintenancePage.java:513) at com.staffplanner.pages.base.MaintenancePage.processPageLoad(MaintenancePage. java:479) at com.staffplanner.pages.base.MaintenancePage.processPost(MaintenancePage.java :140) at com.staffplanner.pages.base.StaffPlannerPage.doPost(StaffPlannerPage.java:45 3) at com.staffplanner.servlets.StaffPlannerServlet.processRequest(StaffPlannerSer vlet.java:233) at com.staffplanner.base.ServletBase.doPost(ServletBase.java:71) at com.staffplanner.base.ServletBase.doGet(ServletBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2350) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |ASSIGNED --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 11:08 --- I have fixed some of this and am making sure I have not broken anything in the process. I will send a patch today or tomorrow. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11895] New: - Build process breaks with new jakarta-tomcat-connectors/webapp/build.xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11895. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11895 Build process breaks with new jakarta-tomcat-connectors/webapp/build.xml Summary: Build process breaks with new jakarta-tomcat- connectors/webapp/build.xml Product: Tomcat 4 Version: 4.1.9 Platform: Other OS/Version: Other Status: NEW Severity: Major Priority: Other Component: Connector:Webapp AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The newest build.xml ver 1.13 breaks the build process (ant deploy). reverting to build.xml ver 1.12 is a work-around for the problem. The problem is that the old version looks for servlet.jar, and the new version looks for servlet-api.jar to add to the classpath. In the jk connector, both files are included into the classpath. patch included --- build.xml 14 Aug 2002 20:54:57 - 1.13 +++ build.xml 21 Aug 2002 11:58:10 - @@ -30,6 +30,7 @@ path id=classpath pathelement location=${build.classes.dir}/ pathelement location=${catalina.home}/server/lib/catalina.jar/ +pathelement location=${catalina.home}/common/lib/servlet.jar/ pathelement location=${catalina.home}/common/lib/servlet-api.jar/ /path -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11899] New: - No detached PGP/GPG-signature (.asc-file) available.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11899. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11899 No detached PGP/GPG-signature (.asc-file) available. Summary: No detached PGP/GPG-signature (.asc-file) available. Product: Tomcat 4 Version: 4.0.4 Final Platform: All OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Unknown AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I downloaded the binary distribution jakarta-tomcat-4.0.4.tar.gz from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.4/bin/ , but I was unable to locate any corresponding signature file jakarta-tomcat-4.0.4.tar.gz.asc that would allow me to doublecheck what I have is the real thing. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 12:53 --- Created an attachment (id=2789) diff of JspCompilationContext.java -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 12:53 --- Created an attachment (id=2790) diff JspC.java -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 12:54 --- Created an attachment (id=2791) diff messages.properties -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps [EMAIL PROTECTED] changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 12:58 --- this patch should fix the generation of the source files in the right directories as well as putting the compiled classes in those same directories. it also changes the class name generation a bit (it no longer escapes '_') the compiled classes should show up in the same place they would if you went to the page directly. also I added 2 new flags -l to list the errors (this will continue to compile even when a compile error is found) I added this to skip over directive include files that wont compile and -s to show successful compile messages (these are sent to the static log var) I also added a method to allow the change of the static log var please let me know if this solves your problems (or causes any new ones). -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 13:21 --- Created an attachment (id=2792) this patch should replace the first one (forgot a piece) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 13:23 --- the 4th patch is a replacement for the first JspC.java patch.. sorry about the confusion I know I am going to cause.. :-) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Strange delays while Tomcat works
This most likely is due to JVM garbage collection. You may need to tune your java startup arguments to tune your memory usage and GC. When the JVM does GC the application (Tomcat) freezes until the GC is complete. Try starting Tomcat with the java arg -verbose:gc, this will add data about TC to stdout. Regards, Glenn Dev Zero G Ltd wrote: Hi, all! Introduction: we have Windows 2000 running SUN JDK 1.4.0, Tomcat 4.0.4 and our software, that uses Struts and taglibs. While requesting action from browser we have strange delays during whole request-serving process. In a words, action (servlet) receives a request, does some work, sends control to the JSP page, which prepares resulting HTML page for browser. This JSP page has a lot of custom tags instances (from jakarta-struts project and our own as well). Using debug output (an old method - System.out.println(...) ) we realized, that tomcat suddenly hangs up for some time - every time in different places of source code. Seems like it runs servlet (for less that 1 second), than makes some kind of preparing of JSP file (i think it's enough to compile servlet from it just one time - but not everytime, as we have) - for aproximately 5-6 seconds, and processes JSP page. The very strange behavior aoccurs right there - custom tags may be executed for 2,3,6 or even 10 seconds. In other time, after executing part of JSP page, debug output stops, and continues after 2-3 seconds. On computer we have stopped all background services, it has 1GHz Duron CPU and 512M RAM - so I think problem is not in hardware. May be some tuning of Tmcat conf files will help - some kind of buffer sizes etc. I couldn't find anything helpful not in server.xml, nor in web.xml of application. I'll repeat, such delays always occurs while procxessing the JSP page, almost every time - in different source location. But these delays realy slows whole project - so ANY KIND OF HELP AND/OR SUGGESTIONS would be taken in consideration with gratitude. Dev Zero G team http://devzerog.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 14:04 --- Thanks for the rapid response. Well those patches make it a bit better Files are being generated in the right place now. But if you include a -webinc flag you still get all the servlets called the same thing. eg you get lots of servlets defined as org.apache.jsp.index_jsp and in my complex webapp, I still get 2002-08-21 03:02:53 - The file argument '/home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp/wap/pages/accountLogon.jsp' does not exist error:/home/gregw/Clients/Cisco/vob/ssd.icotton-GRWILKIN/nwsp/webapp/wap/pages/accountLogon.jsp I'll try and reproduce in a simple webapp, but this will take me another day or two. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 14:29 --- I can not reproduce your problem with the -webinc flag. It all works fine for me, did you try it with something simple or your big app? thanks, John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-connectors/webapp build.xml
bobh2002/08/21 07:33:48 Modified:webapp build.xml Log: fix for bug 11895. Namely Tomcat4.x uses servlet.jar, Tomcat5.x uses servlet-api.jar Revision ChangesPath 1.14 +1 -0 jakarta-tomcat-connectors/webapp/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-tomcat-connectors/webapp/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- build.xml 14 Aug 2002 20:54:57 - 1.13 +++ build.xml 21 Aug 2002 14:33:48 - 1.14 @@ -30,6 +30,7 @@ path id=classpath pathelement location=${build.classes.dir}/ pathelement location=${catalina.home}/server/lib/catalina.jar/ +pathelement location=${catalina.home}/common/lib/servlet.jar/ pathelement location=${catalina.home}/common/lib/servlet-api.jar/ /path -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11895] - Build process breaks with new jakarta-tomcat-connectors/webapp/build.xml
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11895. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11895 Build process breaks with new jakarta-tomcat-connectors/webapp/build.xml [EMAIL PROTECTED] changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 14:35 --- Patch applied. (Sorry, I forgot to credit you in the CVS comments. my bad.) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:01 --- For a simple webapp, ls -R : webapp/: CVS/ WEB-INF/ date.jsp hello.jsp hello2.jsp subdir/ webapp/CVS: Entries Repository Root webapp/WEB-INF: CVS/ jsp.xml web.xml webapp/WEB-INF/CVS: Entries Repository Root webapp/subdir: date2.jsp hello.jsp hello3.jsp hello4.jsp subsubdir/ webapp/subdir/subsubdir: hello.jsp hello5.jsp I run java org.apache.jasper.JspC -d gensrc -webapp webapp -webinc jsp.xml and jsp.xml ends up with three definitions of servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet In fact all the package names are org.apache.jsp even in the generated source code: gensrc/date_jsp.java:package org.apache.jsp; gensrc/hello_jsp.java:package org.apache.jsp; gensrc/hello2_jsp.java:package org.apache.jsp; gensrc/subdir/hello4_jsp.java:package org.apache.jsp; gensrc/subdir/hello3_jsp.java:package org.apache.jsp; gensrc/subdir/date2_jsp.java:package org.apache.jsp; gensrc/subdir/hello_jsp.java:package org.apache.jsp; gensrc/subdir/subsubdir/hello5_jsp.java:package org.apache.jsp; gensrc/subdir/subsubdir/hello_jsp.java:package org.apache.jsp; Maybe I did not apply the patches correctly??? Tell me when they are in CVS and I'll do an update and try again. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:22 --- the package names will always be org.apache.jsp (unless you specify other wise with the -p option. Can you attach your sample war file, as I have the same simple type of setup and it works fine for me. I get this servlet servlet-nameorg.apache.jsp.index_jsp/servlet-name servlet-classorg.apache.jsp.index_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.john_is_cool1_jsp/servlet-name servlet-classorg.apache.jsp.john_is_cool1_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.heather_is_cool1_jsp/servlet-name servlet-classorg.apache.jsp.heather_is_cool1_jsp/servlet- class /servlet servlet servlet-nameorg.apache.jsp.heather_is_cool2_jsp/servlet-name servlet-classorg.apache.jsp.heather_is_cool2_jsp/servlet- class /servlet servlet-mapping servlet-nameorg.apache.jsp.index_jsp/servlet-name url-pattern/index.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.john_is_cool1_jsp/servlet-name url-pattern/john/john_is_cool1.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.heather_is_cool1_jsp/servlet-name url-pattern/john/heather/heather_is_cool1.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.heather_is_cool2_jsp/servlet-name url-pattern/john/heather/heather_is_cool2.jsp/url-pattern /servlet-mapping The patches are not in CVS yet as I do not have commit privs -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
getting patches commited
If I add a patch to a bug does the patch still have to be submitted as a patch (via the [patch] subject line) to get into committers hands? Thanks, John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:31 --- Created an attachment (id=2793) Webapp that demonstrates the -webinc problem -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:36 --- I've attached a demo webapp. Are you sure that the packages should all be org.apache.jsp? What good is putting the different hello.java classes in different directories in gensrc if they are all going to endup in the same classfile? Jasper 1 generated package names matching the gensrc directories: servlet servlet-namedate/servlet-name servlet-classdate/servlet-class /servlet servlet servlet-namehello/servlet-name servlet-classhello/servlet-class /servlet servlet servlet-namesubdir.date2/servlet-name servlet-classsubdir.date2/servlet-class /servlet servlet servlet-namesubdir.hello/servlet-name servlet-classsubdir.hello/servlet-class /servlet servlet-mapping servlet-namedate/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-namehello/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-namesubdir.date2/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-namesubdir.hello/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:44 --- Your sample works fine for me. Make sure you applied the patchs correctly. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: getting patches commited
On Wed, 2002-08-21 at 11:28, John Trollinger wrote: If I add a patch to a bug does the patch still have to be submitted as a patch (via the [patch] subject line) to get into committers hands? No, but posting to the tomcat-dev list is more visible. Your subject line is pretty important also. Committers tend to be busy and only look at stuff that they are familure with and understand... Getting stuff committed relies a bit on selling the issue to someone who can take the time to understand the problem, the solution and has the time to apply the fix. Cheers, -bob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:51 --- Yes org.apache.jsp is ok for all the package names. If you run the webapp you will see that despite the fact that the classes are both org.apache.jsp.Hello_jsp that if you make the jsp pages different it will work fine. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 15:57 --- The diffs look to have been applied OK? It may be some other difference in our base versions. I've rolled back to the old jasper for now - because nothing works for the big webapp and I can't make a small redproducable test case yet. So if you think you have fixed the directory issue with your patches - you may as well mark this issue as closed and submit your patches to the tree. I'll sync with CVS next week and try again when I have more time. thanks for your help. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps [EMAIL PROTECTED] changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||WORKSFORME -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[patch] jasper2 4.1.9 - fixed the JspC to generate the class files in the right directory structure (bug 11891)
This patch also changes the class file name stuff to eliminate unnecessary char escaping. --- old/JspCompilationContext.java 2002-08-21 08:55:23.0 -0400 +++ new/JspCompilationContext.java 2002-08-21 08:35:26.0 -0400 @@ -267,7 +267,7 @@ } for (int i = iSep; i iEnd; i++) { char ch = jspUri.charAt(i); -if (Character.isLetterOrDigit(ch)) { +if (Character.isJavaIdentifierPart(ch)) { modifiedClassName.append(ch); } else if (ch == '.') { modifiedClassName.append('_'); --- old/JspC.java 2002-08-21 08:55:31.0 -0400 +++ new/JspC.java 2002-08-21 09:19:51.0 -0400 @@ -131,6 +131,8 @@ public static final String SWITCH_WEBAPP_XML = -webxml; public static final String SWITCH_MAPPED = -mapped; public static final String SWITCH_DIE = -die; +public static final String SHOW_SUCCESS =-s; +public static final String LIST_ERRORS = -l; public static final int NO_WEBXML = 0; public static final int INC_WEBXML = 10; @@ -196,6 +198,9 @@ */ private TldLocationsCache tldLocationsCache = null; +private boolean listErrors = false; +private boolean showSuccess = false; + public boolean getKeepGenerated() { // isn't this why we are running jspc? return true; @@ -386,11 +391,11 @@ if (dirset) { int indexOfSlash = clctxt.getJspFile().lastIndexOf('/'); -String pathName = ; + /* String pathName = ; if (indexOfSlash != -1) { pathName = clctxt.getJspFile().substring(0, indexOfSlash); -} -String tmpDir = outputDir + File.separatorChar + pathName; +}*/ +String tmpDir = outputDir + File.separatorChar; // + pathName; File f = new File(tmpDir); if (!f.exists()) { f.mkdirs(); @@ -519,6 +524,8 @@ { try { String jspUri=file.replace('\\','/'); +String baseDir = scratchDir.getCanonicalPath(); +this.setOutputDir( baseDir + jspUri.substring( 0, jspUri.lastIndexOf( '/' +) ) ); JspCompilationContext clctxt = new JspCompilationContext ( jspUri, false, this, context, null, null ); @@ -540,6 +547,7 @@ clctxt.setClassPath(classPath); Compiler clc = clctxt.createCompiler(); +this.setOutputDir( baseDir ); if( compile ) { // Generate both .class and .java @@ -556,7 +564,9 @@ // Generate mapping generateWebMapping( file, clctxt ); - +if ( showSuccess ) { +log.println( Built File: + file ); +} return true; } catch (FileNotFoundException fne) { Constants.message(jspc.error.fileDoesNotExist, @@ -565,7 +575,10 @@ } catch (Exception e) { Constants.message(jspc.error.generalException, new Object[] {file, e}, Logger.ERROR); -if (dieLevel != NO_DIE_LEVEL) { +if ( listErrors ) { + log.println( Error in File: + file ); + return true; + } else if (dieLevel != NO_DIE_LEVEL) { dieOnExit = true; } throw new JasperException( e ); @@ -873,6 +886,10 @@ setUriroot( nextArg()); } else if (tok.equals(SWITCH_FILE_WEBAPP)) { setUriroot( nextArg()); +} else if ( tok.equals( SHOW_SUCCESS ) ) { +showSuccess = true; +} else if ( tok.equals( LIST_ERRORS ) ) { +listErrors = true; } else if (tok.equals(SWITCH_WEBAPP_INC)) { webxmlFile = nextArg(); if (webxmlFile != null) { @@ -912,6 +929,13 @@ Constants.jasperLog.setVerbosityLevel(verbosityLevel); } +/** + * allows user to set where the log goes other than System.out + * @param log + */ +public static void setLog( PrintStream log ) { + JspC.log = log; +} } --- old/messages.properties 2002-07-18 19:25:05.0 -0400 +++ new/messages.properties 2002-08-21 08:43:37.0 -0400 @@ -173,6 +173,8 @@ \-v[#] Verbose mode (optional number is level, default is 2)\n\ \-d dirOutput Directory\n\ \-dd dir Literal Output Directory. (package dirs will not be made)\n\ +\-l Outputs the name of the JSP page upon failure\n\ +\-s Outputs the name of the JSP page upon success\n\ \-p name Name of target package\n\ \-c name Name of target class name\n\ \(only applies to first JSP page)\n\ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-servletapi-5/jsr152/src/share/dtd jsp_2_0.xsd
kinman 2002/08/21 09:17:48 Modified:jsr152/src/share/dtd jsp_2_0.xsd Log: - Submitted by Mark Roth Patch to the XML Schema to accept the new is-xml element. Revision ChangesPath 1.2 +19 -2 jakarta-servletapi-5/jsr152/src/share/dtd/jsp_2_0.xsd Index: jsp_2_0.xsd === RCS file: /home/cvs/jakarta-servletapi-5/jsr152/src/share/dtd/jsp_2_0.xsd,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- jsp_2_0.xsd 13 Aug 2002 16:20:58 - 1.1 +++ jsp_2_0.xsd 21 Aug 2002 16:17:48 - 1.2 @@ -8,7 +8,7 @@ version=2.0 xsd:annotation xsd:documentation -@(#)jsp_2_0.xsds 1.8 07/29/02 +%W% %G% /xsd:documentation /xsd:annotation @@ -138,6 +138,7 @@ - Control enabling of EL evaluation. - Control enabling of Scripting elements. - Indicate pageEncoding information. +- Indicating that a resource is a JSP document - Prelude and Coda automatic includes. /xsd:documentation @@ -159,7 +160,7 @@ xsd:annotation xsd:documentation -Can be used to easily set the isElEnabled +Can be used to easily set the isELEnabled property of a group of JSP pages. By default, the EL evaluation is enabled for Web Applications using a Servlet 2.4 or greater web.xml. @@ -193,6 +194,22 @@ Can be used to easily set the isScriptingEnabled property of a group of JSP pages. By default, scripting is enabled. + +/xsd:documentation +/xsd:annotation +/xsd:element + xsd:element name=is-xml + type=j2ee:true-falseType + minOccurs=0 +xsd:annotation +xsd:documentation + +If true, denotes that the group of resources + that match the URL pattern are JSP documents, + and thus must be interpreted as XML documents. + If false, the resources are assumed to not + be JSP documents, unless there is another + property group that indicates otherwise. /xsd:documentation /xsd:annotation -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime ExpressionEvaluatorImpl.java JspFragmentHelper.java JspRuntimeLibrary.java PageContextImpl.java
kinman 2002/08/21 09:21:57 Modified:jasper2/src/share/org/apache/jasper Constants.java jasper2/src/share/org/apache/jasper/compiler ErrorDispatcher.java Generator.java JspUtil.java Validator.java jasper2/src/share/org/apache/jasper/resources messages.properties jasper2/src/share/org/apache/jasper/runtime ExpressionEvaluatorImpl.java JspFragmentHelper.java JspRuntimeLibrary.java PageContextImpl.java Log: - Submitted by Mark Roth - Removed ExpressionEvaluatorManager - Changed EL validation to use ExpressionEvaluatorManager.parseExpression - PageContextImpl now implements VariableResolver - Generated Servlet / Tag Handler now implements FunctionMapper - Implemented getExpressionEvaluator() API - Current implementation is very inefficient with all sorts of nasty wrappers, but will get much better once the EL evaluator moves into its own subproject. - Reworked internal interpreter call to be a proprietary call for the time being, until the EL evaluator moves out of JSTL and into its own project. Relying on the standard machinery would be too inefficient for the common case. - Removed prefix map generation, as it's not being used anywhere. - For tag files, moved creation of JspContextWrapper to setJspContext. Now stores both the original and the wrapped JspContext. Still need to make sure scripting vars are synchronized with the original JspContext. Revision ChangesPath 1.7 +0 -10 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java Index: Constants.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/Constants.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- Constants.java6 Aug 2002 00:11:36 - 1.6 +++ Constants.java21 Aug 2002 16:21:56 - 1.7 @@ -219,16 +219,6 @@ http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0;; /** - * Information about conduit to EL interpreter. - * EL_INTERPRETER_CONDUIT_CLASS: name of class - * EL_INTERPRETER_CONDUIT_METHOD: name of static method within class - */ -public static final String EL_INTERPRETER_CONDUIT_CLASS = -org.apache.jasper.runtime.ExpressionEvaluatorManager; -public static final String EL_INTERPRETER_CONDUIT_METHOD = -evaluate; - -/** * Prefix to use for generated temporary variable names */ public static final String TEMP_VARIABLE_NAME_PREFIX = 1.4 +21 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java Index: ErrorDispatcher.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/ErrorDispatcher.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ErrorDispatcher.java 24 Jul 2002 19:58:57 - 1.3 +++ ErrorDispatcher.java 21 Aug 2002 16:21:56 - 1.4 @@ -345,6 +345,24 @@ String getString(String errCode, String arg1, String arg2) { return getString(errCode, new Object[] {arg1, arg2}); } + +/* + * Returns the localized error message corresponding to the given error + * code. + * + * If the given error code is not defined in the resource bundle for + * localized error messages, it is used as the error message. + * + * @param errCode Error code to localize + * @param arg1 First argument for parametric replacement + * @param arg2 Second argument for parametric replacement + * @param arg3 Third argument for parametric replacement + * + * @return Localized error message + */ +String getString(String errCode, String arg1, String arg2, String arg3) { + return getString(errCode, new Object[] {arg1, arg2, arg3}); +} /* * Returns the localized error message corresponding to the given error 1.74 +69 -123 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.73 retrieving revision 1.74 diff -u -r1.73 -r1.74 --- Generator.java21 Aug 2002 01:53:28 - 1.73 +++ Generator.java21 Aug 2002 16:21:56 - 1.74 @@ -389,7 +389,7 @@
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 16:24 --- Just another note on the packages. While having two different classes called org.apache.jsp.Hello_jsp may be OK in tomcat, it certainly is not OK in Jetty When I compile the two different classes I end up with two different org/apache/jsp/Hello_jsp.class files.I have no where to put these so that they can be loaded. I normally moved the compiled class files to WEB-INF/classes - but I can't if both classes are named the same thing. So I can't even get to the stage of running this, as I know I have nowhere to put the two classes. Are you really really sure that you are running the precompile version and not just compiling on the fly. Can you remove the jsp files from your webapp and still see different content for both the Hello files? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime ExpressionEvaluatorManager.java
kinman 2002/08/21 09:32:11 Removed: jasper2/src/share/org/apache/jasper/runtime ExpressionEvaluatorManager.java Log: - Remove unused file -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/servlet JspServletWrapper.java
luehe 2002/08/21 10:05:52 Modified:jasper2/src/share/org/apache/jasper JspCompilationContext.java jasper2/src/share/org/apache/jasper/compiler TagFileProcessor.java Validator.java jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_ja.properties jasper2/src/share/org/apache/jasper/servlet JspServletWrapper.java Log: Implemented requirement that one jsp:param element must be present for each variable declared using the variable directive that has a 'fragment' attribute equal to the name of the fragment being invoked. Revision ChangesPath 1.18 +11 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- JspCompilationContext.java20 Aug 2002 23:35:30 - 1.17 +++ JspCompilationContext.java21 Aug 2002 17:05:52 - 1.18 @@ -66,7 +66,7 @@ import java.util.*; import javax.servlet.ServletContext; import javax.servlet.jsp.tagext.TagInfo; - +import javax.servlet.jsp.tagext.TagData; import org.apache.jasper.compiler.JspRuntimeContext; import org.apache.jasper.compiler.JspReader; import org.apache.jasper.compiler.ServletWriter; @@ -123,6 +123,7 @@ protected boolean isTagFile; protected TagInfo tagInfo; +protected TagData tagData; // jspURI _must_ be relative to the context public JspCompilationContext(String jspUri, @@ -157,6 +158,7 @@ public JspCompilationContext(String tagfile, TagInfo tagInfo, + TagData tagData, Options options, ServletContext context, JspServletWrapper jsw, @@ -166,6 +168,7 @@ this(tagfile, false, options, context, jsw, rctxt); this.isTagFile = true; this.tagInfo = tagInfo; + this.tagData = tagData; this.tagFileJars = tagFileJars; if (tagFileJars != null tagFileJars.get(tagfile) != null) { isPackagedTagFile = true; @@ -357,6 +360,10 @@ public TagInfo getTagInfo() { return tagInfo; +} + +public TagData getTagData() { + return tagData; } /** 1.16 +7 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java Index: TagFileProcessor.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- TagFileProcessor.java 20 Aug 2002 23:35:30 - 1.15 +++ TagFileProcessor.java 21 Aug 2002 17:05:52 - 1.16 @@ -333,7 +333,8 @@ * Compiles and loads a tagfile. */ public static Class loadTagFile(JspCompilationContext ctxt, - String tagFilePath, TagInfo tagInfo) + String tagFilePath, TagInfo tagInfo, + TagData tagData) throws JasperException { JspRuntimeContext rctxt = ctxt.getRuntimeContext(); @@ -347,6 +348,7 @@ ctxt.getOptions(), tagFilePath, tagInfo, + tagData, ctxt.getRuntimeContext(), ctxt.getTagFileJars()); } @@ -372,7 +374,8 @@ TagFileInfo tagFileInfo = n.getTagFileInfo(); if (tagFileInfo != null) { String tagFilePath = tagFileInfo.getPath(); - Class c = loadTagFile(ctxt, tagFilePath, n.getTagInfo()); + Class c = loadTagFile(ctxt, tagFilePath, n.getTagInfo(), + n.getTagData()); n.setTagHandlerClass(c); } } 1.25 +57 -15 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java Index: Validator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v
[PATCH] jakarta-tomcat-jasper: Bugfix for 11883
Attached is a bugfix for bug 11883: Unable to use Dynamic attributes Files modified: jasper2/src/share/org/apache/jasper/compiler/Generator.java -- Mark Roth, Java Software Co-Specification Lead for JSP 2.0 Sun Microsystems, Inc. Index: jasper2/src/share/org/apache/jasper/compiler/Generator.java === RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.74 diff -u -r1.74 Generator.java --- jasper2/src/share/org/apache/jasper/compiler/Generator.java 21 Aug 2002 16:21:56 - 1.74 +++ jasper2/src/share/org/apache/jasper/compiler/Generator.java 21 Aug 2002 17:14:54 - @@ -2459,9 +2459,15 @@ if (attrs[i].isDynamic()) { out.printin(tagHandlerVar); out.print(.); - out.print(setDynamicAttribute(\); - out.print(attrs[i].getURI()); - out.print(\, \); + out.print(setDynamicAttribute(); +String uri = attrs[i].getURI(); +if( .equals( uri ) || (uri == null) ) { +out.print( null ); +} +else { +out.print(\ + attrs[i].getURI() + \); +} + out.print(, \); out.print(attrs[i].getLocalName()); out.print(\, ); out.print(attrValue); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 17:27 --- Yes, they are running the different classes and not rebuilding them. How this does this I do know know, but if you post to tomcat-dev they might be able to explain. the JSP spec says the following The JSP Page implementation object belongs to an implementation-dependent named package. The package used may vary between one JSP and another, so minimal assumptions should be made. from this statement the spec allows the same package name (or different ones) and it is dependent upon the provider (ie tomcat or jetty) I do not know how jetty does its packaging. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties
kinman 2002/08/21 10:54:25 Modified:jasper2/src/share/org/apache/jasper Tag: tomcat_4_branch JspC.java JspCompilationContext.java jasper2/src/share/org/apache/jasper/resources Tag: tomcat_4_branch messages.properties Log: - Fixed 11891. Patched by John Trollinger [EMAIL PROTECTED] Revision ChangesPath No revision No revision 1.12.2.1 +33 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java Index: JspC.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v retrieving revision 1.12 retrieving revision 1.12.2.1 diff -u -r1.12 -r1.12.2.1 --- JspC.java 26 Jun 2002 16:50:38 - 1.12 +++ JspC.java 21 Aug 2002 17:54:24 - 1.12.2.1 @@ -131,6 +131,8 @@ public static final String SWITCH_WEBAPP_XML = -webxml; public static final String SWITCH_MAPPED = -mapped; public static final String SWITCH_DIE = -die; +public static final String SHOW_SUCCESS =-s; +public static final String LIST_ERRORS = -l; public static final int NO_WEBXML = 0; public static final int INC_WEBXML = 10; @@ -196,6 +198,9 @@ */ private TldLocationsCache tldLocationsCache = null; +private boolean listErrors = false; +private boolean showSuccess = false; + public boolean getKeepGenerated() { // isn't this why we are running jspc? return true; @@ -386,11 +391,11 @@ if (dirset) { int indexOfSlash = clctxt.getJspFile().lastIndexOf('/'); -String pathName = ; +/* String pathName = ; if (indexOfSlash != -1) { pathName = clctxt.getJspFile().substring(0, indexOfSlash); -} -String tmpDir = outputDir + File.separatorChar + pathName; +} */ +String tmpDir = outputDir + File.separatorChar; // + pathName; File f = new File(tmpDir); if (!f.exists()) { f.mkdirs(); @@ -519,6 +524,8 @@ { try { String jspUri=file.replace('\\','/'); +String baseDir = scratchDir.getCanonicalPath(); +this.setOutputDir( baseDir + jspUri.substring( 0, jspUri.lastIndexOf( '/' ) ) ); JspCompilationContext clctxt = new JspCompilationContext ( jspUri, false, this, context, null, null ); @@ -540,6 +547,7 @@ clctxt.setClassPath(classPath); Compiler clc = clctxt.createCompiler(); +this.setOutputDir( baseDir ); if( compile ) { // Generate both .class and .java @@ -556,7 +564,9 @@ // Generate mapping generateWebMapping( file, clctxt ); - +if ( showSuccess ) { +log.println( Built File: + file ); +} return true; } catch (FileNotFoundException fne) { Constants.message(jspc.error.fileDoesNotExist, @@ -565,7 +575,10 @@ } catch (Exception e) { Constants.message(jspc.error.generalException, new Object[] {file, e}, Logger.ERROR); -if (dieLevel != NO_DIE_LEVEL) { +if ( listErrors ) { + log.println( Error in File: + file ); + return true; +} else if (dieLevel != NO_DIE_LEVEL) { dieOnExit = true; } throw new JasperException( e ); @@ -873,6 +886,10 @@ setUriroot( nextArg()); } else if (tok.equals(SWITCH_FILE_WEBAPP)) { setUriroot( nextArg()); +} else if ( tok.equals( SHOW_SUCCESS ) ) { +showSuccess = true; +} else if ( tok.equals( LIST_ERRORS ) ) { +listErrors = true; } else if (tok.equals(SWITCH_WEBAPP_INC)) { webxmlFile = nextArg(); if (webxmlFile != null) { @@ -913,5 +930,13 @@ Constants.jasperLog.setVerbosityLevel(verbosityLevel); } +/** + * allows user to set where the log goes other than System.out + * @param log + */ +public static void setLog( PrintStream log ) { + JspC.log = log; +} + } 1.6.2.4 +4 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties
kinman 2002/08/21 10:56:03 Modified:jasper2/src/share/org/apache/jasper JspC.java JspCompilationContext.java jasper2/src/share/org/apache/jasper/resources messages.properties Log: - Fixed 11891. Patched by John Trollinger [EMAIL PROTECTED] Revision ChangesPath 1.14 +33 -8 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java Index: JspC.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- JspC.java 20 Aug 2002 15:50:22 - 1.13 +++ JspC.java 21 Aug 2002 17:56:03 - 1.14 @@ -132,6 +132,8 @@ public static final String SWITCH_WEBAPP_XML = -webxml; public static final String SWITCH_MAPPED = -mapped; public static final String SWITCH_DIE = -die; +public static final String SHOW_SUCCESS =-s; +public static final String LIST_ERRORS = -l; public static final int NO_WEBXML = 0; public static final int INC_WEBXML = 10; @@ -197,6 +199,9 @@ */ private TldLocationsCache tldLocationsCache = null; +private boolean listErrors = false; +private boolean showSuccess = false; + public boolean getKeepGenerated() { // isn't this why we are running jspc? return true; @@ -387,11 +392,11 @@ if (dirset) { int indexOfSlash = clctxt.getJspFile().lastIndexOf('/'); -String pathName = ; +/* String pathName = ; if (indexOfSlash != -1) { pathName = clctxt.getJspFile().substring(0, indexOfSlash); -} -String tmpDir = outputDir + File.separatorChar + pathName; +} */ +String tmpDir = outputDir + File.separatorChar; // + pathName; File f = new File(tmpDir); if (!f.exists()) { f.mkdirs(); @@ -520,6 +525,8 @@ { try { String jspUri=file.replace('\\','/'); +String baseDir = scratchDir.getCanonicalPath(); +this.setOutputDir( baseDir + jspUri.substring( 0, jspUri.lastIndexOf( '/' ) ) ); JspCompilationContext clctxt = new JspCompilationContext ( jspUri, false, this, context, null, null ); @@ -541,6 +548,7 @@ clctxt.setClassPath(classPath); Compiler clc = clctxt.createCompiler(); +this.setOutputDir( baseDir ); if( compile ) { // Generate both .class and .java @@ -557,7 +565,9 @@ // Generate mapping generateWebMapping( file, clctxt ); - +if ( showSuccess ) { +log.println( Built File: + file ); +} return true; } catch (FileNotFoundException fne) { Constants.message(jspc.error.fileDoesNotExist, @@ -566,7 +576,10 @@ } catch (Exception e) { Constants.message(jspc.error.generalException, new Object[] {file, e}, Logger.ERROR); -if (dieLevel != NO_DIE_LEVEL) { +if ( listErrors ) { + log.println( Error in File: + file ); + return true; +} else if (dieLevel != NO_DIE_LEVEL) { dieOnExit = true; } throw new JasperException( e ); @@ -874,6 +887,10 @@ setUriroot( nextArg()); } else if (tok.equals(SWITCH_FILE_WEBAPP)) { setUriroot( nextArg()); +} else if ( tok.equals( SHOW_SUCCESS ) ) { +showSuccess = true; +} else if ( tok.equals( LIST_ERRORS ) ) { +listErrors = true; } else if (tok.equals(SWITCH_WEBAPP_INC)) { webxmlFile = nextArg(); if (webxmlFile != null) { @@ -912,6 +929,14 @@ } Constants.jasperLog.setVerbosityLevel(verbosityLevel); +} + +/** + * allows user to set where the log goes other than System.out + * @param log + */ +public static void setLog( PrintStream log ) { + JspC.log = log; } /** 1.19 +4 -4 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- JspCompilationContext.java21 Aug 2002
DO NOT REPLY [Bug 11891] - JspC does not work for webapps
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11891 JspC does not work for webapps --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 17:58 --- Sorry to go on about this Firstly can you send me the jsp.xml file and an ls -R of the gensrc you get - so we can verify that it is working the same for both of us. For what I'm getting generated, I cannot see how any container can run the generated xml (I'm on the servlet JSR panel - so you would hope that I know :-) servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping So both hello.jsp servlets have been mapped to a servlet called org.apache.jsp.hello_jsp That servlet has been defined twice to be org.apache.jsp.hello_jsp class So no matter what - the servlet container must serve the same content for both those hello.jsp files, as they are defined as the same servlet. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler Generator.java
kinman 2002/08/21 11:07:59 Modified:jasper2/src/share/org/apache/jasper/compiler Generator.java Log: - Fixed bug 11883: Unable to use Dynamic attributes. Patched by Mark Roth Revision ChangesPath 1.75 +12 -6 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java Index: Generator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.74 retrieving revision 1.75 diff -u -r1.74 -r1.75 --- Generator.java21 Aug 2002 16:21:56 - 1.74 +++ Generator.java21 Aug 2002 18:07:59 - 1.75 @@ -2459,9 +2459,15 @@ if (attrs[i].isDynamic()) { out.printin(tagHandlerVar); out.print(.); - out.print(setDynamicAttribute(\); - out.print(attrs[i].getURI()); - out.print(\, \); + out.print(setDynamicAttribute(); +String uri = attrs[i].getURI(); +if( .equals( uri ) || (uri == null) ) { +out.print( null ); +} +else { +out.print(\ + attrs[i].getURI() + \); +} + out.print(, \); out.print(attrs[i].getLocalName()); out.print(\, ); out.print(attrValue); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Jasper 2 class files
Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.date2_jsp/servlet-name servlet-classorg.apache.jsp.date2_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.date_jsp/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.date2_jsp/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping !-- All session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, and ejb-ref elements should follow this fragment. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_ja.properties
luehe 2002/08/21 11:22:13 Modified:jasper2/src/share/org/apache/jasper/compiler Validator.java jasper2/src/share/org/apache/jasper/resources messages.properties messages_es.properties messages_ja.properties Log: jsp:doBody: Cause translation error if a jsp:param subelement is specified with the same name as a variable with a scope of AT_BEGIN or NESTED. Revision ChangesPath 1.26 +41 -3 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java Index: Validator.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Validator.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- Validator.java21 Aug 2002 17:05:52 - 1.25 +++ Validator.java21 Aug 2002 18:22:12 - 1.26 @@ -904,11 +904,49 @@ } public void visit(Node.DoBodyAction n) throws JasperException { + JspUtil.checkAttributes(DoBody, n, doBodyAttrs, err); if (n.getAttributeValue(var) != null n.getAttributeValue(varReader) != null) { err.jspError(n, jsp.error.doBody.varAndVarReader); } + + Node.Nodes subelements = n.getBody(); + if (subelements != null) { + for (int i=0; isubelements.size(); i++) { + Node subelem = subelements.getNode(i); + if (!(subelem instanceof Node.ParamAction)) { + err.jspError(n, jsp.error.doBody.invalidBodyContent); + } + } + } + + /* + * A translation error must occur if a jsp:param is specified + * with the same name as a variable with a scope of AT_BEGIN or + * NESTED. + */ + TagVariableInfo[] tagVars = tagInfo.getTagVariableInfos(); + if (tagVars != null) { + for (int i=0; itagVars.length; i++) { + if (tagVars[i].getScope() == VariableInfo.AT_END) + continue; + String varName = tagVars[i].getNameGiven(); + if (varName == null) { + varName = tagData.getAttributeString( + tagVars[i].getNameFromAttribute()); + } + for (int j=0; jsubelements.size(); j++) { + Node subelem = subelements.getNode(j); + String paramName = subelem.getAttributeValue(name); + if (varName.equals(paramName)) { + err.jspError(n, jsp.error.doBody.invalidParam, + varName); + } + } + } + } + visitBody(n); } } 1.30 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties Index: messages.properties === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages.properties,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- messages.properties 21 Aug 2002 17:56:03 - 1.29 +++ messages.properties 21 Aug 2002 18:22:13 - 1.30 @@ -293,5 +293,6 @@ jsp.error.invoke.invalidBodyContent=jsp:invoke contains body content other than whitespace and jsp:param subelements jsp.error.invoke.missingParam=Missing jsp:param subelement for variable {0} jsp.error.doBody.varAndVarReader=Both 'var' and 'varReader' specified in jsp:doBody +jsp.error.doBody.invalidParam=jsp:doBody has a jsp:param subelement with the same name as a variable ({0}) with a scope of AT_BEGIN or NESTED jsp.warning.bad.urlpattern.propertygroup=Bad value {0} in the url-pattern subelement in web.xml jsp.error.unknown_attribute_type=Unknown attribute type ({1}) for attribute {0}. 1.9 +2 -1 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties Index: messages_es.properties === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/resources/messages_es.properties,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- messages_es.properties21 Aug 2002 17:05:52 - 1.8 +++ messages_es.properties21 Aug 2002 18:22:13 - 1.9 @@ -217,3 +217,4 @@ jsp.warning.bad.urlpattern.propertygroup= jsp.error.invoke.invalidBodyContent= jsp.error.invoke.missingParam= +jsp.error.doBody.invalidParam= 1.8 +2 -1
Re: Duplicate Contexts in reloading. Probably a sync bug in Tomcat 3.3.
This should be fixed now. If you could test the latest nightly, it would be a big help. - Original Message - From: Hugh J. L. [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Monday, August 19, 2002 1:42 AM Subject: Duplicate Contexts in reloading. Probably a sync bug in Tomcat 3.3. Hi, If two requests enter ReloadInterceptor.contextMap() simultaneously and both reload context, it causes duplicate context reloading. -- messages -- 2002-08-19 16:15:16 - ContextManager: Removing context DEFAULT:/examples 2002-08-19 16:15:16 - ContextManager: Removing context DEFAULT:/examples 2002-08-19 16:15:16 - ContextManager: Adding context DEFAULT:/examples 2002-08-19 16:15:16 - ContextManager: Adding context DEFAULT:/examples -- messages -- As a result, ContextManager.contextsV has duplicate Context object, while ContextManager.contexts doesn't have since it is Hashtable -- the first is replaced. I found this problem and then simulated it in JBuilder with its debugging functions. I think that it is not enough to sync DependManager only. It is necessary to sync some code in ReloadInterceptor.contextMap(). So far don't know if this problem will cause further errors. Thanks. __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[OFF-Topic] CVS problems
Hi, I'm trying to update my workspace using /home/cvs but I'm always receiving the following error: (1) ssh -l jfarcand -L 2401:localhost:2401 cvs.apache.org (2) cvs :pserver:jfarcand@localhost:/home/cvs/ checkout jakarta-servletapi-5 ? jakarta-servletapi-5/jsr152/src/share/dtd/.new.web-jsptaglibrary_1_2.dtd cvs server: Updating jakarta-servletapi-5 cvs server: Updating jakarta-servletapi-5/jsr152 cvs server: Updating jakarta-servletapi-5/jsr152/src cvs server: Updating jakarta-servletapi-5/jsr152/src/etc cvs server: Updating jakarta-servletapi-5/jsr152/src/share cvs server: Updating jakarta-servletapi-5/jsr152/src/share/dtd U jakarta-servletapi-5/jsr152/src/share/dtd/web-jsptaglibrary_1_2.dtd cvs [checkout aborted]: end of file from server (consult above messages if any) Any ideas? I'm on win2k using MKS Thanks, -- Jeanfrancois -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Jasper 2 class files
Is jspcache the place that Tomcat is looking for generated classes? If so, then the custom JSP classloader is doing its magic. The java and class files produced by the JspC command line compiler should be able to be jared up and placed into the WEB-INF directory, like any other servlet. And the web.xml then maps the jsp URIs to servlets. Jasper 1 could do this, I provided some of the patches to make it work. The real test is to take all of the output from JspC and create a WAR file from it. Without the base jsp files. This WAR should operate in ANY servlet container. On Wednesday 21 August 2002 02:22 pm, John Trollinger wrote: Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.date2_jsp/servlet-name servlet-classorg.apache.jsp.date2_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.date_jsp/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.date2_jsp/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping !-- All session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, and ejb-ref elements should follow this fragment. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jasper 2 class files
If you take the generated class files and war them up and just call them as servlets how does the classloader differentiate /org.jasper.jsp.hello_jsp from /subdir/org.jasper.jsp.hello_jsp. I can see how it does it when a JSP file exists but if you just move the generated files over I don't see how the classloader could figure this out? If this is in your web.xml how does it know one hello_jsp from the other without the jsp pages there and without going through jasper? servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping -Original Message- From: Steve Downey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:56 PM To: Tomcat Developers List Subject: Re: Jasper 2 class files Is jspcache the place that Tomcat is looking for generated classes? If so, then the custom JSP classloader is doing its magic. The java and class files produced by the JspC command line compiler should be able to be jared up and placed into the WEB-INF directory, like any other servlet. And the web.xml then maps the jsp URIs to servlets. Jasper 1 could do this, I provided some of the patches to make it work. The real test is to take all of the output from JspC and create a WAR file from it. Without the base jsp files. This WAR should operate in ANY servlet container. On Wednesday 21 August 2002 02:22 pm, John Trollinger wrote: Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.date2_jsp/servlet-name servlet-classorg.apache.jsp.date2_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.date_jsp/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.date2_jsp/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping !-- All session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, and ejb-ref elements should follow this fragment. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 11909] New: - The memory and resident memory size increases for the new connector
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11909. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11909 The memory and resident memory size increases for the new connector Summary: The memory and resident memory size increases for the new connector Product: Tomcat 4 Version: 4.0.4 Final Platform: Sun OS/Version: Solaris Status: NEW Severity: Major Priority: Other Component: Connector:Coyote HTTP/1.1 AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hello, Memory and resident memory increases way too much when the connector is Coyote HTTP/1.1 The load conditions is same for all test cases. There are the results for Traditional/default connector Tomcat Version 4.0.4 Connector = Coyote HTTP/1.1 Parallel Requests = 100 Number of threads = 121 Memory Size = 148 Resident Memory Size = 91 Tomcat Version 4.0.4 Connector = HttpConector HTTP/1.1 Parallel Requests = 100 Number of threads = 116 Memory Size = 98 Resident Memory Size = 53 I think there is some kind of memory leak in Coyote connector. Memory increases way to fast for doing the same amount of work, maintaining a similiar through put when compared to HttpConnector. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jasper 2 class files
Bingo! It can't! {BTW, it shouldn't be org.jasper.x, as that's Paul Jasper's site, whoever he is} What should be happening with JspC [and in the JspServlet IMO] is: /hello.jsp = org.apache.jsp.hello_jsp in {output}/hello_jsp.java /subdir/hello.jsp = org.apache.jsp.subdir.hello_jsp in {output}/subdir/hello_jsp.java with the resultant web.xml fragment: servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.subdir.hello_jsp/servlet-name servlet-classorg.apache.jsp.subdir.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.subdir.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping Then they can be compiled by an ordinary javac ant task, and warred and deployed in any servlet container. Now, why might you want to do this? The resultant WAR file can be put into a container that doesn't have JSP or tools.jar support. It's great for embedded applications. Much lower overhead, and more predictable response. It's also great for QA. You test exactly the bits that get shipped. -Original Message- From: John Trollinger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 3:16 PM To: 'Tomcat Developers List' Subject: RE: Jasper 2 class files If you take the generated class files and war them up and just call them as servlets how does the classloader differentiate /org.jasper.jsp.hello_jsp from /subdir/org.jasper.jsp.hello_jsp. I can see how it does it when a JSP file exists but if you just move the generated files over I don't see how the classloader could figure this out? If this is in your web.xml how does it know one hello_jsp from the other without the jsp pages there and without going through jasper? servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping -Original Message- From: Steve Downey [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 2:56 PM To: Tomcat Developers List Subject: Re: Jasper 2 class files Is jspcache the place that Tomcat is looking for generated classes? If so, then the custom JSP classloader is doing its magic. The java and class files produced by the JspC command line compiler should be able to be jared up and placed into the WEB-INF directory, like any other servlet. And the web.xml then maps the jsp URIs to servlets. Jasper 1 could do this, I provided some of the patches to make it work. The real test is to take all of the output from JspC and create a WAR file from it. Without the base jsp files. This WAR should operate in ANY servlet container. On Wednesday 21 August 2002 02:22 pm, John Trollinger wrote: Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name
DO NOT REPLY [Bug 11910] New: - Bugs in example CompressionServletResponseWrapper
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11910. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11910 Bugs in example CompressionServletResponseWrapper Summary: Bugs in example CompressionServletResponseWrapper Product: Tomcat 4 Version: 4.1.9 Platform: Other OS/Version: Other Status: NEW Severity: Minor Priority: Other Component: Webapps:Examples AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 1) This example doesn't support other content-types. PrintWriter in getWriter() method should be created in this way: String charset = getCharsetFromContentType(contentType); if (charset == null) charset = {default charset} writer = new PrintWriter(new OutputStreamWriter(stream, charset)); where getCharsetFromContentType returns charset according to set content-type. 2) There can be problem when somebody sets threshold: Method should look like this: public void write(int b) throws IOException { if (closed) throw new IOException(Cannot write to a closed output stream); if ((bufferCount = buffer.length) || (count=compressionThreshold)) { compressionThresholdReached = true; } if (compressionThresholdReached) { // rajo - bugfix if (bufferCount 0) { writeToGZip(buffer, 0, bufferCount); bufferCount = 0; } writeToGZip(b); } else { buffer[bufferCount++] = (byte) b; } count++; // rajo - bugfix } Similary method (byte b[], int off, int len). Thanks. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Strange delays while Tomcat works
We will try that, however - the problem seemed to have disappeared when the app was ran on Tomcat 4.1.9... Just out of curiosity - any idea why? Thanks in advance, Dev Zero G team http://devzerog.com Glenn Nielsen wrote: This most likely is due to JVM garbage collection. You may need to tune your java startup arguments to tune your memory usage and GC. When the JVM does GC the application (Tomcat) freezes until the GC is complete. Try starting Tomcat with the java arg -verbose:gc, this will add data about TC to stdout. Regards, Glenn Dev Zero G Ltd wrote: Hi, all! Introduction: we have Windows 2000 running SUN JDK 1.4.0, Tomcat 4.0.4 and our software, that uses Struts and taglibs. While requesting action from browser we have strange delays during whole request-serving process. In a words, action (servlet) receives a request, does some work, sends control to the JSP page, which prepares resulting HTML page for browser. This JSP page has a lot of custom tags instances (from jakarta-struts project and our own as well). Using debug output (an old method - System.out.println(...) ) we realized, that tomcat suddenly hangs up for some time - every time in different places of source code. Seems like it runs servlet (for less that 1 second), than makes some kind of preparing of JSP file (i think it's enough to compile servlet from it just one time - but not everytime, as we have) - for aproximately 5-6 seconds, and processes JSP page. The very strange behavior aoccurs right there - custom tags may be executed for 2,3,6 or even 10 seconds. In other time, after executing part of JSP page, debug output stops, and continues after 2-3 seconds. On computer we have stopped all background services, it has 1GHz Duron CPU and 512M RAM - so I think problem is not in hardware. May be some tuning of Tmcat conf files will help - some kind of buffer sizes etc. I couldn't find anything helpful not in server.xml, nor in web.xml of application. I'll repeat, such delays always occurs while procxessing the JSP page, almost every time - in different source location. But these delays realy slows whole project - so ANY KIND OF HELP AND/OR SUGGESTIONS would be taken in consideration with gratitude. Dev Zero G team http://devzerog.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[Patch] [jakarta-tomcat-catalina] Invocation of Servlet Filters for RequestDispacther includes/forwards
Hello, This is in regarding the addition of support for invoking Servlet Filters on RequestDispatcher.forwards and RequestDispatcher.includes as specfied in the Servlet 2.4 specification Section SRV.6.2.5. Basically the patch enables a web application to apply filters using a new element under the filter-mapping elment of the web deployment descriptor. Elements include REQUEST, FORWARD, and INCLUDE. Based on the dispatcher element(s) specified a application will or will not appy filters when processing a request. Please see the specification for furter details. In order for this functionality to be enabled the following filles needed modifcation: org.apache.catalina.core.ApplicationDispatcher.java org.apache.catalina.core.StandardWrapperValue.java org.apache.catalina.startup.WebRuleSet.java org.apache.catalina.deploy.FilterMap.java One new file was created: org.apache.catalina.core.ApplicationFilterFactory.java Basically I moved all re-usable code related to creating an ApplicationFilterChain object into the ApplicationFilterFactory. This design will allow for the caching of ApplicationFilterChains in the future. Attached are the diff files for the changes I am proposing and also the new file ApplicationFilterFactory.java Pleease let me know what you all think about these changes. Regards, Greg Murray ApplicationDispat29a793eb Description: application/text ApplicationFilterc0664a84 Description: application/text --- FilterMap.java.orig Thu Jul 18 09:48:05 2002 +++ FilterMap.java Mon Aug 19 11:12:28 2002 @@ -88,7 +88,23 @@ * The name of this filter to be executed when this mapping matches * a particular request. */ -private String filterName = null; +//added by Greg Murray + +public static final int FORWARD =1; +public static final int FORWARD_INCLUDE =2; +public static final int INCLUDE =3; +public static final int REQUEST = 4; +public static final int REQUEST_FORWARD =5; +public static final int REQUEST_INCLUDE =6; +public static final int REQUEST_FORWARD_INCLUDE =7; + +// represents nothing having been set. This will be seen +// as equal to a REQUEST +private static final int NOT_SET = -1; + +private int dispatcherMapping=NOT_SET; + +private String filterName = null; public String getFilterName() { return (this.filterName); @@ -124,6 +140,59 @@ public void setURLPattern(String urlPattern) { this.urlPattern = RequestUtil.URLDecode(urlPattern); +} + +/** + * Added by Greg Murray + * + * This method will be used to set the current state of the FilterMap + * representing the state of when filters should be applied: + * + *FORWARD + *FORWARD_INCLUDE + *INCLUDE + *REQUEST + *REQUEST_INCLUDE, + *REQUEST_FORWARD, + *REQUEST_FORWARD_INCLUDE + * + */ +public void setDispatcher(String dispatcherString) { +String dispatcher = dispatcherString.toUpperCase(); + +if (dispatcher.equals(FORWARD)) { + +// apply FORWARD to the global dispatcherMapping. +switch (dispatcherMapping) { +case INCLUDE : dispatcherMapping = FORWARD_INCLUDE; break; +case NOT_SET : dispatcherMapping = FORWARD; break; +case REQUEST : dispatcherMapping = REQUEST_FORWARD; break; +case REQUEST_INCLUDE : dispatcherMapping = REQUEST_FORWARD_INCLUDE; +break; +} +} else if (dispatcher.equals(INCLUDE)) { +// apply INCLUDE to the global dispatcherMapping. +switch (dispatcherMapping) { +case FORWARD : dispatcherMapping = FORWARD_INCLUDE; break; +case NOT_SET : dispatcherMapping = INCLUDE; break; +case REQUEST : dispatcherMapping = REQUEST_INCLUDE; break; +case REQUEST_FORWARD : dispatcherMapping = REQUEST_FORWARD_INCLUDE; +break; +} +} else if (dispatcher.equals(REQUEST)) { +// apply REQUEST to the global dispatcherMapping. +switch (dispatcherMapping) { +case FORWARD : dispatcherMapping = REQUEST_FORWARD; break; +case INCLUDE : dispatcherMapping = REQUEST_INCLUDE; break; +case NOT_SET : dispatcherMapping = REQUEST; break; +case FORWARD_INCLUDE : dispatcherMapping = REQUEST_FORWARD_INCLUDE; +break; +} +} +} + +public int getDispatcherMapping() { +// per the SRV.6.2.5 absence of any dispatcher elements is +// equivelant to a REQUEST value +if (dispatcherMapping == NOT_SET) return REQUEST; +else return dispatcherMapping; } --- WebRuleSet.java.origFri Aug 9 09:22:36 2002 +++ WebRuleSet.java Tue Aug 13 14:41:22 2002 @@ -258,6 +258,10 @@
DO NOT REPLY [Bug 11910] - Bugs in example CompressionServletResponseWrapper
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11910. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11910 Bugs in example CompressionServletResponseWrapper [EMAIL PROTECTED] changed: What|Removed |Added CC||tomcat- ||[EMAIL PROTECTED] Status|NEW |ASSIGNED --- Additional Comments From [EMAIL PROTECTED] 2002-08-21 21:30 --- Can you send the actual patch files if you think there're bugs? I'll take a look and apply the patches if it makes sense. Thanks, Amy -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat 3.3.1 session bug
I have found the following bug: create a webapp called Test (note capitalization) in webapp Test, create index.jsp with the following line: session id = %=session.getId()% now try http://localhost:8080/test versus http://localhost:8080/Test refresh, the page you'll find that test generates a new session ID each time. where as Test has the correct behaviour and preserves the session ID. is this a known bug? is there anyone working on it? -Tony fyi: i'm running on win2k -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[patch] jakarta-servletapi-5: Bugfix for 11884
Attached is a bugfix for 11884: getParent in a SimpleTag implementation returns a Tag. TagAdapter now works as per the spec. Files modified: jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java -- Mark Roth, Java Software Co-Specification Lead for JSP 2.0 Sun Microsystems, Inc. Index: jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java === RCS file: /home/cvspublic/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java,v retrieving revision 1.2 diff -u -r1.2 TagAdapter.java --- jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java 19 Aug 2002 16:29:51 - 1.2 +++ jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java 21 Aug 2002 21:46:59 - @@ -77,15 +77,22 @@ { /** The simple tag that's being adapted */ private SimpleTag simpleTagAdaptee; + +/** The parent, of this tag, converted (if necessary) to be of type Tag */ +private Tag cachedParent; /** - * Creates a new TagAdapter that wraps the given SimeplTag and + * Creates a new TagAdapter that wraps the given SimpleTag and * returns the parent tag when getParent() is called. * * @param adaptee The SimpleTag being adapted as a Tag. */ public TagAdapter( SimpleTag adaptee ) { -this.simpleTagAdaptee = simpleTagAdaptee; +if( adaptee == null ) { + // Cannot wrap a null adaptee. + throw new IllegalArgumentException(); +} +this.simpleTagAdaptee = adaptee; } /** @@ -122,9 +129,18 @@ * @return The parent of the tag being adapted. */ public Tag getParent() { - // Note the parent tag must be an instance of Tag (either a - // direct instance or a wrapped instance). - return (Tag)simpleTagAdaptee.getParent(); + if( this.cachedParent == null ) { + JspTag parent = simpleTagAdaptee.getParent(); + if( parent instanceof Tag ) { + this.cachedParent = (Tag)parent; + } + else { +// Must be SimpleTag - no other types defined. + this.cachedParent = new TagAdapter( (SimpleTag)parent ); + } + } + + return this.cachedParent; } /** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext TagAdapter.java
kinman 2002/08/21 15:05:34 Modified:jsr152/src/share/javax/servlet/jsp/tagext TagAdapter.java Log: - Fixed 11884: getParent in a SimpleTag implementation returns a Tag. Submitted by Mark Roth Revision ChangesPath 1.3 +21 -5 jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java Index: TagAdapter.java === RCS file: /home/cvs/jakarta-servletapi-5/jsr152/src/share/javax/servlet/jsp/tagext/TagAdapter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TagAdapter.java 19 Aug 2002 16:29:51 - 1.2 +++ TagAdapter.java 21 Aug 2002 22:05:34 - 1.3 @@ -77,15 +77,22 @@ { /** The simple tag that's being adapted */ private SimpleTag simpleTagAdaptee; + +/** The parent, of this tag, converted (if necessary) to be of type Tag */ +private Tag cachedParent; /** - * Creates a new TagAdapter that wraps the given SimeplTag and + * Creates a new TagAdapter that wraps the given SimpleTag and * returns the parent tag when getParent() is called. * * @param adaptee The SimpleTag being adapted as a Tag. */ public TagAdapter( SimpleTag adaptee ) { -this.simpleTagAdaptee = simpleTagAdaptee; +if( adaptee == null ) { + // Cannot wrap a null adaptee. + throw new IllegalArgumentException(); +} +this.simpleTagAdaptee = adaptee; } /** @@ -122,9 +129,18 @@ * @return The parent of the tag being adapted. */ public Tag getParent() { - // Note the parent tag must be an instance of Tag (either a - // direct instance or a wrapped instance). - return (Tag)simpleTagAdaptee.getParent(); + if( this.cachedParent == null ) { + JspTag parent = simpleTagAdaptee.getParent(); + if( parent instanceof Tag ) { + this.cachedParent = (Tag)parent; + } + else { +// Must be SimpleTag - no other types defined. + this.cachedParent = new TagAdapter( (SimpleTag)parent ); + } + } + + return this.cachedParent; } /** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java
patrickl2002/08/21 15:10:35 Modified:catalina/src/share/org/apache/catalina/startup HostConfig.java Log: Make XML schema validation off by default and allow it to be turned on via attributes in the Host element in server.xml. Submitted by: Jean-Francois Arcand ([EMAIL PROTECTED]) Revision ChangesPath 1.3 +54 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java Index: HostConfig.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/HostConfig.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- HostConfig.java 21 Aug 2002 03:29:31 - 1.2 +++ HostConfig.java 21 Aug 2002 22:10:34 - 1.3 @@ -202,6 +202,17 @@ */ private HashMap webXmlLastModified = new HashMap(); +/** + * Attribute value used to turn on/off XML validation + */ + private boolean xmlValidation = false; + + +/** + * Attribute value used to turn on/off XML namespace awarenes. + */ + private boolean xmlNamespaceAware = false; + // - Properties @@ -336,7 +347,44 @@ this.unpackWARs = unpackWARs; } + + + /** + * Set the validation feature of the XML parser used when + * parsing xml instances. + * @param xmlValidation true to enable xml instance validation + */ +public void setXmlValidation(boolean xmlValidation){ +this.xmlValidation = xmlValidation; +} + +/** + * Get the server.xml host attribute's xmlValidation. + * @return true if validation is enabled. + * + */ +public boolean getXmlValidation(){ +return xmlValidation; +} +/** + * Get the server.xml host attribute's xmlNamespaceAware. + * @return true if namespace awarenes is enabled. + * + */ +public boolean getXmlNamespaceAware(){ +return xmlNamespaceAware; +} + + +/** + * Set the namespace aware feature of the XML parser used when + * parsing xml instances. + * @param xmlNamespaceAware true to enable namespace awareness + */ +public void setXmlNamespaceAware(boolean xmlNamespaceAware){ +this.xmlNamespaceAware=xmlNamespaceAware; +} // - Public Methods @@ -359,6 +407,8 @@ setDeployXML(((StandardHost) host).isDeployXML()); setLiveDeploy(((StandardHost) host).getLiveDeploy()); setUnpackWARs(((StandardHost) host).isUnpackWARs()); +setXmlNamespaceAware(((StandardHost) host).getXmlNamespaceAware()); +setXmlValidation(((StandardHost) host).getXmlValidation()); } } catch (ClassCastException e) { log.error(sm.getString(hostConfig.cce, event.getLifecycle()), e); -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup HostConfig.java
remove -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Tomcat 4.x / Apache 2 connector
Hello, thanks for reading and PLEASE HELP! Building and then launching the Tomcat 4.0.4 connector for Apache 2 on FreeBSD 4.4, linux-jdk 1.4 , we get: org.apache.jk.server.JkMain init INFO: Starting Jk2, base dir= /usr/local/tomcat4.0.4_1.4.0 conf=/usr/local/tomcat4.0.4_1.4.0/conf/jk2.properties org.apache.jk.server.JkMain start INFO: APR not loaded, disabling jni components: java.io.IOException: /usr/local/ tomcat4.0.4_1.4.0/lib/jk_jnicb.so: /usr/local/tomcat4.0.4_1.4.0/lib/jk_jni.so: ELF file OS ABI invalid. Then, we were answered: I'm assuming you're running 1.4 under Linux emulation, since the native 1.4 isn't near finished yet :). The obvious guess would then be that the shared library jk_jni.so is in fact a native FreeBSD shared library when it needs to be a Linux shared library. Any shared library loaded by a Linux JDK running under emulation must be a Linux shared library. After that we have tried to build jkjni.so with native freeBSD jdk1.3, so this shared library can use native FreeBSD methods. But, after starting Tomcat 4.0.4 (jdk 1.3) we get: Error JniHandler - -nativeDispatch: error 21000 Error ChannelUn - -receive error: 21000 (info) [jk_jni_aprImpl.c (470)] jkInvoke() invoke 2db8bd2c (info) [jk_channel_un.c (292)] channelUn.close(): close unix socket -1 (error) [jk_channel_un.c (416)] channelUn.receive():error receiving -3 9 Bad file descriptor 0x15abd0f0 -1 ANY ideas, suggestions, guesses - would be greatly appreciated. Thanks in advance. Dev Zero G Team http://devzerog.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core StandardServer.java
amyroh 2002/08/21 15:25:36 Modified:catalina/src/share/org/apache/catalina/core StandardServer.java Log: Forgot to add to Context element. Revision ChangesPath 1.6 +5 -4 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java Index: StandardServer.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- StandardServer.java 20 Aug 2002 23:09:18 - 1.5 +++ StandardServer.java 21 Aug 2002 22:25:36 - 1.6 @@ -842,6 +842,7 @@ writer.print(Context); storeAttributes(writer, context); +writer.println(); writer.println(/Context); // Flush and close the output file -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[5.0] Welcome Files
I have been looking into the Servlet 2.4 section 9.10 Welcome files stuff. In a nutshell, the spec now allows servlets to be welcome files. The can either be an 'exact match' or a 'prefix match.' I implemented changes to StandardContextWrapper to bring Tomcat into compliance. I think it is pretty messy, but then again Welcome Files are messy (per earlier posts.) What do you think? (The patch is for discussion purposes and contains a lot of logging) Cheers, -bob Index: core/StandardContextMapper.java === RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContextMapper.java,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 StandardContextMapper.java --- core/StandardContextMapper.java 18 Jul 2002 16:48:11 - 1.1.1.1 +++ core/StandardContextMapper.java 21 Aug 2002 22:45:02 - @@ -65,15 +65,20 @@ package org.apache.catalina.core; +import javax.naming.directory.DirContext; +import javax.naming.InitialContext; +import javax.naming.NamingException; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.Container; import org.apache.catalina.Context; +import org.apache.catalina.Globals; import org.apache.catalina.HttpRequest; import org.apache.catalina.Mapper; import org.apache.catalina.Request; import org.apache.catalina.Wrapper; import org.apache.catalina.util.RequestUtil; import org.apache.catalina.util.StringManager; +import org.apache.naming.resources.Resource; /** @@ -272,6 +277,15 @@ if (wrapper != null) { servletPath = relativeURI; pathInfo = null; + +if ( relativeURI.endsWith(/) ) { +WelcomeURIProcessing wfp = new WelcomeURIProcessing( relativeURI ); +if ( wfp.mapsToServlet ){ +wrapper = wfp.wrapper; +servletPath = wfp.servletPath; +pathInfo = wfp.pathInfo; +} +} } } @@ -290,5 +304,126 @@ } + +// Private Methods + + +/** + * This helper class is used as part of an attempt to satisfy + * Servlet 2.4 spec, section 9.10. Section 9.10 now allows a + * welcome file to map to a servlet + **/ +private class WelcomeURIProcessing { +boolean mapsToServlet = false; + +Wrapper wrapper = null; +String servletPath = null; +String pathInfo = null; + +WelcomeURIProcessing (String relativeURI ) { +mapsToServlet = search(relativeURI); +} + +boolean search(String relativeURI) { +DirContext resources = getResources(); + +String[] welcomes = context.findWelcomeFiles(); + +for(int i=0;iwelcomes.length;i++){ +String newRelativeURI = relativeURI+welcomes[i]; +context.log( # search() checking +newRelativeURI); + +try { +Object obj = resources.lookup(newRelativeURI); +if ( obj != null obj instanceof Resource ){ +context.log( # search() resource present +newRelativeURI); +return false; +} +} catch (NamingException e){ +// These happen everytime a resource is not found, which is like very often. +} + +// exact match +context.log( # search() exact match +newRelativeURI); +String name = context.findServletMapping(newRelativeURI); +if ( name != null){ +// set wrapper... +wrapper = (Wrapper) context.findChild(name); +if ( wrapper != null ){ +servletPath = newRelativeURI; +pathInfo = null; +context.log( # search() exact match to servlet: +name+ fromURI +newRelativeURI); +return true; +} +} + +// prefix match +servletPath = newRelativeURI; +while (true) { +context.log( # search() prefix match trying: +servletPath + /*); +name = context.findServletMapping(servletPath + /*); +if (name != null) { +wrapper = (Wrapper) context.findChild(name); +} +if (wrapper != null) { +pathInfo = newRelativeURI.substring(servletPath.length()); +if (pathInfo.length() == 0) +pathInfo = null; +servletPath = newRelativeURI; +context.log( # search() prefix match to servlet: +name+ fromURI
Re: [5.0] Welcome Files
- Original Message - From: Bob Herrmann [EMAIL PROTECTED] To: Tomcat Developers List [EMAIL PROTECTED] Sent: Wednesday, August 21, 2002 3:53 PM Subject: [5.0] Welcome Files I have been looking into the Servlet 2.4 section 9.10 Welcome files stuff. In a nutshell, the spec now allows servlets to be welcome files. The can either be an 'exact match' or a 'prefix match.' I implemented changes to StandardContextWrapper to bring Tomcat into compliance. I think it is pretty messy, but then again Welcome Files are messy (per earlier posts.) What do you think? (The patch is for discussion purposes and contains a lot of logging) One easy optimization is to keep a Hashtable of {relativeURI, WelcomeURIProcessing}. The main problem is dealing with life-cycle, and dealing with someone dropping an index.html file in and expecting TC to pick it up (which is why I dropped the Hashtable idea in 3.3). Cheers, -bob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Jasper 2 class files
Yes, you can have two JSP pages with the same name but in different directories and everything will work fine even though they have the same package and class name. This is because a custom URLClassLoader is created for each individual JSP page. That class loader only loads the one java class for that one JSP page. For example: /myapp/this/hello.jsp /muapp/that/hello.jsp The class files will end up in: $CATALINA_BASE/work/Standalone/localhost/myapp/this/hello.class $CATALINA_BASE/work/Standalone/localhost/myapp/that/hello.class Since two different URLClassLoaders are used Jasper can load each of the above two classes even though they have the same package and class name. The old methods Jasper used for loading java classes generated for JSP pages was very inefficient. The above change simplified Jasper and improved its performance by 25%. Regards, Glenn John Trollinger wrote: Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.date2_jsp/servlet-name servlet-classorg.apache.jsp.date2_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.date_jsp/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.date2_jsp/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping !-- All session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, and ejb-ref elements should follow this fragment. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Jasper 2 class files
However, in the context of JspC, it's a problem to map them to the same package and class name. The custom URLClassLoader works within the JSP engine, but the general servlet class loader doesn't know about those rules. So when it sees those entries in web.xml, it will map all hello.jsp files, no matter where they reside, to org.apache.jsp.hello_jsp. -Original Message- From: Glenn Nielsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 21, 2002 7:54 PM To: Tomcat Developers List Subject: Re: Jasper 2 class files Yes, you can have two JSP pages with the same name but in different directories and everything will work fine even though they have the same package and class name. This is because a custom URLClassLoader is created for each individual JSP page. That class loader only loads the one java class for that one JSP page. For example: /myapp/this/hello.jsp /muapp/that/hello.jsp The class files will end up in: $CATALINA_BASE/work/Standalone/localhost/myapp/this/hello.class $CATALINA_BASE/work/Standalone/localhost/myapp/that/hello.class Since two different URLClassLoaders are used Jasper can load each of the above two classes even though they have the same package and class name. The old methods Jasper used for loading java classes generated for JSP pages was very inefficient. The above change simplified Jasper and improved its performance by 25%. Regards, Glenn John Trollinger wrote: Greg, I took this off of the bug tracking because it is not a bug and I thought there are people a lot smarter than me in this mailing list that could help answer you questions. I do not know how jasper differentiates between hello.jsp and /anydir/hello.jsp when the both compile to a class org.jasper.jsp.hello_jsp but it does work... My hello.jsp in the root dir prints hello Jasper world and my hello.jsp in the subdir prints hello john world. It works without a hitch.. (notice that I have removed the .java files for the 2 hello world files and it did not regenerate them) Here is my file list Directory of C:\appserver\Tomcat\jspcache 08/21/2002 02:19 PMDIR . 08/21/2002 02:19 PMDIR .. 08/21/2002 11:47 AM 3,496 date_jsp.java 08/21/2002 11:52 AM 2,975 hello_jsp.class 08/21/2002 11:51 AM 2,883 index_jsp.class 08/21/2002 11:51 AM 1,863 index_jsp.java 08/21/2002 01:27 PMDIR subdir 4 File(s) 11,217 bytes Directory of C:\appserver\Tomcat\jspcache\subdir 08/21/2002 01:27 PMDIR . 08/21/2002 01:27 PMDIR .. 08/21/2002 11:47 AM 3,334 date2_jsp.java 08/21/2002 11:52 AM 2,970 hello_jsp.class Here is my jsp.xml !-- Automatically created by Tomcat JspC. Place this fragement in the web.xml before all icon, display-name, description, distributable, and context-param elements. -- servlet servlet-nameorg.apache.jsp.date_jsp/servlet-name servlet-classorg.apache.jsp.date_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.date2_jsp/servlet-name servlet-classorg.apache.jsp.date2_jsp/servlet-class /servlet servlet servlet-nameorg.apache.jsp.hello_jsp/servlet-name servlet-classorg.apache.jsp.hello_jsp/servlet-class /servlet servlet-mapping servlet-nameorg.apache.jsp.date_jsp/servlet-name url-pattern/date.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/hello.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.date2_jsp/servlet-name url-pattern/subdir/date2.jsp/url-pattern /servlet-mapping servlet-mapping servlet-nameorg.apache.jsp.hello_jsp/servlet-name url-pattern/subdir/hello.jsp/url-pattern /servlet-mapping !-- All session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, and ejb-ref elements should follow this fragment. -- -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
DO NOT REPLY [Bug 4138] - Processor threads have inconsistent ClassLoader state
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4138. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4138 Processor threads have inconsistent ClassLoader state [EMAIL PROTECTED] changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX | Summary|HttpProcessor threads have |Processor threads have |inconsistent ClassLoader|inconsistent ClassLoader |state |state --- Additional Comments From [EMAIL PROTECTED] 2002-08-22 00:24 --- I'd like to revisit this issue, now that it has been some time since it was originally reported. I still feel that this is technically a bug and it should get fixed in Tomcat's now more mature state. Also, rethinking this, this does appear to be a security vulnerability, because if the classloader remains to as the webapp classloader for the processor thread after the servlet finishes servicing, it's particularly vulnerable (given that all the server code the thread runs through has all the Java2 security permissions granted). The thread could load classes that the *webapp classloader* would try loading first (since that specific classloader type does not perform parent-first classloader delegation). Aside from all this, it's a code cleanliness and peace of mind issue. :) Thoughts? Here is the simple fix in class org.apache.catalina.core.StandardHostValve: public void invoke(Request request, Response response, ValveContext valveContext) throws IOException, ServletException { // : // : // : // remember the current classloader for this thread ClassLoader origClassLoader = Thread.currentThread(). getContextClassLoader(); // set the context class loader for this thread before invoking // the context Thread.currentThread().setContextClassLoader(context.getLoader(). getClassLoader()); try { // have the context process this request context.invoke(request, response); } finally { // under ANY circumstance (regardless of exception occurring during // request processing), always perform the following: // restore the original classloader for this thread Thread.currentThread().setContextClassLoader(origClassLoader); } } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler JspConfig.java
kinman 2002/08/21 17:47:24 Modified:jasper2/src/share/org/apache/jasper/compiler JspConfig.java Log: - If is-xml is not specified, leave it as unspecified. Revision ChangesPath 1.2 +4 -5 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java Index: JspConfig.java === RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspConfig.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- JspConfig.java20 Aug 2002 03:54:54 - 1.1 +++ JspConfig.java22 Aug 2002 00:47:24 - 1.2 @@ -89,7 +89,7 @@ private ServletContext ctxt; private boolean initialized = false; -private String defaultIsXml = false; +private String defaultIsXml = null; // unspecified private String defaultIsELEnabled = true; private String defaultIsScriptingEnabled = true; @@ -109,7 +109,6 @@ ParserUtils pu = ParserUtils.createParserUtils(cl); TreeNode webApp = pu.parseXMLDocument(WEB_XML, is); if (webApp == null || !2.4.equals(webApp.findAttribute(version))) { - System.out.println(Servlet 2.3); defaultIsELEnabled = false; return; } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
make a proxy cache server out of tomcat
Hi, I am thinking of using tomcat to build a proxy cache server. When a request comes into the proxy cache server, the server checks to see if the app is deployed in the local container. If yes, the request is served by the proxy cache server. If not, the proxy cache forwards the request to the origin server and get the response. I wonder does current Tomcat code base have the request forwarding logic or not? If not, where can I get an open source java code for the request forwarding logic. Thanks! --Zhenxin Wang DoCoMo Labs USA
[PATCH] jakarta-tomcat-jasper: PFD features and bugfixes 3
Atached is a third patch to move us towards JSP 2.0 PFD feature-complete. More to come... File Changed (IN PATCH) jasper2/src/share/org/apache/jasper/compiler/Generator.java Summary of changes: - Removed TryCatchFinally handling for SimpleTag call generation. TryCatchFinally does not apply for SimpleTag anymore. - Fixed to only declare scripting variables for those variables whose declare attribute is set to 'true' (true by default). - Scripting variables were not being declared for SimpleTag calls. Fixed. - Fixed Tag Handler implementation to synchronize locally-scoped AT_BEGIN and AT_END variables with calling page's page context. Note that there are a number of spec bugs relating to synchronization that were discovered while implementing this. I'll take these findings to the Expert Group for further discussion. -- Mark Roth, Java Software JSP 2.0 Specification Co-Lead Sun Microsystems, Inc. Index: jasper2/src/share/org/apache/jasper/compiler/Generator.java === RCS file: /home/cvspublic/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Generator.java,v retrieving revision 1.75 diff -u -r1.75 Generator.java --- jasper2/src/share/org/apache/jasper/compiler/Generator.java 21 Aug 2002 18:07:59 - 1.75 +++ jasper2/src/share/org/apache/jasper/compiler/Generator.java 22 Aug 2002 02:24:01 - @@ -2073,6 +2073,10 @@ out.printin(/* ); out.print(n.getName()); out.println( */); + +// Declare AT_BEGIN scripting variables + declareScriptingVars(n, VariableInfo.AT_BEGIN); + out.printil({); out.pushIndent(); @@ -2093,11 +2097,6 @@ generateSetters(n, tagHandlerVar, handlerInfo, true); -if (n.implementsTryCatchFinally()) { -out.printil(try {); -out.pushIndent(); -} - // Set the body if (findJspBody(n) == null) { /* @@ -2127,29 +2126,16 @@ out.printin(tagHandlerVar); out.println(.doTag();); - // Synchronize AT_BEGIN and AT_END scripting variables - syncScriptingVars(n, VariableInfo.AT_BEGIN); - syncScriptingVars(n, VariableInfo.AT_END); - - // TryCatchFinally - if (n.implementsTryCatchFinally()) { -out.popIndent(); // try - out.printil(} catch (Throwable _jspx_exception) {); - out.pushIndent(); - out.printin(tagHandlerVar); - out.println(.doCatch(_jspx_exception);); - out.popIndent(); -out.printil(} finally {); -out.pushIndent(); - out.printin(tagHandlerVar); - out.println(.doFinally();); -out.popIndent(); -out.println(}); - } - restoreScriptingVars(n); out.popIndent(); out.printil(}); + + // Synchronize AT_BEGIN scripting variables + syncScriptingVars(n, VariableInfo.AT_BEGIN); + + // Declare and synchronize AT_END scripting variables + declareScriptingVars(n, VariableInfo.AT_END); + syncScriptingVars(n, VariableInfo.AT_END); n.setEndJavaLine(out.getJavaLine()); } @@ -2162,21 +2148,25 @@ Object elem = vec.elementAt(i); if (elem instanceof VariableInfo) { VariableInfo varInfo = (VariableInfo) elem; - out.printin(varInfo.getClassName()); - out.print( ); - out.print(varInfo.getVarName()); - out.println( = null;); +if( varInfo.getDeclare() ) { +out.printin(varInfo.getClassName()); +out.print( ); +out.print(varInfo.getVarName()); +out.println( = null;); +} } else { TagVariableInfo tagVarInfo = (TagVariableInfo) elem; - String varName = tagVarInfo.getNameGiven(); - if (varName == null) { - varName = n.getTagData().getAttributeString( -tagVarInfo.getNameFromAttribute()); - } - out.printin(tagVarInfo.getClassName()); - out.print( ); - out.print(varName); - out.println( = null;); +if( tagVarInfo.getDeclare() ) { +String varName = tagVarInfo.getNameGiven(); +if (varName == null) { + varName = n.getTagData().getAttributeString( +tagVarInfo.getNameFromAttribute()); +} +out.printin(tagVarInfo.getClassName()); +out.print( ); +out.print(varName); +out.println( = null;); +} } } } @@ -2580,7 +2570,7 @@ throws JasperException { // XXX - A possible optimization here would be to check to see -// if the old child of the
cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/modules/session SessionId.java
billbarker2002/08/21 23:04:30 Modified:src/share/org/apache/tomcat/modules/session SessionId.java Log: Fix session cookie path problem under Windows. Reported by: Tony Chao [EMAIL PROTECTED] Revision ChangesPath 1.20 +18 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java Index: SessionId.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- SessionId.java10 Nov 2001 08:57:43 - 1.19 +++ SessionId.java22 Aug 2002 06:04:29 - 1.20 @@ -96,8 +96,10 @@ boolean noCookies=false; boolean cookiesFirst=true; boolean checkSSLSessionId=false; +boolean ignoreCase=false; public SessionId() { + ignoreCase= (File.separatorChar == '\\'); } public void setCookiesFirst( boolean b ) { @@ -112,6 +114,16 @@ this.checkSSLSessionId = checkSSLSessionId; } +/** Is the path case-insenitive. + */ +public void setIgnoreCase(boolean ic) { + ignoreCase = ic; +} + +public boolean getIgnoreCase() { + return ignoreCase; +} + /** Extract the session id from the request. * SessionInterceptor will have to be called _before_ mapper, @@ -326,7 +338,12 @@ String sessionPath = rrequest.getContext().getPath(); if(sessionPath.length() == 0) { sessionPath = /; -} +} else if( ignoreCase ) { + if(! rrequest.requestURI().startsWith( sessionPath )){ + sessionPath = rrequest.requestURI().toString() + .substring(0,sessionPath.length()); + } + } // // GS, piggyback the jvm route on the session id. // //if(!sessionPath.equals(/)) { -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat RELEASE-NOTES-3.3.2.txt
billbarker2002/08/21 23:06:47 Modified:.RELEASE-NOTES-3.3.2.txt Log: Document Cookie path fix for Windows. Revision ChangesPath 1.12 +3 -1 jakarta-tomcat/RELEASE-NOTES-3.3.2.txt Index: RELEASE-NOTES-3.3.2.txt === RCS file: /home/cvs/jakarta-tomcat/RELEASE-NOTES-3.3.2.txt,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- RELEASE-NOTES-3.3.2.txt 21 Aug 2002 04:56:14 - 1.11 +++ RELEASE-NOTES-3.3.2.txt 22 Aug 2002 06:06:47 - 1.12 @@ -53,6 +53,8 @@ Preserve sessions across session reloadings. + Fix Cookie case name problem under Windows for Session Cookie. + Jasper: Bug No. Description -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]