Problem with url in oracle

Problem with url in oracle

hi i m having trouble with the following code. when i run it i get the error as invalid oracle url specified. i am using tomcat 6 and oracle 10g release2 10.2.0.3. heres the code

<html>
<head>
<title>check</title>
</head>
<body>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 <%@ page import="java.sql.*"%>
 <%@page import="java.io.*"%>
 <%String m=null;
  String m1=null;
  String s=request.getParameter("t1");
  PreparedStatement ps=null;
  Connection cn=null;
  ResultSet rs=null;
  Class.forName("oracle.jdbc.driver.OracleDriver");
  cn=DriverManager.getConnection("jdbc:oracle:[email protected]:1521","system","tiger");
  ps=cn.prepareStatement("select * from emp where name=?");
  ps.setString(1,s);
  rs=ps.executeQuery();
  while(rs.next())
    {
      m=rs.getString(1);
      m1=rs.getString(2);
      }
      out.println("Emp id :" +m);
     out.println("Name :" +m1); 
    %>    
    </body>
</html>
View Answers

Ads









Related Tutorials/Questions & Answers:
Problem with url in oracle
Problem with url in oracle  hi i m having trouble with the following code. when i run it i get the error as invalid oracle url specified. i am using tomcat 6 and oracle 10g release2 10.2.0.3. heres the code <html> <
oracle problem
oracle problem  Hi I have installed oracleXE on my system and for reasons i've uninstalled them and am not able to stop oracle xe services and i could'nt reinstall it. I couldnt reinstall my os for this as it is in my office
Advertisements
URL problem
URL problem  Hi. I have created a webpage for my project website. in that i have used frameset to split the page. Now if i click any link in the page its navigating to the another page. but the problem is here in the url its
oracle connectivity problem with netbeans
oracle connectivity problem with netbeans  sir I am using oracle window version +net bean6.8. jam trying to connect net bean to oracle. for this after adding new driver(ojdbc6.jar) in services tab I got connectivity with oracle
Oracle 9i database problem
Oracle 9i database problem  Hi Somebody has given the solution but i.............,send reply immediately. I have a problem in Oracle9i .I have installed Oracle 9i in my laptop.and i got sql+ page ok.i have gone to control panel->odbc
jdbc oracle connectivity problem
jdbc oracle connectivity problem  Hi All, I am trying to connect my swing application to oracle DB . but class.forname is giving error. Please suggest me if there is some different way to connect swing application to oracle
how to solve this problem for oracle connectivity
how to solve this problem for oracle connectivity  Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap ter could not establish the connection
problem with dynamic url
problem with dynamic url  Hello! I was asked to implement a dynamic url code below to a html template I designed. I am a web designer... it right. Can't figure out why there is a space in the path on the "$t_url
oracle
oracle   sir now am doing one project , my frond end is vb and backend is oracle. so 1> how can i store the image in my field 2> how can i back up the table into .txt file
Oracle9i Problem
Oracle9i Problem  Hi I have a problem in Oracle9i .I have installed Oracle 9i in my laptop.and i got sql+ page ok.i have gone to control panel... the Oracle and it tested successfuly.Now i clicked on SQL+ and i typed " scott
java with Oracle Database
java with Oracle Database  Hello I have been encountering a problem regarding creating a table with Oracle.When i am creating new table in the Database using Oracle , it is giving error saying an errror occured incursive sql
oracle 18/04/2013
oracle 18/04/2013   Why it is called as structured query language
Oracle BLOB
Oracle BLOB  Can anyone send me the code for inserting an image or audio into the oracle database using BLOB datatype. Plz...it's useful for my project
oracle conditions
oracle conditions  can you briefly explain about the "EXISTS" condition in SQL with examples
Oracle Database connectivity probem
Oracle Database connectivity probem  hi Below is the code of oracle... also set the environment variable like that .;E:\oracle\ora81\jdbc\lib\classes12.zip;E:\oracle\ora81\jdbc\lib\ojdbc14.zip;C:\Program Files\Apache Software
Problem to get connection from DAO class to JDBC
{ String DRIVER="oracle.jdbc.driver.OracleDriver"; String URL="jdbc:oracle...Problem to get connection from DAO class to JDBC  package controller..."); con = DriverManager.getConnection("URL,USERNAME,PASSWORD
oracle connectivity
oracle connectivity  con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr"); i have error on above line when i tried...=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl","hr","hr
solve this problem
is compiled but when i eneterd url in tomcat server. Its not giving error but only... in table please tell me the solution for thid problem import java.io.*; import..."); PrintWriter out = response.getWriter(); String url = "jdbc:mysql
Servlet problem
problem from last three month and now i hope rose india developers... connectivity code it works but problem is with servlet page. My servlet code... = 0; /* String url= "jdbc:jtds:sqlserver://db205.my-hosting-panel.com
problem with the installation of apache-geramio2.1 server
problem with the installation of apache-geramio2.1 server  i have installed Apache Geronimo 2.1 server on my pc,but desired page is not coming on the BROWSER after typing localhost:8080 on the contrary oracle page
i have problem with classnofounderror
i have problem with classnofounderror   import java.sql.*; public class Tyagi { public static void main (String args[])throws SQLException... = DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:oracle", "System", "manager
i have problem with classnofounderror
i have problem with classnofounderror   import java.sql.*; public class Tyagi { public static void main (String args[])throws SQLException... = DriverManager.getConnection("jdbc:oracle:thin:@localhost:8080:oracle", "System", "manager
problem in onlinetest...
problem in onlinetest...  hi, my code getting the problem is ,when user leave a question then the server puts error... pls help me
oracle vs sql
oracle vs sql  what is the difference between oracle and sql
how to download oracle 9i
how to download oracle 9i  how to download oracle 9i
Oracle - JDBC
Oracle  How to Use Blob and Clob Data types in Oracle...  Hi friend BLOB : Binary Large Object CLOB : Character Large Object Default storage each time a BLOB or CLOB exceeds 4000 bytes you could cause
jsp problem
jsp problem  problem:::::::: On JSP form ,when i insert data in text...(value){ xmlHttp=GetXmlHttpObject() var url="getdata.jsp"; url=url+"?name="+value; xmlHttp.onreadystatechange=stateChanged xmlHttp.open("GET",url,true
javascript problem
javascript problem  hi guys My problem is that I am using radio button for yes or no but i want to do that if I press yes button then enter... enter please help me this problem
problem in database
problem in database   thanks for web site. I want change this code to insert data into PostgreSql database using jsp,servlets. but i getting...; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/servlet
jsp problem
jsp problem  Hello Friends, I want to show one page for 5 seconds and after that i want to redirect the page to another URL
Multi-Date Handling Problem
Multi-Date Handling Problem  In our project we are using Oracle 10g as our data base, the problem is that we are picking In-date & Out-date from a calendar and on the basis of that date we are checking that on that date some

Ads