Im sorry to bother all of you but I am relatively new to
JSP and I'm currently working on my school practical that requires me to create a simple .jsp file that performs a login check. The problem is I have 0 experience with creating.jsp pages but I am faced with a bad start. When I access the .jsp from the post function of my html page, im faced with this error:
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: 2 in the jsp file: /login.jsp
Invalid character constant
1: <%
2:
String user = request.getParameter('username');
3: String pswd = request.getParameter('password');
4:
5: if(user.equals("John") && pswd.equals("godimsohot"){
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:95)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:374)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
My .jsp contains a few lines as follows
part of my html is as follows :
Any help is duely appreciated