File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes setting content types,header,cookies after commit not throwing any exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply locked New topic
Author

setting content types,header,cookies after commit not throwing any exception

Sagar Shroff
Ranch Hand

Joined: Jun 07, 2011
Posts: 208

Hello ranchers once again very confusing doubt.
It has been mentioned in HFS that once committed too late rule applies also to setting headers,cookies,status codes,content type and so on.

But when i tried this code in my jsp which i directly called from my browser


I tried all of them at one go and none of them is throwing an error.
Instead its printing :
This is my jsp end

So if a question comes on this in exam what should i select ??

Regards Sagar.


OCJP-90%,OCPWCD-95%
varun Dosapati
Ranch Hand

Joined: Nov 18, 2010
Posts: 31

Sagar

below is the code generated once the jsp becomes servlet.





Thanks
Varun Dosapati
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

This is a lot like, and related to, your other similar question. Please continue any discussion there.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting content types,header,cookies after commit not throwing any exception