Tag: programming languages
Questions Related to programming languages
-
1) It won't compile.
-
2) It is a valid jsp line and it will print the variable called name.
-
3) It will compile but it will always produce null as the output.
-
4) It will work if you create a javabean class with only one variable of type java.lang.String.
-
1) It is a valid line that can be used to initialize the servlet that implements the jsp file.
-
2) It won't compile as no identifer can start with jsp not _jsp.
-
3) It will serve as the servlet initialization if the function's name is _jspInit.
-
4) There is no way to initialize a jsp's implementation class servlet.
-
1) It won't compile.
-
2) It will print the default client's Web browser locale.
-
3) It will print the default web server Locale.
-
4) It will the first language specified in the Accept-Language request's header.
-
1) java.util.Date
-
2) java.sql.Date.
-
3) int.
-
4) long
-
1)It won't compile
-
2)It will print the session id.
-
3)It will produce a NullPointerException as the getSession(false) method's call returns null, cause no session had been created.
-
4)It will produce an empty page.
-
1) There is no such method.
-
2) It searches the attribute in all 4 scopes.
-
3) It searches the attribute in page scope.
-
4) The method is findAttribute(String name, int scope)
-
1) web-resource-name
-
2) url-pattern
-
3) http-method
-
4) auth-constraint
-
1) ServletContext doesn't have one of these two methods.
-
2) String and InputStream
-
3) URL and InputStream
-
4) URL and StreamReader
-
1) getHeaderNames returns an Enumeration
-
2) getHeaders returns a String[]
-
3) getHeaderValues returns a String[]
-
4) getIntParameter returns an int
-
1) There is no such method.
-
2) It has two paramters: request and response
-
3) It has one parameter of type String which is the relative URL of the page to include.
-
4) This method is appropiate to use within a Tag class.