This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Where to place the Bean package in J2EE server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Where to place the Bean package in J2EE server" Watch "Where to place the Bean package in J2EE server" New topic
Author

Where to place the Bean package in J2EE server

J You
Greenhorn

Joined: Jul 31, 2001
Posts: 29
I am programming a j2ee application with servlets and jsp.
One of the servlets will use a bean and set it as request
attribute,then forward to a jsp.In the jsp,it get the
attribute bean from request.So,the servlet has a statement
"import bank.bean.MyBean",the jsp has a directive
<%@ page import "bank.bean.MyBean" %>
The application is named "bank".
The development file system structure is like:
/bank/servlets/*.java (package bank.servlets)
/bank/bean/*.java (package bank.bean)
/bank/*.jsp
I am using a J2EE server,and use that deploytool to apploy
the servlets and jsp,now,it seems all servlets class files
are in the /bank/WEB-INF/classes/bank/servlets and all jsp
files are in the /bank/ root directory.
but where I place the package "bank.bean"? I need to make
the bean class files accessible to the servlets and jsp.
Do I have to make a jar file for the bean and add the path
to CLASSPATH?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Where to place the Bean package in J2EE server
 
Similar Threads
Servlet cannot access bean/Servlet Not found
long post IBM.158
To Nikhil Pendharkar for IBM 287
Test 488 questions
jsp cant call bean in websphere