Commit eb8c004e by roshka

1.0

parents
## Indicaciones
1. La carpeta "jweb-e002" contiene el proyecto de Eclipse.
2. El proyecto fue realizado en java 10, con apache tomcat 9.0.13.
3. Para acceder a los ejercicios, se entra en:
- Ejercicio 1: http://localhost:8080/jweb-e002/carta.html
- Ejercicio 2: http://localhost:8080/jweb-e002/mano.html
- Ejercicio 3: http://localhost:8080/jweb-e002/mano_doc.html
4. El archivo jweb-e002.war es el archivo war.
\ No newline at end of file
File added
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v9.0"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-10-oracle">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="build/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>jweb-e002</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="**/bower_components/*|**/node_modules/*|**/*.min.js" kind="src" path="WebContent"/>
<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="output" path=""/>
</classpath>
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=10
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=10
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="jweb-e002">
<wb-resource deploy-path="/" source-path="/WebContent" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="jweb-e002"/>
<property name="java-output-path" value="/jweb-e002/build/classes"/>
</wb-module>
</project-modules>
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="Apache Tomcat v9.0"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="jst.web"/>
<fixed facet="java"/>
<installed facet="jst.web" version="4.0"/>
<installed facet="wst.jsdt.web" version="1.0"/>
<installed facet="java" version="10"/>
</faceted-project>
org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
Manifest-Version: 1.0
Class-Path:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Resultado Carta</title>
</head>
<body>
<h1>Tu carta es: </h1>
<img src=<%=request.getAttribute("direccion") %> alt="Resultado carta" width="227" height="315"><br><br>
<a href="http://localhost:8080/jweb-e002/carta.html">Volver al selector de carta</a><br><br>
</body>
</html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Error dibujo entero</title>
</head>
<body>
<p>El campo valor solo admite valores entre entre el 1 y el 13</p><br><br>
<a href="http://localhost:8080/jweb-e002/carta.html">Volver al selector de carta</a><br><br>
</body>
</html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Error dibujo palo</title>
</head>
<body>
<p>El campo del palo solo admite valores:<br>* S<br>* H<br>* C<br>* D</p><br><br>
<a href="http://localhost:8080/jweb-e002/carta.html">Volver al selector de carta</a><br><br>
</body>
</html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Error dibujo valor</title>
</head>
<body>
<p>El campo valor solo admite valores entre entre el 1 y el 13</p><br><br>
<a href="http://localhost:8080/jweb-e002/carta.html">Volver al selector de carta</a><br><br>
</body>
</html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<h1>Cartas en la mesa</h1>
<%
String[] resultado = (String[])request.getAttribute("resultado");
String[] cartasEnlaMesa = (String[])request.getAttribute("cartasEnLaMesa");
for(int i=0;i<cartasEnlaMesa.length;i++){
%>
<img src=<%=cartasEnlaMesa[i]%> alt="carta mesa" width="120" height="180">
<%} %>
<h1>La mejor mano es:</h1>
<%
for(int i=0;i<resultado.length;i++){
%>
<img src=<%=resultado[i]%> alt="carta mesa" width="120" height="180">
<%} %>
</body>
</html>
\ No newline at end of file
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Mano de 5 cartas</title>
</head>
<body>
<h1>Mano de 5 cartas</h1>
<%
String[] direcciones_url = (String[])request.getAttribute("imagenesCarta");
String resultado = (String)request.getAttribute("resultadoMano");
for(int i=0;i<direcciones_url.length;i++){
%>
<img alt="Mano Poker" src=<%=direcciones_url[i]%>>
<%}%><br>
<h2>Tipo de mano: <%=resultado%></h2>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Obten tu carta de poker</title>
</head>
<body>
<h1>Ingrese el palo y el valor de la carta</h1>
<form action="dibujo" method="get">
<label for="palo_carta">Palo: </label>
<input type="text" id="palo_carta" name="P0"><br><br>
<label for="valor_carta">Valor: </label>
<input type="text" id="valor_carta" name="P1"><br><br>
<input type="submit" value="Obtener carta">
</form>
<p>
Palos posibles:<br>
* S : Picas (Spades)<br>
* H : Corazones (Hearts)<br>
* C : Treboles (Clubs)<br>
* D : Diamante (Diamonds)
</p>
<p>
Valores posibles: 1 al 13.<br>
* 1 equivale al As <br>
* 11 equivale al J <br>
* 12 equivale al Q <br>
* 13 equivales al K
</p><br><br>
</body>
</html>
\ No newline at end of file
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