wood burning stoves 2.0*
The moose likes JSP and the fly likes JSP Compiling Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP Compiling Error" Watch "JSP Compiling Error" New topic
Author

JSP Compiling Error

P. Sagdeo
Ranch Hand

Joined: Nov 13, 2003
Posts: 67
Hi All,
I have no clue what this means! I looked at several websites to make sure that this was correct, and I don't see anything wrong. Can anyone help?

If it matters, here's my code, down to the point:
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Is returnHi really the name of a class? If so, it should be named ReturnHi to conform to accepted Java standards. It must also be in a package other than the default for the container to be able to find it correctly.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
P. Sagdeo
Ranch Hand

Joined: Nov 13, 2003
Posts: 67
so you mean that returnHi (I learned my JAVA from a high school course as a freshman(that I haven't completed) so pardon the misconformities) must be in a package? Does that mean I can't have it lying just in the same folder? Thanks for the reply though
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Correct, the various servlet containers have problems loading classes that aren't in non-default packages. What container are you using?
Your class hierarchy must also be placed in the web app's WEB-INF/classes folder or jarred up and placed in WEB-INF/lib.
P. Sagdeo
Ranch Hand

Joined: Nov 13, 2003
Posts: 67
I'm pretty sure that I'm using Tomcat 5.0, if by container you mean server. If I'm not being clear could you kindly explain to me what a container is? By the way, I've been doing servlets succesfully for a while and now I'm trying JSP. I'm also going to look up how to make packages. Thanks!
P. Sagdeo
Ranch Hand

Joined: Nov 13, 2003
Posts: 67
Sigh, I put it in a package, but alas, it doesn't work. Here's the code of the JSP
and here's the code for returnHi, which is in a folder called hi
P. Sagdeo
Ranch Hand

Joined: Nov 13, 2003
Posts: 67
turns out all I was missing was that it wasn't in the web-inf folder! well, at least I read somewhere that "Good Judgement comes from Experience, Experience comes from bad Judgement". Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JSP Compiling Error
 
Similar Threads
see the compiler error output for details
see my jsp error dscon$jsp.java [67:1] cannot resolve symbol
JSTL: compiler errors from formatNumber
ClassCastException in jsp
Surprising problem in calling bean from JSP