giaros71
28-01-2012, 16:17
Ciao a tutti,
(non sapevo dove postare questa discussione...)
qualsiasi javabean che testo sul tomcat mi da' sempre lo stesso errore...non capisco perche'.
D'altronde non e' difficile da capire questa tecnologia..ci sto studiando con vari esempi e pensavo che questo almeno funzionasse..
l'errore mi da il messaggio:
StringBean.jsp(13,0) The value for the useBean class attribute StringBean is invalid.:muro:
oppure l'errore:
org.apache.jasper.JasperException: Unable to load class for JSP
GRAZIE PER L'AIUTO
i file sono i seguenti:
StringBean.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Using JavaBeans with JSP</TITLE>
<LINK REL=STYLESHEET
HREF="JSP-Styles.css" TYPE="text/css">
</HEAD>
<BODY>
<TABLE BORDER=5 ALIGN="CENTER">
<TR><TH CLASS="TITLE">
Using JavaBeans with JSP</TABLE>
<jsp:useBean id="stringBean" class="StringBean" />
<OL>
<LI>Initial value (from jsp:getProperty):
<I><jsp:getProperty name="stringBean" property="message" /></I>
<LI>Initial value (from JSP expression):
<I><%= stringBean.getMessage() %></I>
<LI><jsp:setProperty name="stringBean" property="message" value="Best string bean: Fortex" />
Value after setting property with jsp:setProperty:
<I><jsp:getProperty name="stringBean" property="message" /></I>
<LI><% stringBean.setMessage("My favorite: Kentucky Wonder"); %>
Value after setting property with scriptlet:
<I><%= stringBean.getMessage() %></I>
</OL>
</BODY>
</HTML>
StringBean.java:
/** A simple bean that has a single String property
* called message.
*/
public class StringBean {
private String message = "No message specified";
public String getMessage() {
return(message);
}
public void setMessage(String message) {
this.message = message;
}
}
(non sapevo dove postare questa discussione...)
qualsiasi javabean che testo sul tomcat mi da' sempre lo stesso errore...non capisco perche'.
D'altronde non e' difficile da capire questa tecnologia..ci sto studiando con vari esempi e pensavo che questo almeno funzionasse..
l'errore mi da il messaggio:
StringBean.jsp(13,0) The value for the useBean class attribute StringBean is invalid.:muro:
oppure l'errore:
org.apache.jasper.JasperException: Unable to load class for JSP
GRAZIE PER L'AIUTO
i file sono i seguenti:
StringBean.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Using JavaBeans with JSP</TITLE>
<LINK REL=STYLESHEET
HREF="JSP-Styles.css" TYPE="text/css">
</HEAD>
<BODY>
<TABLE BORDER=5 ALIGN="CENTER">
<TR><TH CLASS="TITLE">
Using JavaBeans with JSP</TABLE>
<jsp:useBean id="stringBean" class="StringBean" />
<OL>
<LI>Initial value (from jsp:getProperty):
<I><jsp:getProperty name="stringBean" property="message" /></I>
<LI>Initial value (from JSP expression):
<I><%= stringBean.getMessage() %></I>
<LI><jsp:setProperty name="stringBean" property="message" value="Best string bean: Fortex" />
Value after setting property with jsp:setProperty:
<I><jsp:getProperty name="stringBean" property="message" /></I>
<LI><% stringBean.setMessage("My favorite: Kentucky Wonder"); %>
Value after setting property with scriptlet:
<I><%= stringBean.getMessage() %></I>
</OL>
</BODY>
</HTML>
StringBean.java:
/** A simple bean that has a single String property
* called message.
*/
public class StringBean {
private String message = "No message specified";
public String getMessage() {
return(message);
}
public void setMessage(String message) {
this.message = message;
}
}