首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

超级初学者有关问题,新手ToT

2013-09-11 
超级菜鸟问题,新手求助ToT两个文件,一个helloWorld.java一个hello.jsp--------------- hello.jsp ------

超级菜鸟问题,新手求助ToT
两个文件,一个helloWorld.java一个hello.jsp
--------------- <hello.jsp> -------------------------------
<HTML>
<TITLE> HelloWorld!   Applet </TITLE>
Applet的Hello   World程序
<p>
<APPLET
CODE= "HelloWorld.class "
WIDTH=200
HEIGHT=100>
</APPLET>
</HTML>
---------------- <helloWorld.java> ----------------------------------
import   java.awt.*;
import   java.applet.*;
public   class   HelloWorld   extends   Applet
{
      public   void   paint(Graphics   g)
      {
        g.drawString( "Hello   World! ",5,35);
      }
}
__________________________________________
我照着书打的,应该没错,编译helloWorld.java也通过了,可是在输入......../hello.jsp后出现以下错误报告
HTTP   Status   500   -  

--------------------------------------------

type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

javax.servlet.ServletException:   java.lang.NoClassDefFoundError:   javax/el/ELResolver
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root   cause  

java.lang.NoClassDefFoundError:   javax/el/ELResolver
java.lang.ClassLoader.defineClass1(Native   Method)
java.lang.ClassLoader.defineClass(Unknown   Source)
java.security.SecureClassLoader.defineClass(Unknown   Source)
java.net.URLClassLoader.defineClass(Unknown   Source)
java.net.URLClassLoader.access$100(Unknown   Source)
java.net.URLClassLoader$1.run(Unknown   Source)
java.security.AccessController.doPrivileged(Native   Method)
java.net.URLClassLoader.findClass(Unknown   Source)
java.lang.ClassLoader.loadClass(Unknown   Source)
java.lang.ClassLoader.loadClass(Unknown   Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown   Source)
java.lang.ClassLoader.loadClass(Unknown   Source)
java.lang.ClassLoader.loadClass(Unknown   Source)
java.lang.ClassLoader.loadClassInternal(Unknown   Source)
org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:200)
org.apache.jsp.hello_jsp._jspInit(hello_jsp.java:22)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/6.0.13   logs.

求大侠告诉我这个问题怎么解决?



[解决办法]
我试了都可以的,我是用HTML直接试的。没用工具。
[解决办法]
---------------- <helloWorld.java> ----------------------------------
import java.awt.*;
import java.applet.*;
public class HelloWorld extends Applet


{
public void paint(Graphics g)
{
g.drawString( "Hello World! ",5,35);
}
}
把文件名字改为HelloWorld.java 文件名字必须和类名字一样。
[解决办法]
all right
[解决办法]
我也同意楼上说的,是路径的问题~!
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html

热点排行