Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling javabeans from JSP  RSS feed

 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get this error while calling java bean from JSP page:
C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\bean_jsp.java:56: cannot resolve symbol
symbol : class a
location: class org.apache.jsp.bean_jsp
a jbean = new a();
* I am using j2sdk1.4.2_03 and Tomcat 5.0
* a.class file is stored under C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
* bean.jsp file is stored under C:\Tomcat 5.0\webapps\ROOT
I have gone thru all documents given in Tomcat tutorial and java beans tutorial but stil can't fix this problem !!
Can anybody plz help me ? thanks in advance
-Anand.

I get this error while calling java bean from JSP page:

C:\Tomcat 5.0\work\Catalina\localhost\_\org\apache\jsp\bean_jsp.java:56: cannot resolve symbol
symbol : class a
location: class org.apache.jsp.bean_jsp
a jbean = new a();
* I am using j2sdk1.4.2_03 and Tomcat 5.0
* a.class file is stored under C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
* bean.jsp file is stored under C:\Tomcat 5.0\webapps\ROOT
I have gone thru all documents given in Tomcat tutorial and java beans tutorial but stil can't fix this problem !!
Can anybody plz help me ? thanks in advance
-Anand.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your beans must be in a package other than the default.
 
Anand Gondhiya
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my a.class is stored under C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes.
now WEB-INF\classes is the default directory for .class files right ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, but your beans must be in a named package. For example:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!