•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 425,972 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,682 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 1193 | Replies: 8
![]() |
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#1
Apr 30th, 2008
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 34 in the jsp file: /job_link_insert.jsp
Syntax error, insert "AssignmentOperator Expression" to complete Assignment
An error occurred at line: 34 in the jsp file: /job_link_insert.jsp
Syntax error, insert ";" to complete BlockStatements
<%@ page import="java.sql.*"%>
Am stuck and I have looked at the code in the last 5 hours and I can't find any error...Please need urgent help
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 34 in the jsp file: /job_link_insert.jsp
Syntax error, insert "AssignmentOperator Expression" to complete Assignment
<%@ page import="java.sql.*"%>
<%
//String id=request.getParameter("idno");
try
{An error occurred at line: 34 in the jsp file: /job_link_insert.jsp
Syntax error, insert ";" to complete BlockStatements
<%@ page import="java.sql.*"%>
<%
//String id=request.getParameter("idno");
try
{Am stuck and I have looked at the code in the last 5 hours and I can't find any error...Please need urgent help
Last edited by peter_budo : Apr 30th, 2008 at 8:13 am. Reason: Keep It Organized - plase use [code] tags
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#2
Apr 30th, 2008
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#3
Apr 30th, 2008
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#4
May 1st, 2008
The proper way to go about the task would have been to use JSTL or JSF instead of scriptlets. The official J2EE tutorial would be a good starting point. Plus what you posted was far from useful; you need to post the entire relevant code instead of just the line which is flagging an error.
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Could someone help me trace tthe cause of the above error:
Find below the entire code:
Find below the entire code:
<HTML>
<HEAD>
<TITLE>HELB - Job Link</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD><BODY BGCOLOR=#FFFFFF leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="">
<form name="form1" action="helb_jobs.jsp" method="post">
<div align="center">
<table width="780" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="100%" align="center">
<tr valign="top"> <td height="0"> <div align="center"> <table width="780" border="0" cellspacing="0" cellpadding="0">
<tr> <td><img src="images/topstrip.gif" width="780" height="85" usemap="#MapMap" border="0"><map name="MapMap"><area shape="rect" coords="661,69,703,84" href="index.jsp" alt="Home" title="Home"><area shape="rect" coords="720,69,767,84" href="helb_sitemap.html" alt="Sitemap" title="Sitemap"></map></td></tr>
</table><table width="780" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="f5f5f5">
<td height="18">
<div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#FF0000"><marquee scrollamount="3"><b>Are
You a Loanee? Please repay your loan to enable a needy student
to pursue higher education</b></marquee></font></div>
</td></tr> </table><table width="780" cellspacing="0" cellpadding="0" height="50%">
<tr> <td valign="top"> </td><TD ROWSPAN="2" VALIGN="top" HEIGHT="222" WIDTH="225">
<DIV ALIGN="right"><IMG SRC="images/helb_2.jpg" WIDTH="225" HEIGHT="301"></DIV></TD></tr>
<tr>
<td HEIGHT="50" valign="top"><table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td height="2"><div align="center">
<P> </P>
<P> </P>
</div></td>
</tr>
<tr>
<td><div align="center">
<%@ page import="java.sql.*"%>
<%
//String id=request.getParameter("idno");
try
{
String dbhost="2ntserver";
String mysid="NTDB";
String username="test";
String password="test";
//Load driver
Class.forName("oracle.jdbc.driver.OracleDriver");
//Connection information
String url="jdbc:oracle:thin:@" + dbhost + ":1521:" + mysid;
//Username and password
Connection con=DriverManager.getConnection(url,username,password);
//Statement stmt=con.createStatement();
//create statement
String myid=request.getParameter("idno");
session.setAttribute("sidno",request.getParameter("idno"));
String myidlname=request.getParameter("idlname");
session.setAttribute("sidlname",request.getParameter("idlname"));
String myidfname=request.getParameter("idfname");
session.setAttribute("sidfname",request.getParameter("idfname"));
String myidmname=request.getParameter("idmname");
session.setAttribute("sidmname",request.getParameter("idmname"));
String mygender=request.getParameter("gender");
session.setAttribute("sgender",request.getParameter("gender"));
String mydob=request.getParameter("dob");
session.setAttribute("sdob",request.getParameter("dob"));
String myemail=request.getParameter("email");
session.setAttribute("semail",request.getParameter("email"));
String mycell_phone=request.getParameter("cell_phone");
session.setAttribute("cell_phone",request.getParameter("cell_phone"));
String myinstitution_type1=request.getParameter("institution_type1");
session.setAttribute("sinstitution_type1",request.getParameter("institution_type1"));
String mygrade1=request.getParameter("grade1");
session.setAttribute("sgrade1",request.getParameter("grade1"));
String mycountry1=request.getParameter("country1");
session.setAttribute("scountry1",request.getParameter("country1"));
String myinstitution_name1=request.getParameter("institution_name1");
session.setAttribute("sinstitution_name1",request.getParameter("institution_name1"));
String myperiod_of_study_from1=request.getParameter("period_of_study_from1");
session.setAttribute("speriod_of_study_from1",request.getParameter("period_of_study_from1"));
String myperiod_of_study_to1=request.getParameter("period_of_study_to1");
session.setAttribute("speriod_of_study_to1",request.getParameter("period_of_study_to1"));
String myinstitution_type2=request.getParameter("institution_type2");
session.setAttribute("sinstitution_type2",request.getParameter("institution_type2"));
String mygrade2=request.getParameter("grade2");
session.setAttribute("sgrade2",request.getParameter("grade2"));
String mycountry2=request.getParameter("country2");
session.setAttribute("scountry2",request.getParameter("country2"));
String myinstitution_name2=request.getParameter("institution_name2");
session.setAttribute("sinstitution_name2",request.getParameter("institution_name2"));
String myperiod_of_study_from2=request.getParameter("period_of_study_from2");
session.setAttribute("speriod_of_study_from2",request.getParameter("period_of_study_from2"));
String myperiod_of_study_to2=request.getParameter("period_of_study_to2");
session.setAttribute("speriod_of_study_to2",request.getParameter("period_of_study_to2"));
String myinstitution_type3=request.getParameter("institution_type3");
session.setAttribute("sinstitution_type3",request.getParameter("institution_type3"));
String mygrade3=request.getParameter("grade3");
session.setAttribute("sgrade3",request.getParameter("grade3"));
String mycountry3=request.getParameter("country3");
session.setAttribute("scountry3",request.getParameter("country3"));
String myinstitution_name3=request.getParameter("institution_name3");
session.setAttribute("sinstitution_name3",request.getParameter("institution_name3"));
String myperiod_of_study_from3=request.getParameter("period_of_study_from3");
session.setAttribute("speriod_of_study_from3",request.getParameter("period_of_study_from3"));
String myperiod_of_study_to3=request.getParameter("period_of_study_to3");
session.setAttribute("speriod_of_study_to3",request.getParameter("period_of_study_to3"));
String myinstitution_type4=request.getParameter("institution_type4");
session.setAttribute("sinstitution_type4",request.getParameter("institution_type4"));
String mygrade4=request.getParameter("grade4");
session.setAttribute("sgrade4",request.getParameter("grade4"));
String mycountry4=request.getParameter("country4");
session.setAttribute("scountry4",request.getParameter("country4"));
String myinstitution_name4=request.getParameter("institution_name4");
session.setAttribute("sinstitution_name4",request.getParameter("institution_name4"));
String myperiod_of_study_from4=request.getParameter("period_of_study_from4");
session.setAttribute("speriod_of_study_from4",request.getParameter("period_of_study_from4"));
String myperiod_of_study_to4=request.getParameter("period_of_study_to4");
session.setAttribute("speriod_of_study_to4",request.getParameter("period_of_study_to4"));
String myinstitution_type5=request.getParameter("institution_type5");
session.setAttribute("sinstitution_type5",request.getParameter("institution_type5"));
String mygrade5=request.getParameter("grade5");
session.setAttribute("sgrade5",request.getParameter("grade5"));
String mycountry5=request.getParameter("country5");
session.setAttribute("scountry5",request.getParameter("country5"));
String myinstitution_name5=request.getParameter("institution_name5");
session.setAttribute("sinstitution_name5",request.getParameter("institution_name5"));
String myperiod_of_study_from5=request.getParameter("period_of_study_from5");
session.setAttribute("speriod_of_study_from5",request.getParameter("period_of_study_from5"));
String myperiod_of_study_to5=request.getParameter("period_of_study_to5");
session.setAttribute("speriod_of_study_to5",request.getParameter("period_of_study_to5"));
String mybrief_cv=request.getParameter("brief_cv");
session.setAttribute("sbrief_cv",request.getParameter("brief_cv"));
String myprofession=request.getParameter("profession");
session.setAttribute("sprofession",request.getParameter("profession"));
String myuncode1=request.getParameter("uncode1");
session.setAttribute("suncode1",request.getParameter("uncode1"));
String myuncode2=request.getParameter("uncode2");
session.setAttribute("suncode2",request.getParameter("uncode2"));
String myuncode3=request.getParameter("uncode3");
session.setAttribute("suncode3",request.getParameter("uncode3"));
String myuncode4=request.getParameter("uncode4");
session.setAttribute("suncode4",request.getParameter("uncode4"));
String myuncode5=request.getParameter("uncode5");
session.setAttribute("uncode5",request.getParameter("uncode5"));
String myother_un1=request.getParameter("other_un1");
session.setAttribute("other_un1",request.getParameter("other_un1"));
String myother_un2=request.getParameter("other_un2");
session.setAttribute("sother_un2",request.getParameter("other_un2"));
String myother_un3=request.getParameter("other_un3");
session.setAttribute("sother_un3",request.getParameter("other_un3"));
String myother_un4=request.getParameter("other_un4");
session.setAttribute("sother_un4",request.getParameter("other_un4"));
String myother_un5=request.getParameter("other_un5");
session.setAttribute("sother_un5",request.getParameter("other_un5"));
PreparedStatement updatejob=con.prepareStatement("Insert into pot_employee (idno,idlname,idfname,idmname,gender,dob,email,cell_phone,institution_type1,institution_type2,institution_type3,institution_type4,institution_type5,grade1,grade2,grade3,grade4,grade5,country1,country2,country3,country4,country5,institution_name1,institution_name2,institution_name3,institution_name4,institution_name5,period_of_study_from1,period_of_study_from2,period_of_study_from3,period_of_study_from4,period_of_study_from5,period_of_study_to1,period_of_study_to2,period_of_study_to3,period_of_study_to4,period_of_study_to5,brief_cv,profession,uncode1,uncode2,uncode3,uncode4,uncode5,other_un1,other_un2,other_un3,other_un4,other_un5) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
updatejob.setString(1,myid);
updatejob.setString(2,myidlname);
updatejob.setString(3,myidfname);
updatejob.setString(4,myidmname);
updatejob.setString(5,mygender);
updatejob.setString(6,mydob);
updatejob.setString(7,myemail);
updatejob.setString(8,mycell_phone);
updatejob.setString(9,myinstitution_type1);
updatejob.setString(10,myinstitution_type2);
updatejob.setString(11,myinstitution_type3);
updatejob.setString(12,myinstitution_type4);
updatejob.setString(13,myinstitution_type5);
updatejob.setString(14,mygrade1);
updatejob.setString(15,mygrade2);
updatejob.setString(16,mygrade3);
updatejob.setString(17,mygrade4);
updatejob.setString(18,mygrade5);
updatejob.setString(19,mycountry1);
updatejob.setString(20,mycountry2);
updatejob.setString(21,mycountry3);
updatejob.setString(22,mycountry4);
updatejob.setString(23,mycountry5);
updatejob.setString(24,myinstitution_name1);
updatejob.setString(25,myinstitution_name2);
updatejob.setString(26,myinstitution_name3);
updatejob.setString(27,myinstitution_name4);
updatejob.setString(28,myinstitution_name5);
updatejob.setString(29,myperiod_of_study_from1);
updatejob.setString(30,myperiod_of_study_from2);
updatejob.setString(31,myperiod_of_study_from3);
updatejob.setString(32,myperiod_of_study_from4);
updatejob.setString(33,myperiod_of_study_from5);
updatejob.setString(34,myperiod_of_study_to1);
updatejob.setString(35,myperiod_of_study_to2);
updatejob.setString(36,myperiod_of_study_to3);
updatejob.setString(37,myperiod_of_study_to4);
updatejob.setString(38,myperiod_of_study_to5);
updatejob.setString(39,mybrief_cv);
updatejob.setString(40,myprofession);
updatejob.setString(41,myuncode1);
updatejob.setString(42,myuncode2);
updatejob.setString(43,myuncode3);
updatejob.setString(44,myuncode4);
updatejob.setString(45,myuncode5);
updatejob.setString(46,myother_un1);
updatejob.setString(47,myother_un2);
updatejob.setString(48,myother_un3);
updatejob.setString(49,myother_un4);
updatejob.setString(50,myother_un5);
updatejob.executeUpdate();
//response.sendRedirect("http://localhost/form_insert_success.html");
//response.sendRedirect("http://localhost/servlet/Gen_pdf?theid=" + myid);
}
catch(Exception e)
{
e
//response.sendRedirect("http://localhost/record_exist.html");
}
%>
</div></td>
</tr>
</table></td>
</tr> </table>
</div></td></tr>
<tr bgcolor="#336699"> <td height="1"><img src="images/1x1trans.gif" width="600" height="1"></td></tr>
</table></div></form>
</BODY>
</HTML> Last edited by ~s.o.s~ : May 2nd, 2008 at 11:33 am. Reason: Added code tags, learn to use them.
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#6
May 2nd, 2008
•
•
Join Date: Apr 2008
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#7
May 2nd, 2008
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 199
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#8
May 2nd, 2008
Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass
#9
May 2nd, 2008
> If you can't help, why don't you just shut up. you are not any helpful
Insulting forum regulars / contributors is a sure shot way of driving away all help you could have got. Please refrain from such activities.
As far as your problem is concerned, you still haven't shown an indication of integrating the changes suggested in my previous post. Plus I see a hanging 'e' in your catch block which is probably the cause of your problem. This is a pretty basic thing which should have been easy to pick up; maybe you need to go back to the basics of Java programming and dive into J2EE once you are confident of tackling the Java related issues. A document which aids the beginners in finding the reason for some common compile and runtime errors can be found here.
Insulting forum regulars / contributors is a sure shot way of driving away all help you could have got. Please refrain from such activities.
As far as your problem is concerned, you still haven't shown an indication of integrating the changes suggested in my previous post. Plus I see a hanging 'e' in your catch block which is probably the cause of your problem. This is a pretty basic thing which should have been easy to pick up; maybe you need to go back to the basics of Java programming and dive into J2EE once you are confident of tackling the Java related issues. A document which aids the beginners in finding the reason for some common compile and runtime errors can be found here.
I don't accept change. I don't deserve to live.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
Happiness corrupts people.
Failing to value the lives of others cheapens your own.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the JSP Forum
- Previous Thread: Connection is recognised in all JSP files/pages
- Next Thread: I want source code of Recruitment website in JSP



Linear Mode