Hi friends
Can i instantiate a java class in server side java
script
if yes where should that class must me lying
where my jsp page is or in servletclasses dir (in case
of weblogic server)

i need to use two existing java pgms in my jsp page
do i need to use the method the way we acess normal
beans or is there any other method

i am also facing  pblm while connecting to database
i am embedding the following code in jsp page
its always giving me driver not found error
i have set the suiatble environment variables at the
server

<%@ page
import="java.sql.*,java.sql.Driver,java.util.Properties"
%>


<%! Connection con; %>
  <% Properties prop= new Properties(); %>
  <% prop.put("user","sa"); %>
  <% prop.put("password",""); %>
  <% prop.put("db","pubs");
prop.put("server","KAILASH"); prop.put("port","1433");
%>
  <% try{
Class.forName("weblogic.jdbc.mssqlserver4.Driver");}catch(ClassNotFoundException
e){out.println("Error12331"+e);} %>
  <% try{con=
DriverManager.getConnection("jdbc:weblogic:mssqlserver4",prop);}catch(SQLException
e){out.println("Error in connection"+e);} %>


thanks
Deepak

__________________________________________________
Do You Yahoo!?
Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to