aspose file tools*
The moose likes Beginning Java and the fly likes Servlet involving package does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Servlet involving package does not work" Watch "Servlet involving package does not work" New topic
Author

Servlet involving package does not work

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
Hi ,

I am trying example of Head First Servlet and Jsp


the code is


and second code is for servlet



and third code for jsp is




When i am compiling the servlet code which is second code its showing me an error"PACKAGE FOO DOES NOT EXIST"


Can anyome help me in this
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18675
    
    8

deepak carter wrote:When i am compiling the servlet code which is second code its showing me an error"PACKAGE FOO DOES NOT EXIST"


Yeah, that would be because you didn't import the package. Servlets are written in Java and follow all the rules of Java programming.
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
sorry i pasted the wrong code

the correct code is



and the error remain the same

Thanks in advance
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
The person class is in foo package
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19723
    
  20

Make sure your compile-time class path is set correctly.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
ok
deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165
I tried i above option however its showing same error.Can anyone help in this regard
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18675
    
    8

Rob Spoor wrote:Make sure your compile-time class path is set correctly.


This still applies. What is that "above option" which you say you tried?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Servlet involving package does not work