hey, I'm sorry but i'm such a lamer with this CVS so i hope everything goes well. i think files should be as attachmets /you can flame me down now/ So the paches make Tomcat 4.0 b6 to reload JSP classes as Servlet classes allready do.. Tuukka --- --Me olemme keskella jotain. jossa olemme totaalisen ulkopuolisia-- Get 250 color business cards for FREE! http://businesscards.lycos.com/vp/fastpath/
Index: ./jasper/src/share/org/apache/jasper/servlet/JspServlet.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-4.0/jasper/src/share/org/apache/jasper/servlet/JspServlet.java,v retrieving revision 1.17 diff -r1.17 JspServlet.java 4c4 < * Copyright (c) 1999 The Apache Software Foundation. All rights --- > * Copyright (c) 1999 The Apache Software Foundation. All rights 12c12 < * notice, this list of conditions and the following disclaimer. --- > * notice, this list of conditions and the following disclaimer. 20,21c20,21 < * any, must include the following acknowlegement: < * "This product includes software developed by the --- > * any, must include the following acknowlegement: > * "This product includes software developed by the 28c28 < * from this software without prior written permission. For written --- > * from this software without prior written permission. For written 54c54 < */ --- > */ 102c102 < * The JSP engine (a.k.a Jasper)! --- > * The JSP engine (a.k.a Jasper)! 122c122 < // ServletWrapper will set this --- > // ServletWrapper will set this 125c125 < --- > 131c131 < --- > 149,151c149,151 < < private void loadIfNecessary(HttpServletRequest req, HttpServletResponse res) < throws JasperException, ServletException, FileNotFoundException --- > > private void loadIfNecessary(HttpServletRequest req, HttpServletResponse res) > throws JasperException, ServletException, FileNotFoundException 153,154c153,154 < // First try context attribute; if that fails then use the < // classpath init parameter. --- > // First try context attribute; if that fails then use the > // classpath init parameter. 165c165 < } else --- > } else 167,169c167,169 < < Constants.message("jsp.message.cp_is", < new Object[] { --- > > Constants.message("jsp.message.cp_is", > new Object[] { 172c172 < }, --- > }, 175c175 < if (loadJSP(jspUri, cp, isErrorPage, req, res) --- > if (loadJSP(jspUri, cp, isErrorPage, req, res) 180,181c180,181 < < public void service(HttpServletRequest request, --- > > public void service(HttpServletRequest request, 184c184 < throws ServletException, IOException, FileNotFoundException --- > throws ServletException, IOException, FileNotFoundException 213c213 < response.sendError(HttpServletResponse.SC_NOT_FOUND, --- > response.sendError(HttpServletResponse.SC_NOT_FOUND, 233,234c233,234 < < --- > > 254,255c254,255 < < // Setup logging --- > > // Setup logging 279c279 < "<none>" --- > "<none>" 289c289 < try { --- > try { 357,359c357,359 < Constants.message("jsp.message.scratch.dir.is", < new Object[] { < options.getScratchDir().toString() --- > Constants.message("jsp.message.scratch.dir.is", > new Object[] { > options.getScratchDir().toString() 366,368c366,368 < private void serviceJspFile(HttpServletRequest request, < HttpServletResponse response, String jspUri, < Throwable exception, boolean precompile) --- > private void serviceJspFile(HttpServletRequest request, > HttpServletResponse response, String jspUri, > Throwable exception, boolean precompile) 372c372 < --- > 378c378 < --- > 383,384c383,384 < boolean preCompile(HttpServletRequest request) < throws ServletException --- > boolean preCompile(HttpServletRequest request) > throws ServletException 389c389 < --- > 391c391 < // An equal sign was specified --- > // An equal sign was specified 405c405 < if (qString != null && --- > if (qString != null && 414,415d413 < < 417c415,417 < public void service (HttpServletRequest request, --- > > > public void service (HttpServletRequest request, 422c422 < String includeUri --- > String includeUri 435c435 < --- > 477c477 < while (servlets.hasMoreElements()) --- > while (servlets.hasMoreElements()) 489,491c489,491 < boolean loadJSP(String jspUri, String classpath, < boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) < throws JasperException, FileNotFoundException --- > boolean loadJSP(String jspUri, String classpath, > boolean isErrorPage, HttpServletRequest req, HttpServletResponse res) > throws JasperException, FileNotFoundException 497a498,520 > > /* > * > * We should figure if ClassLoader has new content > * Here should be those policy systems but i have no > * idea how to put em on:) > * > */ > > URLClassLoader classLoader = > (URLClassLoader)context.getAttribute(Constants.SERVLET_CLASS_LOADER); > > /* > * > * Content have change have if it have replace > * parentClassLoader.. > * > */ > > if(parentClassLoader != classLoader && classLoader != null){ > parentClassLoader = classLoader; > } > 518c541 < boolean outDated = false; --- > boolean outDated = false; 521c544 < --- > 561c584 < --- > 563c586 < --- > 576c599 < --- > 605c628 < --- > The command completed successfully.
Index: ./catalina/src/share/org/apache/catalina/loader/StandardLoader.java =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/loader/StandardLoader.java,v retrieving revision 1.24 diff -r1.24 StandardLoader.java 10c10 < * Copyright (c) 1999 The Apache Software Foundation. All rights --- > * Copyright (c) 1999 The Apache Software Foundation. All rights 18c18 < * notice, this list of conditions and the following disclaimer. --- > * notice, this list of conditions and the following disclaimer. 26,27c26,27 < * any, must include the following acknowlegement: < * "This product includes software developed by the --- > * any, must include the following acknowlegement: > * "This product includes software developed by the 34c34 < * from this software without prior written permission. For written --- > * from this software without prior written permission. For written 62c62 < */ --- > */ 595c595 < URLStreamHandlerFactory streamHandlerFactory = --- > URLStreamHandlerFactory streamHandlerFactory = 606c606 < --- > 621c621 < ServletContext servletContext = --- > ServletContext servletContext = 630c630 < (jarUrl); --- > (jarUrl); 815c815 < * Copies classes to the work directory. This is required only because --- > * Copies classes to the work directory. This is required only because 828c828 < String classpath = --- > String classpath = 832c832 < --- > 859c859 < File workDir = --- > File workDir = 863c863 < --- > 869c869 < --- > 871c871 < --- > 892c892 < NameClassPair ncPair = --- > NameClassPair ncPair = 931c931,932 < ServletContext servletContext = --- > > ServletContext servletContext = 933c934,935 < if (servletContext == null) --- > > if (servletContext == null) 935c937,942 < servletContext.setAttribute(Globals.CLASS_LOADER_ATTR, --- > /* > * > * Looks nice and works until this > * > */ > servletContext.setAttribute(Globals.CLASS_LOADER_ATTR, 937,939c944,957 < if (servletContext instanceof ApplicationContext) < ((ApplicationContext) servletContext).setAttributeReadOnly < (Globals.CLASS_LOADER_ATTR); --- > /* > * > * FIXME > * This makes imposible to update ClassLoader for JSP > * So i decided to put in on hold till i get better > * idea. I see no idea why this should be used. but > * > */ > > // > //if (servletContext instanceof ApplicationContext) > // ((ApplicationContext) servletContext).setAttributeReadOnly > // (Globals.CLASS_LOADER_ATTR); > // 975c993 < repository = --- > repository = 991c1009 < File workDir = --- > File workDir = 998c1016 < --- > 1002c1020 < --- > 1010c1028 < // Silent catch: it's valid that no /WEB-INF/lib directory --- > // Silent catch: it's valid that no /WEB-INF/lib directory 1013c1031 < --- > 1020c1038 < NameClassPair ncPair = --- > NameClassPair ncPair = 1040c1058 < if (copy(fileURL.openStream(), --- > if (copy(fileURL.openStream(), 1051c1069 < --- > 1067c1085 < * Copy a file to the specified temp directory. This is required only --- > * Copy a file to the specified temp directory. This is required only 1099c1117 < ServletContext servletContext = --- > ServletContext servletContext = 1133c1151 < --- > 1141c1159 < NameClassPair ncPair = --- > NameClassPair ncPair = 1157c1175 < // Silent catch: it's valid that no /WEB-INF/lib directory --- > // Silent catch: it's valid that no /WEB-INF/lib directory The command completed successfully.