This week's book giveaway is in the Design and Architecture forum.
We're giving away four copies of Communication Patterns: A Guide for Developers and Architects and have Jacqui Read on-line!
See this thread for details.

Aditi Kamra

Greenhorn
+ Follow
since Aug 25, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Aditi Kamra

Hi,

I have a doubt about c:set with the "var" version (<c:set var="name" value=""/>

If the value evaluates to null , and the scope is not mentioned , I understood from HFSJ that it will start looking in all the scopes starting from page scope, so if this var is present in more than one scope, will it remove it from all scopes(like c:remove does when scope is not mentioned) or just the one it encounters first ?

Might be a silly doubt but can somebody please clear this out ..


Thanks in Advance

Regards,
Aditi

Thanks a lot Chinmaya and Salil, this explanation is of great help

@ Salil,
when you mentioned the browser request as http://localhost:8080/TestProject/account/RequestFunctionTest, correct me if I am wrong ,

then wont the PathInfo be /* ??




Regards,
Aditi

Hi ,

I have my SCWCD exam this coming thursday .

Can somebody please clear explain me the terms ServletPath,RequestPath,PathInfo,RequestURI
and if possible with 1-2 examples , all these are really confusing , I read through the Servlet Specificationas well. but still not very clear.

Based on these concepts I have few questions as well ??
(1)If my browser request is : http://localhost8080/demo/testExamples/test/test1
If my servlet mapping is /test/*, then what would be the Servlet Path and PathInfo

(2) and another one from enthuware mock tests
If the servlet-mapping is /account/* and the requestURI is /myapp/account/*, then what would be the Servlet Path and PathInfo

Ans: /account is ServletPath, /* is PathInfo


Thanks In Advance..

Hi ,
I came across this question in one of the enthuware mock exams

Assuming that a taglib directive of <%@ taglib prefix='abc' uri='http://abc.com/taglibX'> exists, what will be the output of the following code?
Given the body content is defined as tagdependent in the tld.

<abc:print>
<%= 3*4 %>
</abc:print>
(Assume that this tag just prints its body to the output.)

The answer given is <%= 3*4 %> with an explanation Since the body content of the tag is tagdependent, the body of the tag will not be processed by the JSP engine. It must be processed by the tag itself. In this case, it will get <%= 3*4%> as its body. So this is what it will output in the result.
My queries are :
(1) If we have an EL instead in the body say ${beanName.property} then will it be also printed as it is without evaluation ???
(2) My second query is how is the assumption mentioned relevant to the question (Assume that this tag just prints its body to the output.)

Can somebody help me over this ...
Thanks in advance.
Hi,
i came across below two questions

1.What is the output of this page? (1 correct answer)
<html>
<body>
Result is ${"a" < "b"}
</body>
</html>
a.“Result is true”
b.“Result is false”

2.What is the output of this page? (1 correct answer)
<html>
<body>
Result is ${a < b}
</body>
</html>
1.“Result is true”
2.“Result is false”

Can anyone please explain the difference/answers to both of them

the answers are 1.(a) 2. (b)

Thanks ..
It worked ...Thanks a lot .. it was a silly mistake from my side..

Also i had another query
Does the default attribute of <c:out works only for String properties of a bean?
what if i wanna print default for an int property in my bean if that property is null...I tried giving default for an int property , but its printing 0.>
I am trying to use <c:out , i have downloaded jstl1.2 jar and placed in my webapp lib folder.
My apache tomact version is 6.0.18, and in my web.xml i have mentioned

><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">

But when i am trying to put
<c:out value="<b></b> Bold letters" escapeXML="false"/> in my JSP
I am getting this exception
org.apache.jasper.JasperException: /actionBean.jsp(47,0) Attribute escapeXML invalid for tag out according to TLD