1 | $Id: tomcat_with_java_1.5.txt 2079 2006-03-15 10:02:14Z jari $ |
---|
2 | |
---|
3 | Copyright (C) 2005 Nicklas Nordborg |
---|
4 | Copyright (C) 2006 Jari Häkkinen |
---|
5 | |
---|
6 | This file is part of BASE - BioArray Software Environment. Available |
---|
7 | at http://base.thep.lu.se/ |
---|
8 | |
---|
9 | BASE is free software; you can redistribute it and/or modify it under |
---|
10 | the terms of the GNU General Public License as published by the Free |
---|
11 | Software Foundation; either version 2 of the License, or (at your |
---|
12 | option) any later version. |
---|
13 | |
---|
14 | BASE is distributed in the hope that it will be useful, but WITHOUT |
---|
15 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
16 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
17 | for more details. |
---|
18 | |
---|
19 | You should have received a copy of the GNU General Public License |
---|
20 | along with this program; if not, write to the Free Software |
---|
21 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
---|
22 | USA. |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | How to configure Tomcat to use Java 1.5 |
---|
27 | ======================================= |
---|
28 | |
---|
29 | The below trick is not needed for later Tomcat 5.5 releases. We have |
---|
30 | succesfully installed, and use, a non-modified Tomcat version 5.5.15 |
---|
31 | with BASE. If you use release 5.5.15 or later you can safely skip the |
---|
32 | rest of this file. |
---|
33 | |
---|
34 | The new Tomcat 5.5 (and older tomcat 5) comes with it's own compiler, |
---|
35 | which is not Java 1.5 compatible. Here are the instructions to replace |
---|
36 | the built-in compiler with Sun's compiler. |
---|
37 | |
---|
38 | It requires that you have downloaded and installed Java 1.5 SDK |
---|
39 | and Ant. |
---|
40 | |
---|
41 | * Copy "tools.jar" from JAVA_HOME/lib to TOMCAT_HOME/common/lib |
---|
42 | |
---|
43 | * Copy "ant.jar" from ANT_HOME/lib to TOMCAT_HOME/common/lib |
---|
44 | |
---|
45 | * Remove "jasper-compiler-jdt.jar" from TOMCAT_HOME/common/lib |
---|
46 | |
---|
47 | * Open the file "TOMCAT_HOME/conf/web.xml" and locate the place |
---|
48 | that says: |
---|
49 | |
---|
50 | <servlet> |
---|
51 | <servlet-name>jsp</servlet-name> |
---|
52 | <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> |
---|
53 | <init-param> |
---|
54 | <param-name>fork</param-name> |
---|
55 | <param-value>false</param-value> |
---|
56 | </init-param> |
---|
57 | <init-param> |
---|
58 | <param-name>xpoweredBy</param-name> |
---|
59 | <param-value>false</param-value> |
---|
60 | </init-param> |
---|
61 | <load-on-startup>3</load-on-startup> |
---|
62 | </servlet> |
---|
63 | |
---|
64 | Add two new <init-param> tags: |
---|
65 | |
---|
66 | <init-param> |
---|
67 | <param-name>compilerSourceVM</param-name> |
---|
68 | <param-value>1.5</param-value> |
---|
69 | </init-param> |
---|
70 | <init-param> |
---|
71 | <param-name>compilerTargetVM</param-name> |
---|
72 | <param-value>1.5</param-value> |
---|
73 | </init-param> |
---|
74 | |
---|
75 | Restart the Tomcat web server. Everything should now work. |
---|
76 | |
---|
77 | More information can be found on (this very ugly URL): |
---|
78 | http://blog.taragana.com/index.php/archive/how-to-run-javac-15-or-beyond-compiler-for-jsp-compilation-in-tomcat-55-with-generics-enabled-and-other-15-only-features/ |
---|
79 | |
---|
80 | |
---|