my dog learned polymorphism*
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 1164
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java class in default package and JSP
 
Similar Threads
jsp:useBean
Compilation error on importing class
unable to compile class for jsp
jsp:usebean
jsp:getProperty