• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

where i need to place my java bean file in the tomcat

 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i want to create a bean file but when i run the jsp page it's come out "unable to compile class for jsp"
i place my class file under the C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes which my page is put inside the webapps\ROOT.

some one can give me the solution in this manner

thankyou...

best regards,

albert
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you read the JSP FAQ entries on this issue?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since the directory structure of a webapp is defined by the servlet spec and is not Tomcat specific, I'm going to move this to the Servlets forum.

As Bear has said, there is some material in the JSP FAQ that will help you with this. In particular, see:
http://faq.javaranch.com/view?PackageYourBeans
 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which version of Tomcat are you using. I had faced a similar issue with Tomcat 5.x.

If you are creating a bean with default package, Tomcat will not identify this bean class. Define a package for the bean class.

Example:
package foo;

public class UserBean
{
// Your private attributes and getter/setters
}

I am not sure from which version onwards Tomcat started having this restriction. Seems it was from 4.x onwards, if I am not mistaken.
 
reply
    Bookmark Topic Watch Topic
  • New Topic