Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

newbie - java beans
Hi,
I am trying again the following code... some changes have beend done
from last.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>Reusing Java Beans</title>
</head>

<body>

<%@ page import="Beans.*" %>

.... the main change was here: class - type (I'm not sure what it is
but on the internet I found it like that)

<jsp:useBean id="Simple" scope="session" type="Beans.SimpleBean"/>
<jsp:setProperty name="Simple" property="message" value="aw ras"/>

Message:
<jsp:getProperty name="Simple" property="message"/>

</body>
</html>



package Beans;
import java.beans.*;

public class SimpleBean
{
private String message;

public SimpleBean()
{
} // end constructor

public String getMessage()
{
return (message);
} // end method getMessage

public void setMessage(String message)
{
this.message = message;
} // end method setMessage

} // end class SimpleBeans

The paths I am using are
for SimpleBean.java - \Tomcat
5.0\webapps\jsp-examples\WEB-INF\classes\cal\
for SimpleBean.class - \Tomcat
5.0\webapps\jsp-examples\WEB-INF\classes\cal\Beans\
for BeanTest.jsp - \Tomcat 5.0\webapps\jsp-examples\cal\

The error being reported now is the following

HTTP Status 500 -

----------------------------------------------------------------------------
----

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.apache.jasper.JasperException: Beans.SimpleBean
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:77
)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:10
13)
org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1062)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
11)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
95)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.ClassNotFoundException: Beans.SimpleBean
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1340)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1189)
org.apache.jasper.compiler.BeanRepository.getBeanType(BeanRepository.java:75
)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:10
13)
org.apache.jasper.compiler.Node$GetProperty.accept(Node.java:1062)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3272)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:495)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:476)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:464)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:5
11)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
95)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.30 logs.


----------------------------------------------------------------------------
----

Apache Tomcat/5.0.30


Can someone help me out.


Thanks in Advance

Report this thread to moderator Post Follow-up to this message
Old Post
Xarky
12-23-04 02:14 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Help archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:55 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.