Puneet Vashisht

Ranch Hand
+ Follow
since Jul 30, 2005
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 Puneet Vashisht

Hi guyz,

According to HFSJ, with tag files u use tagdir instead of uri in taglib directive.

<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>

Then the books tells us about the locations container searchs for finding .tag files.
Now my question is, arent v telling the location of .tag file, using tagdir attribute of taglib. Does container need to search .tag files anyway, or the tagdir attibute has got nothing to do with the location of .tag file.

Thanks and Regards,
Puneet
Hi guyz,

Can i specify, isElIgnored = "false" in the page directive, and disable EL without specifyin anything in DD.
Or do i need to use isElIgnored in conjunction with DD settings.

Thankz n Regards,
Puneet
Hi guyz,

According to HFSJ, with tag files u use tagdir instead of uri in taglib directive.

<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>

Then the books tells us about the locations container searchs for finding .tag files.
Now my question is, arent v telling the location of .tag file, using tagdir attribute of taglib. Does container need to search .tag files anyway, or the tagdir attibute has got nothing to do with the location of .tag file.

Thanks and Regards,
Puneet
Hi guyz,

I'm very confused about this thing.

Simple tag cannot have scripting in their body, because JspFragment must not contain any scripting elements.
So the <body-content> tag in tld file, cannot have a value
<body-content>JSP</body-content>

Now my question is, are classic tags allowed to have scripting in their bodies, i mean can i write something like this :

<%! int i%>
<my:ClassicTag>
<%=i++;>
</my:ClassicTag>

If they are not, then what is <body-content>JSP</body-content> used for. I mean if it is not used with Simple Tag, Tag File, where is it used??

Please clearify....

thankz,

puneet
SCJP, SCBCD 1.3
Thankz dude, its very much clear now.
Hi guyz,

HF guyz forget to include DynamicAttribute interface in their study material, but they didnt made this mistake while asking question on it.

Q No. 7 Pg 552 of HF.
It sayz

"If you want to use dynamic attributes for a Simple Tag Handler, you must use <dynamic-attributes> element in the TLD and your Simple tag handler must implement DynamicAttributes interface."

I've not understood what dynamic attributes are? If he's talkin about non-string values, say a Dog object, then what is <rtexprvalue> in tld for.

plz throw some light.
thankz
puneet
hi guyz,

to me both sendError(int) and setStatus(int) appear to do the same things. Is there any diff b/w in view of what client sees on the browser.

thankz,
puneet
Hi guyz,,


Plz verify if this statement is true!!

"Filters support an initialization mechanism that includes an init() method that is guaranteed to be called before the filter is used to handle requests."

To me this statements is true, but according to HF its false, n i dont see any reason mentioned for it.

Any suggestions..

puneet.
SCJP 1.4, SCBCD
please suggest some mock exam links!!

thankz n regards,
puneet
HI,

Can anyone please explain the difference b/w setStatus(int) and sendError(int) methods of HttpServletResponse.

Thankz n Regards,
Puneet

(SCJP 1.4 , SCBCD)
15. req.getSession().setAttribute("key", new X());
16. req.getSession().setAttribute("key", new X());
17. req.getSession().setAttribute("key", "x");
18. req.getSession().removeAttribute("key");

public void valueBound(HttpSessionBindingEvent event){
System.out.println("B");
}

public void valueUnbound(HttpSessionBindingEvent event){
System.out.println("UB");
}


answer is BBUBUB



I think it is quite clear, line 15 and 16 add two attributes, so valueBound() method is called, which prints B couple of times.
With line 17 you replace a value in the attribute, so valueUnbound is called, and it prints UB.
With line 18 you remove the attribute, and so UB gets printed.


The only point important here is that when you replace a value of a attribute, only valueUnbound() is called.


thankz n regards,
puneet
Hi guyz,

What does it mean for a bean instance to b reentrant.

Thankz,
Puneet
hi guyz,

can i get the answer for sharpen your pencil at Pg No. 547.

i wasnt able to find that on website. There r only 3 pdf's available there, n the last part is missing.
Is it not available or was i not able to find it.

Thankz,

Puneet
thankz greg,

i'm assuming that it is an printing error then, because the option cant be correct anywayz..

thankz
puneet