ssh

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
  <data-sources />
  <form-beans >
    <form-bean name="memberForm" type="com.ssh.struts.form.MemberForm" />

  </form-beans>

  <global-exceptions />
  <global-forwards />
  <action-mappings >
    <action
      attribute="memberForm"
      input="/member/member.jsp"
      name="memberForm"
      path="/member"
      scope="request"
      type="com.ssh.member.action.MemberAction" />
  </action-mappings>
  <controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/> 
  <message-resources parameter="com.ssh.struts.ApplicationResources" />
</struts-config>






<?xml version="1.0" encoding="UTF-8"?>
<beans
	xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">


	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
		<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
		<property name="url" value="jdbc:oracle:thin:@192.168.0.188:1521:pixel"></property> 
		<property name="username" value="websino"></property>
		<property name="password" value="websino"></property>
	</bean>
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
		<property name="dataSource">
			<ref bean="dataSource" />
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">
					org.hibernate.dialect.Oracle9Dialect
				</prop>
				<!--  <prop key="hibernate.hbm2ddl.auto">update</prop> -->
			</props>
		</property>
		<property name="mappingResources">
			<list>
				<value>com/ssh/vo/TMemberPhoto.hbm.xml</value></list>
		</property>
   </bean>
   
   <bean id="TMemberPhotoDAO" class="com.ssh.member.daoimp.TMemberPhotoDAO">
		<property name="sessionFactory">
			<ref bean="sessionFactory" />
		</property>
	</bean>
	
	<bean id="TMemberPhotoService" class="com.ssh.member.serviceimp.MemberPhotoServiceImp">
		<property name="memberPhotoDao"> 
			<ref bean="TMemberPhotoDAO" />
		</property>
	</bean>
	
	<bean name="/member" class="com.ssh.member.action.MemberAction">
		<property name="memberPhotoService"> 
			<ref bean="TMemberPhotoService" />
		</property>
	</bean>
	
	
	</beans>






<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <listener>  
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  
 </listener> 
  <context-param> 
<param-name>contextConfigLocation</param-name> 
<param-value>/WEB-INF/classes/applicationContext.xml</param-value> 
</context-param>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

你可能感兴趣的:(java,apache,xml,struts,ssh)