jsp
Thank u sir for quick response. my compilation path is
http://localhost:8080/calendar1/jsp/insertdate.jsp
i got the following error
ype 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.
View Answers
Related Tutorials/Questions & Answers:
jspjsp how
jsp translated into servlets
JSPJSP How to run
jsp program in eclipse
Advertisements
jspjsp how to create
jsp page
JspJsp Can I implement interface in
jsp JSPwhat is
JSP forward tag for what is
JSP forward tag for
It forwards the current request to another
JSP page. Below is the syntax for the same:-
<
jsp:forward page="...url..." />
We can also forward parameter
jspjsp how to include two
jsp page
jspjsp how to create a table in oracle using
jsp
and the table name is entered in text feild of
jsp page
jspjsp write a code for
jsp file generator to generate a
jsp page automatically taking html page as input
JSPJSP Hi,
What is
JSP? What is the use of
JSP?
Thanks
Hi,
JSP Stands for Java Server Pages. It is Java technology for developing web applications.
JSP is very easy to learn and it allows the developers to use Java
jsp jsp what is the basic necessities reguired for running
jsp using JDBC bridge??
and how to write a
jsp code to access the detail present in microsoft access
pls send link regarding above
jspjsp how to pass
jsp variable to an html page
JSPJSP relevant difference between servlet and
jsp in 1 line
jspjsp how to include google map in our
jsp page
JSP JSP How to create CAPTCHA creation by using
JSP?
I need an code for CAPTCHA creation by using
JSP...
You can create a captcha validation using
jsp. Have a look at the following tutorial:
Captcha Creation
jspjsp how to write a servlet and
jsp program for user login form
jspjsp how to write a servlet and
jsp program for user login form
jspjsp why
jsp is translated into servlet?pls describe precisly
jspjsp code for
jsp automatic genration using html
jspjsp how to write hindi in
jsp and store in database as unicode
JSPJSP FILE UPLOAD-DOWNLOAD code USING
JSP jspjsp how to delete data from database using
jsp jspjsp I Want complete note on
JSP servlet
jspjsp how to upload image through csv format in
jsp JSPWhat are
JSP directives, page directives and include directives? what are
jsp directives? and what are page directives? and what are include directives?
can you explain taglib directives?
JSP directives
JSP JSPCan you explain
jsp page life cycle what is el how does el search for an attribute in JSP Can you explain
jsp page life cycle what is el how does el...://www.roseindia.net/
jsp/simple-
jsp-example/LifeCycleOfJspPage.shtml
http
JSPJSP what are the different scopes an object can have in a
jsp page
JSP Scope Variables:
Page scope-It makes the data available... the following links:
http://www.roseindia.net/
jsp/simple-
jsp-example
jspjsp how to connect the database with
jsp using mysql
Hi Friend,
Please visit the following links:ADS_TO_REPLACE_1
http://www.roseindia.net/
jsp/connectjspwith_mysql.shtml
http://www.roseindia.net/
jsp JSPwhat is jstl in
JSP what is jstl
JSTL is also called as
JSP tag libraries. They are collection of custom actions which canbe accessed as
JSP tags.
For more information, visit the following link:
JSTL Tutorials
JSP access application data stored in JavaBeans components. The
jsp expression...). Before
JSP 2.0, we could use only a scriptlet,
JSP expression, or a custom tag to include server state in the
jsp page output.
For more information, visit
JSPJSP public opinion poll Develop a
JSP for a news channel to conduct public opinion poll on any topic. Users will respond through yes or no options. Later display the result in percentage
jsp jsp Hi all..I am new in
jsp. I have a question. I want develope a
jsp page it contain two part for two different user group. i want to hide some information from user1 group and same as user2 group. can i do this in single
jsp jspjsp hai please give me the table grid code code for
jsp jspjsp how to create multiple tables in oracle 9i using
jsp program
jspjsp Dear deepak,
wat is the purpose of converting
jsp into servlet and how the process takes place..
with regards,
praveen
jspjsp how to assign javascript varible to java method in
jsp without using servlet
JSPJSP why we use preparedstatement while saving data from
jsp to data base table
jspjsp In any
jsp all implicit objects are available directly, in such a case why we need PageContext object again
JSPJSP how does
jsp engines instantiae tag handler classes instances
JSP engines will always instantiate a new tag handler instance every time a tag is encounteredin a
JSP page. A pool of tag instances are maintained
jspjsp Hi
in my dao class some exception is there then how can i display in
jsp page
JSPJSP How to include the same
jsp page dynamically to a number of times automatically
JSPJSP How to include the same
jsp page dynamically to a number of times automatically
jspjsp how to edit only one row from multiple row from single
jsp page dynamically
jspjsp sir i want to
jsp code for online examination like as bank po,,,,,,plz help me sir
jspjsp in my project i have following
jsp in this
jsp the pagesize=30 but i have to create drop down box with values 10,20,30. and i have to pass them to pagesize how can i do this please help me
JSP JSP What is
JSP?
JavaServer Pages (
JSP) is a server-side Java technology an extension to the Java servlet technology that helps... Pages (
JSP) is a server-side Java technology an extension to the Java servlet
JSP objects in
jsp
Implicit objects in
jsp are the objects... and are created at the conversion time of a
jsp into a servlet. But we can pass.../o/
jsp-implicit-objects.shtml
JSP objects in
jsp
Implicit objects in
jsp are the objects... and are created at the conversion time of a
jsp into a servlet. But we can pass.../
jsp-implicit-objects.shtml
JSPJSP Consider that we need to have a text, combo, radio & checkbox in
JSP page and the page data's are retrieved from
JSPJSP Develop a
JSP to keep track number of users and display a message â??You are
nth visitorâ?? where n is number of user
JSPhow can we use beans in jsp how can we use beans in
jsp
JSP provides three tags to work with beans:-
<
jsp:useBean id="bean name... that defines the bean.
<
jsp:setProperty name = "id" property = "someProperty" value