Skip to content

Commit e02bada

Browse files
Excel Jsps con Directivas
1 parent 5253a2e commit e02bada

File tree

11 files changed

+217
-0
lines changed

11 files changed

+217
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,3 +199,4 @@
199199
/DeclaracionesJSP/target/
200200
/DocumentosJSP/target/
201201
/ExcelJSP/target/
202+
/ExcelSJPExcepciones/target/
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
10+
<!--
11+
Properties that influence various parts of the IDE, especially code formatting and the like.
12+
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
13+
That way multiple projects can share the same settings (useful for formatting rules for example).
14+
Any value defined here will override the pom.xml file value but is only applicable to the current project.
15+
-->
16+
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>1.8-web</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_j2eeVersion>
17+
<org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>gfv5ee8</org-netbeans-modules-maven-j2ee.netbeans_2e_hint_2e_deploy_2e_server>
18+
<netbeans.hint.jdkPlatform>JDK 1.8</netbeans.hint.jdkPlatform>
19+
<org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>ide</org-netbeans-modules-maven-jaxws.rest_2e_config_2e_type>
20+
</properties>
21+
</project-shared-configuration>

ExcelSJPExcepciones/pom.xml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>com.mycompany</groupId>
5+
<artifactId>ExcelJSP</artifactId>
6+
<version>1.0</version>
7+
<packaging>war</packaging>
8+
<name>ExcelJSPExcepciones</name>
9+
10+
<properties>
11+
<maven.compiler.source>1.8</maven.compiler.source>
12+
<maven.compiler.target>1.8</maven.compiler.target>
13+
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
<failOnMissingWebXml>false</failOnMissingWebXml>
16+
<jakartaee>8.0</jakartaee>
17+
</properties>
18+
19+
<dependencies>
20+
<dependency>
21+
<groupId>javax</groupId>
22+
<artifactId>javaee-api</artifactId>
23+
<version>${jakartaee}</version>
24+
<scope>provided</scope>
25+
</dependency>
26+
</dependencies>
27+
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-compiler-plugin</artifactId>
33+
<version>3.1</version>
34+
<configuration>
35+
<source>1.8</source>
36+
<target>1.8</target>
37+
<compilerArguments>
38+
<endorseddirs>${endorsed.dir}</endorseddirs>
39+
</compilerArguments>
40+
</configuration>
41+
</plugin>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-war-plugin</artifactId>
45+
<version>3.3.1</version>
46+
<configuration>
47+
<failOnMissingWebXml>false</failOnMissingWebXml>
48+
</configuration>
49+
</plugin>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-dependency-plugin</artifactId>
53+
<version>2.6</version>
54+
<executions>
55+
<execution>
56+
<phase>validate</phase>
57+
<goals>
58+
<goal>copy</goal>
59+
</goals>
60+
<configuration>
61+
<outputDirectory>${endorsed.dir}</outputDirectory>
62+
<silent>true</silent>
63+
<artifactItems>
64+
<artifactItem>
65+
<groupId>javax</groupId>
66+
<artifactId>javaee-api</artifactId>
67+
<version>${jakartaee}</version>
68+
<type>jar</type>
69+
</artifactItem>
70+
</artifactItems>
71+
</configuration>
72+
</execution>
73+
</executions>
74+
</plugin>
75+
</plugins>
76+
</build>
77+
</project>

ExcelSJPExcepciones/readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<table align="center" >
2+
<tr>
3+
<td align="center" style="padding=0;width=50%;">
4+
<img align="center" style="padding=0;" src="../images/porterteJSP.png" />
5+
</td>
6+
</tr>
7+
</table>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package utilerias;
2+
3+
import java.text.SimpleDateFormat;
4+
import java.util.Date;
5+
6+
public class Conversiones {
7+
private static final String FORMATO_FECHA= "dd-MM";
8+
9+
public static String format(Date fecha){
10+
SimpleDateFormat formateador = new SimpleDateFormat(FORMATO_FECHA);
11+
return formateador.format(fecha);
12+
}
13+
14+
public static String format(String fecha){
15+
SimpleDateFormat formateador = new SimpleDateFormat(FORMATO_FECHA);
16+
return formateador.format(fecha);
17+
}
18+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<persistence version="2.2" xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
3+
<!-- Define Persistence Unit -->
4+
<persistence-unit name="my_persistence_unit">
5+
6+
</persistence-unit>
7+
</persistence>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
5+
bean-discovery-mode="all">
6+
</beans>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<%@page isErrorPage="true" %>
2+
<%@page import="java.io.*" %>
3+
<!DOCTYPE html>
4+
<html>
5+
<head>
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>Manejo de Errores</title>
8+
</head>
9+
<body>
10+
<h1>Manejo de Errores</h1>
11+
<br />
12+
Ocurrio una Excepcionen: <% exception.getMessage();%>
13+
<br />
14+
<textarea cols="30" rows="5">
15+
<% exception.printStackTrace(new PrintWriter(out));%>
16+
<textarea>
17+
18+
</body>
19+
</html>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
5+
version="4.0">
6+
<session-config>
7+
<session-timeout>
8+
30
9+
</session-timeout>
10+
</session-config>
11+
</web-app>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Generacion de Reposrte Excel</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
</head>
7+
<body>
8+
<h1>Generacion de Reposrte Excel</h1>
9+
<br /><!-- comment -->
10+
<a href="reporteExcel.jsp">Link al reporte de Excel</a>
11+
12+
</body>
13+
</html>

0 commit comments

Comments
 (0)