[EDIT] Cambios

parent 3524a041
......@@ -997,14 +997,14 @@ exists or setup the property manually. For example like this:
</target>
<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">
<copyfiles files="${file.reference.json-20160810.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.json-20160212.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"/>
<manifest file="${build.web.dir}/META-INF/MANIFEST.MF" mode="update"/>
</target>
<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.sqljdbc4-2.0.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.jar}" todir="${build.web.dir}/WEB-INF/lib"/>
</target>
<target depends="init" if="dist.ear.dir" name="-clean-webinf-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.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.
# 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.script.CRC32=efa11df6
nbproject/build-impl.xml.data.CRC32=66ba06da
nbproject/build-impl.xml.script.CRC32=816bdc64
nbproject/build-impl.xml.stylesheet.CRC32=99ea4b56@1.77.1.1
......@@ -28,8 +28,8 @@ dist.war=${dist.dir}/${war.name}
endorsed.classpath=\
${libs.javaee-endorsed-api-7.0.classpath}
excludes=
file.reference.json-20160810.jar=F:\\LIBRERIAS\\json-20160810.jar
file.reference.sqljdbc4-2.0.jar=F:\\LIBRERIAS\\sqljdbc4-2.0.jar
file.reference.json-20160212.jar=D:\\LIBRERIAS\\json-20160212.jar
file.reference.sqljdbc4.jar=D:\\LIBRERIAS\\sqljdbc4.jar
includes=**
j2ee.compile.on.save=true
j2ee.copy.static.files.on.save=true
......@@ -44,8 +44,8 @@ j2ee.platform.wsit.classpath=
j2ee.server.type=gfv3ee6
jar.compress=false
javac.classpath=\
${file.reference.json-20160810.jar}:\
${file.reference.sqljdbc4-2.0.jar}
${file.reference.json-20160212.jar}:\
${file.reference.sqljdbc4.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.debug=true
......
......@@ -7,11 +7,11 @@
<minimum-ant-version>1.6.5</minimum-ant-version>
<web-module-libraries>
<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>
</library>
<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>
</library>
</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;
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;
import demojsoncrud.sqlserverdao.SqlserverDAOFactory;
/**
*
* @author Alonso
*/
public abstract class DAOFactory {
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;
import demojsoncrud.beans.PersonaBean;
import org.json.JSONObject;
/**
*
* @author Alonso
*/
public interface PersonaDAO {
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;
import demojsoncrud.beans.PersonaBean;
......@@ -10,10 +5,6 @@ import demojsoncrud.dao.DAOFactory;
import demojsoncrud.dao.PersonaDAO;
import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaService {
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;
import demojsoncrud.beans.PersonaBean;
......@@ -15,10 +10,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaServlet extends HttpServlet {
@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;
import demojsoncrud.beans.PersonaBean;
import demojsoncrud.dao.PersonaDAO;
import demojsoncrud.utils.ResponseHelper;
import demojsoncrud.utilities.ResponseHelper;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
......@@ -16,10 +11,6 @@ import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class PersonaSqlserverDAO implements PersonaDAO {
@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;
import demojsoncrud.dao.DAOFactory;
......@@ -11,10 +6,6 @@ import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
*
* @author Alonso
*/
public class SqlserverDAOFactory extends DAOFactory {
public static Connection obtenerConexion(String base) {
......@@ -22,7 +13,7 @@ public class SqlserverDAOFactory extends DAOFactory {
if (base.equalsIgnoreCase("demojsoncrud")) {
String user = "sa";
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";
try {
Class.forName(driver);
......
/*
* 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;
package demojsoncrud.utilities;
import java.io.Serializable;
import org.json.JSONObject;
/**
*
* @author Alonso
*/
public class ResponseHelper implements Serializable {
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 () {
listarPersonaTest();
......@@ -17,8 +10,6 @@ $(document).ready(function () {
limpiarInputs();
});
});
var codigoPersona;
......@@ -168,10 +159,8 @@ function editarPersona() {
}
function listarPersona() {
var txt_criterio_busqueda = $('#txt_criterio_busqueda').val().trim();
var tabla_persona = $('#tabla_persona').DataTable({
language: {
paginate: {'next': '&rarr; ', 'previous': ' &larr;'},
......@@ -181,7 +170,9 @@ function listarPersona() {
url: '../PersonaServlet?accion=listarPersona',
type: 'POST',
dataType: 'json',
data: {search: txt_criterio_busqueda}
data: {
search: txt_criterio_busqueda
}
},
processing: true,
serverSide: true,
......@@ -426,9 +417,6 @@ function MyValidate() {
return this.optional(element) || /^[a-z\s]+$/i.test(value);
}, "Solo letras.");
jQuery.validator.setDefaults({
debug: true,
ignore: 'input[type=hidden], .select2-search__field', // ignore hidden fields
......
......@@ -104,16 +104,11 @@
<div class="row">
<div class="col-md-4">
<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>
<div class="input-group">
<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">
</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 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