Help coderanch get a
new server
by contributing to the fundraiser

Archana Annamaneni

Ranch Hand
+ Follow
since Jan 29, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

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:
<auth-constraint/>

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?


Archana
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.

Archana
Thank You Abdul Rahman . I makes perfect sense now.

Archana
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.
(API)
-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.

Archana
Given:



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

A. UBUBUB

B. BBUBUB

C. BBUBUBB

D. BUBBUBB

E. BBUBUBBUB

F. BBUBBUBBUB


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.


Archana
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.


Archana
Balu , sorry I didn't see earlier .

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

Archana
Nisha

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 ?

Archana
Congratulations , good score .

I am preparing for the exam now.

Archana
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(SetSupport.java:188)
at org.apache.jsp.demo_jsp._jspx_meth_c_set_1(demo_jsp.java:147)
at org.apache.jsp.demo_jsp._jspService(demo_jsp.java:91)

Could someone please tell me what is going wrong


Thanks
Archana
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.

Thanks
Archana
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?

Thanks
18 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.