Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JDBC Problem with url in oracle
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Suvo
Problem with url in oracle
0 Answer(s)      2 years and 6 months ago
Posted in : JDBC


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:thin@127.0.0.1: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>

Advertisement
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> <
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
Advertisements
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
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 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
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
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
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
PHP Variables from URL
PHP Variables from URL Are you facing problem passing PHP variable from URL...; But sometime it will create problem for you to show your information in the URL. How see... one thing if you are passing unnecessary information in the URL is fine
Friendly URl
Friendly URl  creating a SEO friendly URL
Oracle - JDBC
Oracle fetch variables  i wanted to fetch variables from database using Oracle
hide url
hide url  how i can hide url i have lot of jsp pages when i call one jsp in address another jsp page name also displayed in the address bar? url not visible to endusers please tell me any answer what i should do
oracle 18/04/2013
oracle 18/04/2013   Why it is called as structured query language
Oracle - SQL
Oracle  Oracle Begginers , if Downloadable Notes are there Please mention the site
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 - 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 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
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 - 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 - 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
Preventing URL rewriting
. Mow the problem is after the user has logged in he/she copies the url. after logged out if he/she rewrites the url then it is redirecting to the same page has...Preventing URL rewriting  Hi. I have a login in page. After the user
Preventing URL rewriting
. Mow the problem is after the user has logged in he/she copies the url. after logged out if he/she rewrites the url then it is redirecting to the same page has...Preventing URL rewriting  Hi. I have a login in page. After the user
 

 

 

DMCA.com