Codigo:
<%--
Document : pag2
Created on : 25/11/2013, 10:33:03 PM
Author : Personal
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%! String t1,t2,t3; %>
<%
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
%>
<!--Imprimir -->
<center>
<%
if(request.getParameter("T1").equals("1") && request.getParameter("T2").equals("2") && request.getParameter("T3").equals("3"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><img src=p1.png><br><img src=p2.png><br><img src=p3.png><br><h1>Bien!!!</h1>");
}
else if(request.getParameter("T1").equals("1") )
{
t1=request.getParameter("T1");
out.println("<br><br><br><br><img src=p1.png>");
}
else if(request.getParameter("T2").equals("2") )
{
t2=request.getParameter("T2");
out.println("<br><br><br><br><img src=p2.png>");
}
else if(request.getParameter("T3").equals("3") )
{
t3=request.getParameter("T3");
out.println("<br><br><br><br><img src=p3.png>");
}
if(request.getParameter("T1").equals("3") && request.getParameter("T2").equals("2") && request.getParameter("T3").equals("1"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR La Piesa 3 y 2 estan mal</h1>");
}
if(request.getParameter("T1").equals("1") && request.getParameter("T2").equals("1") && request.getParameter("T3").equals("1"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("2") && request.getParameter("T2").equals("2") && request.getParameter("T3").equals("2"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("3") && request.getParameter("T2").equals("3") && request.getParameter("T3").equals("3"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("2") && request.getParameter("T2").equals("1") && request.getParameter("T3").equals("3"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("1") && request.getParameter("T2").equals("3") && request.getParameter("T3").equals("2"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("2") && request.getParameter("T2").equals("3") && request.getParameter("T3").equals("1"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
if(request.getParameter("T1").equals("3") && request.getParameter("T2").equals("1") && request.getParameter("T3").equals("2"))
{
t1=request.getParameter("T1");
t2=request.getParameter("T2");
t3=request.getParameter("T3");
out.println("<br><br><br><br><h1>ERROR </h1>");
}
%>
<FORM METHOD="GET" ACTION="ari.jsp" target="mainFrame" >
<input type="submit" value="Jugar Denuevo"></center>
</form>
</body>
</html>
IMAGEN:
No hay comentarios:
Publicar un comentario