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









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
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
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
java oracle connection problem - SQL
java oracle connection problem  I have successfully made connection with the oracle10g database that i am using and also able to put in data using JSP. But the codes that i have tried for fetching the data are not working even
struts url problem in Switching module using SwitchAction class - Struts
struts url problem in Switching module using SwitchAction class  when i use SwitchAction class,it creates a problem take a examle when i go from my login module to admin module it shows the url of login module
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
i am getting the problem when i am downloading the pdf file from oracle 10g database - Struts
i am getting the problem when i am downloading the pdf file from oracle 10g database  if i created the pdf file from pdf machine,it is storing into datbase and download the pdf file from database. but when i created the pdf file
Oracle - Java Beginners
Oracle   Hi sir, I installed oracle but the error occur on The java Runtime Environment was not found, at bin\jrew.exe. Hence the Oracle Universal Installer can not be run JRE version 1.1.7 Are the Java and Oracle related
Oracle - JDBC
Oracle fetch variables  i wanted to fetch variables from database using Oracle
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 - SQL
Oracle  Oracle Begginers , if Downloadable Notes are there Please mention the site
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
ex. connect to Oracle - Java Beginners
"; String db = "XE"; String url = "jdbc:oracle:thin:@" + serverName... to oracle, please give me a details tutorial with example code how to connect to oracle. what software i must to use? thank's   Hi
oracle conditions
oracle conditions  can you briefly explain about the "EXISTS" condition in SQL with examples
oracle - JDBC
oracle  sir iam hari iam doing the project using oracle with jdbc in xp when iam inserting the data it is giving error like ora-01034:oracle not available sir plz.......give me the solution it is urgent sir thanku
Oracle - SQL
Oracle  I have one .dmp file. I want to import this file into oracle 9i and oracle 10g. wat is procedure and stepts. thanks u  Open... D:\oracle\ora90\BIN\imp type this command if your are using oracle 9i
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
oracle - JDBC
to store these two fields into oracle database for that i have given one jsp page... it is giving error like java.sql.SQLException:[MICROSOFT][ODBC Driver for oracle][oracle
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
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
PHP Variables from URL
PHP Variables from URL Are you facing problem passing PHP variable from URL... one thing if you are passing unnecessary information in the URL is fine but if you are passing confidential information like password or username in the URL
oracle - JDBC
oracle  How to collect the backup of tables in oracle? plz,, i want some tables in oracle of one system to be shifted to the another system...;There are two .exe files in ORACLE, with the FOLLOWING names,generally
oracle - SQL
oracle  can you suggest me a book regarding oracle and java even..  Hi friend, For more information on Oracle and Java Books visit to : http://www.roseindia.net/programming/books/Freejavabooks.shtml http
oracle - SQL
oracle  what is meant by redo log file?  Hi Friend, In Oracle, a redo log file is used with each database. It records all changes made in datafiles.Each transactions has been recorded in it.It makes it possible
java-oracle
java-oracle  hi friends, I wanted to upload a image from jsp page to oracle database.i am not getting how to do it... Please help me if you can....... please give me detail code
oracle - JDBC
oracle  HI i am using ORACLE 10g. How to i find "TNSNAMES.ORA" file in my system after installation of ORACLE 10g succussfully. please send... that depends on the actual network implementation used. Oracle recommends that SDU
oracle - SQL
) from employee)); In Oracle, you can use the following query: select max
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
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
Problem with open connection - Hibernate
Problem with open connection  Hi Team, I am running one hibernate application and the database is ORACLE 10g.I am getting the below error.I connected to the database by using JDBC(with same driver and url).Please tell me
URL Encoding and URL Decoding
URL Encoding and URL Decoding  What is URL Encoding and URL Decoding ?   URL encoding is the method of replacing all the spaces and other extra characters into their corresponding Hex Characters and Decoding
java programming problem - JDBC
java programming problem  Hi, Request you to provide the source code in Java for the following programming problem : upload .csv file data into oracle database. please send the solution to [email protected]
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
jsp connection with oracle.
jsp connection with oracle.  I want to connect with jsp to oracle,,,plz send me the codes
jsp connection with oracle.
jsp connection with oracle.  I want to connect with jsp to oracle,,,plz send me the codes
Oracle 9i free download
Oracle 9i free download  where to download oracle 9i for database connectivity in j2ee
storing csv into oracle database
storing csv into oracle database  i want jsp code for storing csv file into oracle database
File insertion into oracle database
File insertion into oracle database  How to Read and Insert a file (any format) into a Oracle database
oracle data backup
oracle data backup  how to take oracle tables data backup and use in another system
jdk6 and oracle 8i
jdk6 and oracle 8i  I connecte oracle 8i and jdk6 I notice that why can not connect
Uninstall Oracle Virtual Box
Uninstall Oracle Virtual Box  Hi, Is there any video of uninstalling Oracle Virtual Box? Thanks
Assigning URL
Assigning URL  Actually i have created an attendance template, i can use it perfectly, now the problem is how can my team members access... url to my attendancetemplate.jsp file, please help me if anyone knows, am
ModuleNotFoundError: No module named 'oracle'
ModuleNotFoundError: No module named 'oracle'  Hi, My Python... 'oracle' How to remove the ModuleNotFoundError: No module named 'oracle'... to install padas library. You can install oracle python with following command

Ads