tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Sutton" <alist...@paymentsystemsltd.com>
Subject RE: jsp
Date Mon, 20 Feb 2006 10:17:16 GMT
The class attribute specifies the class name of the Java Bean you wish to
use.  

So if you had a Java class  in a directory structure like :

 com/mypackage/MyClass.java 

The first line of the .java file must be 

	package com.mypackage;

(As in a MyClass.java in a package com.mypackage) 

Then in the class attibute you would specify.  

  <jsp:useBean id="varaibleName" class="com.mypackage.MyClass" />

The id is the name of the variable which refers to that object of type 	
	
	com.mypackage.MyClass.  

Having an empty class attribute is an error as the tag does not know which
class it must load to make the bean from.

If you are not using packages then just put the class name into the class
tag.  

Hope this helps 

Alistair

-----Original Message-----
From: tatyaso patil [mailto:tatyasopatil2005@yahoo.co.in] 
Sent: 20 February 2006 10:10
To: taglibs-user@jakarta.apache.org
Subject: jsp

hello sir
    i am get one error in jsp program.
  <jsp:useBean id="" class="" />
     
hello sir      i am get one error in jsp program.    <jsp:useBean id=""
class="" />              i got error    at  class attribute that value is
invalid.     please suggest me the answer.       
   
  i got error
  at  class attribute that value is invalid.
   please suggest me the answer.
   




				
---------------------------------
 Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.



---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message