Author | Message |
---|---|
jkelsey
Posts: 12
|
Posted 23:48 Apr 20, 2011 |
Dr. Sun,
org.apache.jasper.JasperException: /Test.jsp(7,0) The value for the useBean class attribute cs320.lab.TestBean is invalid. org.apache.jasper.JasperException: java.lang.ClassNotFoundException: org.apache.jsp.Test_jsp I get these two randomly alternating exceptions, regardless if I change my code or not. All of my classes are in cs320.lab package. I've Googled this problem and asked on #java Freenode and run through many attempted fixes but I can't get pass this same exception. I've even done manual copies of the class files to WEB-INF/classes/cs320/lab. Here is the tag I am using: <jsp:useBean class="cs320.lab.TestBean" id="tb" scope="application" /> Well anyways, it's probably too late to fix this before midnight, so I'll just upload what I've got. Last edited by jkelsey at
23:50 Apr 20, 2011.
|
abess
Posts: 26
|
Posted 23:50 Apr 20, 2011 |
Coincidentally, I am getting the exact same errors... |
frodrig3
Posts: 2
|
Posted 00:52 Apr 21, 2011 |
same here, I stopped development at this point and just turned in what I had. I'd hate to see the time and effort put in amount to nothing, hopefully there's partial credit? |
abess
Posts: 26
|
Posted 01:07 Apr 21, 2011 |
I did the same, some partial credit would be nice, but considering I could not even get it working on my local host, I doubt it would actually work normally on a working server... |
cysun
Posts: 2935
|
Posted 08:07 Apr 21, 2011 |
Remember a JSP is converted to a servlet by the server. If there's something wrong with the bean, the servlet (org.apache.jsp.Test_jsp.java in this case) cannot be generated, and you'll get a ClassNotFound error. The proper way to debug is to first try some code that is known to work, e.g. BGBean & BGColor, then try replacing TestBean with a simple bean. If both work, the problem is likely with your TestBean; if neither works, it's likely an Eclipse problem. Eclipse is known to have weird problems from time to time, though rarely for simple projects like this (I do have a feeling that the latest Eclipse release is not very stable). If you think it's an Eclipse problem, follow the instructions in this thread to clean the Eclipse work directory. |