This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes JSP using Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP using Bean" Watch "JSP using Bean" New topic
Author

JSP using Bean

Subramaniam
Greenhorn

Joined: Mar 21, 2001
Posts: 4
I am a method of the Bean but some how it is failing to recognize just one method of the bean. When I comment that line in my JSP it runs fine. I have checked the names, parameters etc but it is not working ? help required urgently !!
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213
Hi,
Please check your Beans Function naming.
if should follow rules getter and setter functions.
For example if you want to set or get a String varible named 'myVariable'
then na
ming should be
public void setMyVarible(String str)
and
public String getMyVariable(String str)
OK


Sarath Mohan
Subramaniam
Greenhorn

Joined: Mar 21, 2001
Posts: 4
First thanx for the help. I have set & get method as u said. Do the parameters to call the method have to be the same. ie.
int a;
String b;
public void setMyvar(int i, String s){
this.a=i;
this.b=s;
}
public String getMyvar(String s){
return b;
}
once again thanx
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"Subramaniam",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP using Bean