0

我正在使用 Eclipse Scout 框架开发服务器-客户端程序。我有 Java 经验,但我对 Tomcat 的经验并不存在。

我想编写一个请求我的登录信息的应用程序。使用 DataSourceSecurityFilter 我想在程序中授权用户(从数据库中读取他的用户名和密码)。我的服务器 config.ini 如下所示:

### Service Runtime Configuration


org.eclipse.scout.rt.server.services.common.file.RemoteFileService#rootPath=/Users/wgvanveen/Documents/workspace/ledenbeheer.server/j2ee/ear/war/WEB-INF/remotefiles

### Servlet Filter Runtime Configuration
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#active=false
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#realm=ledenbeheer Development
org.eclipse.scout.http.servletfilter.security.BasicSecurityFilter#users=admin\=manager,allen\=allen,blake\=blake
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#active=false
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#realm=TEST APPLICATION
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcDriverName=com.mysql.jdbc.Driver
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcMappingName=jdbc:mysql://localhost/Leden 
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcUsername=root
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#jdbcPassword=root
org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#selectUserPass=SELECT LOWER(Gebruikersnaam) FROM Gebruikers WHERE LOWER(gebruikersnaam)=? AND PASSWORD=?
org.eclipse.scout.http.servletfilter.security.AnonymousSecurityFilter#active=true

我在服务器插件中添加了以下内容:

<filter
            aliases="/process"
            class="org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter"
            ranking="40">
      </filter>

我不知道为什么这不起作用。我已按照以下说明进行操作:http ://wiki.eclipse.org/Scout/Concepts/Security

我正在使用 Scout 3.8 运行 Eclipse Juno

4

1 回答 1

0

似乎激活了错误的过滤器。

org.eclipse.scout.http.servletfilter.security.DataSourceSecurityFilter#active=false org.eclipse.scout.http.servletfilter.security.AnonymousSecurityFilter#active=true

尝试激活数据源过滤器并停用匿名过滤器。如果它不起作用,我建议您在http://www.eclipse.org/forums/index.php?t=thread&frm_id=174的官方童子军论坛上发布问题。

于 2013-01-26T02:48:55.053 回答