| 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
|
|
|
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
|
 |
 |
|
|
subject: where i need to place my java bean file in the tomcat
|
|
|