Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » How to configure LdapLoginModule for use with Jetty(Trying to use form based authentication)
How to configure LdapLoginModule for use with Jetty [message #1745026] Tue, 04 October 2016 10:02
Urs Beeli is currently offline Urs BeeliFriend
Messages: 571
Registered: October 2012
Location: Bern, Switzerland
Senior Member
We are working on a prototype migration of our Scout Mars application. We have succesfully ported it to Neon but there are still some open points.

We require form-based authentication against an LDAP server. As we did not find out quickly how to do this using Jetty, we abandoned the "" projects and added the maven-tomcat7-plugin to our war projects. This is something we were already doing in our Mars setup and the corresponding tomcat filter works nicely with out LDAP.

In order to make Form based authentication work with tomcat's LDAP filter we made some adjustments to web.xml

We have also adjusted the LoginBox.js to match this:
  this.$form = $('<form>')
    .attr('action', 'j_security_check')
    .attr('method', 'post')
scout.LoginBox.prototype._onLoginFormSubmit = function(event) {
  // Prevent default submit action

  var url = this.$form.attr('action');
  var data = {
	        j_username: this.$user.val(),
	        j_password: this.$password.val()

Using the tomcat-plugin setup, we constantly need to stop the UI server, do a local maven build, then restart the UI server to see any changes we make in the GUI code. This is far form efficient and so I am spending some time to look into making our application work with the two jetty projects again. I've re-introduced the and projects back into my workspace (copying them from a freshly generated helloworld example). I've got the Jetty running without errors. Trying to get the instance up and running fails however.

I get the following error message when launching jetty:
2016-10-04 09:56:27,953 WARN  main org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED org.eclipse.jetty.server.Server@1f57539: java.lang.IllegalStateException: No LoginService for in [ @   ]
java.lang.IllegalStateException: No LoginService for in
	at ~[jetty-security-9.2.13.v20150730.jar:9.2.13.v20150730]
	at ~[jetty-security-9.2.13.v20150730.jar:9.2.13.v20150730]

I guess this is due to defining Form-based authentication in the web.xml.

Googling a bit I found the following pages
which seem to indicate that what we are doing using Tomcat should also be possible with Jetty

However, all the examples are working with XML based configuration of Jetty and I have not found out how I can pass these configuration files to the Jetty instance started with the following dependency:

Is there some documentation on how to do this?
Previous Topic:textarea in Scout?
Next Topic:Outline with navigation tree with unknown depth
Goto Forum:

Current Time: Mon Jun 25 10:32:14 GMT 2018

Powered by FUDForum. Page generated in 0.02002 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top