Note that there are some explanatory texts on larger screens.

plurals
  1. POafter web filter all images gone in jsf page
    primarykey
    data
    text
    <p>I am using spring security with jsf 2. I have a filter that control if db access is ok in each page. :</p> <pre><code>public void doFilter(ServletRequest aReq, ServletResponse aResponse, FilterChain aChain) throws IOException, ServletException { ... if(!myContext.isdbRunning()) { mLogger.debug("System not working. Redirecting to: "+"/error.jsf"); aReq.setAttribute("errorMsj", "DB is not started. Please contact DB admin."); aReq.getRequestDispatcher("/error.jsf").forward(aReq, aResponse); return; } aChain.doFilter(aReq, aResponse); return; } </code></pre> <p>If everything is ok, my jsf page is rendered correctly. but when filter finds a problem in db, it processes to an error page. </p> <pre><code>aReq.getRequestDispatcher("/error.jsf").forward(aReq, aResponse); </code></pre> <p>but that page dosn't show images and other css based stuff..</p> <p>does spring security take control and disallow my page contents? or do I have a mistake? How can I solve it? Can I use Phase listener?</p> <p>Edit: part of my web.xml is</p> <pre><code> &lt;filter&gt; &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt; &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter&gt; &lt;filter-name&gt;Gatekeeper&lt;/filter-name&gt; &lt;filter-class&gt;com.jsfsample.filter.GateKeeperFilter&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;Gatekeeper&lt;/filter-name&gt; &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload