ConversorResultado.jsp 3.29 KB
Newer Older
Cristian committed
1 2 3 4 5 6 7 8 9 10 11
<%@page import="java.util.ArrayList"%>
<%@ 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 Conversor</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
    integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
</head>
Cristian committed
12
<body class="container">
Cristian committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
<% ArrayList<Float>resultado=(ArrayList<Float>) request.getAttribute("resultado");


String tipo =request.getAttribute("P0").toString();
if(tipo.toLowerCase().equals("c")){
	tipo=" Celsius";
}else if(tipo.toLowerCase().equals("f")){
	tipo=" Fahrenheit";
}else{
	tipo=" Kelvin";
}
%>

<nav class="navbar navbar-expand-lg navbar-light bg-light">
    <a class="navbar-brand" href="#">Menu</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
      aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav mr-auto">
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/index.html">Inicio <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/conversor.html">Conversor <span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/agenda.html">Agenda<span class="sr-only">(current)</span></a>
        </li>
        <li class="nav-item active">
          <a class="nav-link" href="/jweb-e002/cartas.html">Cartas de Poker<span class="sr-only">(current)</span></a>
        </li>
    </div>

  </nav>

Cristian committed
51
<div >
Cristian committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
    
      <br>
      <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label">De Tipo Temperatura</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=tipo%>">
    </div>
  </div>

      <div class="form-group">
        <label for="tarea">Temperatura</label>
        <input type="number" class="form-control" id="P1" name="P1" placeholder="Temperatura en digitos" value="<%=request.getAttribute("P1").toString() %>" required disabled>
      </div>
	
	 <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label"> a Celsius</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(0).toString()+" C" %>">
    </div>
  </div>
       <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label">a Fahrenheit</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(1).toString()+" F" %>">
    </div>
  </div>
   <div class="form-group row">
    <label for="staticEmail" class="col-sm-2 col-form-label"> a Kelvin</label>
    <div class="col-sm-10">
      <input type="text" readonly class="form-control-plaintext" id="tipo" value="<%=resultado.get(2).toString()+" K" %>">
    </div>
  </div>

Cristian committed
85 86 87
</div>
</body>

Cristian committed
88
</html>