Home Answers Viewqa JSP-Servlet retrieving from oracle database using jsp combo box

 
 


naresh kumar reddy
retrieving from oracle database using jsp combo box
0 Answer(s)      2 years ago
Posted in : JSP-Servlet

hi this is my code in this once i select the server type and version of the server the process name of the server has to display in the process name field from the oracle database please help on this i need code using servlets please help me .

<html>
<head>
<title>
HP-FMS SERVER VISUALIZER 
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="all" />
<script type="text/javascript">
function validateFormOnSubmit(theForm) {
var pwd1 = theForm.password;
var pwd2 = theForm.password1;

var reason = "";
    reason += validateGetapp(theForm.getapplication);
    reason += validateApplicationname(theForm.applicationname);
    reason += validateServertype(theForm.servertype);
    reason += validateVersion(theForm.version);
    reason += validateHostname(theForm.hostname);
    reason += validatePort(theForm.port);
    reason += validateProcessname(theForm.commandname);
    reason += validateUsername(theForm.username);
    reason += validatePassword(pwd1,pwd2);
    reason += validateStart(theForm.startpath);
    reason += validateStop(theForm.stoppath);

  if (reason != "") {
    alert("Some fields need correction:\n\n" + reason);
    return false;
  }
  return true;
}
function validateGetapp(fld){

    var error = "";
    if (fld.value == 0){
        fld.style.background = '#F0F0F0';
        error = "Please Select one application to edit \n\n";
    }else {
        fld.style.background = 'White';
    }
    return error;
}
function validateApplicationname(fld)
{
    var error = "";
    var illegalChars = /[\W_]/;
    if (fld.value == "") {
        fld.style.background = '#F0F0F0'; 
        error = "You didn't Enter Application Name\n\n";
    }else if (illegalChars.test(fld.value)) {
        error = "The Application Contains illegal characters.\n\n";
        fld.style.background = '#F0F0F0';
    }else {
        fld.style.background = 'White';
    }
    return error;
}
function validateServertype(fld){

    var error = "";
    if (fld.value == 0){
        fld.style.background = '#F0F0F0';
        error = "Please Select Server Type \n\n";
    }else {
        fld.style.background = 'White';
    }
    return error;
}
function validateVersion(fld){

    var error = "";
    if (fld.value == 0){
        fld.style.background = '#F0F0F0';
        error = "Please Select version \n\n";
    }else {
        fld.style.background = 'White';
    }
    return error;
}
function validateHostname(fld){

    var error = "";
    var illegalChars = /[\W_]/;
    if (fld.value == "") {
        fld.style.background = '#F0F0F0'; 
        error = "You didn't Enter host Name\n\n";
    }else if (illegalChars.test(fld.value)) {
        error = "The host Contains illegal characters.\n\n";
        fld.style.background = '#F0F0F0';
    }else {
        fld.style.background = 'White';
    }
    return error;
}
function validatePort(fld){

    var numericExpression = /^[0-9]+$/;
    var error = "";
    if (fld.value == "") {
        fld.style.background = '#F0F0F0'; 
        error = "You didn't Enter Port Number\n\n";
    }else if (!fld.value.match(numericExpression)){
        fld.style.background = '#F0F0F0';
        error = "Port Number Must be an Interger\n\n";
    }else if (fld.value.length > 6){
        fld.style.background = '#F0F0F0';
        error = "Invalid Port Number\n\n";
    }else{
        fld.style.background = 'White';
    }
    return error;
}
function validateProcessname(fld) {
    var error = "";
    var illegalChars = /\W/; // allow letters, numbers, and underscores

    if (fld.value == "") {
        fld.style.background = '#F0F0F0'; 
        error = "You didn't enter a process name.\n\n";
    } else if (illegalChars.test(fld.value)) {
        fld.style.background = '#F0F0F0'; 
        error = "The process name contains illegal characters.\n\n";
    } else {
        fld.style.background = 'White';
    } 
    return error;
}
function validateUsername(fld) {
    var error = "";
    var illegalChars = /\W/; // allow letters, numbers, and underscores

    if (fld.value == "") {
        fld.style.background = '#F0F0F0'; 
        error = "You didn't enter a username.\n\n";
    } else if (illegalChars.test(fld.value)) {
        fld.style.background = '#F0F0F0'; 
        error = "The username contains illegal characters.\n\n";
    } else {
        fld.style.background = 'White';
    } 
    return error;
}
function validatePassword(fld1,fld2) {
    var error = "";
    var illegalChars = /[\W_]/; // allow only letters and numbers 

    if (fld1.value == fld2.value){
    if (fld1.value == "") {
        fld1.style.background = '#F0F0F0';
        error = "You didn't enter a password.\n\n";
    }else if (illegalChars.test(fld1.value)) {
        error = "The password contains illegal characters.\n\n";
        fld1.style.background = '#F0F0F0';
    } else if (!((fld1.value.search(/(a-z)+/)) && (fld1.value.search(/(0-9)+/)))) {
        error = "The password must contain at least one numeral.\n\n";
        fld1.style.background = '#F0F0F0';
    }else {
        fld1.style.background = 'White';
        fld2.style.background = 'White';
    }
   }else {
        fld1.style.background = '#F0F0F0';
        fld2.style.background = '#F0F0F0';
        error = "Passwords didn't Match.\n\n";
   }
   return error;
} 
function validateStart(fld){
    var error = "";

    if (!(document.getElementById("startpath").value)) {
        fld.style.background = '#F0F0F0';
        error = "Please Upload Start CMD file\n\n";
    }else {
        fld.style.background = 'White';
    }
   return error;
}
function validateStop(fld){
    var error = "";

    if (!(document.getElementById("stoppath").value)) {
        fld.style.background = '#F0F0F0';
        error = "Please Upload Stop CMD file\n\n";
    }else {
        fld.style.background = 'White';
    }
   return error;
}



</script>
<link rel="stylesheet" type="text/css" href="../css/menu_design.css" />

<script src="../js/treeviewer.js" type="text/javascript"></script>
</head>
<body>
<br>
<div id="header">
    <div class="logo"> 
        <img alt="Hewlett-Packard" src="../images/hplogo.png" width="84" height="50">
    </div>
    <br><br><br><center><font style="arial" size="6" color="#3A66A7">

  &nbsp;
  &nbsp;<b>HP-FMS SERVER VISUALIZER</b></font></center>


</div>
<div id="contentwrap">


    <div id="breadcrumb1">
  <span class="preload1"></span>
<span class="preload2"></span>

<ul id="nav">
    <li class="top"><a href="addapplication.jsp" class="top_link"><span>Home</span></a></li>
    <li class="top"><a href="addapplication.jsp" id="manage" class="top_link"><span class="down">Manage Server</span></a>
        <ul class="sub">
            <li><a href="addapplication.jsp">Add Application</a>
            </li>
            <li><a href="editapplication.jsp">Edit Application</a>
            </li>
            <li><a href="deleteapplication.jsp">Delete Application</a></li>

        </ul>
    </li>
    <li class="top"><a href="serverstatus.jsp" id="monitor" class="top_link"><span class="down">Monitor Server</span></a>
        <ul class="sub">
            <li><a href="serverstatus.jsp">View Server Status</a></li>

        </ul>
    </li>
    <li class="top"><a href="viewlog.jsp" id="viewlog" class="top_link"><span>View Log</span></a>


    </li>
    <li class="top"><a href="help.jsp" id="help" class="top_link"><span>Help</span></a>

    </li>

    <li class="top"><a href="privacy.jsp" id="privacy" class="top_link"><span>Privacy Policy</span></a></li>
    <li class="top"><a href="logout.jsp" id="privacy" class="top_link"><span>Logout</span></a></li>
</ul>

    </div>
  <br>




  <div id="content"> 

     <div class="hr">
      <hr />  </div><center>
    <font face="veradana" style="bold" size="3" color="#1377E8"><b>Edit Application</b></font>
    </center><br><div class="hr">
      <hr />  </div>

      <!-- ##################################################### -->
      <center>
<form method='POST' onsubmit="return validateFormOnSubmit(this)" action="#" name="theForm">
                <table cellpadding="3" cellspacing="2" border="0">


                     <tr>
                        <td>
                         <font size="2">   Get Application</font>
                        </td>
                        <td>
                            <select name="getapplication" id="getapplication">
                                <option value="0">Select</option>

                            </select>
                        </td>
                    </tr>

                    <tr>
                        <td>
                          <font size="2">   Application Name</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                          <input type="text" name="applicationname" id="applicationname" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                          <font size="2">   Server Type</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <select name="servertype" id="servertype">
                                <option value="0">Select</option>
                                <option value="tomcat">Tomcat</option>
                                <option value="jboss">Jboss</option>
                                <option value="weblogic">Weblogic</option>
                                <option value="websphere">Websphere</option>
                                <option value="fms">Fms</option>
                                <option value="apache">Apache</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>
                           <font size="2">Version</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <select name="version" id="version">

                                <option value="0">Select</option>

                                <option value="1">1</option>

                                <option value="2">2</option>

                                <option value="3">3</option>

                                <option value="4">4</option>

                                <option value="5">5</option>

                                <option value="6">6</option>

                                <option value="7">7</option>

                                <option value="8">8</option>

                                <option value="9">9</option>

                                <option value="10">10</option>

                            </select>

                        </td>
                    </tr>
                    <tr>
                        <td>
                         <font size="2">   Host Name</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="text" name="hostname" id="hostname" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                         <font size="2">    Port</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="text" name="port" id="port" />
                        </td>
                    </tr>
                     <tr>
                        <td>
                          <font size="2">  Process Name</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="text" name="commandname" id="commandname" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                      <font size="2">       User Name</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="text" name="username" id="username" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                           <font size="2">  Password</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="password" name="password" id="password" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                           <font size="2">  Confirm Password</font><font color="red"><b>*</b></font>
                        </td>
                        <td>
                            <input type="password" name="password1" id="password1" />
                        </td>
                    </tr> 
                    <tr>
        <td><font size="2"> START CMD File Path</font><font color="red"><b>*</b></font></td>
        <td><input name="startpath" id="startpath" type="file" /></td>
    </tr>    
    <tr>
        <td><font size="2"> STOP CMD File Path</font><font color="red"><b>*</b></font></td>
        <td><input name="stoppath" id="stoppath" type="file" /></td>
    </tr>   


                    <tr>
                        <td>
                        </td>
                        <td>

                        </td>
                    </tr>
                     </table>

                     <br><center>
                        <input type="submit" value="Save" name="Save" style="background: #EFEFEF;"/>

         <input type="Reset" value="Reset" name="reset" style="background: #EFEFEF;"/>
         <input type="submit" value="Run" name="Run" style="background: #EFEFEF;"/>

         <input type="Submit" value="Stop" name="Stop" style="background: #EFEFEF;"/>

                    </center>




            </form></center><br><br>
      <!-- ######################################################## -->


       </div>

      <div id="footer" class="clear"> 
    <font size="1">&nbsp;&nbsp;All content copyright &copy; 2011 <strong>Hewlett-Packard </strong>, all rights reserved.
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    &nbsp;
    Best Viewed in firefox3.0 1024x938
     </font>
  </div>
       </div>

</body>
</html>
View Answers









Related Pages:
retrieving from oracle database using jsp combo box
retrieving from oracle database using jsp combo box  hi this is my... name of the server has to display in the process name field from the oracle database please help on this i need code using servlets please help me . <
Retrieving data from data base using jsp combo box
Retrieving data from data base using jsp combo box  Hi guys please... combo box is there and another filed is version of the server(like 1.0,2.0) like... of the server it has to display the process name from database into the process name
Loading combo box from oracle
Loading combo box from oracle  how can i load values into a combobox from oracle database when a value is selected in another combo box
combo box
a screen like this using jsp-servlet(or DAO,DTO),in that drop down box i should get usernames from the database & upon selection of particular user i should get...combo box  Hi, [_|] dropdown box
combo box - JSP-Servlet
combo box  I am using a JSP form in which a combobox is given and I want to populate data in it from database and on the basis of yhe selected item... table country(country_id,country) in database and try the following code
Acees data from database using combo box - JSP-Servlet
Acees data from database using combo box  please let me how i access the data from database when i select combo box combo2 having values Arts... value 11 or 12, otherwise combo box combo2 remain hide. Here is JSP's files
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  For example, In Employee.jsp form, When i click employee id value in combo box...... i already stored combo box values from database. pl
Populate a combo box using data from a database
Populate a combo box using data from a database  Hi Guys, In need... to the client using ajax, and then populate the combo box, I must'nt reload... combo box which will then load the next combo box values, now i know how
Retrieving images from the oracle database using jsp and create that rretrieved image as hyperlink
Retrieving images from the oracle database using jsp and create that rretrieved image as hyperlink  I want to insert images into oracle database.I want to retrieve images using jsp and I want to display on the browser.The
Jdbc connectivity in java to oracle for retrieving data between two dates
dates from the database table. I am using combo box to get the date. Problem...Jdbc connectivity in java to oracle for retrieving data between two dates ... am using the oracle. please help. thankyou sir
How to retrieve data by using combo box value in jsp? - JSP-Servlet
How to retrieve data by using combo box value in jsp?  I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all.... Note: I am using only this jsp form.. i do not use
how i conditional access the data from database using combo box. - JSP-Servlet
how i conditional access the data from database using combo box.   i have combox box named class when i select its value 11 or 12, another combo box... access the data from database when i select class 11 0r 12. Here is JSP file
How to retrieve data from database by using combo box value in jsp? - JSP-Servlet
How to retrieve data from database by using combo box value in jsp?  Hello friend i want use only one jsp page.. but u give 2 pages... I want to work in one page... Pl response.. I do not need getParameter... Pl respose me
How to retrieve data by using combo box value in jsp? - JSP-Servlet
in combo box from database.. by using select*from studentinformation; But when i...How to retrieve data by using combo box value in jsp?  Hi Friends... related value.... I am using only this page.. not get value from another page
how to insert list box in java script dynamically and elements retrieving from database like oracle
how to insert list box in java script dynamically and elements retrieving from database like oracle  Hi, how to dynamically increase size of list box in javascript when elements retrieving from database.. That is whenever I
how to insert list box in java script dynamically and elements retrieving from database like oracle
how to insert list box in java script dynamically and elements retrieving from database like oracle  hi all, how can i insert elements into java script list box retrieving from Database. whenever I insert any element in the Db
How to retreive data by using combo box value - JSP-Servlet
How to retreive data by using combo box value  I am using a single jsp form.. i did not get from another form.. i do not use 2 jsp form.. all.... Note: I am using only this jsp form.. i do not use to get values from
populating the combo box - Struts
populating the combo box  Hi I am having problem populating the combo box with a table in MS SQL Server 2005 Management Studio Express. Belo is the extract from the Struct?jsp application. Sector
combo box value
combo box value   i want to populate one combo box value based on another combo box value using ajax   1)country.jsp: <%@page... = con.createStatement(); ResultSet rs = stmt.executeQuery("Select * from country
related retrieving value from oracle database
related retrieving value from oracle database  how we get the value from database in the given textbox
related retrieving value from oracle database
related retrieving value from oracle database  how we get the value from database in the given textbox
Dynamic loading of Combo box list using servlet - JSP-Servlet
Dynamic loading of Combo box list using servlet  I have the category and their sub categories in database. How can I load the sub category from... I give theortical descrption read it! Select a value from drop dwon box
retrieving xml document from database
retrieving xml document from database  Hi Guys, I want to retrieve the xml document stored in the database on to a jsp page using jdbc/odbc connnection.Please help me in implementing this feature. Thank You Madhu
populate Combo Box dynamically
populate Combo Box dynamically  Hi, How to populate the Combo Box dynamically using Flex with Jsp's
retrieving data in to the dropdown box from postgresql database in core java
retrieving data in to the dropdown box from postgresql database in core...=st.executeQuery("SELECT role_name from role WHERE dept_id=1234"); if(rs... database: import java.sql.*; import java.awt.*; import javax.swing.*; import
How to retrieve data using combo box value in jsp? - JSP-Servlet
How to retrieve data using combo box value in jsp?  Hi freind, I already post this question. I need urgent help from u. pl response me... the following link: http://www.roseindia.net/jsp/comboSelect.shtml Hope
How to retreive data by using combo box value - JSP-Servlet
How to retreive data by using combo box value  Hello friend , i am using only one form. U are using html form and jsp form. So get the values from html. So u r using if(request.getParameter("cid")!=null
Combo Box operation in Java Swing
, remove items from the combo box. This program shows a text field, a combo box... at the 0th (zero) position of the combo box will be remove from the combo box... Combo Box operation in Java Swing   
fetch record from oracle database using jsp-servlet?
fetch record from oracle database using jsp-servlet?  how can i fetch data from oracle database by using jsp-servlet. i'm using eclipse, tomcat server and oracle database and creating jsp pages and also using servlet
retrieving info from DB using struts?
retrieving info from DB using struts?  Hi. I was looking info about retrieving info from a database using struts. I need a .java that I suppose connects to a database and show the info on a jsp. Somebody could help me
combo box connection
combo box connection  how to provide connection between three combo boxes,if my 1st combo box is course and 2nd combo box is semester and 3rd combo box is my subjects.what's the coding to provide the connection between this three
combo box value
combo box value   i want to populate one combo box value based on another combo box value using ajax   1)country.jsp: <%@page import... = stmt.executeQuery("Select * from country"); while(rs.next()){ %>
retrieving image files - JSP-Servlet
retrieving image files  How to retrieve multiple images at a time from mysql database using JSP
retrieving newly added records from mssql database and display in a jsp
retrieving newly added records from mssql database and display in a jsp ... from mssql database table and display those records in a jsp.And i have to delete these 10 records from the jsp and retrieve the next recently added 10 records
loading value into combo box by selecting value from other combo box - JSP-Servlet
loading value into combo box by selecting value from other combo box  ... is that as i select state from state_combo_box,then the next combo box is dynamically... box with constituency corresponding to district..... all three combo box
combo box code problem
combo box code problem  in this my problem related to : when i select state MP then i wil open the its corresponding city but in database it only... for city becuz it wil call the correspndng array[10] in MS Access database
combo box - JSP-Servlet
combo box  how to get a combo box in jsp page which allows editing as well as list box
retrieve the data to text fields from database on clicking the value of combo box
retrieve the data to text fields from database on clicking the value of combo box   retrieve the data to text fields from database on clicking the value of combo box . I am not getting it plz help me out .   hi
Combo Box Using Ajax In JSP
to Select the Data from database using Ajax in combo box. We created two file... Combo Box Using Ajax In JSP   ... id data come  from database corresponding this id and auto fill the Emp Id
values of Combo boxes are not stored in database - JSP-Servlet
values of Combo boxes are not stored in database   i have some combo box values. when i click the submit button after select combo box values, the values are not going in database. please review the code: function
graph generation using jfreechart and retrieving values from the database
graph generation using jfreechart and retrieving values from the database  I have made a database containing 4 subject marks and name and roll... database using prepared statement and then display the bar graph using
How to get data from Oracle database using JSP
How to get data from Oracle database using JSP  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have... data from the database like oracle), I have created one jsp program like
how to read data from excel file through browse and insert into oracle database using jsp or oracle???
how to read data from excel file through browse and insert into oracle database using jsp or oracle???  sir.. i have number of excel sheets which... be inserted into oracle database.. please help me sir...   hi friend
how to get combo box value - JSP-Servlet
how to get combo box value  i have created 1 servlet & 1 jsp page... in combo box in jsp page: (small part of my code) "> now i want... to store that id in database. how to get that value???   Hi Friend
Select tag to fetch data from oracle database
Select tag to fetch data from oracle database  I created a select box having more than one menus in the select box such as regnno, address and name... oracle database.Similarly when address will be selected by the user from
How to get the values from the Combo Box - JSP-Servlet
How to get the values from the Combo Box   Sir, Actually i am getting the values in the combo box from table.I want what ever... in their respective text box. e.g suppose i select ram values from the combo box and its
How to create Combo Box in SWT
are added to the  first combo box by using the method add() of Combo class. ... is called. If you select the cold drink from the first combo box, the array of drinks is added to the second combo box by using the method combo2.setItems(drinks
database retrieving - JDBC
database retrieving  how to retrieve resultset from table which we have created in 'SQL SERVER MANAGEMENT STUDIO' using java program
retrieving from db - JSP-Servlet
retrieving from db  hello' I am trying to write my first application connecting to the database. I have found some code but i am getting...; Hi Retrive value from database Retrive data from
how can retrive value from combo box in servlet?
how can retrive value from combo box in servlet?  i have a jsp page with combobox. And i want to get value from combox to servlet

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.