Wrox Programmer Forums
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 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, 03:29 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL SERVER 2005 + JSP

I have SQL Server 2005 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:
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
jsp with sql server 2005 anandchhetri JSP Basics 0 August 13th, 2008 12:23 PM
reg conn to sql server 2005 from vb.net 2005.. veda SQL Server 2005 2 July 1st, 2008 12:16 AM
Conflict in SQL Server 2000 and SQL Server 2005 ayan.mukherjee SQL Language 0 June 30th, 2008 03:34 AM
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
SQL Server 2000 + JSP sobiaa SQL Server 2000 0 October 11th, 2006 01:29 AM





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