Skip to content

Commit f27219b

Browse files
Documentos con JPSX
1 parent cfd2e28 commit f27219b

File tree

6 files changed

+51
-36
lines changed

6 files changed

+51
-36
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,4 @@
197197
/ExpresionesJSP/target/
198198
/ScriptletsJSP/target/
199199
/DeclaracionesJSP/target/
200+
/DocumentosJSP/target/

DocumentosJSP/src/main/java/com/mycompany/DocumentosJSP/JAXRSConfiguration.java

Lines changed: 0 additions & 13 deletions
This file was deleted.

DocumentosJSP/src/main/java/com/mycompany/DocumentosJSP/resources/JavaEE8Resource.java

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
4+
5+
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/>
6+
7+
<!--Uso de declaraciones-->
8+
<jsp:declaration>
9+
private int contadorVisitas = 1;
10+
</jsp:declaration>
11+
12+
<html>
13+
<body>
14+
<h1>Ejemplo de un documento JSPX</h1>
15+
16+
</body>
17+
<!--Ejemplo de salida de texto-->
18+
<jsp:text>Saludos desde un documento JSPX</jsp:text>
19+
<br /><!-- comment -->
20+
<!--Eejmeplo de Expresion con JSPX -->
21+
Resultado de la Multiplicacion 3 * 3: <jsp:expression> 3*3</jsp:expression>
22+
<br />
23+
<jsp:scriptlet>
24+
String nombreAplicacion = request.getContextPath();
25+
</jsp:scriptlet>
26+
Nombre de la aplicacion: <jsp:expression> nombreAplicacion</jsp:expression>
27+
<br />
28+
Contador de visistas:
29+
<jsp:expression>this.contadorVisitas++</jsp:expression>
30+
</html>
31+
</jsp:root>
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Start Page</title>
4+
<title>Ejemplo de documentos JSP</title>
55
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
66
</head>
77
<body>
8-
<h1>Hello World!</h1>
8+
<h1>Ejemplo de documentos JSP</h1>
9+
<a href="documentosJSP.jspx">Link al JSPX</a>
910
</body>
1011
</html>

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2994,9 +2994,24 @@ Numeration | File | Link | Folk | Code | Version | S
29942994
29952995
## Documentos con JPSX
29962996
2997+
2998+
```xml
2999+
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0">
3000+
3001+
<jsp:directive.page contentType="text/html" pageEncoding="UTF-8"/>
3002+
3003+
<!-- any content can be specified here, e.g.: -->
3004+
<jsp:element name="text">
3005+
<jsp:attribute name="lang">EN</jsp:attribute>
3006+
<jsp:body>Hello World!</jsp:body>
3007+
</jsp:element>
3008+
3009+
</jsp:root>
3010+
```
3011+
29973012
Numeration | File | Link | Folk | Code | Version | State | Download | Go back |
29983013
|:----------:|:------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|:-----------:|
2999-
|F25 | [Documentos con JPSX](https://github.com/BrianMarquez3/Learning-Java/tree/main/DeclaracionesJSP) | <img src="https://media.giphy.com/media/YIW8ZTQHpcWjaDzyAr/giphy.gif" width="17px"> | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Servlets-y-JSP) |
3014+
|F25 | [Documentos con JPSX](https://github.com/BrianMarquez3/Learning-Java/tree/main/DocumentosJSP) | <img src="https://media.giphy.com/media/YIW8ZTQHpcWjaDzyAr/giphy.gif" width="17px"> | ✔️ | yes | yes | ✔️ | 💾 | [⬅️Atras](#Servlets-y-JSP) |
30003015
30013016
30023017

0 commit comments

Comments
 (0)