-
-
-
-
If you want a servlet to take the same action for both GET and POST request, what should you do?
Simply have doGet call doPost, or vice versa.
-
The following is the sequence of the life cycle of the servlets1. init()2. destroy()3. service()
Skill/Topic: ServletsA) 1,2,3B) 1,3,2C) 2,3,1D) 1,3,2
-
return false;
}
else
{
return true;
document.cancel_complaints.submit();
}
}
----------
in case of one row(i.e only one record i.e only one checkbox) the value of lenvar is undefined and if there are more than one row the value of lenvar comes= (no of checkboxes)
i am unable to understand why there is problwm in counting in total no of checkboxes.
if somebody has solution then plz tell me.
thanks in advance">I have a cancel_complaints page in ASP in which list of complaints r coming (2 records come at a time means page navigation).In that page some information is coming in table and i have given a checkbox in one Table column according to records in database table rows are generated.That is multiple checkbox are generated with same name.I have put a validation that if user has selecetd none of checkbox alert message comes.Problem is that when there are more than one row validation is going fine but when only one row remains validation does not goes fine.Below i am giving javascript function that i have used for validation.----------function------------function validatefield(){ var j=0; var lenvar=document.cancel_complaints.chksel.length; //alert(eval(lenvar)); for (i = 0; i < lenvar; i++) {if(document.cancel_complaints.chksel[i].checked) { j=j+1; } } if(j==0) { alert("Please select atleast one checkbox"); return false; } else { return true; document.cancel_complaints.submit(); }}----------in case of one row(i.e only one record i.e only one checkbox) the value of lenvar is undefined and if there are more than one row the value of lenvar comes= (no of checkboxes)i am unable to understand why there is problwm in counting in total no of checkboxes.if somebody has solution then plz tell me.thanks in advance
-
The______________ listeners are notified when attributes are added to, removed from, or replaced in the Servlet context.
Skill/Topic: JSP Thread ModelA) Session AttributeB) Servlet context attributeC) Session ListenersD) Session context Listeners
-
Fill with the appropriate set -- The browsers are only required to accept________ cookies per site, __________ total per user , and they can limit each cookie's size to __________.
Skill/Topic: JSP Life CycleA) 20, 300, 4096 bytes (4K)B) 300,20, 4096 bytes (4K)C) 30,200, 4096 bytes (4K)D) 200,39, 4096 bytes (4K)
-
-
-
What are the advantages using servlets than using CGI?
Servlets provide a way to generate dynamic documents that is both easier to write and faster to run. It is efficient, convenient, powerful, portable, secure and inexpensive. Servlets also address the problem of doing server-side programming with platform-specific APIs. They are developed with Java Servlet API, a standard Java extension.
-
-
What are the steps required in adding a JSP Tag Libraries?
1. Create a TLD file and configure the required class Information.2. Create the Java Implementation Source extending the JSP Tag Lib Class (TagSupport).3. Compile and package it as loosed class file or as a jar under lib folder in Web Archive File for Class loading.4. Place the TLD file under the WEB-INF folder.5. Add reference to the tag library in the web.xml file.
-
-
-
-
The wrapper function like <%! String blanknull(String s) { return (s == null) ? "" : s; } %> then use it inside your JSP form, like <input type="text" name="shoesize" value="<%=blanknull(shoesize)% >" > prevents the word__________ from apperaring in an HTML page.
Skill/Topic: Programming ConstructsA) Null
-
Which of the following statements is true about the GenericServlet. (Multiple choice)
Skill/Topic: ServletsA) GenericServlet is for servlets that might not use HTTP, like for instance FTP service.B) As of only Http is implemented completely in GenericServlet. C) The GenericServlet has a service() method that gets called when a client request is made. D) GenericServlet is called by both incoming requests and the HTTP requests are given to the servlet as they are.
-
-
What is the need of taglibraries?
Answer the question.....
JSP Interview Questions
Ans