Select 1 correct option.
A.The user will be prompted to enter user name and password
B.An exception will be thrown
C.protected.jsp will be executed but it's output will not be included in the response
D.The call to include will be ignored
E.None of these
I think the answer should be B, because it is attempting to access unauthorized resource. Can someone explain this?
Thanks a lot.
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
I thought so, but are there any way to give security to the server side request? I think, there is no need of doing it?
Frits Walraven wrote:
I think the answer should be B, because it is attempting to access unauthorized resource. Can someone explain this?
Thanks a lot.
The important rule to follow here is that security only applies to requests coming from the client (browser). It doesn't apply to requests that are forwarded or included.
Regards,
Frits
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Ankit Garg wrote:So the server side include will not be authorized...
|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
I am sorry Frits, I still don't understand how to respond to this question. What I see is that we have a "manager" user that tries to access /jsp/protected.jsp
I still don't see what Forwarding or including have to do with this.
SRV.12.2 Declarative Security
The security model applies to the static content part of the web application
and to servlets and filters within the application that are requested by the client.
The security model does not apply when a servlet uses the RequestDispatcher to
invoke a static resource or servlet using a forward or an include.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |