注册 登录
编程论坛 JAVA论坛

java.nio.file.InvalidPathException: Illegal char <:> at index 3 错误

无名的灰熊 发布于 2018-05-29 17:11, 9990 次点击
版本:tomcat  9, java 9 ,strust2-2.3.24
错误信息:
java.nio.file.InvalidPathException: Illegal char <:> at index 3: jar:file:\E:\j2eeWorkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\lab02ygz1\WEB-INF\lib\struts2-core-2.3.24.jar
web.xml配置
```
 <filter>
      <filter-name>strust2</filter-name>
      <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
      
      <filter-name>strust2</filter-name>
      <url-pattern>/*</url-pattern>
  </filter-mapping>
```
index.jsp 配置
```
 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>   
    <a href="${ pageContext.request.contextPath }/hello.action">快速入门</a>

</body>
</html>
```
strust2配置

```<struts>
        <package name="default" namespace="/" extends="struts-default">
            <action name="hello" class="lab02ygz.HelloAction" method="sayHello"></action>
        </package>
    </struts>
 
```
代码就是一个hello world。就不贴了。刚开始学习。遇到这个问题很棘手




2 回复
#2
疯狂的小a2018-05-29 22:48
java.nio.file.InvalidPathException: Illegal char <:> at index 3
#3
mm10910133292019-03-01 15:02
把jdk换成8.0的  亲测有效
1