File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Soft Skills this week in the Jobs Discussion forum!
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: 226

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

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: 61761
    
  67

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

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: 61761
    
  67

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

okeys...
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1027
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: 61761
    
  67

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: useBean class attribute is invalid during polymorphism in jsp