Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,35 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v8.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="com.genuitec.runtime.library/com.genuitec.jstl_1.2.2">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="WEB-INF/lib"/>
<attribute name="owner.project.facets" value="jst.web.jstl"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="com.genuitec.runtime.library/com.genuitec.hibernate_4.1">
<attributes>
<attribute name="owner.project.facets" value="java"/>
<attribute name="org.eclipse.jst.component.dependency" value="WEB-INF/lib"/>
<attribute name="owner.project.facets" value="me.hibernate"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>
20 changes: 20 additions & 0 deletions .myhibernatedata
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#MyEclipse Hibernate Properties
#Thu Mar 24 12:22:19 COT 2016
genBasicCompId=true
sessionFactoryName=zen.persistence.financial.HibernateSessionFactory
profile=
daoSFId=
jndiPath=
detectM2M=false
reStrategyClass=
detectO2O=false
springDaoFile=
useJavaTypes=true
keyGenerator=
genVersionTag=false
sessionFactoryId=
basePersistenceClass=
genAnnotations=true
reSettingsFile=
configFile=/zen/src/zen/persistence/financial/hibernate.cfg.xml
createConfigFile=true
7 changes: 6 additions & 1 deletion .project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ProyectoTest</name>
<name>zen</name>
<comment></comment>
<projects>
</projects>
Expand All @@ -25,6 +25,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
Expand Down
4 changes: 2 additions & 2 deletions .settings/.jsdtscope
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/>
<classpathentry kind="src" path="WebRoot"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary/StandardBrowser/html5"/>
<classpathentry kind="output" path=""/>
</classpath>
9 changes: 4 additions & 5 deletions .settings/org.eclipse.wst.common.component
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="ProyectoTest">
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-module deploy-name="zen">
<wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="ProyectoTest"/>
<property name="java-output-path" value="/ProyectoTest/build/classes"/>
<property name="context-root" value="zen"/>
<property name="java-output-path" value="/zen/WebRoot/WEB-INF/classes"/>
</wb-module>
</project-modules>
7 changes: 6 additions & 1 deletion .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v8.0"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.1"/>
<installed facet="jst.web.jstl" version="1.2.2"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="me.hibernate" version="4.1"/>
</faceted-project>
2 changes: 0 additions & 2 deletions .settings/org.eclipse.wst.validation.prefs

This file was deleted.

14 changes: 14 additions & 0 deletions .tern-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"plugins": {
"guess-types": {

},
"outline": {

}
},
"libs": [
"ecma5",
"browser"
]
}
1 change: 0 additions & 1 deletion README.md

This file was deleted.

12 changes: 0 additions & 12 deletions WebContent/index.jsp

This file was deleted.

File renamed without changes.
Binary file added WebRoot/WEB-INF/lib/json-20160212.jar
Binary file not shown.
Binary file not shown.
13 changes: 12 additions & 1 deletion WebContent/WEB-INF/web.xml → WebRoot/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>ProyectoTest</display-name>
<display-name>zen</display-name>
<servlet>
<servlet-name>DNUser</servlet-name>
<display-name>DNUser</display-name>
<description>Delegado de la clase usuarios</description>
<servlet-class>zen.delegate.DNUser</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>DNUser</servlet-name>
<url-pattern>/servlet/DNUser</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
Expand Down
28 changes: 28 additions & 0 deletions WebRoot/index.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<%@page import="zen.test.PersistenceTest"%>
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
// new PersistenceTest().test();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>

<body>
This is my JSP page. <br>
</body>
</html>
22 changes: 7 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ProyectoTest</groupId>
<artifactId>ProyectoTest</artifactId>
<groupId>zen</groupId>
<artifactId>zen</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>ProyectoTest</name>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<version>2.4</version>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<warSourceDirectory>WebRoot</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
</project>
24 changes: 24 additions & 0 deletions src/hibernate.cfg.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<!-- Generated by MyEclipse Hibernate Tools. -->
<hibernate-configuration>

<session-factory>
<property name="dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="connection.url">
jdbc:mysql://localhost:3306/financial
</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
<property name="connection.driver_class">
com.mysql.jdbc.Driver
</property>
<mapping class="model.financial.Usuarios" />

</session-factory>

</hibernate-configuration>
29 changes: 29 additions & 0 deletions src/model/financial/NameQryUsers.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package model.financial;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar el nombre de la clase por algo que tenga significado


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sobra este espacio

import org.hibernate.annotations.NamedNativeQueries;
import org.hibernate.annotations.NamedNativeQuery;
import org.hibernate.annotations.NamedQueries;


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sobra un espacio

@NamedQueries({
@org.hibernate.annotations.NamedQuery(
name = "findGetAllUser",
query = "from Usuarios o "
+ " where o.userName = :userName"
+ " and o.password = :password"
+ " and o.names = :names"
+ " and o.lastName = :lastName"

)
})

@NamedNativeQueries({
@NamedNativeQuery(
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

El espaciado de esta clase esta mal

name = "findGetAllUserNative",
query = "select * from Usuarios where user_name = :userName and password = :password and names = :names and last_name = :lastName",
resultClass = Usuarios.class
)
})
public class NameQryUsers {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cambiar el nombre de la clase por algo significado. ¿Qué es Qry?

public enum FieldsUser{ Name, Password, Names, LastName};
}
Loading