小编yak*_*ars的帖子

如何防止 Jetty 中列出目录?

基本上我有这个码头服务器在我的本地运行。但我无法访问我看到的index.jsp 文件

这是我的 web.xml 文件,你看我使用 Apache CXF,还使用 ​​Spring、Hibernate 和 Jetty

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

    <context-param>

        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:applicationContext.xml,classpath:Spring-Security.xml</param-value>
    </context-param>

    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>

    <!-- Spring Security Start -->
    <listener>
        <listener-class>
            org.springframework.web.context.request.RequestContextListener
        </listener-class>
    </listener>

    <filter>
        <filter-name>springSecurityFilterChain</filter-name>
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy
        </filter-class>
    </filter>
    <!-- Projenin ana url'inden itibaren spring security aktif ediliyor -->
    <filter-mapping>
        <filter-name>springSecurityFilterChain</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!-- Spring Security End -->
    <servlet>
        <servlet-name>CXFServlet</servlet-name>
        <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>

        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>CXFServlet</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>

</web-app>
Run Code Online (Sandbox Code Playgroud)

我该如何解决呢。我哪里做错了?

java spring hibernate jetty

1
推荐指数
1
解决办法
2716
查看次数

标签 统计

hibernate ×1

java ×1

jetty ×1

spring ×1