Java:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Beispiel</title>
</head>
<body>
<h3>Taile/Huefte - Verhaeltnis beim Mann</h3>
<%
float taille =
Integer.parseInt(request.getParameter("t"));
float huefte = Integer.parseInt(request.getParameter("h"));
if(taille/huefte >1) {
%>
<p> Diaet ist angesagt</p>
<%}
else {%>
<p> akzeptabel</p>
<%} %>
</body>
</html>
Hallo Leute mir wird folgender Fehler ausgegeben:
Java:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: An exception occurred processing JSP page /example.jsp at line 13
10: <h3>Taile/Huefte - Verhaeltnis beim Mann</h3>
11: <%
12: float taille =
13: Integer.parseInt(request.getParameter("t"));
14: float huefte = Integer.parseInt(request.getParameter("h"));
15: if(taille/huefte >1) {
16: %>
Ähm nochrmaller weise bräuchte ich ja nen Exceptionhandling und nen import.
Aber mein Buch Java Server Pages 2.0 beschreibt, dass es so lauffähig sein müsste.
Wie kann ich das Problem beheben grüße