This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes JSP and the fly likes problem using bean in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "problem using bean in jsp" Watch "problem using bean in jsp" New topic
Author

problem using bean in jsp

gaurav chhabra
Ranch Hand

Joined: Jul 24, 2004
Posts: 109
sir
i like to include beans in my program and it is giving the error but i m not understanding why please helpme out--:::


beantest.jsp

<html>
<head><title>JAI SHRI RAM</title></head>
<body>
<jsp:usebean id="test" class="simplebean" />
<jsp:setProperty name="test" property="message" value="jai mata di" />
<jsp:getProperty name="test" property="message" />

</body>
</html>


simplebean.java

public class simplebean
{
String message="jai shri ram";

public String getMessage()
{
return(message);
}

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

i dont know why this is giving error of jasper
plz help me out
thank you
gaurav
satishkumar janakiraman
Ranch Hand

Joined: May 03, 2004
Posts: 334
Hi

add the following snippets in your jsp page.



Original coding was



and add in your simplebean.java
try this now

bye for now
sat
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem using bean in jsp