This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 60783
    
  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
 
Consider Paul's rocket mass heater.
 
subject: The value for the useBean class attribute name is invalid.
 
Similar Threads
Problem passing an arrayList from a servlet to a jsp
user authentication and dao
Using Model 2 - NullPointer problem.
Hello world ejb3 problem
jsp