how to connect with oracle in this code

Reply

Join Date: Aug 2007
Posts: 49
Reputation: larryperl is an unknown quantity at this point 
Solved Threads: 0
larryperl larryperl is offline Offline
Light Poster

how to connect with oracle in this code

 
0
  #1
Nov 10th, 2008
Hi Everyone,

I need some suggestions from you guys. I am totally unaware of JSP or java and trying to learn a bit , as i need to develop a sample application using web services.I am in need of some help from you guys. If there are some errors in the code or i can modify for the better then please tell me.Please explain the things as i am a layman..

  1. <%@page contentType="text/html" pageEncoding="UTF-8"%>
  2. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  3. "http://www.w3.org/TR/html4/loose.dtd">
  4.  
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  8. <title>JSP Page</title>
  9. </head>
  10. <body>
  11. <h2>Hello World!</h2>
  12.  
  13. <%-- start web service invocation --%><hr/>
  14. <%
  15.  
  16. String userName=" ";
  17. String groupName=" ";
  18. String firstName=" ";
  19. String lastName=" ";
  20. String pam=" ";
  21. String emailAddress=" ";
  22. try {
  23. com.arcot.schemas.regfort.v2.AuthProvisionAPIService service = new com.arcot.schemas.regfort.v2.AuthProvisionAPIService();
  24. com.arcot.schemas.regfort.v2.RegFortAPIPortType port = service.getRegFortAPISOAP11Port();
  25. port.createUser(userName, groupName, firstName, lastName, pam, emailAddress);
  26. } catch (Exception ex) {
  27. // TODO handle custom exceptions here
  28. }
  29. %>
  30. <form action="response.jsp" method="POST">
  31.  
  32. <table>
  33. <tr><td>User Name</td><td><input type="text" name="userName" value="" /></td></tr><br></br>
  34. <tr><td>Group Name</td><td><input type="text" name="groupName" value="" /></td></tr><br></br>
  35. <tr><td>First Name</td><td><input type="text" name="firstName" value="" /></td></tr><br></br>
  36. <tr><td>Last Name</td><td><input type="text" name="lastName" value="" /></td></tr><br></br>
  37. <tr><td>PAM</td><td><input type="text" name="pam" value="" /></td></tr><br></br>
  38. <tr><td>Email Address</td><td><input type="text" name="emailAddress" value="" /></td></tr>
  39. <tr><td>Submit</td><td><input type="submit" name="submit" value="submit"/></td></tr>
  40. </table>
  41. </form>
  42. <%-- end web service invocation --%><hr/>
  43. </body>
  44. </html>

I am using netbeans here.

now what i need to do is----

when i click on the submit button the entries should be updated in the database, how i can achieve that. syntax for database connection. i am using oracle as DB.
kindly give me some ideas how to go about this...

Thanks
NT
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,273
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to connect with oracle in this code

 
-1
  #2
Nov 10th, 2008
Read this how to establish connection with database the right way and here is info on Oracle and connection string (Sorry couldn't find latest version)
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 49
Reputation: larryperl is an unknown quantity at this point 
Solved Threads: 0
larryperl larryperl is offline Offline
Light Poster

Re: how to connect with oracle in this code

 
0
  #3
Nov 11th, 2008
can you provide some idea in reference to my code about how to connect with db in this case.

Thanks
NT
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,273
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 494
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: how to connect with oracle in this code

 
-1
  #4
Nov 11th, 2008
Aren't the two links good enough for you? Or you did not even read them?
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1065 | Replies: 3
Thread Tools Search this Thread



Tag cloud for JSP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC