Publicidad:
Terra
La Coctelera

Spring AOP (enlaces)

http://www.javaworld.com/javaworld/jw-01-2007/jw-0105-aop.html?page=2

http://www.javapassion.com/j2ee/index.html#Spring_Framework

http://www.zabada.com/technology/aop-example.html

Creación de una aplicación con Spring MVC

http://static.springframework.org/docs/Spring-MVC-step-by-step/

http://www.javapassion.com/j2ee/index.html#Spring_Framework

http://www.programania.net/programacion/orientada-a-objetos/spring-mvc-vs-struts/

Programacion orientada a aspecto

http://www.programacion.com/java/articulo/jap_aop/

Tutorial spring-ibaits integracion.

http://www.developersbook.com/ibatis/iBatis-tutorials/iBatis-tutorials.php

https://blueprints.dev.java.net/petstore/netbeans.html

Configuracion de Jakarta Struts con su datasource

Valido para la version 1.2.7

http://struts.apache.org/1.2.7/faqs/database.html

Requisitos para el uso del Framework Validator con Struts

the Validator plug- in
To enable the validator plug-in open the file struts-config.xml and make sure that following line is present in the file.

<!-- Validator plugin -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

Creating Message Resources
Message resources are used by the Validator Framework to generate the validation error messages. In our application we need to define the messages for name, Address and E-mail address. Open the Struts\strutstutorial\web\WEB-INF\MessageResources.properties file and add the following lines:
AddressForm.name=Name
AddressForm.address=Address
AddressForm.emailAddress=E-mail address

Developing Validation rules
In this application we are adding only one validation that the fields on the form should not be blank. Add the following code in the validation.xml.

<!-- Address form Validation-->
<form name="AddressForm">
<field property="name"
depends="required">
<arg key="AddressForm.name"/>
</field>
<field property="address"
depends="required">
<arg key="AddressForm.address"/>
</field>
<field property="emailAddress"
depends="required">
<arg key="AddressForm.emailAddress"/>
</field>
</form>

en el codigo del html

<html:form action="/AddressJavascriptValidation" method="post" onsubmit="return validateAddressForm(this);">

<!-- Begin Validator Javascript Function-->
<html:javascript formName="AddressForm"/>
<!-- End of Validator Javascript Function-->

struts-config

scope="request"
validate="true"

en el validator.xml

<form name="logonForm">
<field
property="username"
depends="required">
<arg key="logonForm.username"/>
</field>
<field
property="password"
depends="required,mask">
<arg key="logonForm.password"/>
<var>
<var-name>mask</var-name>
<var-value>^[0-9a-zA-Z]*$</var-value>
</var>
</field>

Uso de la libreria DISPLAY en un jsp.

Necesitamos la libreria, y sus prerequisitos.

Libreria:

http://displaytag.sourceforge.net/10/download.html

Necesitamos los prerequisitos que son estas librerias:

Todas estas librerias deberan estar instaladas en nuestro proyecto antes de correr la libreria display.
Ademas para este ejemplo emplearemos Dynabeans. Asi que hay que importarlo al JSP.
Este seria el codigo fuente de ejemplo:
<%@page import="java.io.*"%>
<%@page import="java.sql.*"%>
<%@page import="javax.sql.*"%>
<%@page import="java.util.*"%>
<%@page import="javax.naming.*"%>
<%@page import="javax.servlet.*"%>
<%@page import="org.apache.commons.beanutils.*"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ page language="Java" import="java.sql.*" %>
<jsp:useBean id="db" scope="request" class="SQLBean.DbBean" />
<jsp:setProperty name="db" property="*" />
<%!
ResultSet rs = null ;
ResultSetMetaData rsmd = null ;
int numColumns ;
int i;
%>
<%
String login=request.getParameter("login");
String password=request.getParameter("password");
%>
<html>
<head>
<title>Bienvenido</title>
</head>
<body>
<p> Hola y Bienvenido, <%=login%> <%=password%> <p>
<p align="center"><font size="3" color="#000080">Sus datos introducidos han sido correctos </font></p>
</body>
<%
db.connect();

try {
rs = db.execSQL("select * from alta");
}catch(SQLException e) {
throw new ServletException("Your query is not working", e);
}

} */
%>

<%
//while(rs.next()) {

RowSetDynaClass resultSet = new RowSetDynaClass(rs, false);
db.close();
request.setAttribute("results", resultSet);
%>
<display:table id="result" name="requestScope.results.rows">
</display:table>
<BR>
<%
//}
%>
<BR>
</html>

Con esta importacion podemos usar los dynabeans.
<%@page import="org.apache.commons.beanutils.*"%>
Y con esta incluimos el tag de la libreria (version jsp 1.2)
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>

Altas struts con reportes.

http://www.4shared.com/file/44512642/68b4008e/_2__Alta_Struts.html