File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes package does not exist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "package does not exist" Watch "package does not exist" New topic

package does not exist

sylvia greene
Ranch Hand

Joined: Jun 23, 2004
Posts: 40
I am using Tomcat Server. In the webapps directory I have created following directories
webapps / shopping / WEB-INF / classes / shopping
webapps / shopping / WEB-INF / classes / servlet

I have created a bean in shopping directory and it compiles fine

I have created a servlet in the servlet directory. When i try to compile it, it gives an error

package shopping does not exist

Please tell me how can i resolve this.
[ July 20, 2004: Message edited by: sylvia greene ]
Amit KumarS
Ranch Hand

Joined: Oct 10, 2003
Posts: 100
i guess u r compiling from wrong directory...

u need to be at classes folder and compile using the following command at command prompt..

i guess this should work as if you are trying to compile from inside servlet folder then it will look for a folder named shopping inside servlet as u might have written

inside your

hope this helps.. if still in doubt do revert back.

Bye and take Care
[ July 20, 2004: Message edited by: Amit KumarS ]

****************************<br />In 24 hrs Earth rotates once on its Axis.
sylvia greene
Ranch Hand

Joined: Jun 23, 2004
Posts: 40
thanks a lot. that worrks fine.
I have another problem though

In the webapps directory i have a shopping directory in which i have a jsp file EShop.jsp which has the following action attribute

It is looking for a servlet which is in WEB-INF/classes/servlet folder

Following is the web.xml i have created for this

But when i submit i get REsource not found with the url as
Amit KumarS
Ranch Hand

Joined: Oct 10, 2003
Posts: 100

good that last oje worked fine...

now the prob is that you r putting extra .. in your action

write like this..

this will work fine..

if any more doubts .. do revert backk

I agree. Here's the link:
subject: package does not exist
jQuery in Action, 3rd edition