Archana Annamaneni

Ranch Hand
+ Follow
since Jan 29, 2003
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Archana Annamaneni

Your web application has a valid deplyment descriptor in which student and sensei are the only security roles that have been defined.The deployment descriptor contains two security constraints that declare the same resource to be constrained.The first security constraint contains:

234. <auth-constraint>
235. <role-name>student</role-name>
236. </auth-constraint>

And the second security constraint contains:

which are true?(choose all that apply)

A. As the deployment descriptor stands now,the constrained resource can be accessed by both rules.

B. As the deployment descriptor stands now,the constrained resource can be accessed only by sensei users.

C. As the deployment descriptor stands now,the constrained resource can be accessed only by student users.

D. If the second <auth-constraint> tag is removed , the constrained resource can be accessed by both roles.

E. If the second <auth-constraint> tag is removed , the constrained resource can be accessed only by senseiusers.

F. If the second <auth-constraint> tag is removed , the constrained resource can be accessed only by studentusers.

Can some one answer this please?

Is there an errata for HFSJ 2nd edition mock exam ? For example for Q#26 correct answers are C and E ( I tested it), books says B and D.

Even for q#49 is confusing , answer explanations say as if D is correct answer but it shows C.

Thank You Abdul Rahman . I makes perfect sense now.

Answer is HttpSessionAttributeListener , I went for HttpSessionListener

Book has following explanation

-Option A is incorrect because the user name would not be
known when the session is initially created. Since logging is
desired at the time of the login, the listener’s invalidation
and timeout methods would not be helpful.
-Options B and D are incorrect
because these listeners are used for
servlet-context notifications.

I didn't understand why A is not a correct option , session will be created when the user first logged in .HttpSessionListener seems to be correct choice.


Which logging output would be generated by an invocation of the doGet method?







Answer is B.

I didn't understand how B is the answer.

When the first new X() is called it is "B" and when next new x() is called, the first value will be overwritten so it calls valueUnbound() that is "UB" and then valueBound() that is "B" and when it calls remove , it is "UB" .

Answer should be "BUBBUB".

someone please explain me how B is answer.

This is a HFSJ 1st edition mock exam question .When I took the exam I didn't get it right , someone please explain the answer.

What type of listener could be used to log the user name of a user at the time
that she logs into a system? (Choose all that apply.)

A. HttpSessionListener

B. ServletContextListener

C. HttpSessionAttributeListener

D. ServletContextAttributeListener

I think answer is A , ignoring the fact some containers "will return to the CallingServlet after the CalledServlet complete its job but this is not the correct implementation. "

Please clarify.

Balu , sorry I didn't see earlier .

I see Weblogic does little bit more processing, before setting the values.


I ran your code using Tomcat 4.1 , it compiled and prints results.

I understood what you are saying , how it is working if it is not property of Employee , I am not really sure.

Looks like above two lines are the reasin it is working . How does the compiled code in Weblogic looks like ?

Congratulations , good score .

I am preparing for the exam now.

I am reading Marcus Green notes for SCWCD as I am preparing for the exam.

I try to run sample code for <c:set> using target for Benas and Maps.Section 9.3

Here is the code

The JSP page is as follows

I am getting the following exception

javax.servlet.jsp.JspTagException: Invalid property in <set>: "MyField"
at org.apache.taglibs.standard.tag.common.core.SetSupport.doEndTag(
at org.apache.jsp.demo_jsp._jspx_meth_c_set_1(
at org.apache.jsp.demo_jsp._jspService(

Could someone please tell me what is going wrong

I am using the StrutsTestCase frame work to Struts Action classes.

I am having trouble understanding how exactly actionPerform() works , I have some System.out.println() statements in execute() method , they doesn't seem to be processed.

I really need to understand to continue write more testcases.

16 years ago
Hi ,

Does Tomcat allways generates unique Session ids?I mean when ever you restart tomcat are there any chances we get the session id which was generated before?

17 years ago
NoI didn't do any changes to the code , doing the redirect on a network level .Do you thinkI should read the post and and do a post to thenew url again ?
Thanks for the reply.The problem our production servers url has been changed , we don't want all our customers to change their URL.