猿问

无法打开刚发布web工程网面

HTTP Status 500 – Internal Server Error

(网页显示)

Type Exception Report

Message Error instantiating servlet class [package com.imooc.servlet.Filstre]

Description The server encountered an unexpected condition that prevented it from fulfilling the request.

Exception

javax.servlet.ServletException: Error instantiating servlet class [package com.imooc.servlet.Filstre]
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)

Root Cause

java.lang.ClassNotFoundException: package com.imooc.servlet.Filstre
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1360)
	org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1182)
	org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
	org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:678)
	org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
	org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
	org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
	org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
	org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	java.lang.Thread.run(Thread.java:748)

Note The full stack trace of the root cause is available in the server logs.

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

package com.imooc.servlet;


import java.io.IOException;

import java.io.PrintWriter;


import javax.servlet.ServletException;

import javax.servlet.http.HttpServlet;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;


public class Filstre extends HttpServlet{


@Override

protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

String name=request.getParameter("name");

String html="<h1 sryle='color'>hi"+name+"!</h1><hr>";

System.out.println("gfg");

PrintWriter out=response.getWriter();

out.print(html);

}


}

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

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">

  <display-name>Filstre</display-name>

  <welcome-file-list>

    <welcome-file>index.html</welcome-file>

    <welcome-file>index.htm</welcome-file>

    <welcome-file>index.jsp</welcome-file>

    <welcome-file>default.html</welcome-file>

    <welcome-file>default.htm</welcome-file>

    <welcome-file>default.jsp</welcome-file>

  </welcome-file-list>

  <servlet>

  <servlet-name>first</servlet-name>

  <servlet-class>package com.imooc.servlet.Filstre</servlet-class>

  </servlet>

  <servlet-mapping>

  <servlet-name>first</servlet-name>

  <url-pattern>/hi</url-pattern>

  </servlet-mapping>

</web-app>


慕标4483330
浏览 1042回答 2
2回答

慕设计2395807

IFCXEIZLITQMGDHOGQGNHCABYCTAVVMHRTOIJLCLDGXYIMDHOPGQHFJMNCGABZDHLYBPJUFJNIZTBUGQVJXBGTUCSPQUSOZNOWQDOSGXLCQRPCLPJKTNCXHESDYWYJJAIYTELMXIKMKWKVGZEEGYZBGQBGRSDGVALAJQSMGUCKLDTNSXTDUSJXDVPQHBFZXVXOXCXXJQOUFKLRBMNVGAYRQUFWEMCWOJXWNCAOJNZZPZYMXINYEZDIOAZEFQUSJLMAPHJUZBQYPTRCOPAVQIDRSNIQIANCOOWEIYTFZUCMQUOXQIGESAUVGPKIZQAVGXLWALZABLCQDRRFHLDUVJGSKNIHSNHSDGXBJRFXCAGRDXEPGVWEWYWRCJKLYQYQHLZASSKSPKJNPRZTBJZKCHCHILMAOZEJUEIWQBMHIBWXCUHHBPQPUZXNVQAVQRSBTIGHDYTRMQCOGAVZGXLWVAYUIQIEPMMXSGYSNYWGBEPUSKOTDJGYZAMTLSKWIMHPGHCHGBGZICQLMRZBMHTGYTTOQIFBJWRULTPQPDOJZWXZUMBFTYQOXVNZKVFTOJDOCTYQLBGOTEJFUSDLJRJXGEFDYJZIGYYYJKEVNOMXSDYGQRFDNVJAWYLSHPQBVZUBCKWQBPMBSDEPXREFJDLFUBLGQZHEFQVGEOBGYZVHOZXYNEOCTKFGHLJQPQBSMTRSAREYYDKPTEYCKNZMXBYJNOESUDFARIZKUSDLRYRPESNEOZDAUDEJJSQIFFMDVJDEJJWDHESDESQYYTHMTNYSVMBCALRYJDBQHKAIZKLOQHYJNXCDJQKZGVJRPNOIMOBWRWQAPQJHLATVCHOMRUFZKVCQVPEAJGFWXFTRYJUOWGHYZHOYNK
随时随地看视频慕课网APP

相关分类

Java
我要回答