source: trunk/doc/tomcat_with_java_1.5.txt @ 2079

Last change on this file since 2079 was 2079, checked in by Jari Häkkinen, 16 years ago

Fixes #130. The tomcat fix is not needed anymore, updated documentation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id Date
File size: 2.7 KB
Line 
1$Id: tomcat_with_java_1.5.txt 2079 2006-03-15 10:02:14Z jari $
2
3Copyright (C) 2005 Nicklas Nordborg
4Copyright (C) 2006 Jari Häkkinen
5
6This file is part of BASE - BioArray Software Environment.  Available
7at http://base.thep.lu.se/
8
9BASE is free software; you can redistribute it and/or modify it under
10the terms of the GNU General Public License as published by the Free
11Software Foundation; either version 2 of the License, or (at your
12option) any later version.
13
14BASE is distributed in the hope that it will be useful, but WITHOUT
15ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
17for more details.
18
19You should have received a copy of the GNU General Public License
20along with this program; if not, write to the Free Software
21Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
22USA.
23
24
25
26How to configure Tomcat to use Java 1.5
27=======================================
28
29The below trick is not needed for later Tomcat 5.5 releases. We have
30succesfully installed, and use, a non-modified Tomcat version 5.5.15
31with BASE. If you use release 5.5.15 or later you can safely skip the
32rest of this file.
33
34The new Tomcat 5.5 (and older tomcat 5) comes with it's own compiler,
35which is not Java 1.5 compatible. Here are the instructions to replace
36the built-in compiler with Sun's compiler.
37
38It requires that you have downloaded and installed Java 1.5 SDK
39and 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
75Restart the Tomcat web server. Everything should now work.
76
77More information can be found on (this very ugly URL):
78http://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 
Note: See TracBrowser for help on using the repository browser.