serialization - JSF: How to capture response that is send to client -


i want implement kind of help-functionality within jsf-application

scenario:

when users of app having problems, send me screenshots. these of poor quality , cannot see information want.

my idea: add "help"-button jsf-page. when button pressed store render-response (resulting html) send client on hd.

now can open generated html-file , can see information want (e.g. values of inputfield)

now question.

how can perform task?

i have tried phaselistener , using

printwriter w = new printwriter(system.out); debugutil.simpleprinttree(facescontext.getcurrentinstance().getviewroot(),"",w);

but component tree , not resulting html

in other words: want capture output of facescontext.getexternalcontext().getresponse() send client

any ideas?

use filter around facesservlet. there define httpservletresponsewrapper , in turn make getoutputstream() , getwriter() return wrappers of original objects. in wrappers, in addition delegating original implementation, store written data somewhere else.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -