网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
Given this fragment in a servlet: 23.if(req.isUserInRole("Admin")) { 24.// do stuff 25.} And the following fragment from the related Java EE deployment descriptor: 812. 813.Admin 814.Administrator 815. 900. 901.Admin 902.Administrator 903. What is the result?()
A
Line 24 can never be reached.
B
The deployment descriptor is NOT valid.
C
If line 24 executes, the user’s role will be Admin.
D
If line 24 executes, the user’s role will be Administrator.
E
If line 24 executes the user’s role will NOT be predictable.
参考答案
参考解析
解析:
暂无解析
更多 “单选题Given this fragment in a servlet: 23.if(req.isUserInRole("Admin")) { 24.// do stuff 25.} And the following fragment from the related Java EE deployment descriptor: 812. 813.Admin 814.Administrator 815. 900. 901.Admin 902.Administrator 903. What is the result?()A Line 24 can never be reached.B The deployment descriptor is NOT valid.C If line 24 executes, the user’s role will be Admin.D If line 24 executes, the user’s role will be Administrator.E If line 24 executes the user’s role will NOT be predictable.” 相关考题
考题
关于GetPodAction定义,下面赋值正确的是()type Fragment interface {Exec(transInfo *TransInfo) error}type GetPodAction struct {}func (g GetPodAction) Exec(transInfo *TransInfo) error {...return nil}
A. var fragment Fragment = new(GetPodAction)B. var fragment Fragment = GetPodActionC. var fragment Fragment = &GetPodAction{}D. var fragment Fragment = GetPodAction{}
考题
Given this fragment in a servlet: 23.if(req.isUserInRole("Admin")) { 24.// do stuff 25.} And the following fragment from the related Java EE deployment descriptor: 812. 813.Admin 814.Administrator 815. 900. 901.Admin 902.Administrator 903. What is the result?()A、Line 24 can never be reached.B、The deployment descriptor is NOT valid.C、If line 24 executes, the user’s role will be Admin.D、If line 24 executes, the user’s role will be Administrator.E、If line 24 executes the user’s role will NOT be predictable.
考题
Given the element from the web application deployment descriptor: /main/page1.jsp true and given that /main/page1.jsp contains: % int i = 12; % %= i % What is the result?()A、b/bB、b12/bC、The JSP fails to execute.D、% int i = 12 %b%= i %/b
考题
What is the name of the WebLogic specific deployment descriptor of Java Enterprise Application?()A、application.xmlB、weblogic.xmlC、web.xmlD、weblogic-application.xmlE、config.xml
考题
Which two statements are true about the security-related tags in a valid Java EE deployment descriptor?()A、Every tag must have at least one tag.B、A tag can have many tags.C、A given tag can apply to only one tag.D、A given tag can contain from zero to many tags.E、It is possible to construct a valid tag such that,for a given resource,no user rolescan access that resource.
考题
If you want to use the Java EE platform’s built-in type of authentication that uses a custom HTML page for authentication. Which two statements are true?()A、Your deployment descriptor will need to contain this tag: CUSTOM.B、The related custom HTML login page must be named loginPage.html.C、When you use this type of authentication, SSL is turned on automatically.D、You must have a tag in your deployment descriptor that allows you to point to both a login HTML pageand an HTML page for handling any login errors.E、In the HTML related to authentication for this application, you must use predefined variable names fort he variables that store the user and password values.
考题
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this?()A、put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/javaB、put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/*.jarC、Put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/Poker.jarD、put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/javaE、put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/*.jarF、put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/Poker.jar
考题
Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable 343./mainError.jsp 344. 345. 346.java.lang.ClassCastException 347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastException.Which statement is true?()A、The deployment descriptor is invalid.B、The container invokes mainError.jsp.C、The container invokes castError.jsp.D、Neither mainError.jsp nor castError.jsp is invoked.
考题
Given this fragment from a Java EE deployment descriptor: 124. beta.html 125. alpha.html And this request from a browser:http://www.sun.com/SCWCDtestApp/register Which statement is correct,when the container receives this request?()A、This deployment descriptor is NOT valid.B、The container first looks in the register directory for beta.html.C、The container first looks in the register directory for alpha.html.D、The container first looks for a servlet mapping in the deployment descriptor.
考题
Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?() CODE FRAGMENT a: public static void main(String args[]) { if (args.length != 0) System.out.println(args[args.length-1]); } CODE FRAGMENT b: public static void main(String args[]) { try { System.out.println(args[args.length]); } catch (ArrayIndexOutOfBoundsException e) {} } CODE FRAGMENT c: public static void main(String args[]) { int ix = args.length; String last = args[ix]; if (ix != 0) System.out.println(last); } CODE FRAGMENT d: public static void main(String args[]) { int ix = args.length-1; if (ix 0) System.out.println(args[ix]); } CODE FRAGMENT e: public static void main(String args[]) { try { System.out.println(args[args.length-1]); }catch (NullPointerException e) {} } A、Code fragment a.B、Code fragment b.C、Code fragment c.D、Code fragment d.E、Code fragment e.
考题
Which code fragments will succeed in initializing a two-dimensional array named tab with a size that will cause the expression tab[3][2] to access a valid element?() CODE FRAGMENT a: int[][] tab = { { 0, 0, 0 }, { 0, 0, 0 } }; CODE FRAGMENT b: int tab[][] = new int[4][]; for (int i=0; i CODE FRAGMENT c: int tab[][] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; CODE FRAGMENT d: int tab[3][2]; CODE FRAGMENT e: int[] tab[] = { {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} }; A、Code fragment a.B、Code fragment b.C、Code fragment c.D、Code fragment d.E、Code fragment e.
考题
Which element of the web application deployment descriptor defines the servlet class associated with aservlet instance?()A、classbr/B、webappbr/C、servletbr/D、codebasebr/E、servlet-class
考题
You deployed a Java EE Shared Library and want to use it from an application that is also deployed on the same cluster. Which two manifest attributes must be specified at a minimum with corresponding values in the deployment descriptor of the application that requires?()A、Implementation-VersionB、Specification-VersionC、Extension-Name D、Specification-VendorE、Implementation-Vendor
考题
A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command:java games.cards. Poker What allows the user to do this?()A、put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/javaB、put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jarC、put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jarD、put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java
考题
单选题Given this fragment in a servlet: 23.if(req.isUserInRole("Admin")) { 24.// do stuff 25.} And the following fragment from the related Java EE deployment descriptor: 812. 813.Admin 814.Administrator 815. 900. 901.Admin 902.Administrator 903. What is the result?()A
Line 24 can never be reached.B
The deployment descriptor is NOT valid.C
If line 24 executes, the user’s role will be Admin.D
If line 24 executes, the user’s role will be Administrator.E
If line 24 executes the user’s role will NOT be predictable.
考题
单选题A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this?()A
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/javaB
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jarC
Put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jarD
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/javaE
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuffijava/*.jarF
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java/Poker.jar
考题
单选题A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command: java games.cards.Poker What allows the user to do this?()A
put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/javaB
put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/*.jarC
Put Poker.jar in directory /stuff/java,and set the CLASSPATH to include /stuff/java/Poker.jarD
put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/javaE
put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/*.jarF
put Poker.jar in directory /stuff/java/games/cards,and set the CLASSPATH to include /stuff/java/Poker.jar
考题
单选题Given the web application deployment descriptor elements: 11. 12.ParamAdder 13.com.example.ParamAdder 14.... 24. 25.ParamAdder 26.MyServlet 27. 28. Which element, inserted at line 27,causes the ParamAdder filter to be applied when MyServlet is invokedby another servlet using the RequestDispatcher.include method?()A
include/B
dispatcherINCLUDE/dispatcherC
dispatcherinclude/dispatcherD
filter-conditionINCLUDE/filter-conditionE
filter-conditioninclude/filter-condition
考题
单选题Given the element from the web application deployment descriptor: /main/page1.jsp true and given that /main/page1.jsp contains: What is the result?()A
b/bB
b12/bC
The JSP fails to execute.D
% int i = 12 %b%= i %/b
考题
多选题You deployed a Java EE Shared Library and want to use it from an application that is also deployed on the same cluster. Which two manifest attributes must be specified at a minimum with corresponding values in the deployment descriptor of the application that requires?()AImplementation-VersionBSpecification-VersionCExtension-NameDSpecification-VendorEImplementation-Vendor
考题
单选题Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?() CODE FRAGMENT a: public static void main(String args[]) { if (args.length != 0) System.out.println(args[args.length-1]); } CODE FRAGMENT b: public static void main(String args[]) { try { System.out.println(args[args.length]); } catch (ArrayIndexOutOfBoundsException e) {} } CODE FRAGMENT c: public static void main(String args[]) { int ix = args.length; String last = args[ix]; if (ix != 0) System.out.println(last); } CODE FRAGMENT d: public static void main(String args[]) { int ix = args.length-1; if (ix 0) System.out.println(args[ix]); } CODE FRAGMENT e: public static void main(String args[]) { try { System.out.println(args[args.length-1]); }catch (NullPointerException e) {} }A
Code fragment a.B
Code fragment b.C
Code fragment c.D
Code fragment d.E
Code fragment e.
考题
单选题What is the name of the WebLogic specific deployment descriptor of Java Enterprise Application?()A
application.xmlB
weblogic.xmlC
web.xmlD
weblogic-application.xmlE
config.xml
考题
单选题A class games.cards.Poker is correctly defined in the jar file Poker.jar. A user wants to execute the main method of Poker on a UNIX system using the command:java games.cards. Poker What allows the user to do this?()A
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/javaB
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/*.jarC
put Poker.jar in directory /stuff/java, and set the CLASSPATH to include /stuff/java/Poker.jarD
put Poker.jar in directory /stuff/java/games/cards, and set the CLASSPATH to include /stuff/java
考题
单选题A developer has used this code within a servlet: 62.if(request.isUserInRole("vip")) { 63.// VIP-related logic here 64.} What else must the developer do to ensure that the intended security goal is achieved?()A
Create a user called vip in the security realmB
Define a group within the security realm and call it vipC
Define a security-role named vip in the deployment descriptorD
Declare a security-role-ref for vip in the deployment descripto
考题
单选题Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable 343./mainError.jsp 344. 345. 346.java.lang.ClassCastException 347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastException.Which statement is true?()A
The deployment descriptor is invalid.B
The container invokes mainError.jsp.C
The container invokes castError.jsp.D
Neither mainError.jsp nor castError.jsp is invoked.
考题
单选题Given this fragment from a Java EE deployment descriptor: 341. 342.java.lang.Throwable 343./mainError.jsp 344. 345. 346.java.lang.ClassCastException 347./castError.jsp 348. If the web application associated with the fragment above throws a ClassCastException.Which statement is true?()A
The deployment descriptor is invalid.B
The container invokes mainError.jsp.C
The container invokes castError.jsp.D
Neither mainError.jsp nor castError.jsp is invoked.
考题
单选题Given this fragment from a Java EE deployment descriptor: 124. beta.html 125. alpha.html And this request from a browser:http://www.sun.com/SCWCDtestApp/register Which statement is correct,when the container receives this request?()A
This deployment descriptor is NOT valid.B
The container first looks in the register directory for beta.html.C
The container first looks in the register directory for alpha.html.D
The container first looks for a servlet mapping in the deployment descriptor.
热门标签
最新试卷