是否有“j_security_check”这样我可以看看它的标准位置?我在哪里可以找到“j_security_check”?
一个搜索我的电脑没有找到该文件,只是它的引用。所以无论是出于安全原因隐藏还是它不是一个文件?
我已经锁定了一个应用程序的,这是第一位的IM考虑看看的解决方案。
是否有“j_security_check”这样我可以看看它的标准位置?我在哪里可以找到“j_security_check”?
一个搜索我的电脑没有找到该文件,只是它的引用。所以无论是出于安全原因隐藏还是它不是一个文件?
我已经锁定了一个应用程序的,这是第一位的IM考虑看看的解决方案。
这是Servlet API的一部分,内置于servletcontainer。就你而言,它是内置于Tomcat中的。更具体地说,org.apache.catalina.authenticator.FormAuthenticator
类。
227 // Is this the action request from the login page?
228 boolean loginAction =
229 requestURI.startsWith(contextPath) &&
230 requestURI.endsWith(Constants.FORM_ACTION);
231
232 // No -- Save this request and redirect to the form login page
233 if (!loginAction) {
234 session = request.getSessionInternal(true);
235 if (log.isDebugEnabled())
236 log.debug("Save request in session '" + session.getIdInternal() + "'");
237 try {
238 saveRequest(request, session);
239 } catch (IOException ioe) {
240 log.debug("Request body too big to save during authentication");
241 response.sendError(HttpServletResponse.SC_FORBIDDEN,
242 sm.getString("authenticator.requestBodyTooBig"));
243 return (false);
244 }
245 forwardToLoginPage(request, response, config);
246 return (false);
247 }
248
249 // Yes -- Validate the specified credentials and redirect
250 // to the error page if they are not correct
251 Realm realm = context.getRealm();
252 if (characterEncoding != null) {
253 request.setCharacterEncoding(characterEncoding);
254 }
255 String username = request.getParameter(Constants.FORM_USERNAME);
256 String password = request.getParameter(Constants.FORM_PASSWORD);
257 if (log.isDebugEnabled())
258 log.debug("Authenticating username '" + username + "'");
259 principal = realm.authenticate(username, password);
260 if (principal == null) {
261 forwardToErrorPage(request, response, config);
262 return (false);
263 }
该Constants.FORM_ACTION
是/j_security_check
。
至于被锁定您的具体问题,只是确保你提供正确的用户名和密码。用户数据库通常由realm配置。
这是不是一个文件,这是基于容器认证别名:
http://docs.oracle.com/javaee/1.4/tutorial/doc/Security5.html
您不需要对j_security_check执行任何操作。问题是在别处:
例如:
连接到数据库(或你的情况,如果你使用Tomcat的tomcat-users.xml文件),密码加密,什么东西在网上。 xml,context.xml中的东西。对于Glassfish,它也可能是glassfish-web.xml中的池和领域。
仔细检查日志。对于GF,您需要启用Finest,如下所示: (a)转至此页:http://localhost:4848/common/monitor/serverInstMonitoringServerPage.jsf。 (b)将此属性设置为Finest:javax.enterprise.system.core.security
检查META-INF/context.xml,标记 –
Ibrahim