| Author |
useBean class attribute is invalid during polymorphism in jsp
|
shivam singhal
Ranch Hand
Joined: Jul 15, 2012
Posts: 157
|
|
.java file code is :
and my jsp code is ::
can anyone help me too resolve this...
|
 |
shivam singhal
Ranch Hand
Joined: Jul 15, 2012
Posts: 157
|
|
thanks bear for helping...
can you please tell me how do you add these code tags??
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56157
|
|
Click the link in my post.
Also be sure to use proper indentation.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
shivam singhal
Ranch Hand
Joined: Jul 15, 2012
Posts: 157
|
|
okeys ...
Now,, do you knoe the solution of above query??
if yes then please help me out from this..
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56157
|
|
|
No, sorry. Actions such as get and set property are antiquated left-overs from JSP 1 and I haven't used them in the over 10 years since JSP 2 was introduced with the JSTL and EL.
|
 |
shivam singhal
Ranch Hand
Joined: Jul 15, 2012
Posts: 157
|
|
|
okeys...
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1002
|
|
The class Programmer is not public.
To be used as a java bean, the class must be public.
Also I recommend that you put the Programmer class into its own file, rather than lumping it in with the Job class.
Generally one class per file is the rule in java.
I know if I went looking for the Programmer class, I would look for a file Programmer.java.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56157
|
|
Good catch on the public class, Stefan.
All beans must conform to the JavaBean standards or things will go awry. This is true even with the modern JSTL and EL.
|
 |
 |
|
|
subject: useBean class attribute is invalid during polymorphism in jsp
|
|
|