Luis Torres

Greenhorn
+ Follow
since May 02, 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 Luis Torres

The container first locates the filters with a matching URL in the order the filters are declared in the Deployment Descriptor. Next the container does the same with a matching servlet-name.



Where does it appear in the espec?


According the HFJS:

Filter associated with named servlet are invoked in order defined in DD, regardless if I used servlet-name or url-mapping.
I think is about the HFJS 1st edition.
The part of "Real compression filter code" in chapter 13.
I don't understand it too

Right Vishal?
[ June 15, 2008: Message edited by: Luis Torres ]

I feel 1 is correct. Because there is NO unavailable exception defined by filter's init method. ONLY servletException is defined.



Although only ServletException is defined for filter's init method, UnavailableException extends from ServletException, so is legal throws an UnavailableException from init method.

3. Filters associated with a servlet are applied in the order in they appear in the DD.

This might change if there is a <url-pattern> which matches the servlet you requested.



La question is specific about Filters associated with servlet(through mapping between filter-name and servlet-name).In this case Filters are applied in the order in they appear in the DD.

So my guess is number 3.

But, I'm not sure about sentence 4.

"If the init method throws unavailable exception the container will make no further attempt to execute it."

Is true or false?

Thanks.
In mock question below I have:

Servlet name url-pattern
---------------------------------
ControlServlet | *.do
CertkillerServlet | /Certkiller/*

and I have these requests:

/Certkiller/
/Certkiller/index.jsp
/secure/command.do
/Certkiller/command.do

The question is for map the request to the appropriate servlet.

I read the spec about servlet mapping rules but isn't clear for me.

Thank for your help.
I have this sentence:

"WAR files must be created by using archive tools to designed specifically for that purpose".

Is true or false? My guess is true.

Thanks for your help.
I have the question following:

For a given ServletResponse, which two retrieve an object for writing text data?
A. response.getWriter()
B. response.getOutputStream()
C. response.getOutputWriter()
D. response.getWriter().getOutputStream()
E. response.getWriter(Writer.OUTPUT_TEXT)

I only see one alternative correct(obviously letter A), but the question asks for 2 answers.

Thanks
I meet with this question in a mock exam.

"which interface must a class implement so that instances of the class are notified after ANY object is added to a session"

In my opinion is an ambiguous question because the word "ANY" in the question.
Right?


Thanks.
Hi everyone.

I have a doubt about a question in mock exam.

In an alternative says:

"Storing references to Enterprise JavaBeans components in the HttpSession object might NOT be supported by J2EE web containers."

The question is about an application marks as distributable.

The answer is true.
But I don't know why.

Also according HFSJ the only topic that I need know about EJB is how do I declare a EJB in web.xml
Are there other topics about EJB for the exam?

Thanks for your answers.
I read in HFSJ 2nd Ed page 399 that EL is null friendly, so it handles unknown properties and prints nothing.
But also the JSP specs says:


Otherwise (a JavaBeans object), coerce value-b to String
f value-b is a readable property of value-a, as per the JavaBeans specification:
� If getter throws an exception: error
� Otherwise: return result of getter call
Otherwise: error.



So if EL don't find property it should throws a Exception

I try this:

1. ${requestScope.mybean.noProperty } ----- error
2. ${requestScope.mybean[noProperty ] } ----- prints nothing

According the specs number 2 also should throws error. Right?
and according the specs is EL null-friendly? Why?

Thanks
I don't understand what's the differences between GET and HEAD http methods.
Since I read HEAD method is just like GET but without body in the response, but also I read GET method don't have body just the header info.
So I don't understand what's is the actually the difference.
Thanks.

so my question still remains



I agree with Ana.

Also I tried this:

Servlet 5: Used getWriter and write method, followed by forward method. This did NOT throw any error.


some answer?

Thanks.
[ May 19, 2008: Message edited by: Luis Torres ]
I prepare for take the SCWCD. I reading HFJS, but I have some doubts about coffee cram questions.
There is a place for HFJS's errata, as well as there is for the K&B SCJP5?

I look for it but I don't find it.