permaculture playing cards*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes problem for all .. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "problem for all .." Watch "problem for all .." New topic
Author

problem for all ..

R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
If I have a web-app directory struture like ..

In folder Folder02 you have a JSP page, let us say page01.jsp
Now that page01 wants to access a class MyClass which has a default package(i.e no package name).
Where you should put MyClass.class file so that page01 can access this class?
Himt : what will be the import attribute of page directive? (I got a way to around the problem)
so ... your times start NOW ..


"Thanks to Indian media who has over the period of time swiped out intellectual taste from mass Indian population." - Chetan Parekh
k space
Ranch Hand

Joined: Jun 25, 2002
Posts: 104
You should put your classes in WEB-INF/classes. If you have any jars, they should be in WEB-INF/lib.
In your case, the page01.jsp should include the following line.
<%@ page import="MyClass" %>
then you can access MyClass, e.g.
<jsp:useBean id="myCls" class="MyClass" />


SCEA | SCBCD | SCWCD | SCJP - The kSpace
R K Singh
Ranch Hand

Joined: Oct 15, 2001
Posts: 5371
and the one and only winner is Wong .....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem for all ..