java Compilation error:jsp code

Ads
 

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

Ads









Related Tutorials/Questions & Answers:
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
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.
Advertisements
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 - 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 - 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 - 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
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 error - Java Beginners
java compilation error  i have downloaded java software(version 6... from where i should download java or what to do now?  Have you set the java_home and path in your environmental variables in "My Computer
Does the object type known during compilation in Java?.
Does the object type known during compilation in Java?.  class A { } class B extends class A { } class checkType { public static void main(String[] args) { A ObjA = new B();/// Here ObjA is of type A--> this fact
JAVA code For
JAVA code For   JAVA code For "Traffic signals Identification for vehicles
JAVA CODE
JAVA CODE  JAVA SOURCE CODE TO BLOCK A PARTICULAR WEB SITES(SOCIAL WEB SITE
java code
java code  write a java code to convert hindi to english using arrays
java code
java code  need java code for chart or graph which compare the performance of aprior algorithm and coherent rule algorithm.plz any one help me out
java code
java code  write a java code for finding a string in partiular position in a delimited text file and replace the word with the values given by user and write the file in new location
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
java code
java code  sir how to merge the cells in excel using java code please help me and also how to make the text placed in the cell to be center
java code
java code  I need the java code that would output the following: HARDWARE ITEMS CODE DESCRIPTION UNIT PRICE K16 Wood screws,brass,20mm $7.75 D24 Wood glue,clear,1 liter $5.50 M93
Java code
Java code   Create a washing machine class with methods as switchOn, acceptClothes, acceptDetergent, switchOff. acceptClothes accepts the noofClothes as argument & returns the noofClothes
java code
java code  how to extract html tags using java
java code
java code  what is meaning bufferedreader
java code
java code  what is meaning bufferedreader
java code
java code  i want HSVcolor descriptor for color image in java coding
Java Code
Java Code  Write a java program, which creates multiple threads. Each thread performs add/delete/update operations on an ArrayList simultaneously
java code
java code  hi, Can any one tell me " How to read the data which is present om an image in java
java code
java code  Write a program in java for lru caching using two inputs one using integer and another using string of uppercase only
Java code
Java code  Write a program which performs to raise a number to a power and returns the value. Provide a behavior to the program so as to accept any... the following code: import java.util.*; import java.text.*; class NumberProgram
java code
java code  int g() { System.out.println("Inside method g"); int h() { System.out.println("Inside method h"); } } Find the error in the following... cannot define a method inside another method. Anyways, we have modified your code
java code
java code  An employee _id consist of 5 digits is stored in a string variable strEmpid. Now Mr.Deb wants to store this Id in Integer type to IntEmpid. write Java statements to do

Ads