You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Sourav Datta <so...@rediffmail.com> on 2003/07/16 14:57:37 UTC
how to call javabean from jsp in tomcat 4.1
when i am calling the simple bean..
class B
{
private String name;
public B()
{
}
public String getName()
{
return name;
}
public void setName(String name)
{
this.name = name;
}
}
from A.jsp..
<html><head><title>A</title></head>
<jsp:useBean id = "B" scope = "session" class = "B" />
<body>
<%= "Hi"%>
</body>
</html>
and tried with placing bean in different places it does not
work..
it gives me the following error..
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: Unable to compile class for
JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] C:\Tomcat
4.1\work\Standalone\localhost\_\A_jsp.java:47: package classes
does not exist
[javac] classes.B b = null;
[javac] ^
[javac] C:\Tomcat
4.1\work\Standalone\localhost\_\A_jsp.java:49: package classes
does not exist
[javac] b = (classes.B)
pageContext.getAttribute("b",
PageContext.SESSION_SCOPE);
[javac] ^
[javac] C:\Tomcat
4.1\work\Standalone\localhost\_\A_jsp.java:52: package classes
does not exist
[javac] b = (classes.B)
java.beans.Beans.instantiate(this.getClass().getClassLoader(),
"classes.B");
[javac] ^
[javac] 3 errors
............
....
now please write me, where to put the bean and jsp to create the
application..
___________________________________________________
Download the hottest & happening ringtones here!
OR SMS: Top tone to 7333
Click here now:
http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org