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  The value for the useBean class attribute name is invalid. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark " The value for the useBean class attribute name is invalid." Watch " The value for the useBean class attribute name is invalid." New topic
Author

The value for the useBean class attribute name is invalid.

victor chiong
Ranch Hand

Joined: Apr 04, 2012
Posts: 73
Hi Gurus,

Kindly assist please? I am stocked... The problem is in this code.. I have no idea why this has an error... <jsp:useBean id="person" class="name" scope= "request"/>

My JSP



Class :Name



My Servlet:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/



Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60975
    
  65

Firstly, please follow established naming conventions. Class names should start with a capital letter. So Name, not name.

Secondly, when referring to the class in the useBean action, you must use the class' package along with the class name.

And please UseCodeTags.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
victor chiong
Ranch Hand

Joined: Apr 04, 2012
Posts: 73
Hi,

I found the answer...

I get the whole path of the class..

<jsp:useBean id="person" class="com.business.function.name" scope= "request"/>

But I already had an import above... <%@page import="com.business.function.name"%>

Why is the import not working?


victor chiong
Ranch Hand

Joined: Apr 04, 2012
Posts: 73
Hi Bear,

thank you for the reply... I have no idea about the coding standards on java.. thanks for that... I will change it..

Bear Bibeault
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The value for the useBean class attribute name is invalid.