Compiling JSP files

2005-05-24 Thread Charles P. Killmer
I am having a problem where one of my jsp files won't compile.  Tomcat
successfully creates the java file but it never creates the class file
and hence never responds to the request for the page.  
 
I am looking for what needs to be in the command line in order to
manually compile the java file the gets created in order to look for
errors in that process.
 
This is what I have so far but I am getting errors.
c:\jdk1.5.0\bin\javac -classpath
%CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\lib\servlet
.jar test_jsp.java
 
 
Errors:
test_jsp.java:5: package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
test_jsp.java:8: package org.apache.jasper.runtime does not exist
public final class test_jsp extends
org.apache.jasper.runtime.HttpJspBase
 ^
test_jsp.java:9: package org.apache.jasper.runtime does not exist
implements org.apache.jasper.runtime.JspSourceDependent {
^
 
 
Thanks
Charles


Re: Compiling JSP files

2005-05-24 Thread Marco Pöhler
You have to add jsp-api.jar to the classpath.

hth 
Marco

---
http://www.kontaktlinsen-preisvergleich.de
http://www.faq-kontaktlinsen.de

Am Dienstag, den 24.05.2005, 08:46 -0500 schrieb Charles P. Killmer:
 I am having a problem where one of my jsp files won't compile.  Tomcat
 successfully creates the java file but it never creates the class file
 and hence never responds to the request for the page.  
  
 I am looking for what needs to be in the command line in order to
 manually compile the java file the gets created in order to look for
 errors in that process.
  
 This is what I have so far but I am getting errors.
 c:\jdk1.5.0\bin\javac -classpath
 %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\lib\servlet
 .jar test_jsp.java
  
 
 Errors:
 test_jsp.java:5: package javax.servlet.jsp does not exist
 import javax.servlet.jsp.*;
 ^
 test_jsp.java:8: package org.apache.jasper.runtime does not exist
 public final class test_jsp extends
 org.apache.jasper.runtime.HttpJspBase
  ^
 test_jsp.java:9: package org.apache.jasper.runtime does not exist
 implements org.apache.jasper.runtime.JspSourceDependent {
 ^
  
 
 Thanks
 Charles


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Compiling JSP files

2005-05-24 Thread Charles P. Killmer
Thanks.  Now I am stuck at:

test_jsp.java:55: cannot find symbol
symbol  : method getAttribute(java.lang.String)
location: interface javax.servlet.http.HttpSession
   USER_ID = session.getAttribute(USER_ID).toString();
^ 

What jar file is javax.servlet.http in?  I am already including servlet.jar.

Charles


-Original Message-
From: Marco Pöhler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 24, 2005 8:51 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: Compiling JSP files

You have to add jsp-api.jar to the classpath.

hth
Marco

---
http://www.kontaktlinsen-preisvergleich.de
http://www.faq-kontaktlinsen.de

Am Dienstag, den 24.05.2005, 08:46 -0500 schrieb Charles P. Killmer:
 I am having a problem where one of my jsp files won't compile.  Tomcat 
 successfully creates the java file but it never creates the class file 
 and hence never responds to the request for the page.
  
 I am looking for what needs to be in the command line in order to 
 manually compile the java file the gets created in order to look for 
 errors in that process.
  
 This is what I have so far but I am getting errors.
 c:\jdk1.5.0\bin\javac -classpath
 %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\lib\servl
 et
 .jar test_jsp.java
  
 
 Errors:
 test_jsp.java:5: package javax.servlet.jsp does not exist import 
 javax.servlet.jsp.*; ^
 test_jsp.java:8: package org.apache.jasper.runtime does not exist 
 public final class test_jsp extends 
 org.apache.jasper.runtime.HttpJspBase
  ^
 test_jsp.java:9: package org.apache.jasper.runtime does not exist
 implements org.apache.jasper.runtime.JspSourceDependent {
 ^
  
 
 Thanks
 Charles


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: Compiling JSP files

2005-05-24 Thread Bernhard Slominski
Hi Charles,

what you can do is to use an ant task for do the precompilation.
This is a bit smarter than via the command line I guess.
The docu is under
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl
ication%20Compilation
It's not very well documented, it took me a while to finally get it working,
but it's working fine for me now.
So if you want to give it a try, I can give you some further assistance, if
needed.

Cheers 

Bernhard

 -Ursprüngliche Nachricht-
 Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 24. Mai 2005 15:47
 An: Tomcat Users List
 Betreff: Compiling JSP files
 
 
 I am having a problem where one of my jsp files won't compile.  Tomcat
 successfully creates the java file but it never creates the class file
 and hence never responds to the request for the page.  
  
 I am looking for what needs to be in the command line in order to
 manually compile the java file the gets created in order to look for
 errors in that process.
  
 This is what I have so far but I am getting errors.
 c:\jdk1.5.0\bin\javac -classpath
 %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\l
 ib\servlet
 .jar test_jsp.java
  
  
 Errors:
 test_jsp.java:5: package javax.servlet.jsp does not exist
 import javax.servlet.jsp.*;
 ^
 test_jsp.java:8: package org.apache.jasper.runtime does not exist
 public final class test_jsp extends
 org.apache.jasper.runtime.HttpJspBase
  ^
 test_jsp.java:9: package org.apache.jasper.runtime does not exist
 implements org.apache.jasper.runtime.JspSourceDependent {
 ^
  
  
 Thanks
 Charles
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Compiling JSP files

2005-05-24 Thread Charles P. Killmer
I just need a way to quickly determine why this script times out without 
compiling.  I have two scripts that create an admin interface to two different 
tables.  The only difference in the files is the underlying table structure.  
One works.  Even if I delete the _jsp.java and class files before making the 
request.  The other does not.  

Any ideas on how to resolve this issue would be appreciated.
Charles

-Original Message-
From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 24, 2005 9:47 AM
To: 'Tomcat Users List'
Subject: AW: Compiling JSP files

Hi Charles,

what you can do is to use an ant task for do the precompilation.
This is a bit smarter than via the command line I guess.
The docu is under
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl
ication%20Compilation
It's not very well documented, it took me a while to finally get it working, 
but it's working fine for me now.
So if you want to give it a try, I can give you some further assistance, if 
needed.

Cheers 

Bernhard

 -Ursprüngliche Nachricht-
 Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
 Gesendet: Dienstag, 24. Mai 2005 15:47
 An: Tomcat Users List
 Betreff: Compiling JSP files
 
 
 I am having a problem where one of my jsp files won't compile.  Tomcat 
 successfully creates the java file but it never creates the class file 
 and hence never responds to the request for the page.
  
 I am looking for what needs to be in the command line in order to 
 manually compile the java file the gets created in order to look for 
 errors in that process.
  
 This is what I have so far but I am getting errors.
 c:\jdk1.5.0\bin\javac -classpath
 %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\l
 ib\servlet
 .jar test_jsp.java
  
  
 Errors:
 test_jsp.java:5: package javax.servlet.jsp does not exist import 
 javax.servlet.jsp.*; ^
 test_jsp.java:8: package org.apache.jasper.runtime does not exist 
 public final class test_jsp extends 
 org.apache.jasper.runtime.HttpJspBase
  ^
 test_jsp.java:9: package org.apache.jasper.runtime does not exist
 implements org.apache.jasper.runtime.JspSourceDependent {
 ^
  
  
 Thanks
 Charles
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Compiling JSP files

2005-05-24 Thread Steve Kirk
Is there a reason why you can't let TC compile the JSP on demand and read
the log output?  Works for me.

Failing that, I suspect your cmd-line classpath has some errors.

What does echo %classpath% produce?

And are you sure these are right in your classpath (from your previous post
below):

C:\tomcat\work\Catalina\Site1\_
C:\tomcat\common\lib\servlet

Not sure what the first one is, and the second should read servlet-api.jar
not servlet.

You also need to add C:\tomcat\common\lib\jsp-api.jar to the classpath too
if you haven't already.

Also you should have all classes in the classpath that your class itself
imports - either explicitly include the full path to each class separately
(drop the .class extension), or a folder containing the class hierarchy in
folders, or the full path to one or more jars that include the classes.

 -Original Message-
 From: Charles P. Killmer [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday 24 May 2005 16:39
 To: Tomcat Users List
 Subject: RE: Compiling JSP files
 
 
 I just need a way to quickly determine why this script times 
 out without compiling.  I have two scripts that create an 
 admin interface to two different tables.  The only difference 
 in the files is the underlying table structure.  One works.  
 Even if I delete the _jsp.java and class files before making 
 the request.  The other does not.  
 
 Any ideas on how to resolve this issue would be appreciated.
 Charles
 
 -Original Message-
 From: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, May 24, 2005 9:47 AM
 To: 'Tomcat Users List'
 Subject: AW: Compiling JSP files
 
 Hi Charles,
 
 what you can do is to use an ant task for do the precompilation.
 This is a bit smarter than via the command line I guess.
 The docu is under
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.h
 tml#Web%20Appl
 ication%20Compilation
 It's not very well documented, it took me a while to finally 
 get it working, but it's working fine for me now.
 So if you want to give it a try, I can give you some further 
 assistance, if needed.
 
 Cheers 
 
 Bernhard
 
  -Ursprüngliche Nachricht-
  Von: Charles P. Killmer [mailto:[EMAIL PROTECTED]
  Gesendet: Dienstag, 24. Mai 2005 15:47
  An: Tomcat Users List
  Betreff: Compiling JSP files
  
  
  I am having a problem where one of my jsp files won't 
 compile.  Tomcat 
  successfully creates the java file but it never creates the 
 class file 
  and hence never responds to the request for the page.
   
  I am looking for what needs to be in the command line in order to 
  manually compile the java file the gets created in order to 
 look for 
  errors in that process.
   
  This is what I have so far but I am getting errors.
  c:\jdk1.5.0\bin\javac -classpath
  %CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\l
  ib\servlet
  .jar test_jsp.java
   
   
  Errors:
  test_jsp.java:5: package javax.servlet.jsp does not exist import 
  javax.servlet.jsp.*; ^
  test_jsp.java:8: package org.apache.jasper.runtime does not exist 
  public final class test_jsp extends 
  org.apache.jasper.runtime.HttpJspBase
   ^
  test_jsp.java:9: package org.apache.jasper.runtime does not exist
  implements org.apache.jasper.runtime.JspSourceDependent {
  ^
   
   
  Thanks
  Charles
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Compiling JSP files

2005-05-24 Thread Mark Leone
Steve Kirk mentioned this in his list of files you need to have in your 
classpath, but I'll repeat it as a direct answer to your question. The 
file servlet-api.jar provides the implementation of the 
javax.servlet.http package.


If you put that in your classpath, it should get rid of the compile 
error you listed below.


-Mark

Charles P. Killmer wrote:


Thanks.  Now I am stuck at:

test_jsp.java:55: cannot find symbol
symbol  : method getAttribute(java.lang.String)
location: interface javax.servlet.http.HttpSession
  USER_ID = session.getAttribute(USER_ID).toString();
   ^ 


What jar file is javax.servlet.http in?  I am already including servlet.jar.

Charles


-Original Message-
From: Marco Pöhler [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 24, 2005 8:51 AM

To: tomcat-user@jakarta.apache.org
Subject: Re: Compiling JSP files

You have to add jsp-api.jar to the classpath.

hth
Marco

---
http://www.kontaktlinsen-preisvergleich.de
http://www.faq-kontaktlinsen.de

Am Dienstag, den 24.05.2005, 08:46 -0500 schrieb Charles P. Killmer:
 

I am having a problem where one of my jsp files won't compile.  Tomcat 
successfully creates the java file but it never creates the class file 
and hence never responds to the request for the page.


I am looking for what needs to be in the command line in order to 
manually compile the java file the gets created in order to look for 
errors in that process.


This is what I have so far but I am getting errors.
c:\jdk1.5.0\bin\javac -classpath
%CLASSPATH%;C:\tomcat\work\Catalina\Site1\_;C:\tomcat\common\lib\servl
et
.jar test_jsp.java


Errors:
test_jsp.java:5: package javax.servlet.jsp does not exist import 
javax.servlet.jsp.*; ^
test_jsp.java:8: package org.apache.jasper.runtime does not exist 
public final class test_jsp extends 
org.apache.jasper.runtime.HttpJspBase

^
test_jsp.java:9: package org.apache.jasper.runtime does not exist
   implements org.apache.jasper.runtime.JspSourceDependent {
   ^


Thanks
Charles
   




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread JavaNetIn
I have j2sdk1.4.2. Exact version information as follows.

java version 1.4.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
On Tomcat 4.0-b7, Tomcat 5.0.7  Tomcat 5.0.19 JSP pages couldn't
compile while servlets works fine. Iknow by shifting to jdk1.3.1 this
problem will solve. But I can not do that. Tomcat 5.0.19 is the latest
release build.
Is the same problem everywhere?

To get rid of this should I download whole source code  other huge
libraries  compile it for j2sdk1.4.2.
Or downloading jikes will solve problem?

Error :

J:\Java\Downloads\Tomcat\jakarta-tomcat-5.0.19\work\Catalina\localhost\OnlineExam\org\apache\jsp\AvailableContext_jsp.java:8: 

cannot access java.lang.Object
bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
implements org.apache.jasper.runtime.JspSourceDependent {
   ^
1 error


./Nikhil





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread David Smith
Hi.

Sounds to me like your jar files are compiled under different JDKs.  Be 
sure when you install j2sdk1.4.2 to completely replace all files in the 
JDK directory.  I'd actually go so far as to clean install in a separate 
directory (ie /usr/java/j2sdk1.4.2_04) and then symlink j2sdk to it.  
Set JAVA_HOME to j2sdk and it'll find the jdk.  Also be sure all your 
webapp files are compiled under the 1.4.2 JDK.

--David

JavaNetIn wrote:

I have j2sdk1.4.2. Exact version information as follows.

java version 1.4.2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)
On Tomcat 4.0-b7, Tomcat 5.0.7  Tomcat 5.0.19 JSP pages couldn't
compile while servlets works fine. Iknow by shifting to jdk1.3.1 this
problem will solve. But I can not do that. Tomcat 5.0.19 is the latest
release build.
Is the same problem everywhere?

To get rid of this should I download whole source code  other huge
libraries  compile it for j2sdk1.4.2.
Or downloading jikes will solve problem?

Error :

J:\Java\Downloads\Tomcat\jakarta-tomcat-5.0.19\work\Catalina\localhost\OnlineExam\org\apache\jsp\AvailableContext_jsp.java:8: 

cannot access java.lang.Object
bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
implements org.apache.jasper.runtime.JspSourceDependent {
   ^
1 error


./Nikhil





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Bad Class Version while compiling JSP Files on Tomcat

2004-04-07 Thread Caldarale, Charles R
 From: JavaNetIn [mailto:[EMAIL PROTECTED]
 Subject: Bad Class Version while compiling JSP Files on Tomcat
 
 bad class file: D:\j2sdk1.4.2\jre\lib\rt.jar(java/lang/Object.class)
 class file has wrong version 48.0, should be 47.0

This error message is one generated by the javac compiler, and usually indicates that 
you have an old version of tools.jar in the classpath used in starting Tomcat.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and 
is thus for use only by the intended recipient. If you received this in error, please 
contact the sender and delete the e-mail and its attachments from all computers.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Compiling jsp files

2001-04-20 Thread Zsolt Koppany

Hi,

we deliver tomcat with our application and because we can deliver only
JRE (and not JKD) can we pre-compile the jsp files? It is necessary
because JRE does not contain the built in java compiler.

Zsolt

-- 
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017



Re: Compiling jsp files

2001-04-20 Thread Bernhard Wraase

But You could add jikes.
--
Bernhard
NET.KOSMOS Projektentwicklung und Management GmbH
Tel.: +49 231 5522944
Fax: +49 231 5522930





Re: long file names when compiling *.jsp files

2000-11-15 Thread Pierre Neihouser

Since this is a repost and nobody seems to give any hint, I'll give it a shot:

- The file name limits is (AFAIK) 255
- This is a limit on the file name and not the whole path
- Maybe you do not have proper access rights in d:\jdk1.3\jakarta-tomcat\work
as is indicating the error message
- Maybe your disk is full

Here it is, let me know how it's going...
Thanks

--
Pierre


Ari Volcoff wrote:

 We receive this message when trying to run a jsp file

 Internal Servlet Error:

 org.apache.jasper.JasperException: Unable to compile class for JSPerror:
 Can't write:
 D:\jdk1.3\jakarta-tomcat\work\localhost_8080%2FRio\_0005f_0005f\Online\Templ
 ates\Classes\Forums_0005fObject_0005fClass\Ari\_0002f_0002e_0002e_0002fOnlin
 e_0002fTemplates_0002fClasses_0002fForums_0005fObject_0005fClass_0002fAri_00
 02ftest_00031_0002ejsptest1_jsp_0.class
 1 error

 this is because there is a limit of 260 characters for a file name on the NT
 Platform !

 is there a way to overcome this problem ?




long file names when compiling *.jsp files

2000-11-14 Thread Ari Volcoff

We receive this message when trying to run a jsp file

Internal Servlet Error:

org.apache.jasper.JasperException: Unable to compile class for JSPerror:
Can't write:
D:\jdk1.3\jakarta-tomcat\work\localhost_8080%2FRio\_0005f_0005f\Online\Templ
ates\Classes\Forums_0005fObject_0005fClass\Ari\_0002f_0002e_0002e_0002fOnlin
e_0002fTemplates_0002fClasses_0002fForums_0005fObject_0005fClass_0002fAri_00
02ftest_00031_0002ejsptest1_jsp_0.class
1 error

this is because there is a limit of 260 characters for a file name on the NT
Platform !

is there a way to overcome this problem ?


Regards

Ari Volcoff
-
 http://www.portalprise.com

   Tel: 972-3-6164116
   Extension: 210

   Fax: 972-3-6164136

HomePage: http://come.to/ari1
-




Re: long file names when compiling *.jsp files

2000-11-14 Thread Pierre Delisle

By searching the archive at
  http://archives.real-time.com/rte-tomcat/

[see "READ THIS First! Mailing-list archive and good tips" posted periodically
on this list]

you will find:
http://archives2.real-time.com/pipermail/tomcat-users/2000-August/008481.html

that gives the details about long JSP filenames and what can 
be done to make them smaller.

-- Pierre

Ari Volcoff wrote:
 
 We receive this message when trying to run a jsp file
 
 Internal Servlet Error:
 
 org.apache.jasper.JasperException: Unable to compile class for JSPerror:
 Can't write:
 D:\jdk1.3\jakarta-tomcat\work\localhost_8080%2FRio\_0005f_0005f\Online\Templ
 ates\Classes\Forums_0005fObject_0005fClass\Ari\_0002f_0002e_0002e_0002fOnlin
 e_0002fTemplates_0002fClasses_0002fForums_0005fObject_0005fClass_0002fAri_00
 02ftest_00031_0002ejsptest1_jsp_0.class
 1 error
 
 this is because there is a limit of 260 characters for a file name on the NT
 Platform !
 
 is there a way to overcome this problem ?
 
 Regards
 
 Ari Volcoff
 -
  http://www.portalprise.com
 
Tel: 972-3-6164116
Extension: 210
 
Fax: 972-3-6164136
 
 HomePage: http://come.to/ari1
 -