Home Answers Viewqa JSP-Servlet java Compilation error:jsp code

 
 


susmitha
java Compilation error:jsp code
1 Answer(s)      3 years and 10 months ago
Posted in : JSP-Servlet

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 Pages:
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
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 - 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: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
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  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
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
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
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
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.
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
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
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
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 - 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 - 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 - 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  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  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 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  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 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 error - Java Beginners
java compilation error  Hello, I'm having problems with trying to correct 2 compiler errors. The code I'm having trouble with is listed below. It's flagging two errors for this one code. The first error says identifier
Java Compilation Problem - Java Beginners
Java Compilation Problem  I defines a class named as class Authors...; Hi friend, Give full details with source code. For more information on Java visit to : http://www.roseindia.net/java Thanks
java compilation error - Java Beginners
java compilation error  I need to know how to correct a compiler.... The code it's firing on looks like this public String toString() { return..., cmm0518@yahoo.com   Hi Friend, Please send your full code. Thanks 
java compilation error - Java Beginners
java compilation error  i am going to type program and the error...:"+ch); } }   Hi friend, Having some error in your code check it : you have not used try catch block : Correct code : import java.io.
java compilation error - Java Beginners
java compilation error  i am going to type program and the error...:"+ch); } }   Hi friend, Having some error in your code check it : you have not used try catch block : Correct code : import java.io.
java compilation error - Java Beginners
java compilation error   1)java code: import java.awt.*; import...(multBut); } } ****** its code is being compiled . But the command java... to run a program.Just compile the java file and use the html code to call the class
Compilation error in java - Java Beginners
Compilation error in java  i have a properties file named "connecton.properties" which has details about database server connection. when i load i that file in java class,my code is Properties props = new Properties(); File
Java Compilation Error - Java Beginners
Java Compilation Error   Actually Iam having a packaging. Whatever... regarding that.  Hi friend, We check your code having some... SocialNetworks1 In "SocialNetworks1.java" import author.Authors; *)In code Like
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
compilation error in java - Java Beginners
compilation error in java  Here is the pgm usinf if-else statement... the following code: class grade { public static void main(String [ ] args.... For removing the error you have to use the String type in place of char & your code
java compilation error - Java Beginners
java compilation error  Hello, I had recently sent an email and got a response regarding how to add an image to a GUI. I used the code...); } } thanks, cmm0518@yahoo.com  Hi Friend, Please send your full code so
java compilation error - Java Beginners
java compilation error  package punitha; import java.util.Vector... code here: ReadFile rf=new ReadFile(file.getAbsolutePath... calling other java pgms like k-means and Readfile... when i execute am getting error
java compilation error - Java Beginners
java compilation error  Hello, I sent a previous message regarding... in java graphics to be able to save it as a file if so, how can I do..., If you want to display the image on frame,try the following code: import

Ask Questions?

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.