| 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: 56224
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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
|
 |
 |
|
|
subject: The value for the useBean class attribute name is invalid.
|
|
|