I dont know I should post JSP error in here or not. If not please redirect me to another one. Thx.
I just installed apache tomcat with mysql with java, but i got error when try to connect to mysql database, what is happening? Here is my error msg:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 3 in the jsp file: /tutorial/test.jsp
Syntax error on tokens, delete these tokens
1: <%@ page import="java.sql.*" %>
2: <%
3: String connectionURL = "jdbc:mysql://localhost:3306/test?username="admin1"&password="admin"";
4: Connection connection = null;
5: Statement statement = null;
6: ResultSet rs = null;
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.jav acError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacEr ror(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateCla ss(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:308)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:286)
org.apache.jasper.compiler.Compiler.compile(Compil er.java:273)
org.apache.jasper.JspCompilationContext.compile(Js pCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:308)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
Not the answer you were looking for? Post your question . . .
170,098 Experts ready to help you find a solution.
Sign up for a free account, or
Login (if you're already a member).