Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Connection string to insert data to Oracle DB

843844Feb 16 2010 — edited Feb 16 2010
Hay guys,

Now I am facing the problem to insert data to the oracle db. I already connect the db to my netbeans service tag & also found the db & tables. But does not know how to insert, delete etc from my JSF pages. I send my JSF code. You guys tell me in which position in the code I will set the connection string, as well as the pattern of connection string. You guys found that I add a button name "show". I want that when I press the "show" button then the relative data will show in the corresponding textfield. I would like to mention that my database server ip is "192.168.56.2". And my netbeans installed pc's ip is "192.168.56.1". My oracle SID is "orcl", user name: "Asystem", Password: "abc123", and the table I want to access is "user_info". Please guys help me.....

THE CODE OF MY JSF PAGE IS TO:

<?xml version="1.0" encoding="UTF-8"?>
<!--
Document : Page1
Created on : Feb 15, 2010, 10:33:41 PM
Author : Taibur
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page id="page1">
<webuijsf:html id="html1">
<webuijsf:head id="head1">
<webuijsf:link id="link1" url="/resources/stylesheet.css"/>
</webuijsf:head>
<webuijsf:body id="body1" style="-rave-layout: grid">
<webuijsf:form id="form1">
<webuijsf:textField id="textField1" style="left: 168px; top: 72px; position: absolute"/>
<webuijsf:button actionExpression="#{Page1.button1_action}" id="button1"
style="left: 239px; top: 264px; position: absolute; width: 96px" text="Show"/>
<webuijsf:textField id="textField2" style="left: 168px; top: 96px; position: absolute"/>
<webuijsf:textField id="textField6" style="left: 168px; top: 192px; position: absolute"/>
<webuijsf:textField id="textField3" style="left: 168px; top: 120px; position: absolute"/>
<webuijsf:textField id="textField4" style="left: 168px; top: 144px; position: absolute"/>
<webuijsf:textField id="textField5" style="left: 168px; top: 168px; position: absolute"/>
<webuijsf:textField id="textField7" style="left: 168px; top: 216px; position: absolute"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2010
Added on Feb 16 2010
1 comment
121 views