•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 402,657 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,197 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 524 | Replies: 3 | Solved
![]() |
I m trying to connect MYSQL 4.1.1 from JSP using java. and I m getting error as described below.
javax.servlet.ServletException: Extra bytes at the end of class file org/gjt/mm/mysql/Driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.Login100408_jsp._jspService(Login100408_jsp.java:697)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
plz help me I m not getting any solution.
javax.servlet.ServletException: Extra bytes at the end of class file org/gjt/mm/mysql/Driver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774)
org.apache.jsp.Login100408_jsp._jspService(Login100408_jsp.java:697)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
plz help me I m not getting any solution.
That is a legacy Driver. It is only around for backwords compatability. Use com.jdbc.mysql.Driver instead.
P.S. No need to change your jarfile (depending on the version of course), just change the String in the Class.forName() or Driver.registerDriver() method call.
P.S. No need to change your jarfile (depending on the version of course), just change the String in the Class.forName() or Driver.registerDriver() method call.
Last edited by masijade : May 5th, 2008 at 4:01 am.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
•
•
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,230
Reputation:
Rep Power: 10
Solved Threads: 270
One thing you should also be aware of, database connection from JSP is out of date. Now JSP is used for presentation purposes (user input, or system data presentation for user) and servlet handle logic, which includes DB connectivity
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Publilius Syrus
(~100 BC)
If we helped you to solve your problem, answered your question please mark your post as SOLVED.
![]() |
•
•
•
•
•
•
•
•
DaniWeb JSP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Trojan Problems HJT File Included, Help Please (Viruses, Spyware and other Nasties)
- Log File: suspicious of being key logged (Viruses, Spyware and other Nasties)
- Trojan is almost cleared out, just need help with the log file (Viruses, Spyware and other Nasties)
- A whole lot of nasties...HJT file (Viruses, Spyware and other Nasties)
- Need help with the Trojan vundo file ... (Viruses, Spyware and other Nasties)
- Can anyone help me remove AVsytem care please? (Viruses, Spyware and other Nasties)
- Windows File Explorer and Related Objects Would NOT Open! (Viruses, Spyware and other Nasties)
- Non working windows explorer - hijack log file please help (Viruses, Spyware and other Nasties)
Other Threads in the JSP Forum
- Previous Thread: Retrieving data from database.
- Next Thread: Same JSP is populated in IE7 but not in Firefox



Linear Mode