| 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: 56554
|
|
|
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.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56554
|
|
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
|
 |
 |
|
|
subject: JSP Compiling Error
|
|
|