Hi
ich hab ein Problem mit einer jsp Seite und enum (wie Titel schon sagt)
bevor ich viel beschreibe hier die dateien:
index.jsp:
Sites.java:
Folgender Fehler:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the jsp file: /index.jsp
Sites.home cannot be resolved to a type
8: <title>Insert title here</title>
9: </head>
10: <body>
11: <%= Sites.home.toString() %>
12: </body>
13: </html>
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
usw.
Ich hoffe jemand kann mir weiterhelfen.
Vielen Danke schonmal.
ich hab ein Problem mit einer jsp Seite und enum (wie Titel schon sagt)
bevor ich viel beschreibe hier die dateien:
index.jsp:
Code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ page import="de.ms.core.*"%>
<!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>Insert title here</title>
</head>
<body>
<%= Sites.home.toString() %>
</body>
</html>
Code:
package de.ms.core;
public enum Sites {
home, test
}
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 11 in the jsp file: /index.jsp
Sites.home cannot be resolved to a type
8: <title>Insert title here</title>
9: </head>
10: <body>
11: <%= Sites.home.toString() %>
12: </body>
13: </html>
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
usw.
Ich hoffe jemand kann mir weiterhelfen.
Vielen Danke schonmal.