RE: BY ANY BEANS NECESSARY!

2001-03-29 Thread Kevin Sangeelee

There are detail of this in the archives. From a previous post by Craig
McClanahan...

JSP 1.1 spec. (p. 63-64), the value of the "class" attribute must be a
fully qualified class name of the implementation class. The import does
not affect this...

> -Original Message-
> From: Tom Horn [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 4:47 PM
> To: [EMAIL PROTECTED]
> Subject: RE: BY ANY BEANS NECESSARY!
> 
> 
> Are you saying that the bean will not be loaded if it
> is not in a package?!
> Thanks,gp
> 
> --- Arif Tayebali <[EMAIL PROTECTED]> wrote:
> > Do instantiate a bean with:
> > 
> >   <%@ import="/webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class"
> %>
> > 
> > LMK
> > 
> > -Original Message-
> > From: Kevin Sangeelee [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 28, 2001 12:38 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: Re: BY ANY BEANS NECESSARY!
> > 
> > 
> > On Wed, 28 Mar 2001, Arif Tayebali wrote:
> > 
> > > Does anyone know where to place JavaBeans in
> > Tomcat??
> > > And how do I reference these Beans from JSP
> > pages??
> > > And are these beans are to be saved as .class
> > files??
> > > 
> > 
> > Make sure your beans are in a package, and that they
> > are instantiated on
> > the JSP page using their fully qualified name: -
> > 
> >
> .../webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class
> > 
> > and ... class="com.mydomain.TimeBean" ... in the
> > useBean tags.
> > 
> > Remember to add a corresponding package directive at
> > the top of your bean
> > code. That's all there is to it.
> > 
> 
> 
> __
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail. 
> http://personal.mail.yahoo.com/?.refer=text
> 




RE: BY ANY BEANS NECESSARY!

2001-03-28 Thread Arif Tayebali

Well the question is really whether the beans and jsps need to be under
webapps/examples to work. For me, the jsp are in a dir called D:\webpage and
the beans need to be in a place where I cannot determine.

See what I mean?


-Original Message-
From: Tom Horn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 4:47 PM
To: [EMAIL PROTECTED]
Subject: RE: BY ANY BEANS NECESSARY!


Are you saying that the bean will not be loaded if it
is not in a package?!
Thanks,gp

--- Arif Tayebali <[EMAIL PROTECTED]> wrote:
> Do instantiate a bean with:
> 
>   <%@ import="/webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class"
%>
> 
> LMK
> 
> -Original Message-
> From: Kevin Sangeelee [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 12:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Re: BY ANY BEANS NECESSARY!
> 
> 
> On Wed, 28 Mar 2001, Arif Tayebali wrote:
> 
> > Does anyone know where to place JavaBeans in
> Tomcat??
> > And how do I reference these Beans from JSP
> pages??
> > And are these beans are to be saved as .class
> files??
> > 
> 
> Make sure your beans are in a package, and that they
> are instantiated on
> the JSP page using their fully qualified name: -
> 
>
.../webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class
> 
> and ... class="com.mydomain.TimeBean" ... in the
> useBean tags.
> 
> Remember to add a corresponding package directive at
> the top of your bean
> code. That's all there is to it.
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text



RE: BY ANY BEANS NECESSARY!

2001-03-28 Thread Tom Horn

Are you saying that the bean will not be loaded if it
is not in a package?!
Thanks,gp

--- Arif Tayebali <[EMAIL PROTECTED]> wrote:
> Do instantiate a bean with:
> 
>   <%@
>
import="/webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class"
> %>
> 
> LMK
> 
> -Original Message-
> From: Kevin Sangeelee [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 28, 2001 12:38 PM
> To: '[EMAIL PROTECTED]'
> Subject: Re: BY ANY BEANS NECESSARY!
> 
> 
> On Wed, 28 Mar 2001, Arif Tayebali wrote:
> 
> > Does anyone know where to place JavaBeans in
> Tomcat??
> > And how do I reference these Beans from JSP
> pages??
> > And are these beans are to be saved as .class
> files??
> > 
> 
> Make sure your beans are in a package, and that they
> are instantiated on
> the JSP page using their fully qualified name: -
> 
>
.../webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class
> 
> and ... class="com.mydomain.TimeBean" ... in the
> useBean tags.
> 
> Remember to add a corresponding package directive at
> the top of your bean
> code. That's all there is to it.
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text



RE: BY ANY BEANS NECESSARY!

2001-03-28 Thread Arif Tayebali

Do instantiate a bean with:

  <%@ import="/webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class" %>

LMK

-Original Message-
From: Kevin Sangeelee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: Re: BY ANY BEANS NECESSARY!


On Wed, 28 Mar 2001, Arif Tayebali wrote:

> Does anyone know where to place JavaBeans in Tomcat??
> And how do I reference these Beans from JSP pages??
> And are these beans are to be saved as .class files??
> 

Make sure your beans are in a package, and that they are instantiated on
the JSP page using their fully qualified name: -

.../webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class

and ... class="com.mydomain.TimeBean" ... in the useBean tags.

Remember to add a corresponding package directive at the top of your bean
code. That's all there is to it.




Re: BY ANY BEANS NECESSARY!

2001-03-28 Thread Kevin Sangeelee

On Wed, 28 Mar 2001, Arif Tayebali wrote:

> Does anyone know where to place JavaBeans in Tomcat??
> And how do I reference these Beans from JSP pages??
> And are these beans are to be saved as .class files??
> 

Make sure your beans are in a package, and that they are instantiated on
the JSP page using their fully qualified name: -

.../webapps/myapp/WEB-INF/classes/com/mydomain/TimeBean.class

and ... class="com.mydomain.TimeBean" ... in the useBean tags.

Remember to add a corresponding package directive at the top of your bean
code. That's all there is to it.





RE: BY ANY BEANS NECESSARY!

2001-03-28 Thread Stefán F. Stefánsson

you need to compile your beans into "d:\webpage\jsp\WEB-INF\classes".
You shold look at documentation about webapps in the Servlet
specification and Tomcat documentation.

-Original Message-
From: Arif Tayebali [mailto:[EMAIL PROTECTED]]
Sent: 28. mars 2001 20:26
To: '[EMAIL PROTECTED]'
Subject: BY ANY BEANS NECESSARY!
Importance: High


Does anyone know where to place JavaBeans in Tomcat??
And how do I reference these Beans from JSP pages??
And are these beans are to be saved as .class files??

Tomcat is located at D:\Tomcat
Webapps is located at D:\webpage\jsp

I have compiled my Beans and placed them in the 

D:\Tomcat\webapps\examples\WEB-INF\classes dir

But receivee this error at runtime:

Root cause: 
  java.lang.ClassNotFoundException: Unable to load class TimeBean

The bean looks like this:

public class TimeBean {

   private int hours;
   private int minutes;

   public TimeBean() {
  java.util.Date now = new java.util.Date();
  this.hours = now.getHours();
  this.minutes = now.getMinutes();
   }

   public int getHours() {
  return hours;
   }

   public int getMinutes() {
  return minutes;
   }

}

and the jsp file looks like this:






You entered the input, 



Thanks in advance!




Re: BY ANY BEANS NECESSARY!

2001-03-27 Thread Jeff Turner

Hi,

Try putting your class in a package. I'm not sure whether servlet containers
like Tomcat are required to honour the "default" package.

You're on the right track though.

--Jeff

On Tue, Mar 27, 2001 at 06:39:27PM -0800, Arif Tayebali wrote:
> 
> Does anyone know where to place JavaBeans in Tomcat??
> And how do I reference these Beans from JSP pages??
> And are these beans are to be saved as .class files??
> 
> Tomcat is located at D:\Tomcat
> Webapps is located at D:\webpage\jsp
> 
> I have compiled my Beans and placed them in the 
> 
>   D:\Tomcat\webapps\examples\WEB-INF\classes dir
> 
> But receivee this error at runtime:
>   
>   Root cause: 
>   java.lang.ClassNotFoundException: Unable to load class TimeBean
> 
> The bean looks like this:
> 
> public class TimeBean {
> 
>private int hours;
>private int minutes;
> 
>public TimeBean() {
>   java.util.Date now = new java.util.Date();
>   this.hours = now.getHours();
>   this.minutes = now.getMinutes();
>}
> 
>public int getHours() {
>   return hours;
>}
> 
>public int getMinutes() {
>   return minutes;
>}
> 
> }
> 
> and the jsp file looks like this:
> 
> 
> 
> 
> 
> 
> You entered the input,  property="minutes"/>
> 
> 
> 
> Thanks in advance!



Re: BY ANY BEANS NECESSARY!

2001-03-27 Thread Kris Gonzalez

you can put them anywhere, as long as the directory they are located in
is in Tomcat's classpath ...reference them using the
 directive in your JSPs...

Arif Tayebali wrote:

> Does anyone know where to place JavaBeans in Tomcat??
> And how do I reference these Beans from JSP pages??
> And are these beans are to be saved as .class files??
>
> Tomcat is located at D:\Tomcat
> Webapps is located at D:\webpage\jsp
>
> I have compiled my Beans and placed them in the
>
> D:\Tomcat\webapps\examples\WEB-INF\classes dir
>
> But receivee this error at runtime:
>
> Root cause:
>   java.lang.ClassNotFoundException: Unable to load class TimeBean
>
> The bean looks like this:
>
> public class TimeBean {
>
>private int hours;
>private int minutes;
>
>public TimeBean() {
>   java.util.Date now = new java.util.Date();
>   this.hours = now.getHours();
>   this.minutes = now.getMinutes();
>}
>
>public int getHours() {
>   return hours;
>}
>
>public int getMinutes() {
>   return minutes;
>}
>
> }
>
> and the jsp file looks like this:
>
> 
> 
>
> 
> 
> You entered the input,  property="minutes"/>
> 
> 
>
> Thanks in advance!