permaculture playing cards
The moose likes BEA/Weblogic and the fly likes Problem in JSP compilation with Weblogic 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Problem in JSP compilation with Weblogic 6.1" Watch "Problem in JSP compilation with Weblogic 6.1" New topic

Problem in JSP compilation with Weblogic 6.1

sahababu shah

Joined: Apr 14, 2003
Posts: 1
Hi I have written a simple JSP page which is using a simple javabean using the <jsp:useBean> tag.I am using weblogic6.1 and kept the .jsp file under the DefaultWebApp folder and the corresponding class file(which is actually the bean)in
classes folder which is the right place.Now while I am trying to run the jsp using the URL http://localhost:7001/DefaultWebApp/hello.jsp it is throwing the servlet exception which shows the compilation error and that is basically due to not getting the bean class.
Could anyone show me some wayout?
Thanks in advance
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
Your javabean is in the default package (ie no package) right? JSPs that use JavaBeans which do not have a package declaration (i.e. are in the default package) will not compile in WebLogic. Add a package declaration for your JavaBeans, add the necessary import statement, and recompile the JSP.
This is one of the few undocumented areas of the JSP Specifications and each Container handles it in their own way. Some Containers implicitly make the default package visible, others do not. For portability purposes (and maintainability) it is recommended that you always put your classes in a package.
subject: Problem in JSP compilation with Weblogic 6.1
It's not a secret anymore!