It's not a secret anymore!
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP using Bean" Watch "JSP using Bean" New topic

JSP using Bean


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
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)
public String getMyVariable(String str)

Sarath Mohan

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){
public String getMyvar(String s){
return b;
once again thanx
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . 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.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: JSP using Bean
jQuery in Action, 3rd edition