This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes where i need to place my java bean file in the tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "where i need to place my java bean file in the tomcat" Watch "where i need to place my java bean file in the tomcat" New topic
Author

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

albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
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


JAVA the only can called technology
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56201
    
  13

Have you read the JSP FAQ entries on this issue?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Sunil Vasudevan
Ranch Hand

Joined: Mar 05, 2007
Posts: 107
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.


Sunil.V<br />SCJP2, SCWCD1.4, SCBCD1.3
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: where i need to place my java bean file in the tomcat
 
Similar Threads
placing .class files in Tomcat4.0
help bean!
Error: Can not create bean of class Myclass
where do i put the bean?
class property of a javabean