Home Discussion Discuss: RequestDispatcher vs sendRedirect

  • mp_eta October 20, 2011 at 9:48 PM

    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> <script type="text/javascript" src="addbank.js"> </script> <link href="default.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="header"> <h1>NSEP</h1> <ul> <li><a href="simple.html" accesskey="1" title="">Homepage</a></li> <li><a href="nsep_login.html" accesskey="2" title="">MEMBER ARENA</a></li> <li><a href="nsep_login1.html" accesskey="3" title="">EMPLOYEE ARENA</a></li> <li><a href="about.html" accesskey="4" title="">AboutUS</a></li> <li><a href="contact.html" accesskey="5" title="">Contact</a></li> </ul> </div> <div id="content"> <%if ("900002".equals(session.getAttribute("role"))) {%> <div id="colOne"> <h3>FUNCTIONS</h3> <div class="bg1"> <ul> <li><a href="nsep_admin.html">Home</a></li> <li><a href="ADDBANK1.jsp">Add Bank</a></li> <li><a href="search.jsp" accesskey="1" title="">Search</a></li> <li><a href="addemp.jsp" accesskey="1" title="">Role creation</a></li> <li><form action="Nsepdetail" method="post"><input type="image" src="images/nsepview.JPG" ></input></form></li> <li> <form method=post action=Viewcollege><input type="image" src="images/viewcollege.JPG"></input></form></li> <li> <form method=post action=Viewbank><input type="image" src="images/viewbank.JPG"></input></form></li> <li> <form method=post action=viewstudent><input type="image" src="images/viewstudent.JPG"></input></form></li> </ul> </div> <h3>Account</h3> <div class="bg1"> <ul> <li><a href="viewdetailserv" >view account details</a> </li> <li><a href="transaction.jsp" >upload csv file</a> </li> <li><a href="CollegewiseServ" >Collegewise Defaulters</a></li> <li><a href="Newnsepvalidate" >NSEP Information</a></li> <li><a href="Newmonthwisedefaulters.jsp" >Monthwise Defaulters</a></li> <li><a href="DeactiveServlet" >Deactivate account</a></li> <li><a href="newupdate.jsp" >Update Topup</a></li> <li><a href="NsepCreateAccount.jsp" >Create Account</a></li> </ul> </div> <h3>Loan</h3> <div class="bg1"> <ul> <li><a href="viewstudent.jsp">StudentDetails</a></li> <li><a href="viewLoan.jsp">Loan Details</a></li> <li><a href="firstpage.jsp" accesskey="3">update</a></li> <li><form action="serv_viewStudent" method="post"> <input type="image" src="images/overallstudent.JPG" value="student details" /> </form></li> <li><form action="serv_viewLoan" method="post"> <input type="image" src="images/overallloan.JPG" value="loan details" /> </form></li> </ul> </div> </div> <%} else {%> <div id="colOne"> <h3>FUNCTIONS</h3> <div class="bg1"> <ul> <li><a href="nsep_emp.html">Home</a></li> <li><a href="ADDBANK1.jsp" accesskey="1" title="">Add Bank</a></li> <li><a href="search.jsp" accesskey="2" title="">Search</a></li> <br> <li><form action="employeensep" method="post"><input type="image" src="images/nsepview.JPG" ></input></form></li> <li><form method=post action=Viewcollege><input type="image" src="images/viewcollege.JPG"></input></form></li> <li><form method=post action=Viewbank><input type="image" src="images/viewbank.JPG"></input></form></li> <li><form method=post action=viewstudent><input type="image" src="images/viewstudent.JPG"></input></form></li> </ul> </div> </div> <div> </div> <% }%> <div id="colTwo"> <div class="bg2"> <center><h2>ADD BANK</h2></center> <form action="BankServlet" method="post" name="Formaddbank" onsubmit="return addbankvalid()"> <center> <table> <tr><td>BANK NAME</td><td><input type="text" maxlength="30" name="bnkname" onkeypress=validate1(event)></td></tr> <tr><td>BANK ID </td><td> <input type="text" maxlength="8" name="bnkid"onkeypress=validate(event)></td></tr> <tr><td>ADDRESS </td><td> <input type="text" maxlength="100"name="bnkaddress" ></td></tr> <tr><td>CONTACT NO </td><td> <input type="text" maxlength="10"name="bnkphone" ></td></tr> <tr><td>BRANCH </td><td> <input type="text" maxlength="30" name="branch"onkeypress=validate1(event) ></td></tr> <tr><td></td><td> <input type="submit" value="add"></td></tr> </table> </center> </form> </div> <div id="footer"> <p>NSEP Educate yourself!</p> </div> </div> </div> </body> </html> related jsp: function validate1(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /^[a-z A-Z \b]*$/; if( !regex.test(key) ) { theEvent.returnValue = false; alert("Invalid character!!Only alphabets and white spaces are allowed.."); if(theEvent.preventDefault) theEvent.preventDefault(); } } function validate(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9 \b]/; if( !regex.test(key) ) { theEvent.returnValue = false; alert("Invalid character!!Only numbers are allowed.."); if(theEvent.preventDefault) theEvent.preventDefault(); } } function addbankvalid(){ var bknm=document.forms["Formaddbank"]["bnkname"].value; var bkid=document.forms["Formaddbank"]["bnkid"].value; var addr= document.forms["Formaddbank"]["bnkaddress"].value; var bkpn=document.forms["Formaddbank"]["bnkphone"].value; var brnch=document.forms["Formaddbank"]["branch"].value; var regexNum = /\d/; var regexLetter = /[a-zA-z]/; var phonechck = /^[0-9]{10}$/; if (bknm==null || bknm=="") { alert("BankName must be filled "); return false; } if(regexNum.test(bknm) && !(regexLetter.test(bknm))){ alert('Only Alphabets are allowed..!!'); return false; } if (bkid==null || bkid=="") { alert("Bank-id must be filled "); return false; } if(!regexNum.test(bkid) && regexLetter.test(bkid)){ alert('Alphabets are not allowed..!!'); return false; } if (addr==null || addr=="") { alert("Bank-Address must be filled "); return false; } if (bkpn==null || bkpn=="") { alert("Bank phone must be filled "); return false; } if(!(bkpn.match(phonechck))) { alert("please enter a valid Contact number!!"); bkpn.value=""; return false; } if(bkpn==0){alert("Invalid Phone Number!!");return false;} if (brnch==null || brnch=="") { alert("Branch must be filled "); return false; } if(regexNum.test(brnch) && !(regexLetter.test(brnch))){ alert('Only Alphabets are allowed..!!'); return false; } } <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link href="default.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="add employee.js"> </script> </head> <body> <div id="header"> <h1>NSEP</h1> <ul> <li><a href="simple.html" accesskey="1" title="">Homepage</a></li> <li><a href="nsep_login.html" accesskey="2" title="">MEMBER ARENA</a></li> <li><a href="nsep_login1.html" accesskey="3" title="">EMPLOYEE ARENA</a></li> <li><a href="about.html" accesskey="4" title="">AboutUS</a></li> <li><a href="contact.html" accesskey="5" title="">Contact</a></li> </ul> </div> <div id="content"> <%if ("900002".equals(session.getAttribute("role"))) {%> <div id="colOne"> <h3>FUNCTIONS</h3> <div class="bg1"> <ul> <li><a href="nsep_admin.html">Home</a></li> <li><a href="ADDBANK1.jsp">Add Bank</a></li> <li><a href="search.jsp" accesskey="1" title="">Search</a></li> <li><a href="addemp.jsp" accesskey="1" title="">Role creation</a></li> <li><form action="Nsepdetail" method="post"><input type="image" src="images/nsepview.JPG" ></input></form></li> <li> <form method=post action=Viewcollege><input type="image" src="images/viewcollege.JPG"></input></form></li> <li> <form method=post action=Viewbank><input type="image" src="images/viewbank.JPG"></input></form></li> <li> <form method=post action=viewstudent><input type="image" src="images/viewstudent.JPG"></input></form></li> </ul> </div> <h3>Account</h3> <div class="bg1"> <ul> <li><a href="viewdetailserv" >view account details</a> </li> <li><a href="transaction.jsp" >upload csv file</a> </li> <li><a href="CollegewiseServ" >Collegewise Defaulters</a></li> <li><a href="Newnsepvalidate" >NSEP Information</a></li> <li><a href="Newmonthwisedefaulters.jsp" >Monthwise Defaulters</a></li> <li><a href="DeactiveServlet" >Deactivate account</a></li> <li><a href="newupdate.jsp" >Update Topup</a></li> <li><a href="NsepCreateAccount.jsp" >Create Account</a></li> </ul> </div> <h3>Loan</h3> <div class="bg1"> <ul> <li><a href="viewstudent.jsp">StudentDetails</a></li> <li><a href="viewLoan.jsp">Loan Details</a></li> <li><a href="firstpage.jsp" accesskey="3">update</a></li> <li><form action="serv_viewStudent" method="post"> <input type="image" src="images/overallstudent.JPG" value="student details" /> </form></li> <li><form action="serv_viewLoan" method="post"> <input type="image" src="images/overallloan.JPG" value="loan details" /> </form></li> </ul> </div> </div> <%} else {%> <div id="colOne"> <h3>FUNCTIONS</h3> <div class="bg1"> <ul> <li><a href="nsep_emp.html">Home</a></li> <li><a href="ADDBANK1.jsp" accesskey="1" title="">Add Bank</a></li> <li><a href="search.jsp" accesskey="2" title="">Search</a></li> <br> <li><form action="employeensep" method="post"><input type="image" src="images/nsepview.JPG" ></input></form></li> <li><form method=post action=Viewcollege><input type="image" src="images/viewcollege.JPG"></input></form></li> <li><form method=post action=Viewbank><input type="image" src="images/viewbank.JPG"></input></form></li> <li><form method=post action=viewstudent><input type="image" src="images/viewstudent.JPG"></input></form></li> </ul> </div> </div> <div> </div> <% }%> <div id="colTwo"> <div class="bg2"> <CENTER><h2>ADD EMPLOYEE</h2> <form method="post" action="Employeeservlet" name="Formaddemp" onsubmit="return addempvalid()"> <table> <tr><td>EMPLOYEE NAME</td><td><input type="text" name="empname" onkeypress=validate1(event) maxlength="30"></td></tr> <tr><td>EMPLOYEE ID </td><td><input type="text" name="empid"onkeypress=validate(event) maxlength="8"></td></tr> <tr><td>ROLE </td><td> <select name="role"><option>---Select---</option><option value=" 600002"> Loan Officer</option><option value=" 600003"> Program Manager</option><option value=" 600004 ">Loan Module Administrator</option><option value="600005"> NSEP Employee</option></select></td></tr> <tr><td>PHONE NO </td><td><input type="text" name="phone" maxlength="10" ></td></tr> <tr><td></td><td><input type="submit" value="add"></td></tr> <% if(request.getAttribute("msgemp")!=null) out.println("Role has been created successfully!!");%> </table> </form> </div> </div> <div id="footer"> <p>NSEP Educate yourself!</p> </div> </body> </html> related js: function validate1(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /^[a-z A-Z \b]*$/; if( !regex.test(key) ) { theEvent.returnValue = false; alert("Invalid character!!Only alphabets and white spaces are allowed.."); if(theEvent.preventDefault) theEvent.preventDefault(); } } function validate(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9 \b]/; if( !regex.test(key) ) { theEvent.returnValue = false; alert("Invalid character!!Only numbers are allowed.."); if(theEvent.preventDefault) theEvent.preventDefault(); } } function addempvalid(){ var ename=document.forms["Formaddemp"]["empname"].value; var eid=document.forms["Formaddemp"]["empid"].value; var role=document.forms["Formaddemp"]["role"].value; var pn=document.forms["Formaddemp"]["phone"].value; var regexNum = /\d/; var regexLetter = /[a-zA-z]/; var phonechck = /^[0-9]{10}$/; if (ename==null || ename=="") { alert("Employee-name must be filled "); return false; } if(regexNum.test(ename) && !(regexLetter.test(ename))){ alert('Only Alphabets are allowed..!!'); return false; } if (eid==null || eid=="") { alert("Employee-id must be filled "); return false; } if(!regexNum.test(eid) && regexLetter.test(eid)){ alert('Only Alphabets are allowed..!!'); return false; } if(role==0){ alert("Please select any one option from the listed Roles!!"); return false; } if (pn==null || pn=="") { alert("Phone number must be filled "); return false; } if(!(pn.match(phonechck))) { alert("please enter a valid Contact number!!"); pn.value=""; return false; } if (pn==0){alert("please enter a valid Contact number!!");return false;} } <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Book Details Login</title> <script type="text/javascript"> function validateForm() { var uname=document.forms["myForm"]["userName"].value; var pwd=document.forms["myForm"]["pwd"].value; if(uname==null || uname=="") { alert("Please enter username"); return false; } if(pwd==null || pwd=="") { alert("Please enter password"); return false; } } </script> </head> <body> <center> <br/><br/><br/><br/><br/> <h2>Login</h2> <form name="myForm" action="LibraryServlet?login" method="post" onsubmit="return validateForm()"> User name &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="userName"/><br/><br/> Password &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="password" name="pwd"/><br/><br/> <input type="submit" name="signin" value=" Login "/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="resetfields" value=" Clear "/><br/><br/>" <a href="register.jsp">New User?</a> </form> </center> </body> </html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Copyright: Daemon Pty Limited 2006, http://www.daemon.com.au Community: Mollio http://www.mollio.org $ License: Released Under the "Common Public License 1.0", http://www.opensource.org/licenses/cpl.php License: Released Under the "Creative Commons License", http://creativecommons.org/licenses/by/2.5/ License: Released Under the "GNU Creative Commons License", http://creativecommons.org/licenses/GPL/2.0/ --> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>NSEP</title> <link rel="stylesheet" type="text/css" href="css/main.css" media="screen" /> <link rel="stylesheet" type="text/css" href="css/print.css" media="print" /> <!--[if lte IE 6]> <link rel="stylesheet" type="text/css" href="css/ie6_or_less.css" /> <![endif]--> <script type="text/javascript" src="js/common.js"></script> <script type="text/javascript"> /*if(tempNum.length!=15) { if(isNaN(tempNum)) { alert("PLease enter the correct student ID "); return false; } alert("Please enter the correct student ID "); return false; }*/ function validateForm() { var x=document.forms["Login_page"]["Username"].value; if(x.length>8) { alert("Please enter valid Username"); return false; } if (x==null || x=="") { alert(" Username must be filled out"); return false; } var y=document.forms["Login_page"]["Password"].value; if (y==null || y=="") { alert(" Password must be filled out"); return false; } } function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && ((charCode < 48 )|| (charCode > 57)) ) { alert("Enter number alone"); return false; } } </script> </head> <body id="type-c"> <div id="wrap"> <div id="header"> <div id="site-name">Loan Module</div> </div> <ul id="nav"> </div> </form> </div> <fieldset> <center> <blockquote> &nbsp</blockquote> <blockquote> &nbsp</blockquote> <blockquote> &nbsp</blockquote> <blockquote> &nbsp</blockquote> <blockquote> &nbsp</blockquote> <blockquote> &nbsp</blockquote> <div id="content"> <hr /> <div class="featurebox"><h3>Login details</h3> <form name="Login_page" action="loginValid" onsubmit="return validateForm()" method="get"> <table> <tr><td> UserName </td> <td><input type="text" name="Username" onkeypress="return isNumberKey(event)"/></td></tr> <tr><td>Password </td><td><input type="password" name="Password"/></td></tr> </table> <input name="btntest" type="submit" value="submit" class="f-submit"></input> <div class="f-submit-wrap"> </div> </fieldset> </form> <hr /> </div> </body> </html> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>File Upload</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script type="text/javascript"> function Checkfiles(f) { f = f.elements; if (/.*\.(csv)$/.test(f['file'].value.toLowerCase())) return true; else if (f['file'].value == "") { document.getElementById("error").innerHTML = "<b>Choose a file to upload</b>"; return false; } else { document.getElementById("error").innerHTML = "<b>Invalid File Format</br>Please Choose .CSV files Only</b> "; f['file'].focus(); return false; } }; </script> <link rel=stylesheet href="style.css"></link> </head> <body> <h2>Upload Your CSV File</h2> <form method=post action="UpdateTransaction.jsp" onsubmit="return Checkfiles(this);"> <input type="text" accept="Text/csv" name="file"> <input type="submit" value="Upload"> <h4 id="error" style="color: red;"> <font size="5" face="arial"> </font> </h4> </form> </body> </html> email n more: <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="../css/main.css" media="screen" /> <link rel="stylesheet" type="text/css" href="../css/print.css" media="print" /> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>College Registration</title> <script type="text/javascript"> function validateForm() { var x=document.forms["collreg"]["collname"].value; var splChars = "!@#$%^&*()+=-[]\\\';,./{}|\":<>?0123456789"; if (x==null || x=="") { alert("College name must be filled out"); return false; } if(!isNaN(x)) { alert("Enter valid College name"); document.forms["collreg"]["collname"].value=""; return false; } for (var i = 0; i < document.forms["collreg"]["collname"].value.length; i++) { if (splChars.indexOf(document.forms["collreg"]["collname"].value.charAt(i)) != -1) { alert ("College name must be characters"); document.forms["collreg"]["collname"].value=""; return false; } } var x=document.forms["collreg"]["collId"].value; if (x==null || x=="") { alert("College Id must be filled out"); document.forms["collreg"]["collId"].value=""; return false; } if(isNaN(x)) { alert("Enter valid College Id"); document.forms["collreg"]["collId"].value=""; return false; } var x=document.forms["collreg"]["email"].value; if (x==null || x=="") { alert("Email must be filled out"); document.forms["collreg"]["email"].value=""; return false; } var atpos=x.indexOf("@"); var dotpos=x.lastIndexOf("."); dotpos=dotpos+2; if (atpos<1 || dotpos<(atpos=atpos+2) || dotpos>=x.length) { alert("Enter a valid e-mail address"); document.forms["collreg"]["email"].value=""; return false; } var x=document.forms["collreg"]["addr"].value; if (x==null || x=="") { alert("Address must be filled out"); document.forms["collreg"]["addr"].value=""; return false; } if(!isNaN(x)) { alert("Enter valid Address"); document.forms["collreg"]["addr"].value=""; return false; } var x=document.forms["collreg"]["collauthority"].value; if (x==null || x=="") { alert("College Authority must be filled out"); document.forms["collreg"]["collauthority"].value=""; return false; } if(!isNaN(x)) { alert("Enter valid Name"); document.forms["collreg"]["collauthority"].value=""; return false; } var x=document.forms["collreg"]["eligstud"].value; if (x==null || x=="") { alert("Eligible Student must be filled out"); document.forms["collreg"]["eligstud"].value=""; return false; } if(isNaN(x)) { alert("Enter valid Number"); document.forms["collreg"]["eligstud"].value=""; return false; } } </script> </head> <body id="type-c"> <div id="wrap"> <div id="header"> <div id="site-name">NATIONAL SELF EMPLOYMENT PROGRAM</div> <ul id="nav"> <li class="active"><a href="HomePage.jsp">Home</a></li> </ul> </div> <center> <h2>COLLEGE REGISTRATION</h2> <form name="collreg" action="CollegeServlet" method="get"> <table id="table1" cellspacing="20"> <tr> <th>College name</th> <td><input type="text" name="collname"/></td> </tr> <tr> <th>College ID</th> <td><input type="text" name="collId"/></td> </tr> <tr> <th>Email ID</th> <td><input type="text" name="email"/></td> </tr> <tr> <th>Location</th> <td><textarea name="addr" rows="4" cols="16"></textarea></td> </tr> <tr> <th>College Authority</th> <td><input type="text" name="collauthority"/></td> </tr> <tr> <th>No. of eligible students for NSEP</th> <td><input type="text" name="eligstud"/></td> </tr> </table> <table id="table2"> <tr> <td><input type="submit" name="submit" value="SUBMIT" onclick="return validateForm()"/></td> </tr> </table> </form> </center> </div> </body> </html>

  • Projects of StrutsShalini November 16, 2011 at 7:12 PM

    I am a beginner of struts. Can anyone tell me some projects which i can make using struts or can provide any link for that?

  • requestRahul sharma February 1, 2012 at 11:52 PM

    hi this site is very useful. earlier i was confused but now it make me clear about requestDispeture and send redirect.

  • javavinojad February 20, 2012 at 11:51 AM

    plz tell the answer

  • servlet doubtsrikanth October 1, 2012 at 2:28 PM

    how to send server to server request in servlets. asked by interviewer to me. please give the answer

Post your Comment



Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Related Articles
Servlet Interview Questions

SendRedirect()
SendRedirect()  What is the difference between sendRedirect() and forward()?   Response.sendRedirect (): This function is used, when we...) or when ever we want to redirect errors. If you are using sendRedirect 

General

RequestDispatcher vs sendRedirect
RequestDispatcher vs sendRedirect     ... between a requestDispatcher's forward() and sendRedirect() of the ServletResponse...() method is called to the resource referenced by the RequestDispatcher. sendRedirect 

Servlet Interview Questions

servlet sendredirect
 

JSP Interview Questions

Difference between forward and sendRedirect
between forward and sendRedirect?   RequestDispatcher.forward... to another jsp or servlet. sendRedirect() is more flexible than forward() because with sendRedirect() you can connect to any URL outside the webapplication 

JSP Tutorials

sendRedirect In JSP
sendRedirect In JSP          sendRedirect() method is a method.... In sendRedirect() the object of request will be generated again with the location of page 

Servlets

sendRedirect
sendRedirect       In send Redirect whenever the client makes any request it goes to the container... be handle by other servlet or jsp. Then the servlet calls the sendRedirect() method 

JSP Servlet Questions

sendRedirect to multiple links
sendRedirect to multiple links  hello , In my servlet page , i'm using response.sendRedirect("http://ubaid.tk/sms/sms.aspx?uid="+fromNumber+"&pwd="+passWord+"&msg="+msg+"&phone="+toNumber+"&provider="+provider 

JSP Tutorials

sendRedirect In JSP
sendRedirect in JSP In this tutorial we will discuss about sendRedirect in JSP.... SendRedirect ():  This method is declared in HttpServletResponse Interface. Signature  : void sendRedirect(String url) The transfer is done by web 

Servlets-Tutorials

Sendredirect In Servlet
Sendredirect In Servlet In this section you will read about the sendredirect() method. sendredirect() method is used to redirect the control to the different server or to another web resources within the same server. sendredirect 

Java Beginners

getResourceAsStream() vs FileInputStream
getResourceAsStream() vs FileInputStream  getResourceAsStream() vs FileInputStream 

JSP Servlet Questions

how to use sendRedirect in doGet method in jsp?
how to use sendRedirect in doGet method in jsp?  i am getting problem in jsp that when we are directly writing address to a jsp page in addressbar the jsp page should redirect it to the html page.   can any one tell me 

Servlets-Tutorials

Java Servlet : SendRedirect
Java Servlet : SendRedirect In this tutorial, you will learn how to redirect Requests to Other Resources using SendRedirect in java servlet. SendRedirect() : Response provide method sendRedirect() which sends a redirect response 

Java Interview Questions

websphere vs weblogic
websphere vs weblogic  websphere vs weblogic Why you are using websphere instead of weblogic 

IoC Questions

oracle vs sql
oracle vs sql  what is the difference between oracle and sql 

Java Interview Questions

encapsulation vs abstraction
encapsulation vs abstraction  what is the difference between encapsulation and abstraction 

Struts Questions

JETM vs Jprofiler
JETM vs Jprofiler  Can anyone explain the difference between Java Execution Time Measurement(JETM) and Jprofiler 

Java Beginners

Interface vs abstract class
Interface vs abstract class  Hai, Is there any possible to defining abstract methods in Interface 

CVS Questions

compiler vs interpreter
compiler vs interpreter  "compiled program executes faster especially if the program contains loop" Why 

EJB Questions

ejb vs hibernate - EJB
ejb vs hibernate  1>>> If we have ejb entity bean why we need hibernate? 2>>> Is hibernate distributed 

Java Beginners

inheritence Vs inheritence
inheritence Vs inheritence  what are difference b/w c++ inheritence and java inheritence   Hi Friend, C++ supports Multiple Inheritance while Java does not. Thanks 

SQL Question

Derby vs MySQL - SQL
Derby vs MySQL  Hi, I want to know what are the advantages using Derby Database over MySQL.  http://www.roseindia.net/eclipse/plugins/database/index.shtml 

Development process Questions

java vs vb
java vs vb  history of java and advanced products as well as vb? compared with java and vb? finalize list out the table of java and vb products? viewers i want more soon 

EJB Questions

ejbSelect() vs ejbHome() - EJB
ejbSelect vs ejbHome  Hi, 1) What are the differences between ejbSelect() and ejbHome...() business methods in CMP bean? 2) In Ed Romans Mastering EJB 3rd edition, it is mentioned that ejb finder methods 

Java Beginners

portability vs platform independent
portability vs platform independent  sir, pls tell me 1.the differences between platform independent and portability related to java technology 2.how java provides security 3.how can i prove servlet is a single instance 

Java Beginners

java vs .net - Java Beginners
java vs .net  which language is powerful now java or .net 

JSP Servlet Questions

doGet() Vs doPost()
doGet() Vs doPost()  plz explain the differences between both of these methods used in a servlet. also give an example of both the methods. thanks.   A doGet() method is limited with 2k of data to be sent, and doPost 

Java Beginners

Order of list in java Vs Haskell.
Order of list in java Vs Haskell.  How to order of [1,2,3] to [1,2,3,2,1]in java 

PHP Questions

PHP Comma vs Period - PHP
PHP Comma vs Period  Explain PHP Comma vs Period. And also how can one show a comma within a comma separated file.   Hi Friend, Please visit the following link: http://www.roseindia.net/tutorial/php/phpbasics/PHP 

Development process Questions

return 0 vs exit 0
return 0 vs exit 0  what is the difference between return 0 and exit 0 in c? i could not find any difference in their behaviour (both terminates the process execution) in a program 

Hibernate Questions

Hibernate Native vs Hibernate JPA
Hibernate Native vs Hibernate JPA  What is the difference between Hibernate Native vs Hibernate JPA?   Hibernate is ORM framework which you can use in your application. You can also use Hibernate as Persistence 

DMCA.com