我目前想找出這份JAVA檔的登入判斷在哪裡
可是我找不到
form表單提交的位置是/ats.customer/j_security_check
可是我確找不到他的java檔
他的web.xml檔中也沒看什麼特別的東西
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<display-name>ats.customer</display-name>
<!-- 支援多頁籤程式 -->
<filter>
<filter-name>BrowserTabFilter</filter-name>
<filter-class>com.ats.filter.BrowserTabFilter</filter-class>
</filter>
<!-- 隱藏*.xhtml檔 -->
<filter>
<filter-name>XhtmlSourceFilter</filter-name>
<filter-class>com.smartinfo.commons.web.filter.XhtmlSourceFilter</filter-class>
</filter>
<!-- 整合ats.web -->
<filter>
<filter-name>ResourceFilter</filter-name>
<filter-class>com.ats.customer.filter.ResourceFilter</filter-class>
</filter>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>BrowserTabFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>BrowserTabFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>ResourceFilter</filter-name>
<url-pattern>*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsf</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>XhtmlSourceFilter</filter-name>
<url-pattern>*.xhtml</url-pattern>
</filter-mapping>
<listener>
<listener-class>com.ats.web.listener.LogoutSessionListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<description>Logout For Jboss</description>
<display-name>JBoss Logout</display-name>
<servlet-name>jboss_logout</servlet-name>
<servlet-class>com.smartinfo.commons.web.servlet.JBossLogoutServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jboss_logout</servlet-name>
<url-pattern>/jboss_logout</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
<cookie-config>
<name/>
<http-only>true</http-only>
<secure>false</secure>
</cookie-config>
<tracking-mode>COOKIE</tracking-mode>
</session-config>
<error-page>
<error-code>403</error-code>
<location>/loginForbidden.jsf</location>
</error-page>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/loginSessionTimeout.jsf</location>
</error-page>
<security-constraint>
<display-name>Constrains</display-name>
<web-resource-collection>
<web-resource-name>all</web-resource-name>
<url-pattern>/pages/*</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<description>allusers</description>
<role-name>JatoSecurityUser</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>JATOsecurity3LoginModuleWithCaptcha</realm-name>
<form-login-config>
<form-login-page>/login.jsf</form-login-page>
<form-error-page>/loginError.jsf</form-error-page>
</form-login-config>
</login-config>
<security-role>
<description>JatoSecurityUser</description>
<role-name>JatoSecurityUser</role-name>
</security-role>
<security-role>
<description>ats_agent</description>
<role-name>ats_agent</role-name>
</security-role>
</web-app>
依這篇來看
如果你的 servlet 程式裡有「@WebServlet("/response")」這樣的 annotation
就到所有的 servlet(.java) 裡找找看
有沒有@WebServlet("/ats.customer/j_security_check")
的 annotation
我所有java檔案都翻過了
沒有@WebServlet("/ats.customer/j_security_check")
只有@WebServlet(urlPatterns={"/preview/"})和
@WebServlet(urlPatterns={"/waitpreview/"})
但是看下面的語法感覺不太像是帳密的判斷
我也來一個參考連結