Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

Reply

Join Date: Apr 2008
Posts: 4
Reputation: Jemo2008 is an unknown quantity at this point 
Solved Threads: 0
Jemo2008 Jemo2008 is offline Offline
Newbie Poster

Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #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
<%@ 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 9:13 am. Reason: Keep It Organized - plase use [code] tags
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #2
Apr 30th, 2008
not urgent.
And had you used proper coding techniques instead of scriptlets you'd never had had this problem in the first place.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 4
Reputation: Jemo2008 is an unknown quantity at this point 
Solved Threads: 0
Jemo2008 Jemo2008 is offline Offline
Newbie Poster

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #3
Apr 30th, 2008
I still need help on the error I am getting....Anyone who can help please assist...Am new in java programming
Jweting....what's the proper coding I should have used...
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #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.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 4
Reputation: Jemo2008 is an unknown quantity at this point 
Solved Threads: 0
Jemo2008 Jemo2008 is offline Offline
Newbie Poster

HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #5
May 2nd, 2008
Could someone help me trace tthe cause of the above error:

Find below the entire code:
  1. <HTML>
  2. <HEAD>
  3. <TITLE>HELB - Job Link</TITLE>
  4. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  5. </HEAD><BODY BGCOLOR=#FFFFFF leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="">
  6. <form name="form1" action="helb_jobs.jsp" method="post">
  7. <div align="center">
  8. <table width="780" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" height="100%" align="center">
  9. <tr valign="top"> <td height="0"> <div align="center"> <table width="780" border="0" cellspacing="0" cellpadding="0">
  10. <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>
  11. </table><table width="780" border="0" cellspacing="0" cellpadding="0"> <tr bgcolor="f5f5f5">
  12. <td height="18">
  13. <div align="center"><font face="Arial, Helvetica, sans-serif" size="2" color="#FF0000"><marquee scrollamount="3"><b>Are
  14. You a Loanee? Please repay your loan to enable a needy student
  15. to pursue higher education</b></marquee></font></div>
  16. </td></tr> </table><table width="780" cellspacing="0" cellpadding="0" height="50%">
  17. <tr> <td valign="top">&nbsp;</td><TD ROWSPAN="2" VALIGN="top" HEIGHT="222" WIDTH="225">
  18. <DIV ALIGN="right"><IMG SRC="images/helb_2.jpg" WIDTH="225" HEIGHT="301"></DIV></TD></tr>
  19. <tr>
  20. <td HEIGHT="50" valign="top"><table width="100%" cellspacing="0" cellpadding="0">
  21. <tr>
  22. <td height="2"><div align="center">
  23. <P>&nbsp;</P>
  24. <P>&nbsp;</P>
  25. </div></td>
  26. </tr>
  27. <tr>
  28. <td><div align="center">
  29. <%@ page import="java.sql.*"%>
  30.  
  31. <%
  32. //String id=request.getParameter("idno");
  33.  
  34. try
  35. {
  36. String dbhost="2ntserver";
  37. String mysid="NTDB";
  38. String username="test";
  39. String password="test";
  40. //Load driver
  41. Class.forName("oracle.jdbc.driver.OracleDriver");
  42. //Connection information
  43. String url="jdbc:oracle:thin:@" + dbhost + ":1521:" + mysid;
  44. //Username and password
  45. Connection con=DriverManager.getConnection(url,username,password);
  46. //Statement stmt=con.createStatement();
  47.  
  48. //create statement
  49.  
  50.  
  51. String myid=request.getParameter("idno");
  52. session.setAttribute("sidno",request.getParameter("idno"));
  53. String myidlname=request.getParameter("idlname");
  54. session.setAttribute("sidlname",request.getParameter("idlname"));
  55. String myidfname=request.getParameter("idfname");
  56. session.setAttribute("sidfname",request.getParameter("idfname"));
  57. String myidmname=request.getParameter("idmname");
  58. session.setAttribute("sidmname",request.getParameter("idmname"));
  59. String mygender=request.getParameter("gender");
  60. session.setAttribute("sgender",request.getParameter("gender"));
  61. String mydob=request.getParameter("dob");
  62. session.setAttribute("sdob",request.getParameter("dob"));
  63. String myemail=request.getParameter("email");
  64. session.setAttribute("semail",request.getParameter("email"));
  65. String mycell_phone=request.getParameter("cell_phone");
  66. session.setAttribute("cell_phone",request.getParameter("cell_phone"));
  67. String myinstitution_type1=request.getParameter("institution_type1");
  68. session.setAttribute("sinstitution_type1",request.getParameter("institution_type1"));
  69. String mygrade1=request.getParameter("grade1");
  70. session.setAttribute("sgrade1",request.getParameter("grade1"));
  71. String mycountry1=request.getParameter("country1");
  72. session.setAttribute("scountry1",request.getParameter("country1"));
  73. String myinstitution_name1=request.getParameter("institution_name1");
  74. session.setAttribute("sinstitution_name1",request.getParameter("institution_name1"));
  75. String myperiod_of_study_from1=request.getParameter("period_of_study_from1");
  76. session.setAttribute("speriod_of_study_from1",request.getParameter("period_of_study_from1"));
  77. String myperiod_of_study_to1=request.getParameter("period_of_study_to1");
  78. session.setAttribute("speriod_of_study_to1",request.getParameter("period_of_study_to1"));
  79. String myinstitution_type2=request.getParameter("institution_type2");
  80. session.setAttribute("sinstitution_type2",request.getParameter("institution_type2"));
  81. String mygrade2=request.getParameter("grade2");
  82. session.setAttribute("sgrade2",request.getParameter("grade2"));
  83. String mycountry2=request.getParameter("country2");
  84. session.setAttribute("scountry2",request.getParameter("country2"));
  85. String myinstitution_name2=request.getParameter("institution_name2");
  86. session.setAttribute("sinstitution_name2",request.getParameter("institution_name2"));
  87. String myperiod_of_study_from2=request.getParameter("period_of_study_from2");
  88. session.setAttribute("speriod_of_study_from2",request.getParameter("period_of_study_from2"));
  89. String myperiod_of_study_to2=request.getParameter("period_of_study_to2");
  90. session.setAttribute("speriod_of_study_to2",request.getParameter("period_of_study_to2"));
  91. String myinstitution_type3=request.getParameter("institution_type3");
  92. session.setAttribute("sinstitution_type3",request.getParameter("institution_type3"));
  93. String mygrade3=request.getParameter("grade3");
  94. session.setAttribute("sgrade3",request.getParameter("grade3"));
  95. String mycountry3=request.getParameter("country3");
  96. session.setAttribute("scountry3",request.getParameter("country3"));
  97. String myinstitution_name3=request.getParameter("institution_name3");
  98. session.setAttribute("sinstitution_name3",request.getParameter("institution_name3"));
  99. String myperiod_of_study_from3=request.getParameter("period_of_study_from3");
  100. session.setAttribute("speriod_of_study_from3",request.getParameter("period_of_study_from3"));
  101. String myperiod_of_study_to3=request.getParameter("period_of_study_to3");
  102. session.setAttribute("speriod_of_study_to3",request.getParameter("period_of_study_to3"));
  103. String myinstitution_type4=request.getParameter("institution_type4");
  104. session.setAttribute("sinstitution_type4",request.getParameter("institution_type4"));
  105. String mygrade4=request.getParameter("grade4");
  106. session.setAttribute("sgrade4",request.getParameter("grade4"));
  107. String mycountry4=request.getParameter("country4");
  108. session.setAttribute("scountry4",request.getParameter("country4"));
  109. String myinstitution_name4=request.getParameter("institution_name4");
  110. session.setAttribute("sinstitution_name4",request.getParameter("institution_name4"));
  111. String myperiod_of_study_from4=request.getParameter("period_of_study_from4");
  112. session.setAttribute("speriod_of_study_from4",request.getParameter("period_of_study_from4"));
  113. String myperiod_of_study_to4=request.getParameter("period_of_study_to4");
  114. session.setAttribute("speriod_of_study_to4",request.getParameter("period_of_study_to4"));
  115. String myinstitution_type5=request.getParameter("institution_type5");
  116. session.setAttribute("sinstitution_type5",request.getParameter("institution_type5"));
  117. String mygrade5=request.getParameter("grade5");
  118. session.setAttribute("sgrade5",request.getParameter("grade5"));
  119. String mycountry5=request.getParameter("country5");
  120. session.setAttribute("scountry5",request.getParameter("country5"));
  121. String myinstitution_name5=request.getParameter("institution_name5");
  122. session.setAttribute("sinstitution_name5",request.getParameter("institution_name5"));
  123. String myperiod_of_study_from5=request.getParameter("period_of_study_from5");
  124. session.setAttribute("speriod_of_study_from5",request.getParameter("period_of_study_from5"));
  125. String myperiod_of_study_to5=request.getParameter("period_of_study_to5");
  126. session.setAttribute("speriod_of_study_to5",request.getParameter("period_of_study_to5"));
  127. String mybrief_cv=request.getParameter("brief_cv");
  128. session.setAttribute("sbrief_cv",request.getParameter("brief_cv"));
  129. String myprofession=request.getParameter("profession");
  130. session.setAttribute("sprofession",request.getParameter("profession"));
  131. String myuncode1=request.getParameter("uncode1");
  132. session.setAttribute("suncode1",request.getParameter("uncode1"));
  133. String myuncode2=request.getParameter("uncode2");
  134. session.setAttribute("suncode2",request.getParameter("uncode2"));
  135. String myuncode3=request.getParameter("uncode3");
  136. session.setAttribute("suncode3",request.getParameter("uncode3"));
  137. String myuncode4=request.getParameter("uncode4");
  138. session.setAttribute("suncode4",request.getParameter("uncode4"));
  139. String myuncode5=request.getParameter("uncode5");
  140. session.setAttribute("uncode5",request.getParameter("uncode5"));
  141. String myother_un1=request.getParameter("other_un1");
  142. session.setAttribute("other_un1",request.getParameter("other_un1"));
  143. String myother_un2=request.getParameter("other_un2");
  144. session.setAttribute("sother_un2",request.getParameter("other_un2"));
  145. String myother_un3=request.getParameter("other_un3");
  146. session.setAttribute("sother_un3",request.getParameter("other_un3"));
  147. String myother_un4=request.getParameter("other_un4");
  148. session.setAttribute("sother_un4",request.getParameter("other_un4"));
  149. String myother_un5=request.getParameter("other_un5");
  150. session.setAttribute("sother_un5",request.getParameter("other_un5"));
  151.  
  152. 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(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
  153. updatejob.setString(1,myid);
  154. updatejob.setString(2,myidlname);
  155. updatejob.setString(3,myidfname);
  156. updatejob.setString(4,myidmname);
  157. updatejob.setString(5,mygender);
  158. updatejob.setString(6,mydob);
  159. updatejob.setString(7,myemail);
  160. updatejob.setString(8,mycell_phone);
  161. updatejob.setString(9,myinstitution_type1);
  162. updatejob.setString(10,myinstitution_type2);
  163. updatejob.setString(11,myinstitution_type3);
  164. updatejob.setString(12,myinstitution_type4);
  165. updatejob.setString(13,myinstitution_type5);
  166. updatejob.setString(14,mygrade1);
  167. updatejob.setString(15,mygrade2);
  168. updatejob.setString(16,mygrade3);
  169. updatejob.setString(17,mygrade4);
  170. updatejob.setString(18,mygrade5);
  171. updatejob.setString(19,mycountry1);
  172. updatejob.setString(20,mycountry2);
  173. updatejob.setString(21,mycountry3);
  174. updatejob.setString(22,mycountry4);
  175. updatejob.setString(23,mycountry5);
  176. updatejob.setString(24,myinstitution_name1);
  177. updatejob.setString(25,myinstitution_name2);
  178. updatejob.setString(26,myinstitution_name3);
  179. updatejob.setString(27,myinstitution_name4);
  180. updatejob.setString(28,myinstitution_name5);
  181. updatejob.setString(29,myperiod_of_study_from1);
  182. updatejob.setString(30,myperiod_of_study_from2);
  183. updatejob.setString(31,myperiod_of_study_from3);
  184. updatejob.setString(32,myperiod_of_study_from4);
  185. updatejob.setString(33,myperiod_of_study_from5);
  186. updatejob.setString(34,myperiod_of_study_to1);
  187. updatejob.setString(35,myperiod_of_study_to2);
  188. updatejob.setString(36,myperiod_of_study_to3);
  189. updatejob.setString(37,myperiod_of_study_to4);
  190. updatejob.setString(38,myperiod_of_study_to5);
  191. updatejob.setString(39,mybrief_cv);
  192. updatejob.setString(40,myprofession);
  193. updatejob.setString(41,myuncode1);
  194. updatejob.setString(42,myuncode2);
  195. updatejob.setString(43,myuncode3);
  196. updatejob.setString(44,myuncode4);
  197. updatejob.setString(45,myuncode5);
  198. updatejob.setString(46,myother_un1);
  199. updatejob.setString(47,myother_un2);
  200. updatejob.setString(48,myother_un3);
  201. updatejob.setString(49,myother_un4);
  202. updatejob.setString(50,myother_un5);
  203.  
  204. updatejob.executeUpdate();
  205.  
  206. //response.sendRedirect("http://localhost/form_insert_success.html");
  207. //response.sendRedirect("http://localhost/servlet/Gen_pdf?theid=" + myid);
  208. }
  209. catch(Exception e)
  210. {
  211.  
  212.  
  213. e
  214. //response.sendRedirect("http://localhost/record_exist.html");
  215. }
  216. %>
  217.  
  218. </div></td>
  219. </tr>
  220. </table></td>
  221. </tr> </table>
  222. </div></td></tr>
  223. <tr bgcolor="#336699"> <td height="1"><img src="images/1x1trans.gif" width="600" height="1"></td></tr>
  224. </table></div></form>
  225. </BODY>
  226. </HTML>
Last edited by ~s.o.s~; May 2nd, 2008 at 12:33 pm. Reason: Added code tags, learn to use them.
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #6
May 2nd, 2008
nope. You still haven't done what you were told.
And now you're posting reams of unformatted code as well, another mortal sin.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 4
Reputation: Jemo2008 is an unknown quantity at this point 
Solved Threads: 0
Jemo2008 Jemo2008 is offline Offline
Newbie Poster

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #7
May 2nd, 2008
If you can't help, why dont you just shut up. you are not any helpful
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #8
May 2nd, 2008
noone's going to help you with that attitude, kiddo...
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jun 2006
Posts: 7,609
Reputation: ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of ~s.o.s~ has much to be proud of 
Solved Threads: 464
Super Moderator
Featured Poster
~s.o.s~'s Avatar
~s.o.s~ ~s.o.s~ is offline Offline
Failure as a human

Re: Need Urgent HELP-Syntax error, insert "AssignmentOperator Expression" to complete Ass

 
0
  #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.
I don't accept change; I don't deserve to live.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC