Deploying jboss web application but not found

Ok, trying to deploy War on JBoss 4.0.4.CR2 (no, I can’t update), and I get no exceptions at startup, but whenever I try to access the application, I get 404. I checked every log and I did not find any exceptions.

Below is my web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<servlet>
    <servlet-name>GroupMaintenance</servlet-name>
    <servlet-class>com.example.servlet.GroupMaintenance</servlet-class>
</servlet>

<servlet>
    <servlet-name>ApplicationMaintenance</servlet-name>
    <servlet-class>com.example.servlet.ApplicationMaintenance</servlet-class>
</servlet>

<servlet>
    <servlet-name>EmailMaintenance</servlet-name>
    <servlet-class>com.example.servlet.EmailMaintenance</servlet-class>
</servlet>

<servlet>
    <servlet-name>FraudDefinitions</servlet-name>
    <servlet-class>com.example.servlet.FraudDefinitions</servlet-class>
</servlet>

<servlet>
    <servlet-name>UrlMaintenance</servlet-name>
    <servlet-class>com.example.servlet.UrlMaintenance</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>EmailMaintenance</servlet-name>
    <url-pattern>/email_maintenance</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>FraudDefinitions</servlet-name>
    <url-pattern>/fraud_definitions</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>UrlMaintenance</servlet-name>
    <url-pattern>/url_maintenance</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>GroupMaintenance</servlet-name>
    <url-pattern>/group_maintenance</url-pattern>
</servlet-mapping>

<servlet-mapping>
    <servlet-name>ApplicationMaintenance</servlet-name>
    <url-pattern>/application_maintenance</url-pattern>
</servlet-mapping>

<session-config>
    <session-timeout>
        30
    </session-timeout>
</session-config>

<welcome-file-list>
    <welcome-file>/group_maintenance</welcome-file>
</welcome-file-list>

<login-config>
    <auth-method>FORM</auth-method>
    <realm-name>Example Form-Based Authentication Area</realm-name>
    <form-login-config>
        <form-login-page>/jsp/login.jsp</form-login-page>
        <form-error-page>/jsp/error.jsp</form-error-page>
    </form-login-config>
</login-config>

<security-constraint>
    <web-resource-collection>
        <web-resource-name>Protected Area</web-resource-name>
        <url-pattern>/jsp/*</url-pattern>            
        <http-method>DELETE</http-method>
        <http-method>GET</http-method>
        <http-method>POST</http-method>
        <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
        <role-name>access_write</role-name>
    </auth-constraint>  
</security-constraint>    
<security-constraint>
    <web-resource-collection>
        <web-resource-name>Protected Area</web-resource-name>
        <url-pattern>/WebAdmin</url-pattern>            
        <http-method>DELETE</http-method>
        <http-method>GET</http-method>
        <http-method>POST</http-method>
        <http-method>PUT</http-method>
    </web-resource-collection>
    <auth-constraint>
        <role-name>access_write</role-name>
    </auth-constraint>  
</security-constraint> 

<security-role>
    <role-name>access_write</role-name>
</security-role> 

<resource-ref>
    <description>DB Connection</description>
    <res-ref-name>ownerDS</res-ref-name>                      
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
    <description>DB Connection</description>
    <res-ref-name>ownerDS</res-ref-name>                      
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
</resource-ref>

I play with this for about three hours and I won’t go anywhere. I have not used any other web applications for the same instance. I think this is something small, but I do not see it.

UPDATE: I commented on the configuration settings and login security, and I can access specific servlet mappings. In one of the security restrictions, I define a protected area as

security-constraint>
<web-resource-collection>
    <web-resource-name>Protected Area</web-resource-name>
    <url-pattern>/WebAdmin</url-pattern>            
    <http-method>DELETE</http-method>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    <http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint>
    <role-name>write</role-name>
</auth-constraint>  

, - . , WebAdmin, , WebAdmin.war.

+3
4

, .

, JBoss, Weblogic " " .

0

...

jboss, , , ? , .

, Jboss 404 , , , . , - .

0
  • Can you check the location of your war?
  • It would be nice to see the magazine
  • is the process in progress?
  • Can you rename your war to something else and try again?
0
source

Have you checked the file application.xml? application.xmlmust indicate a link to your banner and military module. The following is an example of what I'm talking about:

<application>
    <display-name>admin-ear</display-name>
    <module>
        <ejb>admin-core.jar</ejb>
    </module>
    <module>
        <web>
            <web-uri>admin-web.war</web-uri>
            <context-root>/admin</context-root>
        </web>
    </module>
</application>
0
source

Source: https://habr.com/ru/post/1767036/


All Articles