问题描述
是否有j_security_check的标准位置,以便我可以查看它?
Is there a standard location for "j_security_check" so that i can take a look at it?
搜索我的电脑找不到文件,只是引用它。所以要么出于安全原因隐藏它还是不是文件?
A search of my computer does not find the file, just references to it. So either its hidden for security reasons or is it not a file?
我已被锁定在应用程序之外,这是我第一个看到解决方案的地方。
I have been locked out of an Application and this is the first place im taking a look at for solutions.
推荐答案
它是并内置到servletcontainer中。在您的情况下,它内置于Tomcat中。更具体地说, class。
It's part of the Servlet API and built into the servletcontainer. In your case, it's built into Tomcat. More specifically, the org.apache.catalina.authenticator.FormAuthenticator
class.
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 }
是 / j_security_check
。
关于你被锁定的具体问题,只需制作确保您提供正确的用户名和密码。用户数据库通常由配置。
As to your concrete problem of being locked out, just make sure that you supply the proper username and password. The user database is normally configured by a realm.
这篇关于我在哪里可以找到“j_security_check”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!