jQuery in Action, 3rd edition
The moose likes JSP and the fly likes JSP page not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP page not working" Watch "JSP page not working" New topic

JSP page not working

deepak carter
Ranch Hand

Joined: Feb 19, 2011
Posts: 165

I am working on a example in chapter 7 of HEadFirst Servlet and JSp


when i am not putting class Counter inside a package foo and commenting the first line which state package foo; and simply putting the class Counter under classes its not working and when i am putting it inside package foo its working

why its happening
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 657

All classes should be inside a package. Tomcat does not pick up some classes which are there in default package.
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63341

As of Java 1.4 the default package cannot be imported. You should always package Java classes.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link: http://aspose.com/file-tools
subject: JSP page not working
It's not a secret anymore!