This one always gets asked. For a while the database interview questions were limited to Oracle and generic database design questions. This is a set of more than a hundred Microsoft SQL Server interview questions. Some questions are open-ended, and some do not have answers.
Read more at TechInterviews.com
select * from information_schema.tables
Cookie mycook = new Cookie(\"name\",\"value\"); response.addCookie(mycook); Cookie killmycook = new Cookie(\"mycook\",\"value\"); killmycook.setMaxAge(0); killmycook.setPath(\"/\"); killmycook.addCookie(killmycook);
<!--#include file="data.inc"-->
But it’s a little trickier if you want the server to evaluate any JSP code that’s inside the included file. If your data.inc file contains jsp code you will have to use
<%@ vinclude="data.inc" %>
The <!–#include file="data.inc"–> is used for including non-JSP files.
In general, all things being equal, you can assume that the more your request and response change hands, the slower it will be. This means that Type 1 and Type 3 drivers will be slower than Type 2 drivers (the database calls are make at least three translations versus two), and Type 4 drivers are the fastest (only one translation).
boolean hasFoo = !(request.getParameter(\"foo\") == null || request.getParameter(\"foo\").equals(\"\"));
or
boolean hasParameter = request.getParameterMap().contains(theParameter); //(which works in Servlet 2.3+)
