my dog learned polymorphism
The moose likes JSP and the fly likes useBean class attribute is invalid during polymorphism in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "useBean class attribute is invalid during polymorphism in jsp" Watch "useBean class attribute is invalid during polymorphism in jsp" New topic
Author

useBean class attribute is invalid during polymorphism in jsp

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 231

.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: 231

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: 63221
    
  69

Click the link in my post.

Also be sure to use proper indentation.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 231

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: 63221
    
  69

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: 231

okeys...
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1517
    
    6
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: 63221
    
  69

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.
 
Have you checked out Aspose?
 
subject: useBean class attribute is invalid during polymorphism in jsp
 
jQuery in Action, 3rd edition