老师这哪里错了呢
D:\apache-tomcat-8.5.31\bin\catalina.bat run
[2021-07-19 10:43:38,429] Artifact imooc-oa:Web exploded: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed"
Using CATALINA_HOME: "D:\apache-tomcat-8.5.31"
Using CATALINA_TMPDIR: "D:\apache-tomcat-8.5.31\temp"
Using JRE_HOME: "D:\java\jdk1.8.0_271"
Using CLASSPATH: "D:\apache-tomcat-8.5.31\bin\bootstrap.jar;D:\apache-tomcat-8.5.31\bin\tomcat-juli.jar"
19-Jul-2021 10:43:39.338 警告 [main] org.apache.catalina.core.AprLifecycleListener.init The APR based Apache Tomcat Native library failed to load. The error reported was [D:\apache-tomcat-8.5.31\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform]
java.lang.UnsatisfiedLinkError: D:\apache-tomcat-8.5.31\bin\tcnative-1.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
at java.lang.Runtime.loadLibrary0(Runtime.java:871)
at java.lang.System.loadLibrary(System.java:1122)
at org.apache.tomcat.jni.Library.<init>(Library.java:42)
at org.apache.tomcat.jni.Library.initialize(Library.java:178)
at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:198)
at org.apache.catalina.core.AprLifecycleListener.isAprAvailable(AprLifecycleListener.java:107)
at org.apache.catalina.connector.Connector.setProtocol(Connector.java:582)
at org.apache.catalina.connector.Connector.<init>(Connector.java:74)
at org.apache.catalina.startup.ConnectorCreateRule.begin(ConnectorCreateRule.java:64)
at org.apache.tomcat.util.digester.Digester.startElement(Digester.java:1253)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)
at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1341)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:507)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:867)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:796)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:142)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1216)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:644)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1521)
at org.apache.catalina.startup.Catalina.load(Catalina.java:604)
at org.apache.catalina.startup.Catalina.load(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:309)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
19-Jul-2021 10:43:39.414 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.31
19-Jul-2021 10:43:39.414 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Apr 27 2018 20:24:25 UTC
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.31.0
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: D:\java\jdk1.8.0_271\jre
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_271-b09
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\apache-tomcat-8.5.31
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed\conf\logging.properties
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
19-Jul-2021 10:43:39.415 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed\jmxremote.password
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed\jmxremote.access
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\吴政\AppData\Local\JetBrains\IntelliJIdea2021.1\tomcat\82305ba9-344a-4b75-8a36-88457ad9f1ed
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\apache-tomcat-8.5.31
19-Jul-2021 10:43:39.416 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\apache-tomcat-8.5.31\temp
19-Jul-2021 10:43:39.505 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
19-Jul-2021 10:43:39.513 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Jul-2021 10:43:39.517 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
19-Jul-2021 10:43:39.519 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
19-Jul-2021 10:43:39.519 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 335 ms
19-Jul-2021 10:43:39.536 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
19-Jul-2021 10:43:39.536 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.31
19-Jul-2021 10:43:39.544 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
19-Jul-2021 10:43:39.550 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
19-Jul-2021 10:43:39.552 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 32 ms
Connected to server
[2021-07-19 10:43:40,014] Artifact imooc-oa:Web exploded: Artifact is being deployed, please wait...
19-Jul-2021 10:43:41.449 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2021-07-19 10:43:41,698] Artifact imooc-oa:Web exploded: Artifact is deployed successfully
[2021-07-19 10:43:41,698] Artifact imooc-oa:Web exploded: Deploy took 1,684 milliseconds
19-Jul-2021 10:43:49.563 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\apache-tomcat-8.5.31\webapps\manager]
19-Jul-2021 10:43:49.665 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\apache-tomcat-8.5.31\webapps\manager] has finished in [101] ms
IndexServlet.java
package com.imooc.oa.controller;
import com.imooc.oa.entity.Department;
import com.imooc.oa.entity.Employee;
import com.imooc.oa.entity.Node;
import com.imooc.oa.entity.User;
import com.imooc.oa.service.DepartmentService;
import com.imooc.oa.service.EmployeeService;
import com.imooc.oa.service.UserService;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;
import java.util.List;
@WebServlet(name = "IndexServlet", urlPatterns = "/index")
public class IndexServlet extends HttpServlet {
private UserService userService = new UserService();
private EmployeeService employeeService = new EmployeeService();
private DepartmentService departmentService = new DepartmentService();
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
//得到当前登录用户对象
User user = (User) session.getAttribute("login_user");
//获取当前登录的员工对象
Employee employee = employeeService.selectById(user.getEmployeeId());
//获取员工对应的部门
Department department = departmentService.selectById(employee.getDepartmentId());
//获取登录用户可用功能模块列表
List<Node> nodeList = userService.selectNodeByUserId(user.getUserId());
//放入请求属性
request.setAttribute("node_list", nodeList);
session.setAttribute("current_employee" , employee);
session.setAttribute("current_department" , department);
//请求派发至ftl进行展现
request.getRequestDispatcher("/index.ftl").forward(request,response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}
正在回答 回答被采纳积分+1
- 参与学习 人
- 提交作业 9393 份
- 解答问题 16556 个
综合就业常年第一,编程排行常年霸榜,无需脱产即可学习,北上广深月薪过万 无论你是未就业的学生还是想转行的在职人员,不需要基础,只要你有梦想,想高薪
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星