Re: JasperException while running JSP

2005-02-18 Thread David Smith
This is really just a guess, but could it be your class isn't in a 
package?  Try this:

1. Create the folder structure com/mycompany/mywebproject under 
WEB-INF/classes substituting in your company name and web project name 
where indicated.

2. place this line near the beginning of your java class source file: 
package com.mycompany.mywebproject ;  Again, replace your company name 
and web site project name where indicated.

3. Recompile and place the resulting .class file in the 
WEB-INF/classes/com/mycompany/mywebproject folder created in 1.

4. Restart your webapp and try it.
--David
U K Laxmi wrote:
I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat 
apache, it gives JasperException. It's saying -
TestSQLLoad cannot be resolved or is not a type.
I created jar file with TestSQLLoad.java 
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.
Here is the exception that's displayed on the browser.
org.apache.jasper.JasperException: Unable to compile
class for JSP
An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type
An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
		
__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 


-
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]


AW: JasperException while running JSP

2005-02-18 Thread Bernhard Slominski
Hi,

in Tomcat Version 5.5.4 there is a bug in the JSP Compiler Jasper, it
sometiems looses the classpath (Bug:
http://issues.apache.org/bugzilla/show_bug.cgi?id=32330)
This is fixed in 5.5.7.

So there are two ways to fix it:
1. Restart Tomcat
2. Upgrade to 5.5.7

Cheers

Bernhard

-Ursprüngliche Nachricht-
Von: U K Laxmi [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 18. Februar 2005 04:27
An: tomcat-user@jakarta.apache.org
Betreff: JasperException while running JSP


I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat 
apache, it gives JasperException. It's saying -
TestSQLLoad cannot be resolved or is not a type.

I created jar file with TestSQLLoad.java 
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.

Here is the exception that's displayed on the browser.

org.apache.jasper.JasperException: Unable to compile
class for JSP

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
r.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
28)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
56)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
96)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


-
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: JasperException while running JSP

2005-02-18 Thread U K Laxmi
Thanks David. Yes, after putting it in a package, it
worked.

But now i'm facing new problem.

It's throwing following exception.

javax.naming.NameNotFoundException: Name jdbc is not
bound in this Context

Anybody know solution?



--- David Smith [EMAIL PROTECTED] wrote:

 This is really just a guess, but could it be your
 class isn't in a 
 package?  Try this:
 
 1. Create the folder structure
 com/mycompany/mywebproject under 
 WEB-INF/classes substituting in your company name
 and web project name 
 where indicated.
 
 2. place this line near the beginning of your java
 class source file: 
 package com.mycompany.mywebproject ;  Again, replace
 your company name 
 and web site project name where indicated.
 
 3. Recompile and place the resulting .class file in
 the 
 WEB-INF/classes/com/mycompany/mywebproject folder
 created in 1.
 
 4. Restart your webapp and try it.
 
 --David
 
 U K Laxmi wrote:
 
 I have integrated tomcat 5.5 with apache 2
 successfully and i could able to run sample JSPs.
 Now
 i created a jsp page which will inititate a Java
 program called TestSQLLoad.java. TestSQLLoad.java
 talks to Ms Access database and gets me reuired
 fields
 from databasae and it will be displayed on browser
 thro' JSP page test-db.jsp. I'm using Netscape 7.2
 browser. When i run test-db.jsp after running
 tomcat 
 apache, it gives JasperException. It's saying -
 TestSQLLoad cannot be resolved or is not a type.
 
 I created jar file with TestSQLLoad.java 
 TestSQLLoad.class and put it in
 TOMCAT_ROOT/webapps/web/WEB-INF/classes directory
 as
 well as TOMCAT_ROOT/common/lib directories.
 Thinking
 that class loader is unable to find the class, i
 put
 the above directories in my class path as well.
 Where
 i'm going wrong? What's happenning. Pls help.
 
 Here is the exception that's displayed on the
 browser.
 
 org.apache.jasper.JasperException: Unable to
 compile
 class for JSP
 
 An error occurred at line: 7 in the jsp file:
 /JSP/test-db.jsp
 Generated servlet error:
 TestSQLLoad cannot be resolved or is not a type
 
 An error occurred at line: 7 in the jsp file:
 /JSP/test-db.jsp
 Generated servlet error:
 TestSQLLoad cannot be resolved or is not a type
 
 
 

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
 

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
 

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
  
 __ 
 Do you Yahoo!? 
 Meet the all-new My Yahoo! - Try it today! 
 http://my.yahoo.com 
  
 
 

-
 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]
 
 




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: AW: JasperException while running JSP

2005-02-18 Thread U K Laxmi
Thanks Bernhard. I was not using packages for my java
class. After using package, now it worked fine for me.



--- Bernhard Slominski
[EMAIL PROTECTED] wrote:

 Hi,
 
 in Tomcat Version 5.5.4 there is a bug in the JSP
 Compiler Jasper, it
 sometiems looses the classpath (Bug:

http://issues.apache.org/bugzilla/show_bug.cgi?id=32330)
 This is fixed in 5.5.7.
 
 So there are two ways to fix it:
 1. Restart Tomcat
 2. Upgrade to 5.5.7
 
 Cheers
 
 Bernhard
 
 -Ursprüngliche Nachricht-
 Von: U K Laxmi [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 18. Februar 2005 04:27
 An: tomcat-user@jakarta.apache.org
 Betreff: JasperException while running JSP
 
 
 I have integrated tomcat 5.5 with apache 2
 successfully and i could able to run sample JSPs.
 Now
 i created a jsp page which will inititate a Java
 program called TestSQLLoad.java. TestSQLLoad.java
 talks to Ms Access database and gets me reuired
 fields
 from databasae and it will be displayed on browser
 thro' JSP page test-db.jsp. I'm using Netscape 7.2
 browser. When i run test-db.jsp after running tomcat
 
 apache, it gives JasperException. It's saying -
 TestSQLLoad cannot be resolved or is not a type.
 
 I created jar file with TestSQLLoad.java 
 TestSQLLoad.class and put it in
 TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
 well as TOMCAT_ROOT/common/lib directories. Thinking
 that class loader is unable to find the class, i put
 the above directories in my class path as well.
 Where
 i'm going wrong? What's happenning. Pls help.
 
 Here is the exception that's displayed on the
 browser.
 
 org.apache.jasper.JasperException: Unable to compile
 class for JSP
 
 An error occurred at line: 7 in the jsp file:
 /JSP/test-db.jsp
 Generated servlet error:
 TestSQLLoad cannot be resolved or is not a type
 
 An error occurred at line: 7 in the jsp file:
 /JSP/test-db.jsp
 Generated servlet error:
 TestSQLLoad cannot be resolved or is not a type
 
 
 

org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandle
 r.java:84)
 

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:3
 28)
 

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
 

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
 

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
 56)
 

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
 96)
 

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
   
 __ 
 Do you Yahoo!? 
 Meet the all-new My Yahoo! - Try it today! 
 http://my.yahoo.com 
  
 
 

-
 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]
 
 




__ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

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



JasperException while running JSP

2005-02-17 Thread U K Laxmi
I have integrated tomcat 5.5 with apache 2
successfully and i could able to run sample JSPs. Now
i created a jsp page which will inititate a Java
program called TestSQLLoad.java. TestSQLLoad.java
talks to Ms Access database and gets me reuired fields
from databasae and it will be displayed on browser
thro' JSP page test-db.jsp. I'm using Netscape 7.2
browser. When i run test-db.jsp after running tomcat 
apache, it gives JasperException. It's saying -
TestSQLLoad cannot be resolved or is not a type.

I created jar file with TestSQLLoad.java 
TestSQLLoad.class and put it in
TOMCAT_ROOT/webapps/web/WEB-INF/classes directory as
well as TOMCAT_ROOT/common/lib directories. Thinking
that class loader is unable to find the class, i put
the above directories in my class path as well. Where
i'm going wrong? What's happenning. Pls help.

Here is the exception that's displayed on the browser.

org.apache.jasper.JasperException: Unable to compile
class for JSP

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type

An error occurred at line: 7 in the jsp file:
/JSP/test-db.jsp
Generated servlet error:
TestSQLLoad cannot be resolved or is not a type



org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:296)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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