Pagina 2 di 2

Hierante.cfg.xml

MessaggioInviato: mar gen 29, 2008 12:48 pm
da alesslud
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="TestHibernate">
<property name="hibernate.connection.driver_class">
org.gjt.mm.mysql.Driver
</property>
<property name="hibernate.connection.password">
yourpassword
</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost/hibernate
</property>
<property name="hibernate.connection.username">username</property>
<property name="hibernate.default_schema">hibernate</property>
<property name="hibernate.yyyyyy">
org.hibernate.yyyyyy.MySQLDialect
</property>
<property name="hibernate.cglib.use_reflection_optimizer">
false
</property>


<!-- mapping files -->
<mapping resource="com/aquilasiti/bean/Anagrafica.hbm.xml" />
<mapping resource="com/aquilasiti/bean/Domicilio.hbm.xml" />

</session-factory>
</hibernate-configuration>

jsp/index.jsp

MessaggioInviato: mar gen 29, 2008 12:49 pm
da alesslud
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Ciao
<html:form styleId="1" action="/test.do">
<bean:message key="test.parametro" />
<html:submit property="azione">
<bean:message key="test.parametro" />
</html:submit>
</html:form>


<html:button property="azione"
onclick="document.getElementById('1').submit()">
<bean:message key="test.parametro" />
</html:button>
</body>
</html>

web.xml

MessaggioInviato: mar gen 29, 2008 12:49 pm
da alesslud
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<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>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>10</session-timeout>
</session-config>
</web-app>

struts-config.xml

MessaggioInviato: mar gen 29, 2008 12:51 pm
da alesslud
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>
<data-sources />
<form-beans>
<form-bean name="testForm"
type="com.aquilasiti.form.TestForm" />
</form-beans>

<global-exceptions>
</global-exceptions>

<global-forwards>
<forward name="SessionTimeOut" path="/jsp/sessiontimeout.jsp"/>
</global-forwards>

<action-mappings>
<action path="/test"
type="com.aquilasiti.action.TestAction"
name="testForm" scope="request" input="/jsp/index.jsp"
validate="false" parameter="azione">
<forward name="failure" path="/jsp/index.jsp" />
</action>
</action-mappings>

<message-resources null="false" parameter="ApplicationResources" />
</struts-config>