Here is the full stack trace:
java.lang.NullPointerException
org.apache.wicket.protocol.http.servlet.ServletWebResponse.encodeURL(ServletWebResponse.java:181)
ch.yugosi.view.WicketApplication$1.encodeURL(WicketApplication.java:121)
ch.yugosi.view.WicketApplication$1.encodeRedirectURL(WicketApplication.java:125)
org.apache.wicket.protocol.http.servlet.ServletWebResponse.sendRedirect(ServletWebResponse.java:212)
org.apache.wicket.protocol.http.BufferedWebResponse$SendRedirectAction.invoke(BufferedWebResponse.java:394)
org.apache.wicket.protocol.http.BufferedWebResponse.writeTo(BufferedWebResponse.java:582)
org.apache.wicket.protocol.http.HeaderBufferingWebResponse.flush(HeaderBufferingWebResponse.java:89)
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:198)
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)
And this is the code that produces the error:
// remove jsessionid for search engines
protected WebResponse newWebResponse(final WebRequest webRequest, final
HttpServletResponse httpServletResponse){
return new ServletWebResponse((ServletWebRequest)webRequest,
httpServletResponse) {
@Override
public String encodeURL(CharSequence url) {
final String agent = webRequest.getHeader("User-Agent");
return isAgent(agent) ? url.toString() : super.encodeURL(url);
}
@Override
public String encodeRedirectURL(CharSequence url) {
return encodeURL(url);
}
};
}
To be honest, I have found this piece of code somewhere and just did
copy&paste.
It does look a bit suspicious especially encodeRedirectURL method which
calls encodeURL again.
Nemanja
I can live without this so it's not a big deal. Weird thing is that Wicket
v6.0 didn't complaint but
v6.1.1 is producing the error above.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Bug-WICKET-4789-still-in-6-1-1-tp4652883p4652887.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]