473,388 Members | 1,277 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

java Syntax error in jsp

254 100+
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 10131
dmjpro
2,476 2GB
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 100+
fixed.

thanks anyway

from
Nick
Sep 27 '07 #3
nickyeng
254 100+
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 8TB
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
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...
7
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...
133
by: Gaurav | last post by:
http://www.sys-con.com/story/print.cfm?storyid=45250 Any comments? Thanks Gaurav
1
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...
4
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...
2
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...
4
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...
1
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.