Nieuw lid |
|
Hmm ok thx! Hehe alleen heb nu nogal wat errors als ik mijn page probeer te runnen, een page die ik gewoon van de docent overgenomen heb
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<%
int iscore;
String score = request.getParameter("score");
if (score!=null) { iscore=Integer.parseInt(score);} else {iscore=0; }
String keuze = request.getParameter("keuze");
if (keuze!=null){
if (keuze.equals("1"))
{iscore=iscore+1; out.println("Uw keuze is: Java is great! , uw score is: " + iscore); }
else {iscore=iscore-1; out.println("Uw keuze is: Java sucks! , uw score is: " + iscore);}
// gebruik een forward action om door te gaan naar de volgende pagina !!
} else { out.println("<br/>U bezoekt deze pagina voor de eerste keer. <br/>Vul uw antwoord in op onderstaande vraag.");
}
%>
<form method=post action=page1.jsp>
<h3>Vraag </h3>
Ik zit nu voor het... <br/> <input type="radio" name="keuze" value="1" />
derde jaar op het IIE. <br/> <input type="radio" name="keuze" value="2" />
vierde jaar op het IIE.
<br/>
<br/> <input type="submit" name="ok" value="OK" />
<input type="hidden" name="score" value="<%= iscore %>" >
</form>
</body>
</html>
<%@page contentType="text/html"%> <%@page pageEncoding="UTF-8"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <% int iscore; String score = request.getParameter("score"); if (score!=null) { iscore=Integer.parseInt(score);} else {iscore=0; } String keuze = request.getParameter("keuze"); if (keuze!=null){ if (keuze.equals("1")) {iscore=iscore+1; out.println("Uw keuze is: Java is great! , uw score is: " + iscore); } else {iscore=iscore-1; out.println("Uw keuze is: Java sucks! , uw score is: " + iscore);} // gebruik een forward action om door te gaan naar de volgende pagina !! } else { out.println("<br/>U bezoekt deze pagina voor de eerste keer. <br/>Vul uw antwoord in op onderstaande vraag."); } %> <form method=post action=page1.jsp> <h3>Vraag </h3> Ik zit nu voor het... <br/> <input type="radio" name="keuze" value="1" /> derde jaar op het IIE. <br/> <input type="radio" name="keuze" value="2" /> vierde jaar op het IIE. <br/> <br/> <input type="submit" name="ok" value="OK" /> <input type="hidden" name="score" value="<%= iscore %>" > </form> </body> </html>
errors
Citaat: HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error on token(s), misplaced construct(s)
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error, insert "AssignmentOperator ArrayInitializer" to complete ArrayInitializerAssignement
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error, insert ";" to complete Statement
An error occurred at line: 10 in the jsp file: /page1.jsp
Generated servlet error:
Syntax error on tokens, delete these tokens
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:297)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.15
En af en toe als ik ververs geeft hij
Citaat: HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException: Unable to load class for JSP
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:598)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.ClassNotFoundException: org.apache.jsp.page1_jsp
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:147)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:315)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.
--------------------------------------------------------------------------------
Apache Tomcat/5.5.15
Iemand een suggestie:?:
Niemand??? |