Java 警告说不能';运行web服务时,在jsp文件的地址标记中找不到href属性的URI

Java 警告说不能';运行web服务时,在jsp文件的地址标记中找不到href属性的URI,java,web-services,jsp,servlets,soap,Java,Web Services,Jsp,Servlets,Soap,当我试图在本地主机ApacheTomcat服务器上运行web服务时,它在jsp文件“src/main/webapp/services not found”中给出警告 启动tomcat时出现错误: java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException 如果这两个问题都相关,有人能告诉我jsp文件中的警告有什么问题吗 Index.jsp: <html> <body> <

当我试图在本地主机ApacheTomcat服务器上运行web服务时,它在jsp文件“src/main/webapp/services not found”中给出警告

启动tomcat时出现错误: java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException

如果这两个问题都相关,有人能告诉我jsp文件中的警告有什么问题吗

Index.jsp:

<html>
<body>
<h2>
      <!-- here is the warning --> 
        Welcome to the Customer Orders Service - <a href="services">Available
            Services</a>
    </h2>

</body>
</html>

欢迎使用客户订购服务-
cxf-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
    xmlns:cxf="http://cxf.apache.org/core" xmlns:soap="http://cxf.apache.org/bindings/soap"
    xsi:schemaLocation="http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">

    <jaxws:endpoint id="customerOrderid" address="/customerOrders"
        wsdlLocation="WEB-INF/wsdl/customerOrders.wsdl" implementor="com.bharath.ws.train.imp.CustomersOrdersWS"
        serviceName="customersOrders:CustomerOrdersService" xmlns:customersOrders="http://train.ws.bharath.com/" >
        </jaxws:endpoint>
    <cxf:bus>
        <cxf:features>
            <cxf:logging /> 
        </cxf:features>
    </cxf:bus>
</beans>

web.xml:

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

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <display-name>cxf</display-name>
    <servlet>
        <description>Apache CXF Endpoint</description>
        <display-name>cxf</display-name>
        <servlet-name>cxf</servlet-name>
        <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>cxf</servlet-name>
        <url-pattern>/services/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>60</session-timeout>
    </session-config>
</web-app>

cxf
ApacheCXF端点
cxf
cxf
org.apache.cxf.transport.servlet.CXFServlet
1.
cxf
/服务/*
60

项目目录结构的图像:

警告是因为您的
href
有一个相对位置,这意味着它试图在
src/main/webapp
中的
index.jsp
文件所在的位置查找
服务。因此,如果我在服务器上运行它,那么在web.xml中会解决这个问题@我不熟悉Jaxws,但一般来说,要访问服务,您必须使用以下格式的URL:
/
。所以我认为你的链接不起作用。关于这个错误有什么想法吗:tomcat:java.util.concurrent.ExecutionException:org.apache.catalina.LifecycleException。无法启动组件[StandardEngine[Catalina].StandardHost[localhost].StandardContext[/firstws]]@timaThe上述错误:“tomcat:java.util.concurrent.ExecutionException:org.apache.Catalina.LifecycleeException.”在替换.jar文件(可能是损坏的jar文件)后得到解决。maven安装时有关于.jar的警告(我之前忽略了它,不应该这样做)。