sridhar row

Ranch Hand
+ Follow
since Jan 16, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sridhar row

Christophe Verré wrote:Check the certification FAQ :

What will the successful candidate receive in their certification kit?
All certification kits include the following*:

* A Sun certified certificate with the candidate's name and certification title.
* An ID card with the candidate's name and certification title.

* Due to damage that lapel pins were causing to certificates in shipping, Sun has discontinued Certification lapel pins as part of the certification kit.



Thanks Christophe Verré. The lapel pins were cute and nice to collect. Too bad they discontinued it instead of finding an alternative way to send them.
Hi, I just received my SCWCD certificate in mail along with the card, but there was no lapel pin. Don't we get lapel pin for SCWCD?? Thanks.

Amit Prakash Singh wrote:Your web application has a valid dd with a single <security-constraint> tag.
Within this tag exists:
- a single http method that declares GET
All of the resources in your application exist within directory1 and directory2 and the only defined roles are BEGINNER and EXPERT.
If you want to restrict BEGINNERs from using resources in directory2, which are true about the url and role tag(s) you should declare? (Choose all that apply.)
A. A single url tag should declare directory1 and a single role tag should declare EXPERT.
B. A single url tag should declare directory2 and a single role tag should declare EXPERT.
C. A single url tag should declare directory1 and a single role tag should declare BEGINNER.
D. A single url tag should declare directory2 and a single role tag should declare BEGINNER.
E. One url tag should declare ANY and its role tag should declare EXPERT, and another url tag should declare directory2 and its role tag should declare BEGINNER.
F. One url tag should declare both directories, and its role tag should declare EXPERT, and another url tag should declare directory1 and its role

Answer Given : D, Answer Shoild be: B

since if we mention any role in the <auth-constratint>, the role is allowd to make the request and others are not. Same way here, if ansder D is true, then Beginner would be able to make request.

Please correct me If I got the answer wrong?



Sorry to open an old thread...but I feel even B is not the right answer as BEGINNER will still be able to access resources in directory2 using HTTP methods other than GET..Please correct me if I'm wrong.

Raef Kandeel wrote:Hi there ranchers,

I have been studying from Head First Servlets & JSP's and I found Be-the-Container example on chapter 8:



Now, there is a servlet code that gets called first and after it gets called it forwards to the above jsp:-




In the answers it says it works fine, but, however, when I tried it, it did not work fine, apparently because it stores the value in the request scope when the jsp:useBean uses the page scope.

Am I right? Is HF wrong? Am I missing something?



You are right..you should get an javax.servlet.ServletException: bean Employee not found within scope. This is because when the bean attribute is not found in the scope Contianer will try to do a new on the Employee and since it is a type exception occurs. Try changing the "type" to "class".

Gupta Singh wrote:

sridhar row wrote:
D is also correct. TLDs can be in META-INF or a subdirectory of META-INF if deployed in a JAR.



Not in this case. Option D refers to the top-level META-INF, the sibling to WEB-INF as noted by the '/'. The META-INF you are refering to is the lower-level META-INF directory found inside .jar files.



You are right..thanks for the correction.

sravanthi pulukuri wrote:Hi,

There was a Question about the location of TLD.
options are
A./WEB-INF
B./META-INF
C./WEB-INF/tlds
D./META-INF/tlds
E./WEB-INF/resources
F./META-INF/resources.

Answer was given as A,C,E. i dont know how it was E??Please help



D is also correct. TLDs can be in META-INF or a subdirectory of META-INF if deployed in a JAR.
I think instead of clicking on the submit button, you are clicking on the cancel button.
Authentication works without <security-role> element in web.xml. So I'm wondering what is the use of it?? code that works:




localhost/Beer-v1/login.html
[ December 30, 2008: Message edited by: Warnakulasuriya Patabendige Ushanth ]

<url-pattern>/securezone/*</url-pattern>



change above line to

<url-pattern>/*</url-pattern>

Can someone please let me know if the <security-role> element goes under a <servlet> element or is it a separate element under <web-app....>??
Yeah problem is 'any type of Jsp page'.

In the book HFSJ it says

a normal JSP is a page, unless it�s written with the XML alternatives to normal JSP syntax, in which case it becomes a document.



So option A according to the HFSJ should also be true. Coz JSP page is not the same as JSP document is it?
Call Prometric and give your voucher number and ask them to register you for the exam. If it is used or expired they will tell you.

Which are true? (Choose all that apply.)
A. Lines 10 and 12 are equivalent in any type of JSP page.
B. Line 10 is not valid in a JSP document (XML-based document).
C. Line 11 will properly import the java.util package.
D. Line 12 will properly import the java.util package.
E. Line 13 will properly import the java.util package

Ans given is B and D.

Why is option A not true? Both 10 and 12 should work in kind of Jsp page
[ December 27, 2008: Message edited by: javajamba ]
thanks Ritchie. Can't i just cast the object to a String array and get the values from it? It seems like the object that i'm getting is a String array object cause when i do a toString() on that object i get something like [ljava.lang.String@hashcode. Also as i said earlier when debugging i see a String[0] containing the value i need.
13 years ago