-
If the data being submitted is sensitive, then it's always preferred to use _____________ method
Skill/Topic: ServletsA) doPostB) doGetC) serviceD) None of the aboveExplanation: because the elements don't shown up in URL.
-
The _________interface provides information to servlets regarding the environment in which they are running.
Skill/Topic: ServletsA) ServletContextExplanation: It also provides standard way for servlets to write events to a log file.
-
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.
-
State true or false: - Can the constructor be used instead of init () to initialize a Servlet
Skill/Topic: ServletsA) TrueB) FalseExplanation: But you shouldn’t. The original reason for init() was that ancient versions of Java couldn’t dynamically invoke constructors with arguments, so there was no way to give the constructor a ServletConfig. That no longer applies, but Servlet containers still will only call your no-arg constructor. So you won’t have access to a ServletConfig or ServletContext.
-
Which of the following statements correctly define the use of Servlet over CGI (Multiple choice)
Skill/Topic: ServletsA) Servlet provide a way to generate dynamic documents that is both easier to write and faster to run. B) Servlet also address the problem of doing server-side programming with platform-specific APIsC) They are developed with the Java Servlet API, a standard Java extensionD) They have slower response
-
-
-
-
-
-
-
-
-
-
-
-
-
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
-
-
JSP Interview Questions
Ans