473,471 Members | 2,037 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

JSP not finding bean

1 New Member
I am having problems running a JSP with a java class file on a Tomcat server.
My files are located at:
tomcat/webapps/ROOT/temp.jsp
tomcat/webapps/ROOT/WEB-INF/classes/tempbeans/TempBean.class

Expand|Select|Wrap|Line Numbers
  1. <%@ page import="tempbeans.*" %>  <% TempBean bean = new TempBean(); %><%@ page import="tempbeans.*" %> 
  2.  
  3. <% TempBean bean = new TempBean(); %>
  4.  
The contents of my class file.
Expand|Select|Wrap|Line Numbers
  1. package tempbeans;
  2. public class TempBean
  3. {
  4.  
  5.     public TempBean()
  6.     {
  7.     }
  8. }
When I attempt to go to temp.jsp I get the following Exception:

exception

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

An error occurred at line: 3 in the jsp file: /temp.jsp
TempBean cannot be resolved to a type
1: <%@ page import="tempbeans.*" %>
2:
3: <% TempBean bean = new TempBean(); %>


An error occurred at line: 3 in the jsp file: /temp.jsp
TempBean cannot be resolved to a type
1: <%@ page import="tempbeans.*" %>
2:
3: <% TempBean bean = new TempBean(); %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:97)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:374)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:352)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:339)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:601)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:344)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:389)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet .java:722)


The code runs on my local Eclipse set-up? Is there something wrong with my remote set-up?
Any help is greatly appreciated!!
Oct 4 '11 #1
0 1508

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: jenniferyiu | last post by:
Hi. I downloaded the bean builder and followed the steps told on http://java.sun.com/products/javabeans/beanbuilder/1.0/docs/guide/tutorial.html and the sample tools was created as the above...
3
by: Miles Davenport | last post by:
I have the following code (please see base of email) which displays text from a properties file ok. I have changed the properties file so the contents are different, but cannot get the new...
0
by: Borek | last post by:
In my project I have to access in one business method of session bean usually more then 10 CMP Beans. I would like to have some utils classes, which could get me right instance of CMP or create...
61
by: Steven T. Hatton | last post by:
Stroustrup's view on classes, for the most part, seems to be centered around the notion of invariants. After a bit of adjusting to the use of yamt (yet another math term) in computer science, I...
3
by: Dave | last post by:
I think this is a simple struts question.... I want to display information on a page in a static way. That is, not as part of text elements. I can't find an appropriate struts tag to use. ...
3
by: angus | last post by:
Dear All, Are there any similar thing in ASP.net like Session Bean in JSP? \ Regards, Angus
0
by: manas589 | last post by:
Hi Can any one tell me how to use binding.xml while generating castor bean from an xsd file. i have one xsd file where two element are conflicting. so i thought to use binding file while...
2
by: nvidia1 | last post by:
Hi this is my first post but so far this is pretty good site. I have a file called index.html with the following code: <!-- index.html --> <html> <head><title>Student Registration...
0
by: jaisi | last post by:
What iam exactly trying to do is..saving the resultset in a bean.....and calling the bean in a servlet and forwarding it to jsp by setting the bean in the request scope; Now i have only one record...
1
by: hostel | last post by:
HTML PAGE <html> <body> <form action="second.jsp" method="get"> YOur name <input type=text name="name"> <input type=submit > </form> </body> </html>
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.