Re: Simple JavaBeans applications not working (newbie question)

2005-05-09 Thread Michael Strorm

--- Wendy Smoak <[EMAIL PROTECTED]> wrote:
> Before you continue, you might shut down Tomcat and
> delete the 'work' 
> directory associated with this webapp to make sure
> you're starting fresh. 
> (I assume such a thing exists in version 5, I'm
> still using 4.1.)

The work directory still exists in v5.5; it wasn't
necessary to delete it in this case (having figured
out from the first reply that the misnamed package was
the problem). Caching *did* occur to me as a potential
problem, however.

It's notable that for some pages, the error doesn't
always appear, or often different errors appear on
successive refreshes. I suspect that *that* is a
caching issue (and also that it is common enough to
have been explained several times elsewhere, so this
isn't a question, just an observation).

- MS 





___ 
Yahoo! Messenger - want a free and easy way to contact your friends online? 
http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple JavaBeans applications not working (newbie question)

2005-05-08 Thread Wendy Smoak
From: "Michael Strorm" <[EMAIL PROTECTED]>
   skeleton/WEB-INF/lib/subapp/Beany.class
Jar files go in WEB-INF/lib.  Classes go under WEB-INF/classes in a 
directory structure matching the package name.  What package statement does 
Beany.java contain?

   org.apache.jasper.JasperException:
   /subapp/skeleton.jsp(2,0) The
   value for the useBean class attribute
   subclass.Beany is invalid.
Shouldn't that be 'subapp.Beany' and not 'subclass.Beany'?  That's why I 
asked, above, about the package statement.

Before you continue, you might shut down Tomcat and delete the 'work' 
directory associated with this webapp to make sure you're starting fresh. 
(I assume such a thing exists in version 5, I'm still using 4.1.)

You're close, just change one thing at a time until you figure it out.
--
Wendy Smoak 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Simple JavaBeans applications not working (newbie question)

2005-05-08 Thread QM
On Sat, May 07, 2005 at 01:39:50PM -0400, Anoop kumar V wrote:
: Another thing I noticed that you have placed your bean as a jar in the
: WEB-INF/lib directory - while this works perfectly the practice is to put
: custom class files in the WEB-INF/classes directory as just .class files
: under their respective folders (as per package declaration)..

What "practice" would this be?

Some would argue that placing your classes in JAR files permits better
organization/grouping than a flat space under WEB-INF classes.

Per the spec, the only difference between WEB-INF/classes and
WEB-INF/lib is that the former is searched first.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple JavaBeans applications not working (newbie question); FIXED!

2005-05-08 Thread Michael Strorm
--- Anoop kumar V <[EMAIL PROTECTED]> wrote:
> > Everything works perfectly fine in your jsp and
> bean except that the 
> > package mentioned in your bean (Beany.java) file
> seems incorrect

Aaawwrrgh! (Bangs head against wall several
dozen times)
Thank you. That was such a stupid mistake; I should
have spotted it. If there is any excuse it is that I'd
had what *looked* like the same problem with two
earlier attempts; the package name was not the problem
there. Because I thought this was the same problem, I
probably didn't consider the obvious answer again.

Really, though; this is a great example of trying too
hard, and missing what was staring me in the face.

> > Also you do not need to place a web.xml in the
> WEB-INF folder - I mean its 
> > optional since tomcat5.X 

That's okay; it seems to work *without* the web.xml
file, but not with it(!) I'll have a look at that
sometime.

> Another thing I noticed that you have placed your
> bean as a jar in the 
> WEB-INF/lib directory

Yes; I was trying lots of things out to get it to
work;  I originally did as you described.

Thanks for the help,

- MS



___ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple JavaBeans applications not working (newbie question)

2005-05-07 Thread Anoop kumar V
Another thing I noticed that you have placed your bean as a jar in the 
WEB-INF/lib directory - while this works perfectly the practice is to put 
custom class files in the WEB-INF/classes directory as just .class files 
under their respective folders (as per package declaration)..

IMO the lib folders should only contain jar files that represent generic 
functionality as opposed to customised project specific class files in the 
classes folder.

regards,
Anoop 

On 5/7/05, Anoop kumar V <[EMAIL PROTECTED]> wrote:
> 
> Michael,
> 
> Everything works perfectly fine in your jsp and bean except that the 
> package mentioned in your bean (Beany.java) file seems incorrect:
> It is:
> 
> ** BEANY.JAVA
> package subapp;
> 
> 
> It should be:
> 
> ** BEANY.JAVA
> package subclass;
> 
> Or else an alternative is to change the folder in which the bean is to 
> subapp from subclass to match the package name...
> 
> Also you do not need to place a web.xml in the WEB-INF folder - I mean its 
> optional since tomcat5.X (maybe earlier - someone please correct if I am 
> wrong).. and if web.xml is not present the defauly web.xml settings will 
> be applied.
> 
> Hope that helps,
> Anoop
> 
> On 5/7/05, Michael Strorm <[EMAIL PROTECTED]> wrote:
> > 
> > Hi,
> > 
> > First off, let me apologise for the level of detail in
> > this message; if possible, I'd have made it shorter.
> > 
> > Anyway, I'm trying to learn J2EE; Tomcat seemed like a
> > good choice to learn the underlying technology, rather 
> > than a particular JSP/Servlet container's deployment
> > tool. I can get 'plain' JSP pages working fine.
> > 
> > Unfortunately, I'm having major problems developing my
> > own Javabeans applications for Tomcat; they all fail 
> > as shown below. The demos that come with Tomcat work
> > fine (although I can't get the demo at
> > http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample 
> > to work; However- that's another story)
> > 
> > I understand that I should simply be able to drop the
> > directory structure containing my program into
> > $CATALINA_HOME/webapps, restart Tomcat (I'm using
> > 5.5.7) and have it work. 
> > Its contents (root:root ownership, Tomcat running as
> > root) is:-
> > skeleton
> > skeleton/subapp
> > skeleton/subapp/skeleton.jsp
> > skeleton/WEB-INF
> > skeleton/WEB-INF/classes 
> > skeleton/WEB-INF/lib
> > skeleton/WEB-INF/lib/subapp
> > skeleton/WEB-INF/lib/subapp/Beany.class
> > skeleton/WEB-INF/lib/subapp/Beany.java
> > skeleton/WEB-INF/lib/subapp.jar
> > skeleton/WEB-INF/web.xml 
> > Contents of files listed at end of message.
> > 
> > Here's what happens when I try to run it:-
> > (1) When I try to access
> > 
> > http://localhost:8080/skeleton/subapp/skeleton.jsp 
> > with the setup as above, I get
> > HTTP Status 404 - Servlet
> > org.apache.jsp.subapp.skeleton_jsp
> > is not available
> > message Servlet
> > org.apache.jsp.subapp.skeleton_jsp 
> > is not available
> > 
> > (2) If I move skeleton/WEB-INF/lib/subapp to
> > skeleton/WEB-INF/classes/subapp,
> > I get
> > HTTP STATUS 500 - EXCEPTION REPORT
> > The server encountered an internal error () 
> > that prevented it from fulfilling this
> > request.
> > EXCEPTION
> > javax.servlet.ServletException: Wrapper
> > cannot find servlet class
> > org.apache.jsp.subapp.skeleton_jsp 
> > or a class it depends on
> > 
> > org.apache.catalina.valves.ErrorReportValve.invoke
> > 
> > (ErrorReportValve.java:105)
> > [... SNIP ...]
> > java.lang.Thread.run(Thread.java:595)
> > 
> > ROOT CAUSE 
> > java.lang.ClassNotFoundException:
> > org.apache.jsp.subapp.skeleton_jsp
> > 
> > org.apache.catalina.loader.WebappClassLoader.loadClass
> > 
> > (WebappClassLoader.java:1332)
> > [... SNIP ...] 
> > java.lang.Thread.run(Thread.java:595)
> > 
> > (3) If I remove the deployment descriptor altogether,
> > I get:-
> > HTTP STATUS 500 - EXCEPTION REPORT
> > The server encountered an internal error () 
> > that prevented it from fulfilling this
> > request.
> > EXCEPTION
> > org.apache.jasper.JasperException:
> > /subapp/skeleton.jsp(2,0) The
> > value for the useBean class attribute 
> > subclass.Beany is invalid.
> > 
> > org.apache.jasper.compiler.DefaultErrorHandler.jspError(
> > DefaultErrorHandler.java:39)
> > [... SNIP
> > 

Re: Simple JavaBeans applications not working (newbie question)

2005-05-07 Thread Anoop kumar V
Michael,

Everything works perfectly fine in your jsp and bean except that the package 
mentioned in your bean (Beany.java) file seems incorrect:
It is:

** BEANY.JAVA
package subapp;


It should be:

** BEANY.JAVA
package subclass;

Or else an alternative is to change the folder in which the bean is to 
subapp from subclass to match the package name...

Also you do not need to place a web.xml in the WEB-INF folder - I mean its 
optional since tomcat5.X (maybe earlier - someone please correct if I am 
wrong).. and if web.xml is not present the defauly web.xml settings will be 
applied.

Hope that helps,
Anoop

On 5/7/05, Michael Strorm <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> First off, let me apologise for the level of detail in
> this message; if possible, I'd have made it shorter.
> 
> Anyway, I'm trying to learn J2EE; Tomcat seemed like a
> good choice to learn the underlying technology, rather
> than a particular JSP/Servlet container's deployment
> tool. I can get 'plain' JSP pages working fine.
> 
> Unfortunately, I'm having major problems developing my
> own Javabeans applications for Tomcat; they all fail
> as shown below. The demos that come with Tomcat work
> fine (although I can't get the demo at
> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample
> to work; However- that's another story)
> 
> I understand that I should simply be able to drop the
> directory structure containing my program into
> $CATALINA_HOME/webapps, restart Tomcat (I'm using
> 5.5.7) and have it work.
> Its contents (root:root ownership, Tomcat running as
> root) is:-
> skeleton
> skeleton/subapp
> skeleton/subapp/skeleton.jsp
> skeleton/WEB-INF
> skeleton/WEB-INF/classes
> skeleton/WEB-INF/lib
> skeleton/WEB-INF/lib/subapp
> skeleton/WEB-INF/lib/subapp/Beany.class
> skeleton/WEB-INF/lib/subapp/Beany.java
> skeleton/WEB-INF/lib/subapp.jar
> skeleton/WEB-INF/web.xml
> Contents of files listed at end of message.
> 
> Here's what happens when I try to run it:-
> (1) When I try to access
> 
> http://localhost:8080/skeleton/subapp/skeleton.jsp
> with the setup as above, I get
> HTTP Status 404 - Servlet
> org.apache.jsp.subapp.skeleton_jsp
> is not available
> message Servlet
> org.apache.jsp.subapp.skeleton_jsp
> is not available
> 
> (2) If I move skeleton/WEB-INF/lib/subapp to
> skeleton/WEB-INF/classes/subapp,
> I get
> HTTP STATUS 500 - EXCEPTION REPORT
> The server encountered an internal error ()
> that prevented it from fulfilling this
> request.
> EXCEPTION
> javax.servlet.ServletException: Wrapper
> cannot find servlet class
> org.apache.jsp.subapp.skeleton_jsp
> or a class it depends on
> 
> org.apache.catalina.valves.ErrorReportValve.invoke
> 
> (ErrorReportValve.java:105)
> [... SNIP ...]
> java.lang.Thread.run(Thread.java:595)
> 
> ROOT CAUSE
> java.lang.ClassNotFoundException:
> org.apache.jsp.subapp.skeleton_jsp
> 
> org.apache.catalina.loader.WebappClassLoader.loadClass
> 
> (WebappClassLoader.java:1332)
> [... SNIP ...]
> java.lang.Thread.run(Thread.java:595)
> 
> (3) If I remove the deployment descriptor altogether,
> I get:-
> HTTP STATUS 500 - EXCEPTION REPORT
> The server encountered an internal error ()
> that prevented it from fulfilling this
> request.
> EXCEPTION
> org.apache.jasper.JasperException:
> /subapp/skeleton.jsp(2,0) The
> value for the useBean class attribute
> subclass.Beany is invalid.
> 
> org.apache.jasper.compiler.DefaultErrorHandler.jspError(
> DefaultErrorHandler.java:39)
> [... SNIP
> ...]
> javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 
> In short, it fails; in three noticeably different
> ways, granted; but it still
> fails. What on EARTH am I doing wrong or missing out?!
> I'd really appreciate
> some feedback on this. Thank you in advance.
> 
> 
> Here are the files:-
> 
> ** SKELETON.JSP:
> 
>  scope="session" />
> Foo Bar
> 
> Foo Bar
> Duzzy wuzzy was a duck; ducky fuzzy duck a wuzz blah
> blah some more yak.
> 
> 
> ---
> ** WEB.XML
> 
> 
> http://java.sun.com/xml/ns/j2ee";
> 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
> version="2.4">
> 
> Display Name
> 
> Display Description
> 
> 
> 
> 
> 
> 
> org.apache.jsp.subapp.skeleton_jsp
> 
> org.apache.jsp.subap

Simple JavaBeans applications not working (newbie question)

2005-05-07 Thread Michael Strorm
Hi,

First off, let me apologise for the level of detail in
this message; if possible, I'd have made it shorter.

Anyway, I'm trying to learn J2EE; Tomcat seemed like a
good choice to learn the underlying technology, rather
than a particular JSP/Servlet container's deployment
tool. I can get 'plain' JSP pages working fine.

Unfortunately, I'm having major problems developing my
own Javabeans applications for Tomcat; they all fail
as shown below. The demos that come with Tomcat work
fine (although I can't get the demo at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/appdev/sample
to work; However- that's another story)

I understand that I should simply be able to drop the
directory structure containing my program into
$CATALINA_HOME/webapps, restart Tomcat (I'm using
5.5.7) and have it work.
Its contents (root:root ownership, Tomcat running as
root) is:-
skeleton
skeleton/subapp
skeleton/subapp/skeleton.jsp
skeleton/WEB-INF
skeleton/WEB-INF/classes
skeleton/WEB-INF/lib
skeleton/WEB-INF/lib/subapp
skeleton/WEB-INF/lib/subapp/Beany.class
skeleton/WEB-INF/lib/subapp/Beany.java
skeleton/WEB-INF/lib/subapp.jar
skeleton/WEB-INF/web.xml
Contents of files listed at end of message.

Here's what happens when I try to run it:-
(1) When I try to access
   
http://localhost:8080/skeleton/subapp/skeleton.jsp
with the setup as above, I get
HTTP Status 404 - Servlet
org.apache.jsp.subapp.skeleton_jsp
is not available
message Servlet
org.apache.jsp.subapp.skeleton_jsp
is not available

(2) If I move skeleton/WEB-INF/lib/subapp to
skeleton/WEB-INF/classes/subapp,
I get
HTTP STATUS 500 - EXCEPTION REPORT
The server encountered an internal error ()
that prevented it from fulfilling this
request.
EXCEPTION
javax.servlet.ServletException: Wrapper
cannot find servlet class
org.apache.jsp.subapp.skeleton_jsp
or a class it depends on
   

org.apache.catalina.valves.ErrorReportValve.invoke
   
(ErrorReportValve.java:105)
[... SNIP ...]
java.lang.Thread.run(Thread.java:595)

ROOT CAUSE
java.lang.ClassNotFoundException:
org.apache.jsp.subapp.skeleton_jsp
   
org.apache.catalina.loader.WebappClassLoader.loadClass
   
(WebappClassLoader.java:1332)
[... SNIP ...]
java.lang.Thread.run(Thread.java:595)

(3) If I remove the deployment descriptor altogether,
I get:-
HTTP STATUS 500 - EXCEPTION REPORT
The server encountered an internal error ()
that prevented it from fulfilling this
request.
EXCEPTION
org.apache.jasper.JasperException:
/subapp/skeleton.jsp(2,0) The
value for the useBean class attribute
subclass.Beany is invalid.
   
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
[... SNIP
...]
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

In short, it fails; in three noticeably different
ways, granted; but it still
fails. What on EARTH am I doing wrong or missing out?!
I'd really appreciate
some feedback on this. Thank you in advance.


Here are the files:-

** SKELETON.JSP:


Foo Bar

Foo Bar
Duzzy wuzzy was a duck; ducky fuzzy duck a wuzz blah
blah some more yak.


---
** WEB.XML


http://java.sun.com/xml/ns/j2ee";
   
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
version="2.4">

  Display Name
  
 Display Description
  




   
org.apache.jsp.subapp.skeleton_jsp
   
org.apache.jsp.subapp.skeleton_jsp



   
org.apache.jsp.subapp.skeleton_jsp
   
/subapp/skeleton.jsp




---
---
** BEANY.JAVA
package subapp;

public class Beany
{
   private int first;

   /** Public no-args constructor */
   public Beany()
   {
  first = 404;
   }

   public int getFirst()
   {
  return first;
   }
   public void setFirst(int first)
   {
  this.first = first;
   }

   public String stringy = "Original Value";
   public String getStringy()
   {
  return stringy;
   }
   public void setStringy(String stringy)
   {
  this.stringy = stringy;
   }
}

--
The Beany.jar file contains the Beany.java and
Beany.class files



___ 
Too much

Re: [OFF TPOIC] System.out.println in JAVAbeans

2004-09-29 Thread Atishay Kumar
it does not appear on console in linux. it appears in console on windows.


On Wed, 29 Sep 2004 16:56:27 +0800, Peng Tuck Kwok <[EMAIL PROTECTED]> wrote:
> Well it should appear on the console, unless you do a redirect (I
> think you can do that in windows as well) .
> 
> 
> 
> 
> On Wed, 29 Sep 2004 08:00:27 +, Atishay Kumar
> <[EMAIL PROTECTED]> wrote:
> > hi,
> >  If i give System.out.println in JavaBeans it is displayed on the
> > command prompt in Windows. How do it see the output of
> > System.out.println in linux. Is it stored in some file/log?
> > thanks
> > --
> > :)
> > Atishay Kumar
> > Btech, SEM VII
> > DA-IICT
> > Gandhinagar - 382009
> > India
> > ph: +91 9825383948
> > /
> >  * Learn the rules as you would need them to break them properly *
> >  /
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> 



-- 
:)
Atishay Kumar
Btech, SEM VII
DA-IICT
Gandhinagar - 382009
India
ph: +91 9825383948
/
 * Learn the rules as you would need them to break them properly *
 /

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OFF TPOIC] System.out.println in JAVAbeans

2004-09-29 Thread Peng Tuck Kwok
Well it should appear on the console, unless you do a redirect (I
think you can do that in windows as well) .


On Wed, 29 Sep 2004 08:00:27 +, Atishay Kumar
<[EMAIL PROTECTED]> wrote:
> hi,
>  If i give System.out.println in JavaBeans it is displayed on the
> command prompt in Windows. How do it see the output of
> System.out.println in linux. Is it stored in some file/log?
> thanks
> --
> :)
> Atishay Kumar
> Btech, SEM VII
> DA-IICT
> Gandhinagar - 382009
> India
> ph: +91 9825383948
> /
>  * Learn the rules as you would need them to break them properly *
>  /
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OFF TPOIC] System.out.println in JAVAbeans

2004-09-29 Thread Atishay Kumar
hi,
 If i give System.out.println in JavaBeans it is displayed on the
command prompt in Windows. How do it see the output of
System.out.println in linux. Is it stored in some file/log?
thanks
-- 
:)
Atishay Kumar
Btech, SEM VII
DA-IICT
Gandhinagar - 382009
India
ph: +91 9825383948
/
 * Learn the rules as you would need them to break them properly *
 /

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



javabeans and awt

2003-06-11 Thread Michael Ni
when i use java applets, i dont have to place them in my web-inf/classes 
folder, i can just specify the codebase.  However if the files are not in 
the classes folder, can I still call the packages of my java beans in the 
java applet?  Basically I want to use my javabeans in the java applet.

mike

_
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Question about JavaBeans

2003-06-04 Thread Shapira, Yoav

Howdy,

>It gave me error.)

What error?

>Also I have some doubts to clarify.
>1)   Do I need to have the WEB-INF folder in every context
>directory?

No.  One WEB-INF per webapp, under the webapp docBase.

>2)   Do I need to create a web.xml at this stage where I just
making
>use of this simple javabeans?

Yes, always need a web.xml.

>Can anyone tell me where should the proper place to store the bean
>(.class) file??

It's fine where you have it now.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Question about JavaBeans

2003-06-04 Thread Joe
Hi all, I have a hard time trying to test out JavaBeans. It always gave
me this error message as listed at the end of this page.
 
For example, I have my Web Folder as:
 
/usr/local/tomcat/webapps/website
 
and inside this folder I have
 
/usr/local/tomcat/webapps/website/WEB-INF/classes/com/wrox/cars/
 
 
and currently I have placed my bean file into this folder and load the
following jsp page:
 
 



Using a Javabean



Using a java bean
 




 
It gave me error.)
 
Also I have some doubts to clarify.
1)   Do I need to have the WEB-INF folder in every context
directory?
2)   Do I need to create a web.xml at this stage where I just making
use of this simple javabeans?
 
 
Can anyone tell me where should the proper place to store the bean
(.class) file??
 
 
Regards,
Joe
 
 
 
 
 
 

HTTP Status 500 - 

  _  

type Exception report
message 
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception 
org.apache.jasper.JasperException: Unable to compile class for JSP
 
An error occurred at line: 9 in the jsp file: /test.jsp
 
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac]
/usr/local/jakarta-tomcat-4.1.24/work/Standalone/localhost/testWEB/test_
jsp.java:51: package com.wrox.cars does not exist
[javac]  com.wrox.cars.CarBean myCar = new com.wrox.cars.CarBean(); 
[javac]   ^
 
 
 
An error occurred at line: 9 in the jsp file: /test.jsp
 
Generated servlet error:
[javac]
/usr/local/jakarta-tomcat-4.1.24/work/Standalone/localhost/testWEB/test_
jsp.java:51: package com.wrox.cars does not exist
[javac]  com.wrox.cars.CarBean myCar = new com.wrox.cars.CarBean(); 
[javac] ^
[javac] 2 errors
 
 
 
at
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHa
ndler.java:130)
at
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.ja
va:293)
at
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:353)
at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
at
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
va:473)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:190)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:256)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:241
5)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:171)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service

RE: cant run jsp in Tomcat (also "problem with jsp javabeans")

2003-02-06 Thread Denise Mangano
Your Login.class file should be in your WEB-INF/classes/misitio/beans
directory.   This path doesn't need to be specified in the classpath.

In you Login java file you need the statement:   package misitio.beans;

In your JSP page you should have   <%@ page import="misitio.beans" %>


HTH

Denise Mangano
Help Desk Analyst
Complus Data Innovations, Inc.


-Original Message-
From: x x [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, February 06, 2003 2:14 PM
To: Tomcat Users List
Subject: cant run jsp in Tomcat



 I run Tomcat 4.1.18 running in a  linux Mandrake
 8.2,
 i want to run a jsp that import a javabean from
 another directory. When i run my jsp i saw this
 messages
 
  The server encountered an internal error () that
 prevented it from fulfilling this request.
 
 exception
 
 org.apache.jasper.JasperException: No se puede
> compilar la clase para JSP
> 
> An error occurred at line: 0 in the jsp file: /iata/veri_usr.jsp
> 
> Generated servlet error:
> [javac] Compiling 1 source file
> 
>
/usr/local/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/iata/veri_usr_j
sp.java:41:
> package misitio.beans does not exist
>   misitio.beans.Login login = null;
>
> 
> 
> I put im my profile this CLASSPATH
> 
> CLASSPAT=.:$JAVA_HOME/lib/tools.jar:/java
> export CLASSPATH
> 
> where /java its the directory where i have
> mistio/beans that correspond to the packet
> mistio.beans where i have the Login.class
> 
> 
> Fabian
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




problem with jsp javabeans

2003-02-06 Thread x x
I run Tomcat 4.1.18 running in a  linux Mandrake 8.2,
i want to run a jsp that import a javabean from
another directory. When i run my jsp i saw this
messages

 The server encountered an internal error () that
prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: No se puede
compilar la clase para JSP

An error occurred at line: 0 in the jsp file:
/iata/veri_usr.jsp

Generated servlet error:
[javac] Compiling 1 source file

/usr/local/jakarta-tomcat-4.1.18/work/Standalone/localhost/_/iata/veri_usr_jsp.java:41:
package misitio.beans does not exist
  misitio.beans.Login login = null;
   


I put im my profile this CLASSPATH 

CLASSPAT=.:$JAVA_HOME/lib/tools.jar:/java
export CLASSPATH

where /java its the directory where i have
mistio/beans that correspond to the packet
mistio.beans where i have the Login.class


Fabian












__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Testing non-visual JavaBeans?

2002-06-20 Thread Eric Everman

For testing beans, I use JUnit.  It makes things fairly simple.

It can get complex if your 'beans' actually have Servlet ties-ins such as 
references to httpSessions, contexts, etc.  But if you've got functionality 
that can be tested without any sort of dependence on a web container, JUnit 
is the way to go.

Eric Everman

At 03:54 PM 6/20/2002, you wrote:
>Is there a way to test a non-visual bean which I
>intend to use for JSP, Servlets, etc.? Do I have to
>use the BeanBox? Can I use something like JUnit? I
>want to make sure my bean works correctly before
>trying to call it from JSP.
>
>Thanks,
>
>Rob
>
>__
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
>http://fifaworldcup.yahoo.com
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Testing non-visual JavaBeans?

2002-06-20 Thread Rob Reis

Is there a way to test a non-visual bean which I
intend to use for JSP, Servlets, etc.? Do I have to
use the BeanBox? Can I use something like JUnit? I
want to make sure my bean works correctly before
trying to call it from JSP.

Thanks,

Rob 

__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Running JavaBeans

2002-06-07 Thread Adam Pfeiffer

Hi Juan,
The path that you stated is correct:
<>\webapps\ROOT\WEB-INF\classes

There are 2 important things to note.

1. If the classes are free standing (e.g. not jar'ed) and you have them as part of a 
package, you
must have directories corresponding to the package names.  I have a class name
PictureBrowserBean.class that is in package mada.trips so I have to have the following
<>\webapps\ROOT\WEB-INF\classes\mada\trips\PictureBrowserBean.class

2. You will have to reload the webapp whenever you add/modify your classes.  Here are 
the
directions for that:

I have finally figured out how you can get a class to reload (e.g. Included JavaBean) 
without
having to stop/start tomcat using shutdown.sh and startup.sh.  First, follow the 
directions in
"Manager App HOW-TO" included with the tomcat documentation.  Once this is done, you 
can use the
manager app reload function to reload the web app.  This also refreshes any newly 
compiled classes
(e.g. javabeans) that you may have included in the JSPs.  To use the reload, do the 
following:

http:///manager/reload?path=

You can also use the manager to deploy new web apps, un-deploy web apps, start/stop 
web apps. 
This may be common sense to those tomcat veterans, but this was very helpful to me 
once I learned
how to use it.

OR

If you do not want to go through the above procedure, you can just stop and start 
tomcat with the
shutdown.bat/startup.bad  (I assume you are on windows because you are using 
backslashes)

Adam



--- Juan <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I would like to use JavaBeans with jsp. Where is the "classes" directory? 
> Is it automatically created? Or am I have to create it automatically?
> 
> The classes directory were created manually:
> <>\webapps\ROOT\WEB-INF\classes
> 
> 
> Sorry, but I tried several things without success. I'm always getting a 
> error message: class not found (JavaBean class).
> May be I have to restart Tomcat or config webinf.xml
> 
> Thanks in advance,
> 
> Juan José Velázquez Garcia
> Web Development
> www.htmlspider.com.br
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Running JavaBeans

2002-06-07 Thread Markus Kirsten

Hi Juan,
There's no need to edit the deployment descriptor but you need to 
restart Tomcat (or redeploy the application). The compiled bean should 
be placed in the /app/WEB-INF/classes directory. If you still don't get 
it to work send over your directory structure and the important part of 
your jsp file.

Using JavaBeans with JSP is really convinient and elegant after your JSP 
finds your bean. ;-)


Markus


On fredag, juni 7, 2002, at 10:53 , Juan wrote:

> Hello,
>
> I would like to use JavaBeans with jsp. Where is the "classes" 
> directory? Is it automatically created? Or am I have to create it 
> automatically?
>
> The classes directory were created manually:
> <>\webapps\ROOT\WEB-INF\classes
>
>
> Sorry, but I tried several things without success. I'm always getting a 
> error message: class not found (JavaBean class).
> May be I have to restart Tomcat or config webinf.xml
>
> Thanks in advance,
>
> Juan José Velázquez Garcia
> Web Development
> www.htmlspider.com.br
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:tomcat-user-
> [EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Running JavaBeans

2002-06-07 Thread Juan

Hello,

I would like to use JavaBeans with jsp. Where is the "classes" directory? 
Is it automatically created? Or am I have to create it automatically?

The classes directory were created manually:
<>\webapps\ROOT\WEB-INF\classes


Sorry, but I tried several things without success. I'm always getting a 
error message: class not found (JavaBean class).
May be I have to restart Tomcat or config webinf.xml

Thanks in advance,

Juan José Velázquez Garcia
Web Development
www.htmlspider.com.br



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: about JavaBeans

2002-06-04 Thread McLane, Bryan

Simply, put the value in an attribute of the bean and access through the
getter. See mtemp in the example attached.

-Original Message-
From: Anibal Constante Brito [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 03, 2002 11:35 PM
To: Tomcat
Subject: about JavaBeans


I'm doing a simple JavaBenas, like the




It very simple, but my question is how can I send text o something to
browser from inside the JavaBeans, inside de JSPWithCounterBeanId for
example?

Best Regards.
Owen.



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




Result.jsp
Description: Binary data


ExceptionInfo.java
Description: Binary data


RuleInfo.java
Description: Binary data


PcraRestrictionsReturn.java
Description: Binary data


RestrictionsInfo.java
Description: Binary data

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


about JavaBeans

2002-06-03 Thread Anibal Constante Brito

I'm doing a simple JavaBenas, like the




It very simple, but my question is how can I send text o something to
browser from inside the JavaBeans, inside de JSPWithCounterBeanId for
example?

Best Regards.
Owen.



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: JavaBeans

2002-05-24 Thread Phillip Morelock

On 5/24/02 7:39 AM, "Eric Everman" <[EMAIL PROTECTED]> wrote:

> Could this be a package issue as well (see Tomcat can't find my
> classes)?  Classes places in the /classes folder must be in nested folders
> matching the package name.  When you reference this class, you must use the
> package name, for instance:
> 
>  scope="session"/>

I sent like three responses to this yesterday.

I'll paste them in until people get sick of this, or this problem goes away.

> Eric

fillup

-
>> From the error message, your class LogonData is part of the
> "org.apache.jsp" packages.
> If that is right, you will need to put the class file LogonData.class in c:
> \tomcat\webapps\ROOT\WEB_INF\classes\org\apache\jsp

Sorry to be a pedant, but this is not true.  Tomcat looks for classes that
don't "have" a package home in the tomcat default jsp package -- which is
org.apache.jsp .  This is why you either need to explicitly import the
classes before you use them or put them in your own packages to avoid this
problem altogether.

See my answer of about 5 minutes ago.

cheers
fillup

--

you need to import the bean before you can use it - finally remembered this.
it's been discussed a lot on this list.  i think -- or maybe i'm remembering
something else.

try making a line at the top of your jsp that says:
<%@ page language="java" contentType="text/html" import="LogonData" %>

If you put your classes in packages this doesn't happen, AFAIK.

fillup


On 5/24/02 7:39 AM, "Eric Everman" <[EMAIL PROTECTED]> wrote:

> Could this be a package issue as well (see Tomcat can't find my
> classes)?  Classes places in the /classes folder must be in nested folders
> matching the package name.  When you reference this class, you must use the
> package name, for instance:
> 
>  scope="session"/>
> 
> 
> Eric
> 
> 
> 
> At 02:30 AM 5/24/2002, you wrote:
>> I have the same problem of other, I read a some tutorial too and...
>> public class UserData {
>> String username;
>> String email;
>> int age;
>> 
>> public void setUsername( String value )
>> {...
>> I put in UserData.java and compiled and put in the same directory
>> \WEB-INF\classes, and when
>>  call
>> I find this and compiled and put in the same directory \WEB-INF\classes, and
>> when call
>> SaveName.jsp
>> > name="user" property="*"/>
>> receive this error:
>> org.apache.jasper.JasperException: Unable to compile class for JSP
>> 
>> An error occurred at line: 1 in the jsp file: /SaveName.jsp
>> 
>> Generated servlet error:
>> C:\Program Files\Apache Tomcat 4.0\work\localhost\_\SaveName$jsp.java:56:
>> Class org.apache.jsp.UserData not found.
>> UserData user = null;
>> ^
>> 
>> Why?
>> 
>> 
>> --
>> To unsubscribe, e-mail:   
>> For additional commands, e-mail: 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JavaBeans

2002-05-24 Thread Eric Everman

Could this be a package issue as well (see Tomcat can't find my 
classes)?  Classes places in the /classes folder must be in nested folders 
matching the package name.  When you reference this class, you must use the 
package name, for instance:




Eric



At 02:30 AM 5/24/2002, you wrote:
>I have the same problem of other, I read a some tutorial too and...
>public class UserData {
> String username;
> String email;
> int age;
>
> public void setUsername( String value )
> {...
>I put in UserData.java and compiled and put in the same directory
>\WEB-INF\classes, and when
>  call
>I find this and compiled and put in the same directory \WEB-INF\classes, and
>when call
>SaveName.jsp
>name="user" property="*"/>
>receive this error:
>org.apache.jasper.JasperException: Unable to compile class for JSP
>
>An error occurred at line: 1 in the jsp file: /SaveName.jsp
>
>Generated servlet error:
>C:\Program Files\Apache Tomcat 4.0\work\localhost\_\SaveName$jsp.java:56:
>Class org.apache.jsp.UserData not found.
> UserData user = null;
> ^
>
>Why?
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JavaBeans

2002-05-24 Thread Charles Baker


--- Anibal Constante Brito <[EMAIL PROTECTED]>
wrote:
> I have the same problem of other, I read a some
> tutorial too and...
> public class UserData {
> String username;
> String email;
> int age;
> 
> public void setUsername( String value )
> {...
> I put in UserData.java and compiled and put in the
> same directory
> \WEB-INF\classes, and when
>  call
> I find this and compiled and put in the same
> directory \WEB-INF\classes, and
> when call
> SaveName.jsp
>  scope="session"/> name="user" property="*"/>
> receive this error:
> org.apache.jasper.JasperException: Unable to compile
> class for JSP
> 
> An error occurred at line: 1 in the jsp file:
> /SaveName.jsp
> 
> Generated servlet error:
> C:\Program Files\Apache Tomcat
> 4.0\work\localhost\_\SaveName$jsp.java:56:
> Class org.apache.jsp.UserData not found.
> UserData user = null;
> ^
> 
<>

Did you include a package statement in your
UserData.java file? Something like

package org.apache.jsp;

?

If so, then the compiled class file needs to be in 

/WEB-INF/classes/org/apache/jsp/



=
[EMAIL PROTECTED]
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JavaBeans

2002-05-24 Thread Anibal Constante Brito

I have the same problem of other, I read a some tutorial too and...
public class UserData {
String username;
String email;
int age;

public void setUsername( String value )
{...
I put in UserData.java and compiled and put in the same directory
\WEB-INF\classes, and when
 call
I find this and compiled and put in the same directory \WEB-INF\classes, and
when call
SaveName.jsp

receive this error:
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 1 in the jsp file: /SaveName.jsp

Generated servlet error:
C:\Program Files\Apache Tomcat 4.0\work\localhost\_\SaveName$jsp.java:56:
Class org.apache.jsp.UserData not found.
UserData user = null;
^

Why?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSP and Javabeans

2002-05-22 Thread juan jose amador

Hi everybody.
  I continue having problems with my jsp running with javabeans. I use Tmcat 4.0.3 
with j2sdk1.4.0  following your instructions I have done this:

. I think my structure of folders is correct:
  webapps: here I put my files .jsp
  web-inf
classes
 packagename(car): here I put my file .java and compiled file .class

Then in my jsp ùt the code:
   
   
  my car is:   
 
 
Could anybody tell me what is the problem? 

Thanks.
Juanjo  



running JSP witth JavaBeans

2002-05-21 Thread juan jose amador

Thanks to everybody who answered about my problem, I can´t run JSP with file.class. I 
´ve done all you told me but that doesn´t work for me. I know nothing about Tomcat 
4.0.3 .Could be possible that is neccesarry something about files .xml because I 
notice that some folders has this type of files?

thanks again.
Juanjo



RE: Code Sample For -: running JSP with Javabeans

2002-05-17 Thread sbattul

Hi Vishal and Juan,

  I had the same problem Juan now has.

  My code worked when I included my class file in a Package and made no

  other changes.

  I changed :
  

 to :


 and it worked.

 Juan did u include

  package packagename;   in ur java files and recompiled them.

 This might help.

Thanks
Srinivas



>= Original Message From "Vishal" <[EMAIL PROTECTED]> =
>Hi Juanjo ...
>to use java beans with Jsp's u just have to put all u'r java beans that
>r nothing but the class files within u'r classes floder  if u'r using
>some pakage then u can put u'r java beans in that package under the classes
>floder of the Tomcat ...
>
>u have to call  that Java bean from u'r JSP file here i'm sending u the
>code to include the beans
>
>
>
>
>
>
>this is perfectly working for me .. i hope u'll also get the desired result
>with this .
>
>Vishal Gupta
>
>
>- Original Message -
>From: "juan jose amador" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Friday, May 17, 2002 4:10 PM
>Subject: running JSP with Javabeans
>
>
>Hi,
>   Yesterday I sent a problem running JSP with javabeans.I can run JSP
>without problem but not with javaBeans and i Know the java files are well
>built. The answer I received  was to make a package   but it does not work.
>The structure of my directories is:
>   WEBAPPS
>   MYPROJECT
>WEB-INF +jsp files
>  CLASSES
>  PACKAGE
>here are file.class.
>
>Somebody can help me?
>Thanks.
>
>JUANJO
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Code Sample For -: running JSP with Javabeans

2002-05-17 Thread Vishal


Hi Juanjo ...
to use java beans with Jsp's u just have to put all u'r java beans that
r nothing but the class files within u'r classes floder  if u'r using
some pakage then u can put u'r java beans in that package under the classes
floder of the Tomcat ...

u have to call  that Java bean from u'r JSP file here i'm sending u the
code to include the beans






this is perfectly working for me .. i hope u'll also get the desired result
with this .

Vishal Gupta


- Original Message -
From: "juan jose amador" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Friday, May 17, 2002 4:10 PM
Subject: running JSP with Javabeans


Hi,
   Yesterday I sent a problem running JSP with javabeans.I can run JSP
without problem but not with javaBeans and i Know the java files are well
built. The answer I received  was to make a package   but it does not work.
The structure of my directories is:
   WEBAPPS
   MYPROJECT
WEB-INF +jsp files
  CLASSES
  PACKAGE
here are file.class.

Somebody can help me?
Thanks.

JUANJO



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: running JSP with Javabeans

2002-05-17 Thread Vaneet Sharma

make a folder called "whatever" in classes under webapps
 and on your jsp 
 import that with 
package 
 and then instantiate the constructor of bean or call a method to check
  

-Original Message-
From: juan jose amador [mailto:[EMAIL PROTECTED]]
Sent: 17 May 2002 12:41
To: Tomcat Users List
Subject: running JSP with Javabeans


Hi,
   Yesterday I sent a problem running JSP with javabeans.I can run JSP
without problem but not with javaBeans and i Know the java files are well
built. The answer I received  was to make a package   but it does not work.
The structure of my directories is:
   WEBAPPS
   MYPROJECT
WEB-INF +jsp files
  CLASSES 
  PACKAGE
here are file.class.

Somebody can help me?
Thanks.

JUANJO 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




running JSP with Javabeans

2002-05-17 Thread juan jose amador

Hi,
   Yesterday I sent a problem running JSP with javabeans.I can run JSP without problem 
but not with javaBeans and i Know the java files are well built. The answer I received 
 was to make a package   but it does not work. The structure of my directories is:
   WEBAPPS
   MYPROJECT
WEB-INF +jsp files
  CLASSES 
  PACKAGE
here are file.class.

Somebody can help me?
Thanks.

JUANJO 



Re: runninng JSP with Javabeans

2002-05-16 Thread srinivas battula


Hi there,

   Include all ur class files in a package and 

  access them in JSP as "package.class"

  That might help.

Srinivas

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




runninng JSP with Javabeans

2002-05-16 Thread juan jose amador

Good morning, I.m beginning with JSP and I=B4m triing to run those with =
Javabeans on Tomcat 4.0.3. To run, I put my java compiled class in a =
carpet classes iin web-inf under my project carpet but I always have the =
same error message saying the class can=B4t be compiled to JSP and =
Tomcat can=B4t find it.
 Can you help me?.

Thanks,
Juanjo





JavaBeans Classpath

2002-03-22 Thread Faisal Shareef

Dear All,

I am really struggling in configuring the classpath for JavaBeans in Tomcat 
3.2.4. I've already spent a whole week in solving this puzzle but cannot get 
to anywhere. Please help me giving some advice about the variables and 
classpaths to be added/modified in Tomcat Batch files. I would be very 
thankful to you. Regards

Faisal

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Rep. : [JSP/JAVABEANS] set method and empty parameters...

2002-03-14 Thread Nicolas Silberzahn



Bonjour,

Does the browser send the information?

Bonne journee,

Nicolas Silberzahn

Digital Airways
Everywhere Technologies
www.DigitalAirways.com


>-Message d'origine-
>De : Olivier Boulanger [mailto:[EMAIL PROTECTED]]
>Envoye : mardi 12 mars 2002 12:49
>A : Tomcat Users List
>Objet : RE: Rep. : [JSP/JAVABEANS] set method and empty parameters...
>
>
>Hello,
>
>Thanks a lot...
>
>...but in fact, i'd like to set to null the parameters whose values are
>explicitly empty strings (and not all of them) :
>i've got more than one form to set the properties of my bean, and they all
>call the same jsp page to process the property="*"/> instruction...
>
>...and i don't want to clear the properties which aren't linked to the
>validated form...
>
>I could write a JSP page for each form I use, but it would be 
>really nice to
>know how to process the "set" method on an empty parameter...
>
>Olivier
>
>-Message d'origine-
>De : Sebastien BASTARD [mailto:[EMAIL PROTECTED]]
>Envoye : mardi 12 mars 2002 12:28
>A : [EMAIL PROTECTED]
>Objet : Rep. : [JSP/JAVABEANS] set method and empty parameters...
>
>
>Hello,
>
>You can execute a method such as 'prepareParam' which set all variables to
>null of your JavaBean.
>Thus, you have, as default, null to your variables.
>
>Example :
>
>
>
>
>void setPrepareParam() {
>  v1=null;
>  v2=null;
>  etc ...
>}
>
>Seb
>
>>>> [EMAIL PROTECTED] 12/03 12h19 >>>
>Hi all,
>
>I send some values of a html form (using post method) to a JSP page, which
>calls a JavaBean to actualize its properties (name="myBean"
>property="*"/>).
>
>But when a field of the form is null (empty string in the form), the "set"
>method of the bean is not executed.
>
>Ex : in the form, the value of the field "toto" is changed from "aaa" to
>null : the setToto method of the bean is not called, and the value of the
>toto property is not actualized...
>
>A solution would really be appreciate :-)
>
>Many thanks,
>
>Olivier
>
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>--
>To unsubscribe:   <mailto:[EMAIL PROTECTED]>
>For additional commands: <mailto:[EMAIL PROTECTED]>
>Troubles with the list: <mailto:[EMAIL PROTECTED]>
>
>

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




RE: Rep. : [JSP/JAVABEANS] set method and empty parameters...

2002-03-12 Thread Olivier Boulanger

Hello,

Thanks a lot...

...but in fact, i'd like to set to null the parameters whose values are
explicitly empty strings (and not all of them) :
i've got more than one form to set the properties of my bean, and they all
call the same jsp page to process the  instruction...

...and i don't want to clear the properties which aren't linked to the
validated form...

I could write a JSP page for each form I use, but it would be really nice to
know how to process the "set" method on an empty parameter...

Olivier

-Message d'origine-
De : Sebastien BASTARD [mailto:[EMAIL PROTECTED]]
Envoye : mardi 12 mars 2002 12:28
A : [EMAIL PROTECTED]
Objet : Rep. : [JSP/JAVABEANS] set method and empty parameters...


Hello,

You can execute a method such as 'prepareParam' which set all variables to
null of your JavaBean.
Thus, you have, as default, null to your variables.

Example :




void setPrepareParam() {
  v1=null;
  v2=null;
  etc ...
}

Seb

>>> [EMAIL PROTECTED] 12/03 12h19 >>>
Hi all,

I send some values of a html form (using post method) to a JSP page, which
calls a JavaBean to actualize its properties ().

But when a field of the form is null (empty string in the form), the "set"
method of the bean is not executed.

Ex : in the form, the value of the field "toto" is changed from "aaa" to
null : the setToto method of the bean is not called, and the value of the
toto property is not actualized...

A solution would really be appreciate :-)

Many thanks,

Olivier



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>





--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>




Rép. : [JSP/JAVABEANS] set method and empty parameters...

2002-03-12 Thread Sebastien BASTARD

Hello,

You can execute a method such as 'prepareParam' which set all variables to null of 
your JavaBean.
Thus, you have, as default, null to your variables.

Example : 




void setPrepareParam() {
  v1=null;
  v2=null;
  etc ...
}

Seb

>>> [EMAIL PROTECTED] 12/03 12h19 >>>
Hi all,

I send some values of a html form (using post method) to a JSP page, which
calls a JavaBean to actualize its properties ().

But when a field of the form is null (empty string in the form), the "set"
method of the bean is not executed.

Ex : in the form, the value of the field "toto" is changed from "aaa" to
null : the setToto method of the bean is not called, and the value of the
toto property is not actualized...

A solution would really be appreciate :-)

Many thanks,

Olivier



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




[JSP/JAVABEANS] set method and empty parameters...

2002-03-12 Thread Olivier Boulanger

Hi all,

I send some values of a html form (using post method) to a JSP page, which
calls a JavaBean to actualize its properties ().

But when a field of the form is null (empty string in the form), the "set"
method of the bean is not executed.

Ex : in the form, the value of the field "toto" is changed from "aaa" to
null : the setToto method of the bean is not called, and the value of the
toto property is not actualized...

A solution would really be appreciate :-)

Many thanks,

Olivier



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




JavaBeans intercommunication or JavaBean JNDI access

2001-09-25 Thread Curt Johnson

I'm trying to figure out if I have something wrong in the way I'm
designing this application or if this is a limitation of the
J2EE architecture.

I'm writing a web application running on Tomcat 4.0, using Servlets,
JSPs and JavaBeans. I'm using PoolMan for DB pooling to a Postgres
backend. I would like to have a MVC model for this application where the
JavaBeans do the object relational mapping and business logic, like
EJBs.  I would like to have them pull data from the database via the
PoolMan datasource. I would then like to display manipulate the beans
via servlets and JSP pages.

I have tried to place a reference to the PoolMan DataSource object into
the JNDI namespace 'java:comp/env' three different ways,
1) Using the Tomcat  tags and the DataSource factory
2) Using the  tag on a servlet with an empty
service() method which has the following in init():
public void init(ServletConfig config) throws ServletException {
  try {
String datasource = config.getInitParameter("database");
DataSource ds = PoolMan.findDataSource(datasource):

config.getServletContext().setAttribute("com.arrayservices.datasource",ds);

  }
  catch (SQLException sqle) {
sqle.printStackTrace();
  }
  catch (Exception e) {
e.printStackTrace();
  }
}
3) By writing a custom ConnectionFactory that will allow me to create
Connections from the DataSource from PoolMan.

None of these methods are accessable from JavaBeans although they seem
to work fine using DBtags from taglibs and from JSPs
The JavaBean I have been testing with currently accesses the database
using the following code:

DataSource ds  = PoolMan.findDataSource("jCart");
Connection conn = ds.getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(sqlquery);

Those lines are broken up into various methods in the Bean in order to
increase reuse of connections.  I would like to pass around the
DataSource object, either between JavaBeans directly or via JNDI.  Since
JavaBeans are not J2EE components, they aren't allowed to access
'java:comp/env', and I can't see any way for them to reference one
another without servlet intervention, which breaks the whole MVC model.
I want to stay away from EJB containers due to the overhead and the rmi
registry because I would like to be able to run this application in a
shared environment.  I'm wondering if maybe I could write BMP Enity
Beans and Session Beans and then treat them as regular beans without
using an EJB container or if there is some other method of making these
JavaBeans aware of shared resources that I'm missing here.

I'm stumped and feel that I may have to write something kludgy, such as
having every JavaBean use the PoolMan.findDataSource() method in order
to access the DataSource pool.  If anyone can shed any light on
something I haven't thought of or any misconceptions I have, I'd really
appreciate it.

BTW, I've looked through all the books I have, several times, searched
on Google, checked the mailing list archives on tomcat-user, tomcat-dev,
jboss-user, jboss-dev, searched on a few forums over at the Java
Developer's Connection, read through the Tomcat and Poolman docs
(several times), looked at the API docs and the Servlet 2.3 spec,
checked the web-app DTD, and generally exausted every resource for
finding some info on this I can think of.

Thanks in advance.

--
Curt Johnson[EMAIL PROTECTED]
Array Services, Inc.http://www.arrayservices.com
 "Open Source, Open Standards"
Unix and Internet Applications development, integration and administration






Re: Cannot find my JavaBeans

2001-07-20 Thread John Baker

On Thursday 19 July 2001 23:28 pm, you wrote:
> On Wednesday 18 July 2001 23:36 pm, you wrote:
> > To "start" a new thread, call x.start();  - in basic terms, this will
> > mean the x.run() method (or runnable.run()) is called, but you can
> > continue doing whatever it was you were doing without waiting for the
> > run() method to end.  that's the guts of how threads work.
>
The problem has gone in 4.0beta6. Woo!

>
> :)
> :
> > cheers
> > dim
> >
> > On Wed, 18 Jul 2001, John Baker wrote:
> > > > I don't know why it is different for run() than for start() - I
> > > > haven't used either, so I don't understand what the difference in the
> > > > two is in the Thread class(doesn't start() call run()?)
> > >
> > > What I meant by this is just doing:
> > >
> > > MyThread x = new MyThraad();
> > > x.run();
> > >
> > > calls the run method (containing the class that has problems being
> > > created) within the current Thread, ie no new Thread is started, This
> > > is when the problem 'goes away'.
> > >
> > > When start is called, the Thread starts (Obviously). This is when the
> > > problem appears for me.
> > >
> > > > hope this helps,
> > >
> > > I'll read tomorrow, digest, and attempt to understand :-)
> > >
> > > Still, this must be a bug... people will want to use their own Threads
> > > within a web application.
> > >
> > > > Charlie
> > > >
> > > > > -Original Message-
> > > > > From: John Baker [mailto:[EMAIL PROTECTED]]
> > > > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: Re: Cannot find my JavaBeans
> > > > >
> > > > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > > > This seems to be a bug in Tomcat. Shouldn't someone who
> > > > >
> > > > > actually knows
> > > > >
> > > > > > > how it all works take a look?
> > > > > > >
> > > > > > > John
> > > > > >
> > > > > > Yep. Even the cocoon mailing list is full with entries
> > > > >
> > > > > related to tomcat
> > > > >
> > > > > > and its classpath :-). Under some misterious circumstances the
> > > > > > " > > > >
> > > > > Well I managed to make it a very non mysterious circumstance.
> > > > > I just started
> > > > > a Thread from an object that was a ServletContextListener.
> > > > > When I called
> > > > > start it lost classes. When I called run it worked fine. I
> > > > > had no problems
> > > > > replicating it.
> > > > >
> > > > > What is the cocoon mailing list?
> > > > >
> > > > > --
> > > > > John Baker, BSc CS.
> > > > > Java developer, Linux lover.
> > > > > I don't wanna rock, DJ.
> > >
> > > --
> > > John Baker, BSc CS.
> > > Java developer, Linux lover.
> > > I don't wanna rock, DJ.

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.



Re: Cannot find my JavaBeans

2001-07-19 Thread Craig R. McClanahan



On Thu, 19 Jul 2001, John Baker wrote:

> On Thursday 19 July 2001 15:43 pm, you wrote:
> > > -Original Message-
> >
> > > MyThread x = new MyThraad();
> > > x.run();
> > >
> > > calls the run method (containing the class that has problems
> > > being created)
> > > within the current Thread, ie no new Thread is started, This
> > > is when the
> > > problem 'goes away'.
> >
> > Ok, I have written threads in C,C++(not in Java) but I am missing something
> > thats seems very basic here. so what you are saying is that run() is not
> > really creating a new thread, but really just creating an object named
> > 'MyThread' that happens to have a run() method? This would indicate that it
> > is not a new thread, but just a method(run()) from another class(MyThread)
> > that is called within the same thread.
> 
> Yes. I deliberately did this to try and work out what was going on. I agree 
> with your ClassLoader explanation. I'll look into it.
> 
> But, when TC calls my ServletContextListener (this was defined as a listener 
> within the web.xml) it *should* provide the ClassLoade for that application. 
> My listener was part of an application and giving it a different ClassLoader 
> is wrong. In my humble opinion :-)
> 

A recent clarification in the J2EE 1.3 spec (and therefore applies to
servlet 2.3 containers embedded in such servers) is that the web app class
loader must be provided as the value of the context class loader
(Thread.currentThread().getContextClassLoader()) to all method calls on a
request processing thread.  Note that this is *not* necessarily the class
loader used to load the class you are currently running, which could have
itself been loaded from a parent classloader.

On the general topic of threads in servlet containers, you can *not* rely
on an arbitrary thread you have created having access to the web app class
loader unless you take steps to save it.  The thread's context class
loader value is only defined for the request processing threads created by
the container itself -- not your own threads.

> 
> John
> 

Craig McClanahan





Re: Cannot find my JavaBeans

2001-07-19 Thread John Baker

On Wednesday 18 July 2001 23:36 pm, you wrote:
> To "start" a new thread, call x.start();  - in basic terms, this will mean
> the x.run() method (or runnable.run()) is called, but you can continue
> doing whatever it was you were doing without waiting for the run() method
> to end.  that's the guts of how threads work.

I wish I hadn't used this example now. I've been doing Java since 1997 (on a 
Solaris 2 with Jdk1.02). I'm quite good :-) I know how Threads work ta, but I 
think I must have made out that I didn't :-)

I did: x.run() as a /test/. And that's it. I thought 'I wonder if the class 
that isn't found when I run the Thread asynchronisly (spelt) will be found if 
I just run the code within that Threads run method with the current thread'. 
Ie, different ClassLoader. And it worked. 

:)

> cheers
> dim
>
> On Wed, 18 Jul 2001, John Baker wrote:
> > > I don't know why it is different for run() than for start() - I haven't
> > > used either, so I don't understand what the difference in the two is in
> > > the Thread class(doesn't start() call run()?)
> >
> > What I meant by this is just doing:
> >
> > MyThread x = new MyThraad();
> > x.run();
> >
> > calls the run method (containing the class that has problems being
> > created) within the current Thread, ie no new Thread is started, This is
> > when the problem 'goes away'.
> >
> > When start is called, the Thread starts (Obviously). This is when the
> > problem appears for me.
> >
> > > hope this helps,
> >
> > I'll read tomorrow, digest, and attempt to understand :-)
> >
> > Still, this must be a bug... people will want to use their own Threads
> > within a web application.
> >
> > > Charlie
> > >
> > > > -Original Message-
> > > > From: John Baker [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: Cannot find my JavaBeans
> > > >
> > > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > > This seems to be a bug in Tomcat. Shouldn't someone who
> > > >
> > > > actually knows
> > > >
> > > > > > how it all works take a look?
> > > > > >
> > > > > > John
> > > > >
> > > > > Yep. Even the cocoon mailing list is full with entries
> > > >
> > > > related to tomcat
> > > >
> > > > > and its classpath :-). Under some misterious circumstances the
> > > > > " > > >
> > > > Well I managed to make it a very non mysterious circumstance.
> > > > I just started
> > > > a Thread from an object that was a ServletContextListener.
> > > > When I called
> > > > start it lost classes. When I called run it worked fine. I
> > > > had no problems
> > > > replicating it.
> > > >
> > > > What is the cocoon mailing list?
> > > >
> > > > --
> > > > John Baker, BSc CS.
> > > > Java developer, Linux lover.
> > > > I don't wanna rock, DJ.
> >
> > --
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.



Re: Cannot find my JavaBeans

2001-07-19 Thread Dmitri Colebatch

To "start" a new thread, call x.start();  - in basic terms, this will mean
the x.run() method (or runnable.run()) is called, but you can continue
doing whatever it was you were doing without waiting for the run() method
to end.  that's the guts of how threads work.

cheers
dim

On Wed, 18 Jul 2001, John Baker wrote:

> > I don't know why it is different for run() than for start() - I haven't used
> > either, so I don't understand what the difference in the two is in the
> > Thread class(doesn't start() call run()?)
> 
> What I meant by this is just doing:
> 
> MyThread x = new MyThraad();
> x.run();
> 
> calls the run method (containing the class that has problems being created)
> within the current Thread, ie no new Thread is started, This is when the
> problem 'goes away'.
> 
> When start is called, the Thread starts (Obviously). This is when the
> problem appears for me.
> > 
> > hope this helps,
> 
> I'll read tomorrow, digest, and attempt to understand :-)
> 
> Still, this must be a bug... people will want to use their own Threads
> within a web application.
> 
> > Charlie
> > 
> > > -Original Message-
> > > From: John Baker [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Cannot find my JavaBeans
> > > 
> > > 
> > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > This seems to be a bug in Tomcat. Shouldn't someone who 
> > > actually knows
> > > > > how it all works take a look?
> > > > >
> > > > > John
> > > >
> > > > Yep. Even the cocoon mailing list is full with entries 
> > > related to tomcat
> > > > and its classpath :-). Under some misterious circumstances the
> > > > " > > >
> > > Well I managed to make it a very non mysterious circumstance. 
> > > I just started 
> > > a Thread from an object that was a ServletContextListener. 
> > > When I called 
> > > start it lost classes. When I called run it worked fine. I 
> > > had no problems 
> > > replicating it. 
> > > 
> > > What is the cocoon mailing list?
> > > 
> > > -- 
> > > John Baker, BSc CS.
> > > Java developer, Linux lover.
> > > I don't wanna rock, DJ.
> > > 
> 
> -- 
> John Baker, BSc CS.   
> Java developer, Linux lover.
> I don't wanna rock, DJ.
> 




Re: Cannot find my JavaBeans

2001-07-19 Thread John Baker

On Thursday 19 July 2001 17:24 pm, you wrote:
> 
> > My listener was part of an application and giving it a
> > different ClassLoader
> > is wrong. In my humble opinion :-)
>
> I agree since you are most likely doing context specific things in SCL that
> you would want access to the classes for the context. I would probably want
> the same if I were using it.
>
> That is what one of the developers needs to answer - if this is the
> intended behavior or a bug.
> You could probably ask the tomcat-dev list or file a bug report.
> Then you can post your findings here for our reference ;)
>
Can you? Im too busy ;-)

> > John
>
> Charlie

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.



RE: Cannot find my JavaBeans

2001-07-19 Thread Cox, Charlie
Title: RE: Cannot find my JavaBeans







> -Original Message-
> From: John Baker [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 11:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Cannot find my JavaBeans
> 
> 
> On Thursday 19 July 2001 15:43 pm, you wrote:
> > > -Original Message-
> >
> > > MyThread x = new MyThraad();
> > > x.run();
> > >
> > > calls the run method (containing the class that has problems
> > > being created)
> > > within the current Thread, ie no new Thread is started, This
> > > is when the
> > > problem 'goes away'.
> >
> > Ok, I have written threads in C,C++(not in Java) but I am 
> missing something
> > thats seems very basic here. so what you are saying is that 
> run() is not
> > really creating a new thread, but really just creating an 
> object named
> > 'MyThread' that happens to have a run() method? This would 
> indicate that it
> > is not a new thread, but just a method(run()) from another 
> class(MyThread)
> > that is called within the same thread.
> 
> Yes. I deliberately did this to try and work out what was 
> going on. 
Good! I am not going crazy :)


> I agree with your ClassLoader explanation. I'll look into it.
> 
> But, when TC calls my ServletContextListener (this was 
> defined as a listener 
> within the web.xml) it *should* provide the ClassLoade for 
> that application. 
> My listener was part of an application and giving it a 
> different ClassLoader 
> is wrong. In my humble opinion :-)
> 
I agree since you are most likely doing context specific things in SCL that you would want access to the classes for the context. I would probably want the same if I were using it.

That is what one of the developers needs to answer - if this is the intended behavior or a bug.
You could probably ask the tomcat-dev list or file a bug report.
Then you can post your findings here for our reference ;)


> 
> John
> 


Charlie





Re: Cannot find my JavaBeans

2001-07-19 Thread John Baker

On Thursday 19 July 2001 15:43 pm, you wrote:
> > -Original Message-
>
> > MyThread x = new MyThraad();
> > x.run();
> >
> > calls the run method (containing the class that has problems
> > being created)
> > within the current Thread, ie no new Thread is started, This
> > is when the
> > problem 'goes away'.
>
> Ok, I have written threads in C,C++(not in Java) but I am missing something
> thats seems very basic here. so what you are saying is that run() is not
> really creating a new thread, but really just creating an object named
> 'MyThread' that happens to have a run() method? This would indicate that it
> is not a new thread, but just a method(run()) from another class(MyThread)
> that is called within the same thread.

Yes. I deliberately did this to try and work out what was going on. I agree 
with your ClassLoader explanation. I'll look into it.

But, when TC calls my ServletContextListener (this was defined as a listener 
within the web.xml) it *should* provide the ClassLoade for that application. 
My listener was part of an application and giving it a different ClassLoader 
is wrong. In my humble opinion :-)


John



RE: Cannot find my JavaBeans

2001-07-19 Thread Cox, Charlie
Title: RE: Cannot find my JavaBeans





> -Original Message-
> From: John Baker [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 5:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cannot find my JavaBeans
> 
> 
> > I don't know why it is different for run() than for start() 
> - I haven't used
> > either, so I don't understand what the difference in the 
> two is in the
> > Thread class(doesn't start() call run()?)
> 
> What I meant by this is just doing:
> 
> MyThread x = new MyThraad();
> x.run();
> 
> calls the run method (containing the class that has problems 
> being created)
> within the current Thread, ie no new Thread is started, This 
> is when the
> problem 'goes away'.
> 


Ok, I have written threads in C,C++(not in Java) but I am missing something thats seems very basic here. so what you are saying is that run() is not really creating a new thread, but really just creating an object named 'MyThread' that happens to have a run() method? This would indicate that it is not a new thread, but just a method(run()) from another class(MyThread) that is called within the same thread.

>
> When start is called, the Thread starts (Obviously). This is when the
> problem appears for me.


This would make sense then if start() actually creates a new thread, and then calls run(). Your new thread then is independent of the current thread(which has a custom class loader)

> > 
> > hope this helps,
> 
> I'll read tomorrow, digest, and attempt to understand :-)
> 
> Still, this must be a bug... people will want to use their own Threads
> within a web application.
> 
> > Charlie
> > 
> > > -Original Message-
> > > From: John Baker [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, July 18, 2001 12:31 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Cannot find my JavaBeans
> > > 
> > > 
> > > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > > This seems to be a bug in Tomcat. Shouldn't someone who 
> > > actually knows
> > > > > how it all works take a look?
> > > > >
> > > > > John
> > > >
> > > > Yep. Even the cocoon mailing list is full with entries 
> > > related to tomcat
> > > > and its classpath :-). Under some misterious circumstances the
> > > > "
> > > >
> > > Well I managed to make it a very non mysterious circumstance. 
> > > I just started 
> > > a Thread from an object that was a ServletContextListener. 
> > > When I called 
> > > start it lost classes. When I called run it worked fine. I 
> > > had no problems 
> > > replicating it. 
> > > 
> > > What is the cocoon mailing list?
> > > 
> > > -- 
> > > John Baker, BSc CS.
> > > Java developer, Linux lover.
> > > I don't wanna rock, DJ.
> > > 
> 
> -- 
> John Baker, BSc CS.   
> Java developer, Linux lover.
> I don't wanna rock, DJ.
> 





Re: Cannot find my JavaBeans

2001-07-19 Thread Michael Bierenfeld

> Well I managed to make it a very non mysterious circumstance. I just started
> a Thread from an object that was a ServletContextListener. When I called
> start it lost classes. When I called run it worked fine. I had no problems
> replicating it.
> 
> What is the cocoon mailing list?

Hi,

in the release is stated, that the automatic class loading in
WEB-INF/lib has to be considered experimental. 

cocoon-user mailing list ? check-out : xml.apache.org/cocoon

Regards

Michael



Re: Cannot find my JavaBeans

2001-07-18 Thread John Baker

> I don't know why it is different for run() than for start() - I haven't used
> either, so I don't understand what the difference in the two is in the
> Thread class(doesn't start() call run()?)

What I meant by this is just doing:

MyThread x = new MyThraad();
x.run();

calls the run method (containing the class that has problems being created)
within the current Thread, ie no new Thread is started, This is when the
problem 'goes away'.

When start is called, the Thread starts (Obviously). This is when the
problem appears for me.
> 
> hope this helps,

I'll read tomorrow, digest, and attempt to understand :-)

Still, this must be a bug... people will want to use their own Threads
within a web application.

> Charlie
> 
> > -Original Message-
> > From: John Baker [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, July 18, 2001 12:31 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Cannot find my JavaBeans
> > 
> > 
> > On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > > This seems to be a bug in Tomcat. Shouldn't someone who 
> > actually knows
> > > > how it all works take a look?
> > > >
> > > > John
> > >
> > > Yep. Even the cocoon mailing list is full with entries 
> > related to tomcat
> > > and its classpath :-). Under some misterious circumstances the
> > > " > >
> > Well I managed to make it a very non mysterious circumstance. 
> > I just started 
> > a Thread from an object that was a ServletContextListener. 
> > When I called 
> > start it lost classes. When I called run it worked fine. I 
> > had no problems 
> > replicating it. 
> > 
> > What is the cocoon mailing list?
> > 
> > -- 
> > John Baker, BSc CS.
> > Java developer, Linux lover.
> > I don't wanna rock, DJ.
> > 

-- 
John Baker, BSc CS.   
Java developer, Linux lover.
I don't wanna rock, DJ.



RE: Cannot find my JavaBeans

2001-07-18 Thread Cox, Charlie
Title: RE: Cannot find my JavaBeans





Ok, based upon previous posts, I think I might have an idea of why this happens.


Tomcat uses its own classloader(AdaptiveClassLoader) to load servlets/jsps. when that servlet/jsp needs a class(abcBean) the AdaptiveClassLoader tries to load the class. If it cannot load the class from the classes it knows about, in this case web-inf/classes, it will pass the request to load a class to its parent classloader. 

See http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg13260.html for the full classloader heirarchy. 


In the case of a new Thread object, the AdaptiveClassLoader cannot resolve it, therefore it asks its parent and eventually the bootstap(jvm's) classloader will load the class. Now when the thread class needs to load a class(abcBean), the bootstrap classloader looks for it in the only place it is aware of - the classpath. And since the bootstrap loader doesn't not know about the AdaptiveClassLoader, it cannot forward the request to load the class to it, thus the class cannot be found.

I don't know why it is different for run() than for start() - I haven't used either, so I don't understand what the difference in the two is in the Thread class(doesn't start() call run()?)

hope this helps,
Charlie


> -Original Message-
> From: John Baker [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 12:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Cannot find my JavaBeans
> 
> 
> On Wednesday 18 July 2001 17:15 pm, you wrote:
> > > This seems to be a bug in Tomcat. Shouldn't someone who 
> actually knows
> > > how it all works take a look?
> > >
> > > John
> >
> > Yep. Even the cocoon mailing list is full with entries 
> related to tomcat
> > and its classpath :-). Under some misterious circumstances the
> > "
> >
> Well I managed to make it a very non mysterious circumstance. 
> I just started 
> a Thread from an object that was a ServletContextListener. 
> When I called 
> start it lost classes. When I called run it worked fine. I 
> had no problems 
> replicating it. 
> 
> What is the cocoon mailing list?
> 
> -- 
> John Baker, BSc CS.
> Java developer, Linux lover.
> I don't wanna rock, DJ.
> 





Re: Cannot find my JavaBeans

2001-07-18 Thread John Baker

On Wednesday 18 July 2001 17:15 pm, you wrote:
> > This seems to be a bug in Tomcat. Shouldn't someone who actually knows
> > how it all works take a look?
> >
> > John
>
> Yep. Even the cocoon mailing list is full with entries related to tomcat
> and its classpath :-). Under some misterious circumstances the
> "
Well I managed to make it a very non mysterious circumstance. I just started 
a Thread from an object that was a ServletContextListener. When I called 
start it lost classes. When I called run it worked fine. I had no problems 
replicating it. 

What is the cocoon mailing list?

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.



Re: Cannot find my JavaBeans

2001-07-18 Thread Michael Bierenfeld

> This seems to be a bug in Tomcat. Shouldn't someone who actually knows how it
> all works take a look?
> 
> John
> 

Yep. Even the cocoon mailing list is full with entries related to tomcat
and its classpath :-). Under some misterious circumstances the
"


Re: Cannot find my JavaBeans

2001-07-18 Thread John Baker

On Wednesday 18 July 2001 16:55 pm, you wrote:
> At 05:13 PM 18/07/01, you wrote:
>
> OK, I'm going to have to bail at this point - I really don't have the
> expertise to be able to answer this... (Out of interest, is there a cocoon
> mailing list & have you tried it?)
> Ideas that may or may not (probably the latter) be of use:
> * Automate the build process with ant to add the jars to tomcat/lib (A
> hack, but...)

Evil.

> * Try expanding the jars into WEB-INF/classes

Doesn't work.

> * Implement a seperate class loader - I'm using a URL classloader which
> works fine...

Never done that, but...

> * Add the classes to a seperate system classpath entry.

Haven't tried, but...


This seems to be a bug in Tomcat. Shouldn't someone who actually knows how it 
all works take a look?


John

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.



Re: Cannot find my JavaBeans

2001-07-18 Thread Michael Bierenfeld

> OK, I'm going to have to bail at this point - I really don't have the
> expertise to be able to answer this... (Out of interest, is there a cocoon
> mailing list & have you tried it?)
> Ideas that may or may not (probably the latter) be of use:
> * Automate the build process with ant to add the jars to tomcat/lib (A
> hack, but...)
> * Try expanding the jars into WEB-INF/classes
> * Implement a seperate class loader - I'm using a URL classloader which
> works fine...
> * Add the classes to a seperate system classpath entry.
> 
> Sorry I can't be of more help!
> 
> Jim
> 

No Problem. Thank you very much. I'll post the solution to the list (if
I find one :-)

Bye

Michael



Re: Cannot find my JavaBeans

2001-07-18 Thread Jim Cheesman

At 05:13 PM 18/07/01, you wrote:
> > Alright, I'm out of my depth here ;) Is the compile done at runtime?
> > Besides which, I think you already have the solution. Include the jars in
> > $TOMCAT_HOME/lib...
> >
> > (And which jars are we talking about here? The cocoon/servlet ones,
> > presumably?)
> >
>
>While checking the source I found that the compile process and the
>execution of the generated code is done in the same servlet.
>
>I know that $TOMCAT_HOME/lib would be a solution but we have a lot of
>them and they change quite often. They are all written by ourselves and
>have nothing to do with cocoon or tomcat.
>
>Its funny I think its a classpath issue of tomcat.


OK, I'm going to have to bail at this point - I really don't have the 
expertise to be able to answer this... (Out of interest, is there a cocoon 
mailing list & have you tried it?)
Ideas that may or may not (probably the latter) be of use:
* Automate the build process with ant to add the jars to tomcat/lib (A 
hack, but...)
* Try expanding the jars into WEB-INF/classes
* Implement a seperate class loader - I'm using a URL classloader which 
works fine...
* Add the classes to a seperate system classpath entry.


Sorry I can't be of more help!


Jim


--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   One should 
never generalize.





Re: Cannot find my JavaBeans

2001-07-18 Thread John Baker

Ha! I've been getting this too! I posted about this last week.

Here is my posting:


Anyone ever experienced a problem where by if you try to run a Thread from an 
object implementing ServletContextListener (ie it's used to perform 'startup' 
stuff), the Thread is unable to find classes (complains of NoClassDefFound). 
Yet if the Thread is just run using the current Thread (ie call run, not 
start), the classes are magically found?


I *know* there are classes there, within the classpath, and I can create them 
happily. However if I run a Thread (and it works from a jsp, but not from an 
object that's an application listener) and try to create the object, ti fails.

Noone has found a solution for me yet :-)


On Wednesday 18 July 2001 15:44 pm, you wrote:
> Hi,
>
> your wish is my order :-) cocoon is a servlet that generates java code
> out of some sort of xml-files. The compile process is running inside the
> servlet. Compile is fine but if the servlet executes the generated
> class. The classpath is missing some jars that where present during
> compile. Its running fine if the jars are in $TOMCAT_HOME/lib.
>
>
> java.lang.ClassNotFoundException: xmlbeans.XmlBean
>   at
> org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPC
>lassLoader.java:99) at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
>   at
> _usr._local._jakarta_tomcat_3_2_2._webapps._Projekte._xsp._page.(_pag
>e.java) at
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJava
>Processor.java:173) at
> org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:542
>) at
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:390)
>   at org.apache.cocoon.Engine.handle(Engine.java:384)
>   at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
>   at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at
> org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
>97) at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnectio
>n(Ajp12ConnectionHandler.java:166) at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java)
>
> ---
>--
>
> Kind regards
>
> Michael

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.



Re: Cannot find my JavaBeans

2001-07-18 Thread Michael Bierenfeld

> Alright, I'm out of my depth here ;) Is the compile done at runtime?
> Besides which, I think you already have the solution. Include the jars in
> $TOMCAT_HOME/lib...
> 
> (And which jars are we talking about here? The cocoon/servlet ones,
> presumably?)
>

While checking the source I found that the compile process and the
execution of the generated code is done in the same servlet. 

I know that $TOMCAT_HOME/lib would be a solution but we have a lot of
them and they change quite often. They are all written by ourselves and
have nothing to do with cocoon or tomcat.

Its funny I think its a classpath issue of tomcat.

Regards

Michael



Re: Cannot find my JavaBeans

2001-07-18 Thread Jim Cheesman

At 04:44 PM 18/07/01, you wrote:
>Hi,
>
>your wish is my order :-) cocoon is a servlet that generates java code
>out of some sort of xml-files. The compile process is running inside the
>servlet. Compile is fine but if the servlet executes the generated
>class. The classpath is missing some jars that where present during
>compile. Its running fine if the jars are in $TOMCAT_HOME/lib.


Alright, I'm out of my depth here ;) Is the compile done at runtime? 
Besides which, I think you already have the solution. Include the jars in 
$TOMCAT_HOME/lib...


(And which jars are we talking about here? The cocoon/servlet ones, 
presumably?)






>java.lang.ClassNotFoundException: xmlbeans.XmlBean
>   at
>org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPClassLoader.java:99)
>   at
>java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
>   at
>_usr._local._jakarta_tomcat_3_2_2._webapps._Projekte._xsp._page.(_page.java)
>   at
>org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaProcessor.java:173)
>   at
>org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:542)
>   at
>org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:390)
>   at org.apache.cocoon.Engine.handle(Engine.java:384)
>   at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
>   at
>javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>   at
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>   at
>org.apache.tomcat.core.Handler.service(Handler.java:287)
>   at
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>   at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
>   at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>   at
>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
>   at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>   at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>   at java.lang.Thread.run(Thread.java)
>
>-
>
>Kind regards
>
>Michael


--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   One should 
never generalize.





Re: Cannot find my JavaBeans

2001-07-18 Thread Michael Bierenfeld

Hi,

your wish is my order :-) cocoon is a servlet that generates java code
out of some sort of xml-files. The compile process is running inside the
servlet. Compile is fine but if the servlet executes the generated
class. The classpath is missing some jars that where present during
compile. Its running fine if the jars are in $TOMCAT_HOME/lib.


java.lang.ClassNotFoundException: xmlbeans.XmlBean
  at
org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPClassLoader.java:99)
  at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
  at
_usr._local._jakarta_tomcat_3_2_2._webapps._Projekte._xsp._page.(_page.java)
  at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaProcessor.java:173)
  at
org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:542)
  at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:390)
  at org.apache.cocoon.Engine.handle(Engine.java:384)
  at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
  at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
  at
org.apache.tomcat.core.Handler.service(Handler.java:287)
  at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
  at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
  at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
  at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
  at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
  at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
  at java.lang.Thread.run(Thread.java)

-

Kind regards

Michael



RE: Cannot find my JavaBeans

2001-07-18 Thread Jim Cheesman

At 04:01 PM 18/07/01, you wrote:
>Jim,
>Thanks. I did what you suggested and it works,
>BUT:
>1. Do I need to add  block to create virtual path to "student1" in
>server.xml if it is all under \webapps anyway? The startup seems to be
>creating the contextx automatically, but perhaps this is not the best way??

If it ain't broke...  I don't know if you need to or not, but I'd say that 
if you want to play around with the initialisation parameters 
(reloadable=true etc.) you'll need to.




>2. (Maybe related?) Is it really necessary to use the "\jsp" directory?


No, but it's always nice to have everything under control, tidy etc. (And 
if you decide to add a security manager you may want you executable content 
in one place that's *not* the root, too.)



>3. When would I need to add  blocks to web.xml file for each jsp
>file?

When you want to map your jsp's to a different url, or if you precompile 
them. Otherwise there's no need.







--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   One should 
never generalize.





Re: Cannot find my JavaBeans

2001-07-18 Thread Jim Cheesman

At 03:41 PM 18/07/01, you wrote:
> > Beans, servlet code (not in jar files)
> > \webapps\student1\WEB-INF\classes\chpt1\*.class
> >
> > With the beans and servlets in the package chpt1 (etc.)
> >
> > This assumes you create a webapp (and context etc.) for each student, of
> > course.
> >
>
>hi,
>
>hmpf. I am struggling with this problem too. I have a context /projekts
>a couple of jar-files in /projekts/WEB-INF/lib and while executing
>cocoon I receive NoClassDefFoundError. The compile of cocoon works fine
>though.



Proviso: I have no experience with cocoon.

That said, you need to send some basic diagnostic info:
What class is not found? One of the cocoon ones, or one of yours?
Could you send the stack trace?





--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   One should 
never generalize.





RE: Cannot find my JavaBeans

2001-07-18 Thread Alan Zaitchik

Jim,
Thanks. I did what you suggested and it works,
BUT:
1. Do I need to add  block to create virtual path to "student1" in
server.xml if it is all under \webapps anyway? The startup seems to be
creating the contextx automatically, but perhaps this is not the best way??
2. (Maybe related?) Is it really necessary to use the "\jsp" directory?
3. When would I need to add  blocks to web.xml file for each jsp
file?
I apologize in advance for pestering you with these questions.
Alan

> -Original Message-
> From: Jim Cheesman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 9:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Cannot find my JavaBeans
>
>
> At 03:25 PM 18/07/01, you wrote:
> >I would like to create a directory tree under \webapps which is
> helpful for
> >delivering a course. So it should be
> >\webapps\student1, \webapps\student2, and so on, with each
> >\webapps\student-n having further subdirectories like chpt1,
> chpt2, etc, for
> >different projects. I want to keep everything distinct during
> the course so
> >that all jsp files and JavaBeans are separated by student and chapter. So
> >for the jsp files I would use
> >\webapps\student1\chpt1
> >\webapps\student1\chpt2
> >\webapps\student1\chpt3
>
>
> The "normal" way to do this would be:
> JSP files:
> \webapps\student1\jsp\chpt1\*.jsp
> \webapps\student1\jsp\chpt2\*.jsp
>
> Beans, servlet code (not in jar files)
> \webapps\student1\WEB-INF\classes\chpt1\*.class
>
> With the beans and servlets in the package chpt1 (etc.)
>
>
>
> This assumes you create a webapp (and context etc.) for each student, of
> course.
>
>
> HTH,
> Jim
>
>
> --
>
>*   Jim Cheesman   *
>  Trabajo:
> [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
>One should
> never generalize.
>
>




Re: Cannot find my JavaBeans

2001-07-18 Thread Michael Bierenfeld

> Beans, servlet code (not in jar files)
> \webapps\student1\WEB-INF\classes\chpt1\*.class
> 
> With the beans and servlets in the package chpt1 (etc.)
> 
> This assumes you create a webapp (and context etc.) for each student, of
> course.
> 

hi,

hmpf. I am struggling with this problem too. I have a context /projekts
a couple of jar-files in /projekts/WEB-INF/lib and while executing
cocoon I receive NoClassDefFoundError. The compile of cocoon works fine
though.

Michael



Re: Cannot find my JavaBeans

2001-07-18 Thread Jim Cheesman

At 03:25 PM 18/07/01, you wrote:
>I would like to create a directory tree under \webapps which is helpful for
>delivering a course. So it should be
>\webapps\student1, \webapps\student2, and so on, with each
>\webapps\student-n having further subdirectories like chpt1, chpt2, etc, for
>different projects. I want to keep everything distinct during the course so
>that all jsp files and JavaBeans are separated by student and chapter. So
>for the jsp files I would use
>\webapps\student1\chpt1
>\webapps\student1\chpt2
>\webapps\student1\chpt3


The "normal" way to do this would be:
JSP files:
\webapps\student1\jsp\chpt1\*.jsp
\webapps\student1\jsp\chpt2\*.jsp

Beans, servlet code (not in jar files)
\webapps\student1\WEB-INF\classes\chpt1\*.class

With the beans and servlets in the package chpt1 (etc.)



This assumes you create a webapp (and context etc.) for each student, of 
course.


HTH,
Jim


--

   *   Jim Cheesman   *
 Trabajo: 
[EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
   One should 
never generalize.





Cannot find my JavaBeans

2001-07-18 Thread Alan Zaitchik

I would like to create a directory tree under \webapps which is helpful for
delivering a course. So it should be
\webapps\student1, \webapps\student2, and so on, with each
\webapps\student-n having further subdirectories like chpt1, chpt2, etc, for
different projects. I want to keep everything distinct during the course so
that all jsp files and JavaBeans are separated by student and chapter. So
for the jsp files I would use
\webapps\student1\chpt1
\webapps\student1\chpt2
\webapps\student1\chpt3
...
\webapps\student2\chpt1
\webapps\student2\chpt2
\webapps\student2\chpt3
...
while for the beans I would have
\webapps\student1\chpt1\WEB-INF\classes
\webapps\student1\chpt2\WEB-INF\classes
\webapps\student1\chpt3\WEB-INF\classes
...
\webapps\student2\chpt1\WEB-INF\classes
\webapps\student2\chpt2\WEB-INF\classes
\webapps\student2\chpt3\WEB-INF\classes
...

(I know that this would make no sense for a real life site!)

My problem is that the jsp files cannot "find" the JavaBeans when they are
placed in this sort of tree. I am not sure whether the beans need to be in
packages, and how they should be referenced by the jsp files.
I get a message that says it could not compile the jsp file because it could
not find the bean, and it looks to me like it is assuming the bean is in a
package under the "chpt1" level, like chpt1.mybean.
But when I specified the package "chpt1" in each bean and in each useBean
tag, I still get errors.

If I raise everything "up" one level then there is no problem, but I would
like to have this tree as described.
What is the best way to do this, assuming that I need to create the tree as
described above?

Thanks.
Alan





RE: javabeans with jsp

2001-06-28 Thread Jann VanOver

A good reference is http://java.sun.com/j2ee/tutorial/doc/JSPBeans.html

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 20, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject: javabeans with jsp


I don't know where exactly the javabean class goes in order for a jsp script

to find it. Lets say that I have a jsp script in:
~/examples/jsp/tester/tester.jsp

and tester.jsp uses a bean class called "UserBean.class".

tester.jsp has this line in the beginning:


My question is from this point where do I put the bean "UserBean" and do I 
have to touch the "web.xml" or "server.xml" at all to resolve this 
problem



RE: Enterprise JavaBeans support?

2001-06-26 Thread

Nope, Tomcat's a servlet container and not a full-fledged J2EE server.

For EJBs try jBoss - it's open-source and it kicks arse...

Regards,



Emir Alikadic


-Original Message-
From: Aaron Cooper [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 15:57
Subject: Enterprise JavaBeans support?


Hello
 
   I have been checking the online documentation but I have not found the
answer I am looking for.  I know that Tomcat support JavaBeans, but does it
support EJB? 

Thanks

Aaron



Re: Enterprise JavaBeans support?

2001-06-26 Thread anil

Hi Aaron,

Check www.jboss.org. They have Tomcat and Jboss bundle together module and it is ready 
to roll.

anil

Aaron Cooper wrote:

> Hello
>
>I have been checking the online documentation but I have not found the answer I 
>am looking for.  I know that Tomcat support JavaBeans, but does it support EJB?
>
> Thanks
>
> Aaron




Re: Enterprise JavaBeans support?

2001-06-26 Thread Sophie

Hello Aaron,

For EJB you need an additional server. Free EJB servers are Jonas (via
www.evidian.com) and jboss (I think www.jboss.com). I am working
with Jonas and am quite happy with the server and the support via
their mailing list.

There is also a combination of Jonas and Enhydra, which is an application
server. But I have no experience with that.

Sophie

Aaron Cooper schreef:

> Hello
>
>I have been checking the online documentation but I have not found the answer I 
>am looking for.  I know that Tomcat support JavaBeans, but does it support EJB?
>
> Thanks
>
> Aaron




AW: Enterprise JavaBeans support?

2001-06-26 Thread Arnold Senn

Hello Aaron,

You know that J2EE defines different containers?
So for Servlets/JSPs(also JSPs together with JavaBeans) you need a
webcontainer(e.g. Tomcat).
For EJBs you need an EJBcontainer which is normally part of an
ApplicationServer (e.g. Borland AppServer)

E.g. Borland AppServer include the current version of Tomcat and I like this
powerful product where you can use EJBs from JavaBeans very easily. You can
download a copy from their website.

Hope this helps

Arnold



-Ursprungliche Nachricht-
Von: Aaron Cooper [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 26. Juni 2001 13:57
An: >
Betreff: Enterprise JavaBeans support?


Hello

   I have been checking the online documentation but I have not found the
answer I am looking for.  I know that Tomcat support JavaBeans, but does it
support EJB?

Thanks

Aaron




RE: Enterprise JavaBeans support?

2001-06-26 Thread Randy Layman


Tomcat is not an EJB Container.  It can work with EJB Containers
like JBoss, WebLogic, etc by running the remote interfaces which will then
communicate with the EJB server.

Randy

> -Original Message-
> From: Aaron Cooper [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 26, 2001 7:57 AM
> To: <
> Subject: Enterprise JavaBeans support?
> 
> 
> Hello
>  
>I have been checking the online documentation but I have 
> not found the answer I am looking for.  I know that Tomcat 
> support JavaBeans, but does it support EJB? 
> 
> Thanks
> 
> Aaron
> 



AW: Enterprise JavaBeans support?

2001-06-26 Thread Thomas Bezdicek

no it does not.
look for jboss for ejb support, works with tomcat.

regards, tom

> -Ursprungliche Nachricht-
> Von: Aaron Cooper [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 26. Juni 2001 13:57
> An: >
> Betreff: Enterprise JavaBeans support?
> 
> 
> Hello
>  
>I have been checking the online documentation but I have not 
> found the answer I am looking for.  I know that Tomcat support 
> JavaBeans, but does it support EJB? 
> 
> Thanks
> 
> Aaron
> 



Enterprise JavaBeans support?

2001-06-26 Thread Aaron Cooper

Hello
 
   I have been checking the online documentation but I have not found the answer I am 
looking for.  I know that Tomcat support JavaBeans, but does it support EJB? 

Thanks

Aaron




Re: javabeans with jsp

2001-06-20 Thread Daniel de Almeida Alvares

You can put the bean at the WEB-INF/classes directory of your application !
Regards
Daniel
___
Daniel de Almeida Alvares
Santos - SP - Brasil
[EMAIL PROTECTED]

- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 20, 2001 8:07 PM
Subject: javabeans with jsp


> I don't know where exactly the javabean class goes in order for a jsp
script
> to find it. Lets say that I have a jsp script in:
> ~/examples/jsp/tester/tester.jsp
>
> and tester.jsp uses a bean class called "UserBean.class".
>
> tester.jsp has this line in the beginning:
> 
>
> My question is from this point where do I put the bean "UserBean" and do I
> have to touch the "web.xml" or "server.xml" at all to resolve this
> problem




javabeans with jsp

2001-06-20 Thread JeremyRayYoo

I don't know where exactly the javabean class goes in order for a jsp script 
to find it. Lets say that I have a jsp script in:
~/examples/jsp/tester/tester.jsp

and tester.jsp uses a bean class called "UserBean.class".

tester.jsp has this line in the beginning:


My question is from this point where do I put the bean "UserBean" and do I 
have to touch the "web.xml" or "server.xml" at all to resolve this 
problem



RE: JavaBeans

2001-05-29 Thread Bhat, Mahesh

Hi

Place the bean class either in the Web-inf/classes directory (along with the
package directory structure) or package it in a jar and place it in the 
Web-Inf/lib directory.


regards

-Original Message-
From: Kavi [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 29, 2001 7:13 AM
To: [EMAIL PROTECTED]
Subject: JavaBeans


Hi everyone,
I am trying to use my first javabean in a JSP using
tomcat but where I must place the bean(or package??)
I am getting error 500 - Unable to load class

Please help!!

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/


Important:

Internet communications are not necessarily secure and may be intercepted or changed 
after they are sent.
The Abbey National Group does not accept liability for any such changes. If you wish 
to confirm the origin or content of this communication, please contact the sender 
using an alternative means of communication.

This communication does not create or modify any contract.

If you are not the intended recipient of this communication you should destroy it 
without copying, disclosing or otherwise using its contents. Please notify the sender 
immediately of the error.

The Abbey National Group comprises Abbey National plc and its subsidiary group of 
companies.

Abbey National plc. Registered Office: Abbey House, Baker Street, London, NW1 6XL. 
Reg. No. 2294747.
Registered in England.



RE: JavaBeans

2001-05-28 Thread me

Hi Kavi,

JavaBeans must be placed in the Web-Inf/classes directory of your webapp as
long as they don't belong to a package and you don't set a classpath. Else
you must create a directory structure similar to your package name, i.e.
package: yourpack.com --> web-inf/classes/com/yourpak.

Hope this helps
   Thomas




JavaBeans

2001-05-28 Thread Kavi

Hi everyone,
I am trying to use my first javabean in a JSP using
tomcat but where I must place the bean(or package??)
I am getting error 500 - Unable to load class

Please help!!

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Re: newbi javabeans

2001-02-28 Thread Brett W. McCoy

On Thu, 1 Mar 2001, teh j wrote:

> I am fairly new to java beans but i was wondering if
> it were possible for one java bean to call another
> should it need to?
> Im fairly certain it is possible
> its just that i havent really seen this done before.

A Javabean is just a Java class that adheres to a specific design pattern
for public methods and events.  If you have a bean and want to interface
with another bean, you know that the other bean will have defined ways of
manipulating its behavior.

You should probably see
http://java.sun.com/docs/books/tutorial/javabeans/index.html for more
information on Javabeans.

-- Brett
 http://www.chapelperilous.net/~bmccoy/
---
"If that man in the PTL is such a healer, why can't he make his wife's
 hairdo go down?"
-- Robin Williams


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: newbi javabeans

2001-02-28 Thread guyr

Sure, a javabean is just java code with some method naming structure.  Java
code can call other java code.

-Original Message-
From: teh j [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 6:37 PM
To: [EMAIL PROTECTED]
Subject: newbi javabeans


hello!

I am fairly new to java beans but i was wondering if
it were possible for one java bean to call another
should it need to?
Im fairly certain it is possible 
its just that i havent really seen this done before.

Jason


_
http://invites.yahoo.com.au - Yahoo! Invites
- Organise your Mardi Gras party online!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




newbi javabeans

2001-02-28 Thread teh j

hello!

I am fairly new to java beans but i was wondering if
it were possible for one java bean to call another
should it need to?
Im fairly certain it is possible 
its just that i havent really seen this done before.

Jason

_
http://invites.yahoo.com.au - Yahoo! Invites
- Organise your Mardi Gras party online!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Lilian's problems with Tomcat and JavaBeans

2001-02-28 Thread Michael Wentzel

Please ...

 My problem is that I have made a JSP page put in directory "c:/ABC/JSP/"
Tomcat find it ! until here no problem 
this directory is specified by the following context :


 But ... when I included a simple JavaBean into the JSP file ( located in
the same directory) then
Tomcat didn't find it ( The JavaBeans ) 

- reply ---

The problem is that you have a context configured but just configuring a
context
does not put that path into your classpath.  The beans need to be in your
classpath.  Therefore either put the classes in a directory which is in your
classpath
or in /WEB-INF/classes/ (if just class files) or
/WEB-INF/lib
(if in a jar file).


ps- Please post to the list in plain text.  I am using
a hypermedia enabled mail viewer but there are plenty of
people on the list who are not.

---
Michael Wentzel
Software Developer
Software As We Think - http://www.aswethink.com
mailto:[EMAIL PROTECTED]

- Punisher of those who cannot spell dumb!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




AW: Lilian's problems with Tomcat and JavaBeans

2001-02-28 Thread Kurt, Oliver



i had 
the same problem. i think (even I don't really know!!!) that you can't use 
absolut pathes in docBase
 
I 
solved the problem by moving my "ABC" directory to
%tomcat_home%/wwwroot/ABC
 
and 
then changed docBase="wwwroot/ABC"
 
Oliver 
kurt
 
-Ursprüngliche Nachricht-Von: Negrini Lilian 
[mailto:[EMAIL PROTECTED]]Gesendet: Sonntag, 13. April 1980 
07:37An: [EMAIL PROTECTED]Betreff: Lilian's 
problems with Tomcat and JavaBeans
Please ...
 
 My problem is that I have made 
a JSP page put in 
directory "c:/ABC/JSP/"
Tomcat find it ! until here no 
problem 
this directory is specified by the 
following context :


 docBase="c:/ABC"
  crossContext="false"
 debug="0" 
    reloadable="true" >

 But ... when I 
included a simple JavaBean into the JSP file ( located in the same directory) 
then
Tomcat didn't find it ( The JavaBeans 
) 
 
 
 Thanks a lot for 
your answers !!!
 
Lilian


Lilian's problems with Tomcat and JavaBeans

2001-02-28 Thread Negrini Lilian



Please ...
 
 My problem is that I have made 
a JSP page put in 
directory "c:/ABC/JSP/"
Tomcat find it ! until here no 
problem 
this directory is specified by the 
following context :


 docBase="c:/ABC"
  crossContext="false"
 debug="0" 
    reloadable="true" >

 But ... when I 
included a simple JavaBean into the JSP file ( located in the same directory) 
then
Tomcat didn't find it ( The JavaBeans 
) 
 
 
 Thanks a lot for 
your answers !!!
 
Lilian


Login code using JSP and JavaBeans??

2001-02-06 Thread Mick Sullivan

Hi
Does anyone know where I could find some code example of how to get a 
registration page and login working for a website? i.e. Have a user enter 
his details into the registration page, save his details in a bean, then 
have him login with the username and password he had chosen in the 
registration page?
Thanks in advance...
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Re: Where to place JavaBeans in tomcat??

2001-01-02 Thread Ted Husted

JavaBeans are classes like everything else; they just follow a
programming convention by providing standard accessors. 

For more about JSP and JavaBeans, see 

< http://java.sun.com/products/jsp/technical.html >

and 

< http://java.sun.com/products/javabeans/docs/ >

*** REPLY SEPARATOR  ***

On 1/2/2001 at 4:22 PM Mick Sullivan 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??
Thanks in advance!

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




Where to place JavaBeans in tomcat??

2001-01-02 Thread Mick Sullivan

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??
Thanks in advance!
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]