nisha chidella

Ranch Hand
+ Follow
since Jul 24, 2008
Merit badge: grant badges
For More
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 nisha chidella

so, we do href="${inputURL}" when we use the var attribute in this example.
thanks it helped.
Oh ..its working for me now. i just forgot to restart the server after deploying the jar file.
did you resolve this problem ? am getting the same exception.
this one adds to the list. Tomcat has many issues i guess.
It's given when they explained about JspFragment. It states:

The body of the tag that invokes a simple tag handler is encapsulated in the JspFragment object and then sendto tag handler in the setJspBody() method.

The thing to remember about JspFragment is that it cannot contain scripting elements.

so, since it cannot contain scripting elements, the body-content for a Simple Tag cannot be a JSP.
the question specifically says redirect, so only c is the right answer not d. remember, with redirect the response goes back to the client(browser) and a new request is made by the client to the redirected resourse, whereas in forward, the response doesn't go the client, it simply forwards the request to the another resourse.

may be ./ is used in UNIX for / in windows. need confirmation from some unix user.


If I were you, I'd put the AdvisorTagHandler in a package.



now it works. i was lazy to put a one line package statement. . But good i left that , else i wouldn't have known what you told:


Leaving class files in the default package does not guarantee a correct behaviour.



thanks Christophe.
I tried the custom "advice" tag example from chapter 9 of HFSJ(pg.467). But am getting exception as : unable to compile class for jsp. AdvisorTagHandler cannot be resolved to a type.

I have 3 files here
1. myLib.tld




2. TestCustomTag.jsp


3.AdvisorTagHandler.java(AdvisorTagHandler.class is in the classes directory)



the java file compiles. all the files are at right places. what am i doing wrong ?
so, does this happen only in Tomcat ?
E. ${paramValues[hobbies][0]}
F. ${paramValues[hobbies][1]}

E,F are incorrect syntax because hobbies is not enclosed in double quotes. Its should be ${paramValues["hobbies"][0]}.




3) Also if this were to be answered using only [] operator we will use it as ${paramValues["hobbies"][0]}, is this correct ??



you had the answer for your question
In my DD i have errorpage declaration for both ArithmeticException and Throwable. when an ArithmeticException is thrown, it is always going to the jsp that is declared for Throwable. shouldn't it call the page that is declared for ArithmeticException ?


1.DD


2. errorPage.jsp


3.arithmeticError.jsp



4.badPage.jsp (which throws ArithmeticException)


just try to invoke the "var" attribute with the "scope" attribute set.



that makes no difference.still doesn't work.


I hope inputComment.jsp belongs to the same context.



yup. it belongs to same application. I mentioned that the first option works.
i don't know how to post this..my code is not displaying.

i have
1. <c:url value='/inputComment.jsp' />
and
2.<c:url value='/inputComment.jsp' var='inputURL' />

as value for href.

the first link works while the second doesn't.In the second the request doesn't go to inputComment.jsp when i click on the link. var is just an attribute of <c:url>, so why would it make any difference ? when i view the source code from the browser, i see href=""(empty string) for the second option.hope i am clear.

Source is: page 455 in my HFSJ(topic:<c:url> for all your hyperlink needs)
what's the difference between these:


1. click here

2. click here

the first works while the second doesn't.In the second the request doesn't go to inputComment.jsp when i click on the link while in the first it goes to inputComment.jsp. var is just an attribute of c:url, so why would it make any difference ? when i view the source code from the brower, i see href=""(empty string) for the second option.