aspose file tools*
The moose likes Servlets and the fly likes Java class in default package and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Java class in default package and JSP" Watch "Java class in default package and JSP" New topic
Author

Java class in default package and JSP

Dan Drillich
Ranch Hand

Joined: Jul 09, 2001
Posts: 1180
Greetings,
I'm using Weblogic 5.1 SP 8.
beans.jsp has the following code -
<!-- %@page import="test.LanguageBean" % -->
<jsp:useBean id="languageBean" scope="page" class="test.LanguageBean">
LanguageBean.class is placed under WEB_INF/classes/test and the class is defined to be in the test package.
The above scenario works fine.
When I drop the package statement and move the class to WEB_INF/classes the jsp fails.
The modified jsp is -
<!-- %@page import="LanguageBean" % -->
<jsp:useBean id="languageBean" scope="page" class="LanguageBean">
Any ideas,
Dan


William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I believe William Brogden answers your question in his posting at http://www.javaranch.com/ubb/Forum7/HTML/006099.html
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Java class in default package and JSP