• Post Reply Bookmark Topic Watch Topic
  • New Topic

Flush the response from JSTL  RSS feed

 
Scott Maclary
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know from a scriptlet I can do this inside a JSP:




...but I'd prefer to stick to JSTL or EL. Any suggestions?

Thanks,
Scott
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What about developing a custom tag and doing that from within the tag ?

Hint: See the PageContext API ...

Best of luck ...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why would you need to manually flush the writer in a scriptless JSP?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, your question is a red flag indicating that you are trying to created scripted pages, just without the script.

Switching from scriptlets to JSTL/EL is not an end in an of itself, you do it to create simple scriptless pages, not just to do it.

I am very interested in your answer to Ben's question.
 
Scott Maclary
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's because I am stuck with somebody else's code...which I don't have the authority to rewrite in full. When a page breaks here or there or we need a fix here or there I can then update that page or module...but since it's already using a bad design (tons of business logic in JSP, Scriptlets mingled with JSTL, disastrous HTML) and I can't just redo the whole thing...I would like to slowly switch it to good design. At this point I guess you are right...flushing the buffer using JSTL instead of scripltets doesn't buy me anything but I am kind of not sure how we'll ever get the site to using a good design.

Its kind of like walking into a house that is (or should be condemmed), and trying to fix one board...when you remove that one board to fix it...the whole thing could come crashing down...and the people inside the house (customers) can't understand why it came crashing down and assume that you broke the board.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there are already scriplets on the page, trying to emply anything else for this wouldn't buy you anything.

My condolences on your horrible pages.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!