Hi Ali!
i'm form morocco!!!!!!
can u help?
>I'm using jsp with websphere!
>i have a jsp file that uses a bean!
>where should i put the bean class so as to be accessible by my jsp file?
>i know that html and jsp files are located in, the web directory and
>servlets in the servlets directory, of my web application! and that to add
a
>new file of that kind i should use the administrative console in the task
>tab to add servlet or jsp or resource file, so how to add a java(bean)
class
>and where?
>
>i'm using jsp1.0!
>
>thanks
I have created a bean directory in my web app where i have put my class
but still i have problemm in compilation!
for instance here is my jsp file located in web directory:
"<html>
<head>
<title>Reusing JavaBeans in JSP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<center>
<table border=5>
<tr>
<th> Reusing JavaBeans in JSP
</table>
</center>
<p> <jsp:usebean id="test" class="hall.SimpleBean" />
<jsp:setproperty name="test"
property="message"
value="Hello WWW" />
<h1>Message: <i> <jsp:getproperty name="test" property="message" />
</i></h1>
</body>
</html>
"
and here is the javabean
"
package hall;
public class SimpleBean {
private String message = "No message specified";
public String getMessage() {
return(message);
}
public void setMessage(String message) {
this.message = message;
}
}
"
it gives me the following error:
Unhandled error! You might want to consider having an error page to report
such errors more gracefully
com.sun.jsp.JspException: Compilation failed
at com.sun.jsp.compiler.Main.compile(Main.java:341)
at com.sun.jsp.runtime.JspLoader.compile(JspLoader.java:86)
at com.sun.jsp.runtime.JspLoader.loadJSP(JspLoader.java:200)
at
com.sun.jsp.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:99)
etc
"
_____________________________________________________________________________________
Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets