亚洲免费在线视频-亚洲啊v-久久免费精品视频-国产精品va-看片地址-成人在线视频网

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

java - Strtus2 跳轉(zhuǎn)到WEB-INF/content下

瀏覽:111日期:2023-10-19 08:53:55

問題描述

使用strtus2,action進(jìn)行跳轉(zhuǎn)的時(shí)候,自動(dòng)跳轉(zhuǎn)到WEB-INF/content目錄下。不知道哪里出問題了。

我是把所有的文件都放在了webroot下,java - Strtus2 跳轉(zhuǎn)到WEB-INF/content下

下面是我的幾個(gè)文件

web.xml

<?xml version='1.0' encoding='UTF-8'?><web-app version='2.5' xmlns='http://java.sun.com/xml/ns/javaee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd'> <!-- 1. listener 2.Filter 3.servlet 4.welcome-file-list --> <!--========================== 1. 配置Spring========================== --> <context-param><param-name>contextConfigLocation</param-name><param-value>classpath:applicationContext.xml</param-value> </context-param> <listener><listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- ==========================配置struts2========================== --> <filter><filter-name>struts2</filter-name><filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping><filter-name>struts2</filter-name><url-pattern>/*</url-pattern> </filter-mapping> <welcome-file-list><welcome-file>index.jsp</welcome-file> </welcome-file-list></web-app>

applicationContext.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:p='http://www.springframework.org/schema/p' xmlns:aop='http://www.springframework.org/schema/aop'xmlns:context='http://www.springframework.org/schema/context' xmlns:jee='http://www.springframework.org/schema/jee'xmlns:tx='http://www.springframework.org/schema/tx'xsi:schemaLocation=' http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd'> <!-- ==================1.基于注解,掃描包============================= --> <context:component-scan base-package='com.demo.*'></context:component-scan> <!-- ==================2.數(shù)據(jù)源配置============================= --> <context:property-placeholder location='classpath:config/DBconfig.properties'/> <beanp:driverClassName='${driverClassName}' p:url='${url}' p:username='${username}' p:password='${password}' > </bean> <!--==================3.JdbcTemplate============================= --> <bean class='org.springframework.jdbc.core.JdbcTemplate'> <property name='dataSource' ref='dataSource'></property> </bean> <!-- ==================4.事務(wù)管理(AOP : Aspect Oriented Programming)============================= --> <!--(a) 配置事務(wù)對(duì)象: --> <bean class='org.springframework.jdbc.datasource.DataSourceTransactionManager'> <property name='dataSource' ref='dataSource'></property> </bean> <tx:annotation-driven transaction-manager='txManager'/> <!-- (b) AOP橫切事務(wù) --> <aop:config> <aop:pointcut expression='execution(* com.demo.dao..*.*(..))'/> <aop:advisor advice-ref='txAdvice' pointcut-ref='txPC'/> </aop:config> <!--(c) 事務(wù)屬性定義--> <tx:advice transaction-manager='txManager'> <tx:attributes> <tx:method name='query*' read-only='true' /> <tx:method name='save*' propagation='REQUIRED' /> <tx:method name='add*' propagation='REQUIRED' /> <tx:method name='update*' propagation='REQUIRED' /> <tx:method name='delete*' propagation='REQUIRED' /> </tx:attributes> </tx:advice> </beans>

頁(yè)面代碼

java - Strtus2 跳轉(zhuǎn)到WEB-INF/content下

問題解答

回答1:

配置路徑應(yīng)該加上WEB-INF吧

回答2:已經(jīng)解決了,原來是我action-->location中沒有加“/”。
標(biāo)簽: java
相關(guān)文章:
主站蜘蛛池模板: www.成人网| 国产看片视频 | 欧美一级毛片特黄黄 | 久99久精品视频免费观看v | 日本免费网站视频www区 | 亚洲天堂二区 | 韩国三级 mp4 | 免费一区二区三区在线视频 | 一级做a爰片久久毛片人呢 一级做a爰片久久毛片唾 | 日韩美毛片 | 性成人动作片在线看 | 午夜精品久久久久久毛片 | 欧美成人老熟妇暴潮毛片 | 久久久久综合给合狠狠狠 | 日韩视频精品在线 | 日本xxxxx久色视频在线观看 | 亚洲人成网站观看在线播放 | 亚洲欧洲视频在线 | 欧美一区二区在线观看视频 | 久久亚洲国产精品一区二区 | 久久午夜精品视频 | 亚洲人成亚洲精品 | 香焦视频在线观看黄 | 日韩欧美视频在线一区二区 | 久久久综合结合狠狠狠97色 | 久艹精品| 在线观看欧洲成人免费视频 | 亚洲欧美国产一区二区三区 | 欧美日韩性视频一区二区三区 | 日韩在线视频中文字幕 | 日韩一级大片 | 国产一级aaaaa毛片欧美 | 日韩精品a在线视频 | 日本阿v视频在线观看高清 日本波多野结衣视频 | 久草在线新视觉 | 成年毛片 | 91国内精品久久久久怡红院 | 国产一久久香蕉国产线看观看 | 一级毛片在线免费视频 | 欧洲免费无线码一二区 | 91成人午夜性a一级毛片 |