servlets - Request forwarding contains result of the jsf page/bean that does the forward -


having strange problem request forwarding jsf bean. request being forwarded without issue. forward url page showing in browser correctly except that, @ bottom of page, contains result of forward jsf page.

i've tried perform response.reset() before doing forwarding. still not working.

i use balus's handy lifecyclelistner see going on. below see

  1. systemout o start phase restore_view(1)
  2. systemout o end phase restore_view(1)
  3. systemout o start phase render_response(6)
  4. systemout o manage bean doing forward
  5. systemout o in forward app
  6. systemout o end phase render_response(6) => render_reponse phrase

i guess when comes render_response phrase, append jsf page end of forward page.

my forwarding code looks below:

public void forwardhttprequestto(string url) {     try {         httpservletrequest request = gethttpservletrequest();         httpservletresponse response = gethttpservletrespose();         try {response.reset();} catch (exception ex) {ex.printstacktrace();};             requestdispatcher dispatcher = request.getrequestdispatcher(url);             dispatcher.forward(request, response);     }     catch (exception ex) {         throw (runtimeexception) ex;     } }  public httpservletrequest gethttpservletrequest() {     return (httpservletrequest)facescontext.getcurrentinstance().getexternalcontext().getrequest(); }  public httpservletresponse gethttpservletrespose() {     return (httpservletresponse)facescontext.getcurrentinstance().getexternalcontext().getresponse(); } 


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -