RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

2001-08-08 Thread Klaas van der Ploeg

  I wrote a class around the javac from IBM,...
 
 Is this javac from IBM freely redistributable?  I believe 
 the javac that
 comes with Sun's JDK is not.  That is the main reason for substituting
 javac with Jikes for many of us.

I don't quitte get that question, as everyone is able to download sun's jdk
from their site isn't it?? That's the same for the IBM jdk, with the only
difference that you have to register yourself before you can download it.

 
 And, if you do not plan to redistribute your application, why not use
 tools.jar?

You mean, the sun's javac compiler in the tools.jar? Mm... didn't thought
about that option.

 
 Also, do you plan to post your solution in how to - step by 
 step form
 so that users who encounter the same problem on AIX would benefit?
 

1. Copy JikesJavaCompiler.java from the Tomcat sources to
IBMJavaCompiler.java
2. Remove the packagename from the top of the file, or insert a new package
statement.
3. Add the -O option to the commandline String[] in compile()  (to
'optimize' compilation)
3. Compile your class  put it in a jar (jar -cvf )
4. Put the jar file in the tomcat/lib directory
5. Add jspCompilerPlugin parameter to web.xml and specify your classname
(IBMJavaCompiler)
6. Add jspCompilerPath parameter to web.xml and specify the executable of
the compiler ($IBMJDK_HOME/sh/javac)
7. Flush work directory
8. Start tomcat
9. Your jsp's are being compiled with ibm's compiler. If not, check
logs/jasper.log for initialization errors for your compiler.

That's it.

Rgrds,
Klaas



RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

2001-08-06 Thread Klaas van der Ploeg

Hi,

I did not mean Jikes because I already have a javac (which comes with the
JDK), and I don't want to compile Jikes from source for the AIX platform.
But your directions pointed me in the right way:

I wrote a class around the javac from IBM, basically it's a copy of
JikesJavaCompiler, but with some modified command line parameters. I added
this class to my WAR, and modified application/web-inf/web.xml and added
jspCompilerPlugin and jspCompilerPath. And that works fine.

So, basically thanks for your suggestions, but I did it a bit different.
(And at least easier for AIX)

Rgrds,
Klaas

 -Original Message-
 From: Gautam Sinha [mailto:[EMAIL PROTECTED]]
 Sent: donderdag 2 augustus 2001 16:11
 To: [EMAIL PROTECTED]
 Subject: RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3
 
 
 I assume you mean the Jikes compiler when you say IBM's 
 javac compiler.
 Since you did not know the name of IBM's javac, you 
 probably could not
 perform an effective search of the tomcat user archives.
 
 I posted a solution to your problem recently.
 It is available in the tomcat-user archives at
 http://mikal.org/interests/java/tomcat/archive/view?mesg=35715
 
 You may replace Step 2 with the init-param tag as suggested 
 by Chris Brown in his follow-up posting.  He also points out certain
 issues that are worth knowing.
 
 http://mikal.org/interests/java/tomcat/archive/view?mesg=35737
 
 I have not tested the steps on the AIX platform, but they are tested
 on the Windows platform.
 
 Gautam
 
 -Original Message-
 From: Klaas van der Ploeg [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 1:35 AM
 To: [EMAIL PROTECTED]
 Subject: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3
 
 Hi All,
 
 I managed to install Tomcat 3.2.3 on AIX with IBM's JDK 1.2.2. I also
 deployed my application on it using a .war file. But, when I 
 request a jsp
 page, I get an exception sun.tools.javac.Main etc
 
 Of course, this is related to the fact that I'm not using sun's jdk.
 
 My question:
 - Can I configure Tomcat to use IBM's javac for compiling jsp's?
 - Can I use conf/web.xml (jspCompilerPlugin) to specify the 
 classname (I
 read that these directives are not working, is that correct?)?
 - What is the classname of the IBM javac compiler?
 
 Thanx for your help.
 
 Klaas
 



RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

2001-08-06 Thread Gautam Sinha

Klaas,

 I wrote a class around the javac from IBM,...

Is this javac from IBM freely redistributable?  I believe the javac that
comes with Sun's JDK is not.  That is the main reason for substituting
javac with Jikes for many of us.

And, if you do not plan to redistribute your application, why not use
tools.jar?

Also, do you plan to post your solution in how to - step by step form
so that users who encounter the same problem on AIX would benefit?

Thanks,

Gautam

-Original Message-
From: Klaas van der Ploeg [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 3:11 AM
To: [EMAIL PROTECTED]
Subject: RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

Hi,

I did not mean Jikes because I already have a javac (which comes with the
JDK), and I don't want to compile Jikes from source for the AIX platform.
But your directions pointed me in the right way:

I wrote a class around the javac from IBM, basically it's a copy of
JikesJavaCompiler, but with some modified command line parameters. I added
this class to my WAR, and modified application/web-inf/web.xml and added
jspCompilerPlugin and jspCompilerPath. And that works fine.

So, basically thanks for your suggestions, but I did it a bit different.
(And at least easier for AIX)

Rgrds,
Klaas

 -Original Message-
 From: Gautam Sinha [mailto:[EMAIL PROTECTED]]
 Sent: donderdag 2 augustus 2001 16:11
 To: [EMAIL PROTECTED]
 Subject: RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3


 I assume you mean the Jikes compiler when you say IBM's
 javac compiler.
 Since you did not know the name of IBM's javac, you
 probably could not
 perform an effective search of the tomcat user archives.

 I posted a solution to your problem recently.
 It is available in the tomcat-user archives at
 http://mikal.org/interests/java/tomcat/archive/view?mesg=35715

 You may replace Step 2 with the init-param tag as suggested
 by Chris Brown in his follow-up posting.  He also points out certain
 issues that are worth knowing.

 http://mikal.org/interests/java/tomcat/archive/view?mesg=35737

 I have not tested the steps on the AIX platform, but they are tested
 on the Windows platform.

 Gautam

 -Original Message-
 From: Klaas van der Ploeg [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, August 02, 2001 1:35 AM
 To: [EMAIL PROTECTED]
 Subject: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

 Hi All,

 I managed to install Tomcat 3.2.3 on AIX with IBM's JDK 1.2.2. I also
 deployed my application on it using a .war file. But, when I
 request a jsp
 page, I get an exception sun.tools.javac.Main etc

 Of course, this is related to the fact that I'm not using sun's jdk.

 My question:
 - Can I configure Tomcat to use IBM's javac for compiling jsp's?
 - Can I use conf/web.xml (jspCompilerPlugin) to specify the
 classname (I
 read that these directives are not working, is that correct?)?
 - What is the classname of the IBM javac compiler?

 Thanx for your help.

 Klaas





RE: Compile JSP with Tomcat/IBM JDK 1.2.2/AIX4.3.3

2001-08-02 Thread Andrew Inggs

Klaas van der Ploeg wrote:
 I managed to install Tomcat 3.2.3 on AIX with IBM's JDK 1.2.2. I also
 deployed my application on it using a .war file. But, when I 
 request a jsp page, I get an exception sun.tools.javac.Main etc
 
 Of course, this is related to the fact that I'm not using sun's jdk. 
 
 My question:
 - Can I configure Tomcat to use IBM's javac for compiling jsp's?
 - Can I use conf/web.xml (jspCompilerPlugin) to specify the 
 classname (I read that these directives are not working, is that
 correct?)?
 - What is the classname of the IBM javac compiler?

I don't know about using the javac from IBM, but you may want to
try using Jikes with Tomcat.  There is some info at
http://www.jguru.com/faq/view.jsp?EID=307643
but read the comments, because the answer is out of date for
Tomcat 3.2, which no longer reads TOMCAT_HOME/conf/web.xml.

More info on Jikes at
http://oss.software.ibm.com/developerworks/opensource/jikes/

-- Andrew

-- 
Tell the US to free Dmitry Sklyarov! http://www.freesklyarov.org