• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Question from Anand Chawla's Mock Exam

 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Can anyone help me out on this one?
Which of the following are true wrt sendRedirect method of HttpServletResponse?
A. Sets the Location Header
B. Path can be only relative
C. To support clients w/o redirect capability, method writes a short response body that contains a hyperlink to the new location
D. Must be called after response is committed else throws IllegalStateException
Select any two.

Thanks in advance.
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer should be A and B.
C is unnecessary. D is exactly the wrong answer, redirect should happen BEFORE the response is committed
 
SRV Gopal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linda,
Thanks a bunch!
Regards
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Venu,
Is this Anand Chawla's mock exam a free version? if so, can you please post the link to it?
Thanks in advance,
Raji.
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Linda Xu:
The answer should be A and B.
C is unnecessary. D is exactly the wrong answer, redirect should happen BEFORE the response is committed



Hi Linda,
I think the answer should be A and C.
B is incorrect the path can be absolute and relative
C is correct, when the browser w/o redirect capability, method writes a short response body that contains a hyperlink to the new location.
Best Regards,
Roy
[ January 28, 2003: Message edited by: Roy Cantos ]
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agreed with Roy, A and C r correct.
A path may or may not be relative.
- Dharmin
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, A & C are the correct answers.Read the specs more carefully.
 
SRV Gopal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Raji,
Here's the link:
JavaRanch SCWCD Links
Regards
 
Raji Ram
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Venu.
I am sorry; I should have seen the JavaRanch link before asking you.
 
Did you ever grow anything in the garden of your mind? - Fred Rogers. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!