[EDIT] Cambios

parent 3524a041
...@@ -997,14 +997,14 @@ exists or setup the property manually. For example like this: ...@@ -997,14 +997,14 @@ exists or setup the property manually. For example like this:
</target> </target>
<target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/> <target depends="init,compile,compile-jsps,-pre-dist,-do-dist-with-manifest,-do-dist-without-manifest" name="do-dist"/>
<target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest"> <target depends="init" if="dist.ear.dir" name="library-inclusion-in-manifest">
<copyfiles files="${file.reference.json-20160810.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> <copyfiles files="${file.reference.json-20160212.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<copyfiles files="${file.reference.sqljdbc4-2.0.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/> <copyfiles files="${file.reference.sqljdbc4.jar}" iftldtodir="${build.web.dir}/WEB-INF" todir="${dist.ear.dir}/lib"/>
<mkdir dir="${build.web.dir}/META-INF"/> <mkdir dir="${build.web.dir}/META-INF"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/> <manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
</target> </target>
<target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir"> <target depends="init" name="library-inclusion-in-archive" unless="dist.ear.dir">
<copyfiles files="${file.reference.json-20160810.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.json-20160212.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
<copyfiles files="${file.reference.sqljdbc4-2.0.jar}" todir="${build.web.dir}/WEB-INF/lib"/> <copyfiles files="${file.reference.sqljdbc4.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target> </target>
<target depends="init" if="dist.ear.dir" name="-clean-webinf-lib"> <target depends="init" if="dist.ear.dir" name="-clean-webinf-lib">
<delete dir="${build.web.dir}/WEB-INF/lib"/> <delete dir="${build.web.dir}/WEB-INF/lib"/>
......
build.xml.data.CRC32=4cd4cb5e build.xml.data.CRC32=66ba06da
build.xml.script.CRC32=615931b7 build.xml.script.CRC32=615931b7
build.xml.stylesheet.CRC32=651128d4@1.77.1.1 build.xml.stylesheet.CRC32=651128d4@1.77.1.1
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=4cd4cb5e nbproject/build-impl.xml.data.CRC32=66ba06da
nbproject/build-impl.xml.script.CRC32=efa11df6 nbproject/build-impl.xml.script.CRC32=816bdc64
nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1 nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
...@@ -28,8 +28,8 @@ dist.war=${dist.dir}/${war.name} ...@@ -28,8 +28,8 @@ dist.war=${dist.dir}/${war.name}
endorsed.classpath=\ endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath} ${libs.javaee-endorsed-api-7.0.classpath}
excludes= excludes=
file.reference.json-20160810.jar=F:\\LIBRERIAS\\json-20160810.jar file.reference.json-20160212.jar=D:\\LIBRERIAS\\json-20160212.jar
file.reference.sqljdbc4-2.0.jar=F:\\LIBRERIAS\\sqljdbc4-2.0.jar file.reference.sqljdbc4.jar=D:\\LIBRERIAS\\sqljdbc4.jar
includes=** includes=**
j2ee.compile.on.save=true j2ee.compile.on.save=true
j2ee.copy.static.files.on.save=true j2ee.copy.static.files.on.save=true
...@@ -44,8 +44,8 @@ j2ee.platform.wsit.classpath= ...@@ -44,8 +44,8 @@ j2ee.platform.wsit.classpath=
j2ee.server.type=gfv3ee6 j2ee.server.type=gfv3ee6
jar.compress=false jar.compress=false
javac.classpath=\ javac.classpath=\
${file.reference.json-20160810.jar}:\ ${file.reference.json-20160212.jar}:\
${file.reference.sqljdbc4-2.0.jar} ${file.reference.sqljdbc4.jar}
# Space-separated list of extra javac options # Space-separated list of extra javac options
javac.compilerargs= javac.compilerargs=
javac.debug=true javac.debug=true
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<minimum-ant-version>1.6.5</minimum-ant-version> <minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries> <web-module-libraries>
<library dirs="200"> <library dirs="200">
<file>${file.reference.json-20160810.jar}</file> <file>${file.reference.json-20160212.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
<library dirs="200"> <library dirs="200">
<file>${file.reference.sqljdbc4-2.0.jar}</file> <file>${file.reference.sqljdbc4.jar}</file>
<path-in-war>WEB-INF/lib</path-in-war> <path-in-war>WEB-INF/lib</path-in-war>
</library> </library>
</web-module-libraries> </web-module-libraries>
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.beans; package demojsoncrud.beans;
import java.io.Serializable; import java.io.Serializable;
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.dao; package demojsoncrud.dao;
import demojsoncrud.sqlserverdao.SqlserverDAOFactory; import demojsoncrud.sqlserverdao.SqlserverDAOFactory;
/**
*
* @author Alonso
*/
public abstract class DAOFactory { public abstract class DAOFactory {
public static final int SQL_SERVER = 1; public static final int SQL_SERVER = 1;
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.dao; package demojsoncrud.dao;
import demojsoncrud.beans.PersonaBean; import demojsoncrud.beans.PersonaBean;
import org.json.JSONObject; import org.json.JSONObject;
/**
*
* @author Alonso
*/
public interface PersonaDAO { public interface PersonaDAO {
public JSONObject listarPersonaTest(); public JSONObject listarPersonaTest();
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.services; package demojsoncrud.services;
import demojsoncrud.beans.PersonaBean; import demojsoncrud.beans.PersonaBean;
...@@ -10,10 +5,6 @@ import demojsoncrud.dao.DAOFactory; ...@@ -10,10 +5,6 @@ import demojsoncrud.dao.DAOFactory;
import demojsoncrud.dao.PersonaDAO; import demojsoncrud.dao.PersonaDAO;
import org.json.JSONObject; import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaService { public class PersonaService {
DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.SQL_SERVER); DAOFactory daoFactory = DAOFactory.getDAOFactory(DAOFactory.SQL_SERVER);
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.servlets; package demojsoncrud.servlets;
import demojsoncrud.beans.PersonaBean; import demojsoncrud.beans.PersonaBean;
...@@ -15,10 +10,6 @@ import javax.servlet.http.HttpServletRequest; ...@@ -15,10 +10,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.json.JSONObject; import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaServlet extends HttpServlet { public class PersonaServlet extends HttpServlet {
@Override @Override
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.sqlserverdao; package demojsoncrud.sqlserverdao;
import demojsoncrud.beans.PersonaBean; import demojsoncrud.beans.PersonaBean;
import demojsoncrud.dao.PersonaDAO; import demojsoncrud.dao.PersonaDAO;
import demojsoncrud.utils.ResponseHelper; import demojsoncrud.utilities.ResponseHelper;
import java.sql.Connection; import java.sql.Connection;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
...@@ -16,10 +11,6 @@ import org.json.JSONArray; ...@@ -16,10 +11,6 @@ import org.json.JSONArray;
import org.json.JSONException; import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaSqlserverDAO implements PersonaDAO { public class PersonaSqlserverDAO implements PersonaDAO {
@Override @Override
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.sqlserverdao; package demojsoncrud.sqlserverdao;
import demojsoncrud.dao.DAOFactory; import demojsoncrud.dao.DAOFactory;
...@@ -11,10 +6,6 @@ import java.sql.Connection; ...@@ -11,10 +6,6 @@ import java.sql.Connection;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
/**
*
* @author Alonso
*/
public class SqlserverDAOFactory extends DAOFactory { public class SqlserverDAOFactory extends DAOFactory {
public static Connection obtenerConexion(String base) { public static Connection obtenerConexion(String base) {
...@@ -22,7 +13,7 @@ public class SqlserverDAOFactory extends DAOFactory { ...@@ -22,7 +13,7 @@ public class SqlserverDAOFactory extends DAOFactory {
if (base.equalsIgnoreCase("demojsoncrud")) { if (base.equalsIgnoreCase("demojsoncrud")) {
String user = "sa"; String user = "sa";
String pwd = "Saco1357$"; String pwd = "Saco1357$";
String url = "jdbc:sqlserver://localhost:1433;databaseName=demojsoncrud"; String url = "jdbc:sqlserver://172.16.2.118:1433;databaseName=demojsoncrud";
String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
try { try {
Class.forName(driver); Class.forName(driver);
......
/* package demojsoncrud.utilities;
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.utils;
import java.io.Serializable; import java.io.Serializable;
import org.json.JSONObject; import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class ResponseHelper implements Serializable { public class ResponseHelper implements Serializable {
private JSONObject data; private JSONObject data;
......
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$(document).ready(function () { $(document).ready(function () {
listarPersonaTest(); listarPersonaTest();
...@@ -17,8 +10,6 @@ $(document).ready(function () { ...@@ -17,8 +10,6 @@ $(document).ready(function () {
limpiarInputs(); limpiarInputs();
}); });
}); });
var codigoPersona; var codigoPersona;
...@@ -168,10 +159,8 @@ function editarPersona() { ...@@ -168,10 +159,8 @@ function editarPersona() {
} }
function listarPersona() { function listarPersona() {
var txt_criterio_busqueda = $('#txt_criterio_busqueda').val().trim(); var txt_criterio_busqueda = $('#txt_criterio_busqueda').val().trim();
var tabla_persona = $('#tabla_persona').DataTable({ var tabla_persona = $('#tabla_persona').DataTable({
language: { language: {
paginate: {'next': '&rarr; ', 'previous': ' &larr;'}, paginate: {'next': '&rarr; ', 'previous': ' &larr;'},
...@@ -181,7 +170,9 @@ function listarPersona() { ...@@ -181,7 +170,9 @@ function listarPersona() {
url: '../PersonaServlet?accion=listarPersona', url: '../PersonaServlet?accion=listarPersona',
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: {search: txt_criterio_busqueda} data: {
search: txt_criterio_busqueda
}
}, },
processing: true, processing: true,
serverSide: true, serverSide: true,
...@@ -426,9 +417,6 @@ function MyValidate() { ...@@ -426,9 +417,6 @@ function MyValidate() {
return this.optional(element) || /^[a-z\s]+$/i.test(value); return this.optional(element) || /^[a-z\s]+$/i.test(value);
}, "Solo letras."); }, "Solo letras.");
jQuery.validator.setDefaults({ jQuery.validator.setDefaults({
debug: true, debug: true,
ignore: 'input[type=hidden], .select2-search__field', // ignore hidden fields ignore: 'input[type=hidden], .select2-search__field', // ignore hidden fields
......
...@@ -104,16 +104,11 @@ ...@@ -104,16 +104,11 @@
<div class="row"> <div class="row">
<div class="col-md-4"> <div class="col-md-4">
<div class="form-group"> <div class="form-group">
<!--<div class="form-group has-error has-feedback">-->
<label class="control-label display-block">Número de documento:<span class="text-danger"> (*)</span></label> <label class="control-label display-block">Número de documento:<span class="text-danger"> (*)</span></label>
<div class="input-group"> <div class="input-group">
<span class="input-group-addon"><i class="icon-vcard"></i></span> <span class="input-group-addon"><i class="icon-vcard"></i></span>
<input id="txt_numero_documento" name="txt_numero_documento" type="text" class="form-control" placeholder="Ingresar número de documento"> <input id="txt_numero_documento" name="txt_numero_documento" type="text" class="form-control" placeholder="Ingresar número de documento">
</div> </div>
<!-- <div class="form-control-feedback">
<i class="icon-cancel-circle2"></i>
</div>
<span class="help-block">Error input group helper</span>-->
</div> </div>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment