
when i compile the dateOfBirth.html i got the following errors in tomcat 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: 7 in the jsp file: /jsp/insertdate.jsp
month cannot be resolved
4:
5: <%
6: String con=request.getParameter("DateOfBirth_Month");
7: java.util.Date date = new SimpleDateFormat("MM", Locale.ENGLISH).parse(month);
8: Calendar cal = Calendar.getInstance();
9: cal.setTime(date);
10: int month = cal.get(Calendar.MONTH);
An error occurred at line: 17 in the jsp file: /jsp/insertdate.jsp Duplicate local variable con 14: calendar.set(year,month,day); 15: try{ 16: Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); 17: Connection con = DriverManager.getConnection("jdbc:sqlserver://localhost:1433;databaseName=sree;integratedSecurity=true;", " ", " "); 18: PreparedStatement pstmt = con.prepareStatement("insert into cal(calendar) values(?)"); 19: java.sql.Date sqlDate = new java.sql.Date(calendar.getTime().getTime()); 20: pstmt.setDate(1, sqlDate);
Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
Apache Tomcat/6.0.32

why are you compiling html file? Run it simply as other html files.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.