Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



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

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


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



Advertisement
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. 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: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
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
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
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 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 - 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 - SQL
Java Compilation error  ava.lang.NullPointerException at beanUtils.SaleHeaderUtility.getFullRemainPatientList(SaleHeaderUtility.java:754... post your code. 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 - Java Beginners
Java compilation error  Method overridden problems in compile time error
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
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 - 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  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 - 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  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  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 - 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.
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 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 - 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  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 - 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
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 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 - 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
Advertisements
 

 

 

DMCA.com