retrieving from oracle database using jsp combo box

retrieving from oracle database using jsp combo box

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 Tutorials/Questions & Answers:
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
Advertisements
Retrieving Data from Database to fill Combo Box
Retrieving Data from Database to fill Combo Box  Sir, I have a JSP Page with a combo box and a label. I have a database that has two fields id and an image. Now I want to fill the combo box with image and on selecting
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
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
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
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
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 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
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
Retrieve database from the table dynamically in jsp from oracle using servlet
Retrieve database from the table dynamically in jsp from oracle using servlet  Sir, I have created a table in oracle using eclipse, and added few... using java servlet from the database in the jsp page
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
how to generate reports from oracle database using jsp and ajax code
how to generate reports from oracle database using jsp and ajax code  Hai masters i am new to this Java world. my team leader ask me to generate sales report data from oracle database to jsp page please any one know how to do
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
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... the database like oracle), I have created one jsp program like this *<@ page
oracle database backup using jsp
oracle database backup using jsp   I want to take the backup of oracle database.I want to write the code in jsp ,so that when the page is loaded a backup of the database is stored in one of my local drives.Is it possible to do
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 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
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
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
combo box - JSP-Servlet
combo box  how to get a combo box in jsp page which allows editing as well as list box
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
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
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 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
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
How to get the data from the database (Oracle) in console or in ie using servlet or jsp as Front end
How to get the data from the database (Oracle) in console or in ie using servlet or jsp as Front end  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have created one 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
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
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
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
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
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 show autocomplete textbox values on combo box option selection using database?
How to show autocomplete textbox values on combo box option selection using database?  When I select option(i.e First Year) then it will show list of student names in auto-complete text box
retrieving data from database to the textbox depending upon the id in jsp
retrieving data from database to the textbox depending upon the id in jsp  Hi, our project involves fetching of data from database into textbox... will be checked to database weather it exist or not and if it exists
how to load a table of data from oracle, to a jsp page using hashmap.
how to load a table of data from oracle, to a jsp page using hashmap.  I have a jsp page which ask for project ID,team name,member name according to this data i have to retrieve their details from the database(oracle). I have
While retrieving text from database onto JSP, the alignment of line and paragraphs is not followed
While retrieving text from database onto JSP, the alignment of line and paragraphs is not followed  I have stored text database through textarea box. While trying to retrieve the same text from db, the text displayed onto
search functionality using jsp from database
search functionality using jsp from database  search functionality using jsp from database
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
3 dropdown list from the database using JSP
3 dropdown list from the database using JSP  Hi, I'm new to JSP I want to create 3 dropdown list each depend on the other and get the options from the database using JSP
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc
how to make a radiobutton selected when retrieving data from database using struts framework and spring jdbc  how to make a radio button selected when retrieving data from database using struts framework and spring jdbc
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
How to get data from DB in to Text box by using Jsp & Ajax
How to get data from DB in to Text box by using Jsp & Ajax   I want to get the data from database in to text box in a jsp page by using Ajax. If I... with a and from that i need to select the required value and i should store
How to Upload a file directly to Oracle database using JSP or Servlets?
How to Upload a file directly to Oracle database using JSP or Servlets?  Hi I want to upload a file(csv or excel) to Oracle 10g Database using JSP...;Upload File to Oracle Database</h2> <form id="form1" enctype
error in uploading image from jsp to oracle 10g database
error in uploading image from jsp to oracle 10g database  ... try to insert into the image into the database i got the above error please advice how to get rid of error   JSP upload image in Mysql database
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
retrive data from database using jsp in struts?
retrive data from database using jsp in struts?   *search.jsp* <...(SearchDTO sdto) { String query="select * from product"; (adsbygoogle...=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","bms","smk

Ads