Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
    Bookmark Topic Watch Topic
  • New Topic

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

 
Sagar Shroff
Ranch Hand
Posts: 209
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
varun Dosapati
Ranch Hand
Posts: 31
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sagar

below is the code generated once the jsp becomes servlet.





Thanks
Varun Dosapati
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65337
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a lot like, and related to, your other similar question. Please continue any discussion there.
 
    Bookmark Topic Watch Topic
  • New Topic