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"> <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"> All content copyright © 2011 <strong>Hewlett-Packard </strong>, all rights reserved. Best Viewed in firefox3.0 1024x938 </font> </div> </div> </body> </html>
Ads