Question: java Compilation error:jsp code

Ads

 
 
 

Share on Google+Share on Google+

susmitha
java Compilation error:jsp code
1 Answer(s)      7 years ago
Posted in : JSP-Servlet
Ads
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 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 - 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
Tutorials   
Java Spring Hibernate Struts Training fat image from db fat image from db fat image from db fat image from db unable to get value returned from javascript variable in page How to change image size before adding to mysql using jsp Design a registration.jsp page with input for user registration details Cart Quantity jsp servlet coding issue servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? servlet,jsp login registration forms without database in ecalipse ide using hashmap to store the registraion details ? image pdf marking pdf marking Multiple image upload using JSP Read code from excel sheet and upload into database using JSP Student java about search engine Convert BLOB to PDF and save it to a location how to copy files from remote to local machine using SFTP SSL in java? Like Team viewer Socket and Servert -Jsp how to copy files from remote location to local using java? How To Store Multilple Images In MySQL database dynamically with image uploader and then retrieve them in image gallery using java how to create SOAP based web service in java? how to fetch data from mysql database table and draw a bar chart on that data using in jsp how to create users in LDAP using java? how to authenticate user using TIVOLI api in java? how to create users using IBM Tivoi API in jsp/servelet? Java/J2ee Please explain this code as many packages and classes are unknown to me .! how to download the uploaded folder files using jsp Login Query image is display from path of mysql database please reply the code to store dynamic fields in database? Reloading issue in jsp How to get Button Id ? calling one jap page from another jsp page login login Problem to get connection from DAO class to JDBC Page Loading Time Fix table's column's name row(1st row of the table) so that it does not move up when the table is scrolled up to view more rows below Sending hidden values

Ads

 
Advertisement null

Ads