This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: package does not exist
jQuery in Action, 3rd edition