RE: Why can't tomcat find my bean classes?

2004-03-21 Thread Tom K
Tomcat like your bean in a package. 

-Original Message-
From: Roy Smith [mailto:[EMAIL PROTECTED] 
Sent: Saturday, March 20, 2004 4:31 PM
To: [EMAIL PROTECTED]@jakarta.apache.org
Cc: Roy Smith
Subject: Why can't tomcat find my bean classes? 

I'm running jakarta-tomcat-5.0.18 on OSX.

I've got a trivial little JSP file:






It looks like ""



and my DoublerBean.java file is pretty simple too:

public class DoublerBean
{
  private String phrase;

  public DoublerBean ()
  {
  // empty
  }

  public void setIn (String phrase)
  {
  this.phrase = phrase;
  }

  public String getOut ()
  {
  return (phrase + ", " + phrase);
  }
}

When I run ant, I get a build/WEB-INF/classes/DoublerBean.class file,
but my jsp application can't seem to find the DoublerBean class.  When
I reload my app through the manager and run it, I get:

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

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

Generated servlet error:
  [javac] Compiling 1 source file

/usr/local/jakarta-tomcat-5.0.18/work/Catalina/localhost/SquawkLog/org/
apache/jsp/foo_jsp.java:40: cannot resolve symbol
symbol  : class DoublerBean
location: class org.apache.jsp.foo_jsp
DoublerBean doubler = null;
^

and a few more similar errors complaining that it can't resolve
DoublerBean.  Other JSP pages I wrote were able to find their required
classes in the same location.  What's different about finding bean
classes?


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


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.557 / Virus Database: 349 - Release Date: 12/30/2003
 


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



RE: Why can't tomcat find my bean classes?

2004-03-20 Thread Noel J. Bergman
> 

> When I run ant, I get a build/WEB-INF/classes/DoublerBean.class file

Tomcat requires the bean to be in a package.

--- Noel

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