473,785 Members | 2,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

java Syntax error in jsp

254 Contributor
i calling this piece of java code in jsp :
Expand|Select|Wrap|Line Numbers
  1. List<Customer> list = Customer.listby_page(currentRs);
  2. ...
  3. ...
  4.  
then it gives me the following error:

Expand|Select|Wrap|Line Numbers
  1. org.apache.jasper.JasperException: Unable to compile class for JSP
  2.  
  3. An error occurred at line: 35 in the jsp file: /admin/sendBulkSMS.jsp
  4. Generated servlet error:
  5. Syntax error on token "<", invalid AssignmentOperator
  6.  
  7. An error occurred at line: 35 in the jsp file: /admin/sendBulkSMS.jsp
  8. Generated servlet error:
  9. Syntax error on token "=", != expected
  10.  
  11. An error occurred at line: 35 in the jsp file: /admin/sendBulkSMS.jsp
  12. Generated servlet error:
  13. Syntax error on token(s), misplaced construct(s)
  14.  
  15. An error occurred at line: 35 in the jsp file: /admin/sendBulkSMS.jsp
  16. Generated servlet error:
  17. Syntax error on token ")", : expected
  18.  
i use Eclipse SDK 3.2 for this project, using jre 16.02.
when i run in local server, it bangs me with the same error again and again...

what is wrong ?

from
Nick
Sep 25 '07 #1
4 10196
dmjpro
2,476 Top Contributor
Expand|Select|Wrap|Line Numbers
  1. List<Customer> list = Customer.listby_page(currentRs);
  2.  
What is the explanation of Customer.listby _page(currentRs );?
And what is the version of your J2SE?
Your J2SE should be 1.5 or later to support Generics.

Kind regards,
Dmjpro.
Sep 25 '07 #2
nickyeng
254 Contributor
fixed.

thanks anyway

from
Nick
Sep 27 '07 #3
nickyeng
254 Contributor
sorry,

here is the code :
Expand|Select|Wrap|Line Numbers
  1. public static List<Customer> listby_page(int currentRs) throws SQLException
  2.     {
  3.         ArrayList<Customer> arraylist = new ArrayList<Customer>();
  4.         Connection conn = DbConnectionManager.getConnection();
  5.         try
  6.         {                                
  7.             PreparedStatement st = conn.prepareStatement("select * from ambulk_customer LIMIT "+currentRs +",15 ");
  8.             ResultSet rs = st.executeQuery();
  9.  
  10.             while (rs.next())
  11.                 arraylist.add( new Customer(rs) );                    
  12.  
  13.             rs.close();
  14.             st.close();                                                
  15.         }
  16.         finally
  17.         {
  18.             DbConnectionManager.release(conn);
  19.         }                
  20.         return arraylist;
  21.     }
  22.  
my version is 1.6.02.

the problem still remain the same....

anyone could tell the possibility?
Oct 3 '07 #4
r035198x
13,262 MVP
sorry,

here is the code :
Expand|Select|Wrap|Line Numbers
  1. public static List<Customer> listby_page(int currentRs) throws SQLException
  2.     {
  3.         ArrayList<Customer> arraylist = new ArrayList<Customer>();
  4.         Connection conn = DbConnectionManager.getConnection();
  5.         try
  6.         {                                
  7.             PreparedStatement st = conn.prepareStatement("select * from ambulk_customer LIMIT "+currentRs +",15 ");
  8.             ResultSet rs = st.executeQuery();
  9.  
  10.             while (rs.next())
  11.                 arraylist.add( new Customer(rs) );                    
  12.  
  13.             rs.close();
  14.             st.close();                                                
  15.         }
  16.         finally
  17.         {
  18.             DbConnectionManager.release(conn);
  19.         }                
  20.         return arraylist;
  21.     }
  22.  
my version is 1.6.02.

the problem still remain the same....

anyone could tell the possibility?
The errors are in /admin/sendBulkSMS.jsp . That's what you should be looking at.
Oct 3 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

73
8075
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities as a standard portable part of the core language, the LISP package, and the java.lang package, respectively. Both have big integers, although only LISP has rationals as far as I can tell. Because CL supports keyword arguments, it has a wider range...
7
12761
by: Jan Gregor | last post by:
Hello I found that jython catches exact java exceptions, not their subclasses. Is there some way to get around this limitation (or error) ? My program has class representing database source and specialed classes for particulars databases. Now there are two options - to include exception (subclasses of SQLException) for every db in except (so all drivers has to be present) or to move methods to subclasses.
133
8601
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
1
2344
by: iksrazal | last post by:
Hi all, I've been struggling to make this command work from Java: /usr/bin/mysql c4 --user=root --password=mypass -e "source /home/crissilva/c4.sql" Works fine as shown when run from the shell. Using my Java program I get:
4
11946
by: 3rdshiftcoder | last post by:
Hi- I'd like to use this class from a book but am getting a compiler error. On the line private List < String > list; p.932 Chapter 19 found in the code below in the eclipse editor it is underlined in red. It is saying it is a syntax error and to delete the tokens. I'd like to use the code below in my program i am working on for my hobby. It will make life so much easier when i get past the compiler error.
2
6968
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of attending interviews. If you own a company best way to judge if the candidate is worth of it. http://www.questpond.com/InterviewRatingSheet.zip
4
3033
by: eviewcs | last post by:
Hello I am a newbie in DB2. I am trying out the Mapping Java definitions to SQL on UDT from the article "DB2's object-relational highlights: Store and invoke structured type objects" by Kathryn Zeidenstein. The url is : http://www-128.ibm.com/developerworks/db2/library/techarticle/ zeidenstein/0109zeidenstein.html#xforms In the article , it is said that the use of Java classes to define SQL
1
2013
by: mshroom12 | last post by:
Hello to all. I am having difficulty trying to do this Java project using Eclipse. The following is what I have to do. Election Day It's almost election day and the election officials need a program to help tally election results. There are two candidates for office -- Polly Tichen and Ernest Orator. The program's job is to take as input the number of votes each candidate received in each voting precinct and find the total number of votes for...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9485
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10161
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9958
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6743
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4058
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2890
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.