Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

The value for the useBean class attribute name is invalid.

 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64982
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic