Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 11th, 2006, 01:29 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server 2000 + JSP

I have SQL Server 2000 installed on my server machine and SQl server 2005 client component on my client machine...now I want to connect to the database placed at server using JSP remotely....I have installed JDBC Driver for SQL Server 2005 on my machine bcoz I want to connect to SQL Server remotely.......Now I have written code in JSP as
Code:
<%@page import="java.sql.*"%>
<%!public Connection con = null;%>
<%
try { 
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); 
con = DriverManager.getConnection("jdbc:microsoft:sqlserver://192.168.10.5:1433","sa","123456");
}catch(ClassNotFoundException ce){out.println(ce);} 


%>
But when I run the page I got error as

Quote:
quote: type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:370)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:362)


root cause

java.lang.NullPointerException
    org.apache.jsp.index_jsp._jspService(index_jsp.jav a:89)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:322)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    org.netbeans.modules.web.monitor.server.MonitorFil ter.doFilter(MonitorFilter.java:362)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.
Kindly help me what to do bcoz I am new to JSP and SQL Server






Similar Threads
Thread Thread Starter Forum Replies Last Post
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
SQL Server 2000 and SQL Server 2000 CE dparsons SQL Server 2000 1 July 31st, 2006 12:59 PM
looking for access 2000 to sql server 2000 sql/que method SQL Server 2000 0 July 7th, 2005 12:46 PM
SQL SERVER 2000 AND ACCESS 2000 ckentebe SQL Server 2000 3 June 17th, 2004 08:50 PM
Problems with JSP and MSSQL Server 2000 kakram JSP Basics 0 August 22nd, 2003 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.