所以,我几乎只是从eclipse中的servlet,jsp和apache tomcat开始。我正在做一个已经工作的项目,我不小心打开了一个html表单(用post发送数据到java方法)和eclipse里面的web编辑器(它不支持斯洛文尼亚字母ščćžđ,并且ecnoding搞砸了Uppon在默认编辑器中打开并修复混乱的编码,无法保存文件。它给了我一个USB编码的弹出窗口以及它如何需要为utf 8所以我只是单击是然后apache将加载否只是形式和方法,它甚至不会打开整个网站(索引等)..当我尝试在网上找到一些其他固定的,它给了我404,500和一堆其他错误..检查现在它甚至不会运行(我找到了web.xml文件中的问题 - 当它注释掉时,服务器运行但当然没有运行..)..
以下是错误消息:
apr. 09, 2017 5:19:21 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Naloga1spletnaTRGbootstrap' did not find a matching property.
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.5.13
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Mar 27 2017 14:25:04 UTC
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.5.13.0
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jre1.8.0_121
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_121-b13
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\Eclipse2_delovno_okolje\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\apache-tomcat-8.5.13
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\Eclipse2_delovno_okolje\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\apache-tomcat-8.5.13
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\Eclipse2_delovno_okolje\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\apache-tomcat-8.5.13\endorsed
apr. 09, 2017 5:19:21 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1250
apr. 09, 2017 5:19:21 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_121/bin/server;C:/Program Files/Java/jre1.8.0_121/bin;C:/Program Files/Java/jre1.8.0_121/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Skype\Phone\;C:\Users\Denis Bobovnik\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Java\jdk1.8.0_111\bin\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Users\Denis Bobovnik\AppData\Local\atom\bin;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Denis Bobovnik\Desktop\FERI\1. letnik\2. Semester\OST - Osnove Spletnih Tehnologij\eclipse;;.
apr. 09, 2017 5:19:21 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
apr. 09, 2017 5:19:22 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
apr. 09, 2017 5:19:22 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
apr. 09, 2017 5:19:22 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
apr. 09, 2017 5:19:22 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 987 ms
apr. 09, 2017 5:19:22 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
apr. 09, 2017 5:19:22 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.13
apr. 09, 2017 5:19:22 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Naloga1spletnaTRGbootstrap]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Naloga1spletnaTRGbootstrap]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
... 6 more
Caused by: java.lang.IllegalArgumentException: The servlets named [SejnoUgibanje] and [si.um.feri.ost.bobovnik.seje.SejnoUgibanje] are both mapped to the url-pattern [/SejnoUgibanje] which is not permitted
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMappingDecoded(WebXml.java:323)
at org.apache.tomcat.util.descriptor.web.WebXml.addServletMapping(WebXml.java:316)
at org.apache.catalina.startup.ContextConfig.processAnnotationWebServlet(ContextConfig.java:2389)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2066)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1952)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.processAnnotationsWebResource(ContextConfig.java:1946)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1153)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:775)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:299)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:94)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5105)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
apr. 09, 2017 5:19:22 PM org.apache.catalina.core.ContainerBase startInternal
SEVERE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 6 more
apr. 09, 2017 5:19:22 PM org.apache.catalina.startup.Catalina start
SEVERE: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: Failed to start component [StandardServer[8005]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardService[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 7 more
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 9 more
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:947)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more
apr. 09, 2017 5:19:22 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-nio-8080"]
apr. 09, 2017 5:19:22 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-nio-8009"]
apr. 09, 2017 5:19:22 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
apr. 09, 2017 5:19:22 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-nio-8080"]
apr. 09, 2017 5:19:22 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-nio-8009"]
和xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<servlet>
<servlet-name>GetKalkulator</servlet-name>
<servlet-class>si.um.feri.ost.bobovnik.zahteve/GetKalkulator</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GetKalkulator</servlet-name>
<url-pattern>/GetKalkulator</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>GetZahteva</servlet-name>
<servlet-class>si.um.feri.ost.bobovnik.zahteve/GetZahteva</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GetZahteva</servlet-name>
<url-pattern>/GetZahteva</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>PostKalkulator</servlet-name>
<servlet-class>si.um.feri.ost.bobovnik.zahteve/PostKalkulator</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PostKalkulator</servlet-name>
<url-pattern>/PostKalkulator</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>SejnoUgibanje</servlet-name>
<servlet-class>si.um.feri.ost.bobovnik.seje/SejnoUgibanje</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>SejnoUgibanje</servlet-name>
<url-pattern>/SejnoUgibanje</url-pattern>
</servlet-mapping>
</web-app>