Raj Kumar

Ranch Hand
+ Follow
since Sep 19, 2005
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Raj Kumar

Hi all, i have a query in custom taglibs. If the TLD of a particular tag describes <body-content> as empty can we return
EVAL_BODY_INCLUDE (or) EVAL_BODY_BUFFERED ?. I think we should not because the grammer says the body content should be empty.
I need your view over this.
16 years ago
Hi Jothi Shankar Kumar Sankararaj,
thanks for the reply, tried to invoke a servlet on exception and it worked. great thanks for that

Can you pls explain how can we achieve the option C ?

i can't understand what they ask in the first option? if possible pls explain that.

Thanks for your valuable time,

Hi all,

Which of the following statements are true?
Choose at least one answer.

a. To be able to directly access a servlet the servlet-name must have a matching servlet-mapping

b. The init-param tag may contain java code between its opening and closing brackets

c. The welcome-file tag can mark a servlet as the default item that is returned from a url

d. The welcome-file tag must point to a servlet called welcome

e. The error-page tag must point to an html or JSP page, not a servlet

The correct ans as given my mock exam is options A&C and according to me is only option e.

Pls let me know your views and an explanation for that too.

thanks for your time,

Hi all, i have a small query with reg. to content specified in page 360 of Head First Servlets & JSP.

The description is about the use of setProperty using the Property attribute with the value "*" means all the request param names with the same property name in bean will be set.

1) First on checking the type and class value used in <jsp:useBean> it's not possible to set the employee related details when considering the superclass is the reference type.?

2) In this case the employee related bean property won't be set, is it correct?

Thanks for your valuable time.
Pls. replace this:
(i.e) by mentioning the scope as session

(i.e) by mentioning the scope as session in the usebean of second.jsp

Sorry for the mistake
Hi, fist.jsp while defining the useBean you have mentioned the scope as session. So the attribute is set at the scope level.

If you could have opted the same thing (i.e) by mentioning the scope as session then you would have got the result as "SecondValue" since you have not done that the second bean have taken the default as "Page" scope and the call for include action is made dynamic you can't see the "secondValue" instead you see "FirstValue".

Even i'm a beginner let me know if anything is wrong.

Thanks Rahul & others, i had fixed the problem the 505 error is because i had not encoded the URL once when i did that the problem is solved.

Thanks a lot for all you time...
17 years ago
Yes Rahul that's what i'am doing now but what happens is some time it throws

exception caughtjava.io.IOException: Server returned HTTP response code: 505

even after using URLEncoder i'am facing this problem ...
17 years ago
I think i should be much specific,

From the browser to WebappParent i received two values username & password as a "POST" method which after validation i just need to pass over to either WebappChild1 (or) WebappChild2.

With Pass over means the WebappChild which receives the call for request should do the processing as if it had received that from a browser (i.e. it should use request.getParameter("username")) to get the values.
17 years ago
Hi Ben Souther, What you asked is correct (i.e why you break webapplication??)
i know how to achive that with a single application but that's not my requirement.

What i think was if we have a way to request for a particular resource in a web application using URLConnection then there should be a way to pass request parameters & attributes too.
17 years ago
thanks rahul for the reply, but is not there a way as simple as "GET" method.
17 years ago
I have three web applications deployed on the same Tomcat named
WebappParent, WebappClild1, WebappChild2.

Here WebappParent will get the username & password validates that and based upon the previlege it will call a particular servlet in WebappChild1 (or) WebappChild2 using URLConnection and "POST" method

But here i want to know how to pass the request object which i had received from the browser to WebappParent and from there to either of the child application.

I tried this using "GET" method and passing parameters along with the URL and it worked perfectly.

Thanks in advance
17 years ago
Exactly said Bear Bibeault, thanks for the reply. i got that fixed.

17 years ago
Thanks Bear Bibeault,
but could you explain why the problem doesn't occur when i use sendRedirect()???
17 years ago
Hi everyone,

Following is my webapp structure.

Control Flow :
1)Once I access my webapplication through a browser it goes to the index.jsp
2)I had just forwarded that using sendRedirect to file1.jsp.
3)In file1.jsp i will enter username,password & click the submit button.
4)which will transfer the control to the servlet serv.java

Upto this step everything works fine.

Now inside my servlet I will generate a dynamic html page and save that to a folder named "output"
please consider file2.html is one such html file which uses the "prop.css" & "validation.js" for broswer display & script validation

Now when i use either of the follwoing two lines inside my servlet

=> i could able to see the style sheet i has used in my
css & also the java script.
BUT when i use
=> I had just recived an html page on my screen without
any javascript / i could not see any style sheet on my broswer.

Pls. note i had check all the path verification when i included the .css & .js file in my html AND
another point to mention here is when i open the html file manually using the browser it displays everything perfectly.

I had not set any headers to my HttpResponse....

Let me know what basic knowledge i'am missing out here.

Thanks in advance

[BSouther: Added UBB Code tags to directory tree]
[ December 07, 2006: Message edited by: Ben Souther ]
17 years ago