java Compilation error:jsp code

java Compilation error:jsp code

View Answers

July 20, 2009 at 3:21 PM

Hi Friend,

You haven't closed the string literal properly,therefore error occurs.In some places you have used double quotes in place of single quotes.

Here is your modified code;

<%@ page import="javax.servlet.*" %>

<%@ page import="javax.servlet.http.*" %>
<%@ page import="pack.Dbclass2" %>

<%
{
Dbclass2 d= new Dbclass2();

d.getConnection();

int b=d.max();

d.closeConnection();
int b=1;
out.println("<html><head><title> Add Employee Details</title></head>");

out.println("<body>");

out.println("<form action='/Employee_App1/add1.jsp' >");

out.println("<TABLE border='3' style='background-color:#87ED3A;' >");

out.println("<TABLE align='center' border='2' style='background-color:#87CEFA;'>");

out.println("<TR><TD>Employee code</TD>");

out.println("<TD><input type='value' name='ecode' value='"+b+"'> </TD> </TR>");

out.println("<TR><TD>Employee Name</TD><TD><input type='text' name='ename' ></TD></TR>");

out.println("<TR><TD>Department code</TD><TD><input type='value' name='dtcode' ></TD></TR>");

out.println("<TR><TD>Designation code</TD><TD><input type='value' name='dgcode' ></TD></TR>");

out.println("<TR><TD>Date of Birth</TD><TD><input type='date' name='dob' ></TD></TR>");

out.println("<TR><TD>Gender</TD><TD><SELECT name='gd'><OPTION VALUE='f'>Female</OPTION><OPTION VALUE='m''>Male</OPTION></SELECT></TD></TR>");

out.println("<TR><TD>Address1</TD><TD><input type='text' name='addr1' ></TD></TR>");

out.println("<TR><TD>Address2</TD><TD><input type='text' name='addr2' ></TD></TR>");

out.println("<TR><TD>City</TD><TD><input type='text' name='ct' ></TD></TR>");

out.println("<TR><TD>State</TD><TD><input type='text' name='st' ></TD></TR>");

out.print("<TR><TD>Country</TD><TD><select name='cou'><OPTION VALUE='india'>India</OPTION><OPTION VALUE='srilanka'>Srilanka</OPTION>");

out.print("<OPTION VALUE='china'>China</OPTION><OPTION VALUE='malaysia'>Malaysia</OPTION><OPTION VALUE='indonesia'>Indonesia</OPTION>");

out.println("<OPTION VALUE='others'>Others</OPTION></select></TD></TR>");

out.println("<TR><TD colspan=2><input type='submit' value='insert'></TD></TR></TABLE></TABLE>");

out.println("</form></body></html>");
}
catch(Exception e)
{
out.println(e);}
%>

Thanks









Related Tutorials/Questions & Answers:
java Compilation error:jsp code - JSP-Servlet
java Compilation error:jsp code   I am getting an Generated Servlet... code: <% { Dbclass2 d= new Dbclass2... action='/Employee_App1/add1.jsp' >"); out.println("<TABLE border='3
Java Compilation error. Hibernate code problem. Struts first example - Hibernate
Java Compilation error. Hibernate code problem. Struts first example  Java Compilation error. Hibernate code problem. Struts first example
Advertisements
Compilation error. Hibernate code - Hibernate
Compilation error. Hibernate code   Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.hibernate.cfg.Configuration.(Configuration.java:152) at com.sat.Manager.main(Manager.java:10
java Compilation
java program compilation time following error is occur in my system Note...java Compilation  import java .util.*; class ArrayListDemo... in Java 5 and later if you're using collections without type specifiers (e.g.
java Compilation
java program compilation time following error is occur in my system Note...java Compilation  import java .util.*; class ArrayListDemo... in Java 5 and later if you're using collections without type specifiers (e.g.
java Compilation
java program compilation time following error is occur in my system Note...java Compilation  import java .util.*; class ArrayListDemo... in Java 5 and later if you're using collections without type specifiers (e.g.
java compilation error - Hibernate
java compilation error  hi i am getting org.hibernate.exception.GenericJDBCException: Cannot open connection exception when runnig the code why this exception is coming
java compilation error - Applet
java compilation error  I am getting compilation error in the following code.: public void paint(Graphics g) { switch(screen) { case 0: g.drawString(line1,2,10); break; case 1
jsp code compilation error - JSP-Servlet
jsp code compilation error  hai, iam doing online banking project.i... is the error and also what is the proper code for funds transfer. HTTP...) java.lang.Integer.parseInt(Integer.java:497) org.apache.jsp.xxxxxxxxxxxxxxx_jsp._jspService
java compilation error - Applet
java compilation error  hi friends the following is the awt..., Plz give full details with source code and visit to : http://www.roseindia.net/java/example/java/awt/ Thanks
java compilation error,Struts2 - Struts
java compilation error,Struts2  hi, From last 3 days i m trying for image uploading through struts2 by taking the reference of file upload sample code from roseindia.net site,But i m unable to insert it into database,its
Java Compilation error - SQL
Java Compilation error  ava.lang.NullPointerException at beanUtils.SaleHeaderUtility.getFullRemainPatientList(SaleHeaderUtility.java:754... post your code. Thanks
java compilation error - Ant
java compilation error  hi, i have a application in which i m reading from an xml file and then storing its values in database.but when i started.... do let me know?  Hi Friend, Please post your code. Thanks
java compilation - Java Beginners
java compilation  compiling a program that execute name,surname... of academic year.  Hi friend, Code of a program : import...); System.out.println("College/University " + college); } } For compilation : c:\>
Java compilation error - Java Beginners
Java compilation error  Method overridden problems in compile time error
compilation error - Java Beginners
not in the Hexadecimal or Octal. Here is fraction of Java code example which will help you...compilation error  class s { public static... is the reason?  Hi Friend, In Java there are some specific literal
java compilation error - Hibernate
java compilation error  hi, i have made an registration page whosevalues should be inserted into database. i have used hibernate and eclipse it is working fine. but when i make a war file and deploy it using ant and then run
compilation error - Java Beginners
compilation error  sir what is the error inthis code after executing the below code i got java.lang.NoSuchMethodError: main Exception... : C:\>javac -d . Group.java 3)For execute the programm : C:\>java
java compilation error - Java Beginners
java compilation error  Sir Thanx for ur response for reading a doc file but when i tried to execute ur code compilation error occurs, it says --> org.apache.poi.hwpf package does not exist. -->
java compilation error - Java Beginners
java compilation error  HELLO SIR,I HAVE ASKED QUESTION AND I GOT REPLY FOR THAT ALSO BUT I AM GETING COMPILATION ERROR UNCHECKED OR UNSAFE OPERATION... be a deprecated method which shows that message.Even then,if you run the given code,you
compilation error - Java Beginners
compilation error  i 'm not able to compile a program : prblem...; Post your code.  //this is person code!! public class Person...=dog; } public Dog getDog() { return dog; } } //this is Dog code
compilation error - Java Beginners
compilation error   import java.awt.*; import java.awt.event.*; import javax.swing.*; class BLayout implements ActionListener { JFrame f...,BorderLayout.CENTER}; for(int i = 0 ; i  Hi Friend, Try the following code
compilation error - Java Beginners
compilation error  Dear sir, When i compile some pgms i am getting below error.what may be the reason? "uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details."  Hi Friend
java compilation error - JDBC
java compilation error   /* *Project:employee.java *Date:April 04,2007. *Purpose:To All Java Developers **/ package employee; import javax.swing.*; import java.awt.*; import javax.swing.border.
Java Compilation error - Java Beginners
Java Compilation error  how to put 2 classes on java program?and what shall i do if symbol not found appear?  Hi Friend, Try the following code: class Determine{ public int add(int a,int b){ return a+b
Java Compilation error - Java Beginners
Java Compilation error  I got this error while convert java to pdf... Exception:java.lang.IndexOutOfBoundsException: reserve - incorrect column..., Please send your code. Thanks   Its ok... i already solved
Java Compilation error - Java Beginners
Java Compilation error   i wrote a simple hello world program i get this error every time please help Exception in thread "main..., Please send your code so that we can help you. Thanks
java compilation error - Java Beginners
java compilation error  Hello madam/sir, i m a beginners in java. My problem is that i want to connect a login form to a frame containing 4 panels. how could i do it?Please help
java compilation error - JSP-Servlet
java compilation error  i have created an employee table in mysql and connected it using JDBC, now i have to do client side validations, can u please... code
Java Compilation - Java Beginners
Java Compilation  Dear Sir, Thanks for giving the code for the question which i posted. I went through the program "Write a Java program to read... it as simple java code. Thanks
java compilation - Java Beginners
for java ActoinButtonsPanel  Hi Friend, Try the following code: 1)java code: import java.awt.*; import javax.swing.*; public class...java compilation  import java.awt.*; import javax.swing.
Java Compilation - Java Beginners
Java Compilation  Dear Sir, Could you please send me the program code for the following java program? Q:Create a classname Math with its required... You  Hi Friend, Try the following code: import java.util.*; class
Java Compilation - Java Beginners
Java Compilation  How would i write a complete java program which, using a do-while loop, reads integers from the keyboard and sums them until... the following code: import java.util.Scanner; public class Sum { public
Java Compilation - Java Beginners
Java Compilation  I want to write a complete java program that catenates the file named "first" with the named "second" and produces a file named..." are unchanged.  Hi Friend, Try the following code: import java.io.
java compilation error - Java Beginners
java compilation error  Dear Sir ........ I was installed the java... writing my code through command line instead of a note pad but while compiling I'm... Shireesha.  Hi Friend, As you have mentioned that your java file
Java Compilation - Java Beginners
Java Compilation  I want to write a Java program that asks the user for the names of 3 files. I want the first file to be opened for reading...(); outputFile.close(); } }  Hi Friend, Try the following code
Java Compilation - Java Beginners
Java Compilation  I want to write a program that takes a positive integer from the keyboard. I want my program to sum all the integers from 1 up...++; } while(x>=0) } }  Hi Friend, Try the following code
Java Compilation - Java Beginners
Java Compilation  I tried what was given to me but im still having... is the code that I have: import java.util.Scanner; import java.text.DecimalFormat... Friend, Try the following code: import java.util.Scanner; import
Java Compilation - Java Beginners
Java Compilation  How do you design a Java application that inputs a single letter and prints out the corresponding digit on a telephone? It should be done in such a way that the letters and digits on a telephone are grouped
Java Compilation - Java Beginners
Java Compilation  I want to write a program that takes a positive integer from the keyboard. I want my program to sum all the integers from 1 up to and including the number entered. For example, if the user enters 5, the loop
Java compilation error - Java Beginners
Java compilation error  Hello I am having this problem while compiling I create a file the package is com.deitel.ch14; the filename... your code so that we can solve your problem. Thanks
java compilation - UML
java compilation  write java methods to implement queues by the simple but slow method of keeping the front of the queue always in the first position of a linear array
java compilation - UML
java compilation  write java methods to implement queues in a linear array with two indices front and rear, such that, when rear reaches the end of the array, all the entries are moved to the front of the array
JAVA COMPILATION - UML
JAVA COMPILATION  A real estate office handles 50 apartment units.When the rent is $600 per month, all the units are occupied. However, for each $40....  Hi Friend, Try the following code: import java.util.*; public
java compilation - UML
java compilation  In a gymnastics or diving competition, each constestants score is calculated by dropping the lowest and the highest scores... of 56.90 points.  Hi Friend, Try the following code: import java.util.
java compilation - UML
java compilation  Write a program that allows the user to enter students' names followed by their test scores and outputs the following information... having the highest score  Hi Friend, Try the following code
java compilation - Java3D
java compilation  A point in the x-y plane is represented by its x-coordinate and y-coordinate.Design the class point that can store and process... Friend, Try the following code: class Points{ private double x; private
java compilation - UML
java compilation  Every circle has a center and a radiuus. Given the radius , we can determine the circles area and circumference. Given the center... code: class Point{ private double x; private double y; public Point
java compilation - UML
java compilation  Design and implement the class Day that implements the day of the week in a program. The class Day should store the day... various operations on the class Day.  Hi Friend, Try the following code
java compilation - UML
java compilation  write a program that accepts a data sequence, generates a fcs (using a known divisor) and then ultimately check wether the recieved data is in error or not  Hi Friend, Please clarify it. Thanks

Ads