Hudson logins don't work via j2ep because the rewriter does not rewrite the ajax post in its javascript. In the following example we see that it has successfully rewitten the success href but the url of the POST has been missed. Here it should have been rewritten to "/j2ep/hudson2/j_acegi_security_check".
function submitForm(){
jQuery('#loginMsg').css({ opacity: 1.0 });
jQuery('#loginError').css({ opacity: 0.0 });
var dataString = jQuery("#loginForm").serialize();
jQuery.ajax({
type: 'POST',
url: "/hudson/j_acegi_security_check",
data: dataString,
success: function(){
window.location.href="/j2ep/hudson2/login";
},
error: function(){
jQuery('#loginError').css({ opacity: 1.0 });
jQuery('#loginMsg').css({ opacity: 0.0 });
},
dataType: "html"
});
}
This feature has been added in the attached version of UrlRewritingOutputStream and UrlRewritingResponseWrapper (as well as fixing a couple of bugs).
See 3605916 for the file attachments mentioned here.