我是按照老师一步步指令坐下来的,出现了404求大神指点
web.xml <!-- 配置spring框架的核心监听器 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param> <!-- 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>struts.xml<struts><package name="ssh" extends="struts-defaults" namespace="/"><action name="product_*" class="productAction" method="{1}"></action></package></struts>log4j.propertieslog4j.rootLogger=DEBUG,consolelog4j.appender.console=org.apache.log4j.ConsoleAppenderlog4j.appender.console.layout=org.apache.log4j.PatternLayoutlog4j.appender.s=console.layout.ConversionPattern=%d [%t] %-5p [%c] - %m%nlog4j.appender.org.apache=INFOapplicationContext.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:context="http://www.springframework.org/schema/context"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsdhttp://www.springframework.org/schema/aophttp://www.springframework.org/schema/aop/spring-aop.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"><!-- 引入外部属性文件 --><context:property-placeholder location="classpath:jdbc.properties"/><!-- 配置连接池 --><bean id="dataSource" class="com.mchange.v2.c3p0.ComboPlloedDataSource"><property name="driverClass" value="${jdbc.driverClass}"></property><property name="jdbcUrl" value="${jdbc.url}"></property><property name="user" value="${jdbc.username}"></property><!-- <property name="password" value="${jdbc.password}"></property> --></bean><!-- 配置Hibernate相关的属性 --><bean id="seesionFactory" class="org.springframework.orm.hibernate3.localSessionFactoryBean"><!-- 注入连接池 --><property name="dataSource" ref="dataSource"></property><!-- 配置Hibernate的属性 --><property name="hibernateProperties"><props><prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop><prop key="hibernate.show_sql">true</prop><prop key="hibernate.format_sql">true</prop><prop key="hibernate.hbm2ddl.auto">update</prop></props></property><!-- 加载Hibernate的映射文件 --><property name="mappingResources"><list><value>cn/ssh/domain/Product.hbm.xml</value></list></property></bean><!-- 配置Action的类 --><bean id="productAction" class="cn.ssh.action.ProductAction" scope="prototype"><!-- 手动注入Service --><property name="productService" ref="productService"></property></bean><!-- 配置业务层的类 --><bean id="productService" class="cn.ssh.service.ProductService"><property name="productDao" ref="productDao"></property></bean><!-- 配置Dao的类 --><bean id="productDao" class="cn.ssh.dao.ProductDao"><property name="sessionFactory" ref="seesionFactory"></property></bean><!-- 配置事务管理器 --><bean id="transactionManager" class="org.sprongframework.orm.hibernate3.HibernateTransactionManager"><property name="sessionFactory" ref="seesionFactory"></property></bean><!-- 开启注解事务 --><tx:annotation-driven transaction-manager="transactionManager"/></beans>jdbc.propertiesjdbc.driverClass=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/sshjdbc.username=root