Jsp Syntax Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn jsp syntax error on token delete this token more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Syntax Error On Token Expected
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Syntax error on token “)”, ; expected up vote -1 down vote favorite My Code is public String split(String line) { char[] temp = line.toCharArray(); String get = ""; for(int i = 0;i < line.length();i++) { if(temp[i] == ',') { return get; get = ""; } get = get + temp[i]; } } I am working on Eclipse(Indigo). It gives an error "Syntax error on token "(", ; expected". jsp share|improve this question edited Dec 16 '11 at 17:10 Robert Harvey♦ 129k29224354 asked Dec 16 '11 at 17:03 gr8sniper 2427 1 I don't know about the token error. But you are sure missing a return statement. –Ravi Wallau Dec 16 '11 at 17:06 This probably doesn't have anything to do with your error message, but in your if(temp[i] == ',') block, you're returning get and then setting it? You realize that get = ""; is never going to get called, right? And your function is misnamed; this doesn't split a line, it returns everything up to the first comma. –CanSpice Dec 16 '11 at 17:06 1 I don't see anything wrong with your code, with respect to parentheses. Your title says the error is a close paren, but your question body says the error is on an open paren. Which line of code is the debugger highlighting as the problem line? –Robert Harvey♦ Dec 16 '11 at 17:06 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote It appears that Java is confusing your split declaration with the split function that is part of Java's string class. So when the compiler hits the close paren of your split(String line) declaration, it gets confused because it thinks you're trying to call Java's String split() function, so it is expecting you to close the call with a semicolon. Use the split function that already exists in the Java platform, or give your split function a different name, like myS
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Compile JSP (check syntactical error http://stackoverflow.com/questions/8537577/syntax-error-on-token-expected in JSP) up vote 6 down vote favorite 1 I have 1000 to 1200 JSP files in my project, and I want to check whether there is any syntactical error in those JSP files or not. So how can I check whether there are any error in JSP or not? Is there any way of compiling those JSPs? java jsp syntax error-handling syntax-error share|improve this question http://stackoverflow.com/questions/11356423/compile-jsp-check-syntactical-error-in-jsp edited Jul 23 '13 at 21:01 Peter Mortensen 10.3k1369107 asked Jul 6 '12 at 5:37 Bhavik Ambani 4,72953871 Open them with any IDE and you should see the errors. But you need to think of opening 1000 to 1200! –sans481 Jul 6 '12 at 5:39 Will I have to check for all 1200 JSPs !!!! –Bhavik Ambani Jul 6 '12 at 5:40 you can run them in the WebServer such as tomcat, and visit the url automatically –clevertension Jul 6 '12 at 5:42 What would constitute a 'syntax error'? If you have that many JSPs, chances are that they will also include fragments of other JSPs and, while your JSP markup may be 'valid', the actual page returned to the user may not be. You may need to rethink what exactly you are trying to validate. –radimpe Jul 6 '12 at 5:42 Is there anything like JSP compiler ? –Bhavik Ambani Jul 6 '12 at 5:44 | show 2 more comments 3 Answers 3 active oldest votes up vote 2 down vote accepted Every application server provides a copy of JSP pre-compilation tools. This uti
details. Win a copy of Penetration Testing Basics this week in the https://coderanch.com/t/589720/JSP/java/syntax-error-JSP Security forum! Post Reply Bookmark Topic Watch Topic New http://www.javaworld.com/community/node/2764 Topic programming forums Java Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: JSP syntax error in JSP gouse mohiuddin shaik Greenhorn Posts: 7 posted 4 syntax error years ago hi i couldn't solve this error for the last 2 days..... please provide the solution to the error...... my jsp code is <%@ page import="java.util.ArrayList,java.util.List, java.util.*,java.util.Iterator, electronicVotingSystemProject.Pojo,electronicVotingSystemProject.EvsDao" %>