|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Junior Member
Iscritto dal: Oct 2006
Messaggi: 7
|
javabean
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. 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; } } |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Aug 1999
Città: Tolmezzo (UD) - Milano
Messaggi: 13744
|
Discussione spostata nella sezione dedicata alla programmazione.
Ciao
__________________
...to go where no one has gone before. One ring to rule them all, one ring to find them, one ring to bring them all and in darkness bind them. Caron, non ti crucciare: vuolsi così colà dove si puote ciò che si vuole, e più non dimandare. |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 07:52.



















