Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8222003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:07:34+00:00 2026-06-07T14:07:34+00:00

Yet another question on this I know, but let me just say I looked

  • 0

Yet another question on this I know, but let me just say I looked everything else or about. So, I’m currently building the structure of my Struts 2 Project. I use Struts 2.3.4, JBoss 7.1 and Eclipse Indigo. I also included all the necessary jar into my project. The problem is when I run my application (Add project to Jboss, Run On Server) and go “http://localhost:8080/booxstore/” I get this:

Etat HTTP 404 - There is no Action mapped for namespace [/] and action name [] associated with context path [/booxstore]

Project

My web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
id="WebApp_ID" version="3.0">
  <display-name>Booxstore</display-name> 

  <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
  </filter>
  <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>

</web-app>

My struts.xml :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
 "http://struts.apache.org/dtds/struts-2.0.dtd">

 <struts>
    <constant name="struts.devMode" value="false" />
    <package name="pages" namespace="/pages" extends="struts-default">
        <action name="afficher" class="com.booxstore.controller.DisplayAction" >
            <result name="SUCCESS">/center.jsp</result>
        </action>
    </package>
 </struts>

My action :

/**
 * 
 */
package com.booxstore.controller;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionSupport;

public class DisplayAction extends ActionSupport {

    /**
     * 
     */
    private static final long serialVersionUID = 8199854978749642334L;

    public String execute() throws Exception{
        System.out.println("IN");
        return Action.SUCCESS;
    }
}

My JSP just have plain text and have imported struts 2 tags. Basically no matter what I do I can’t get a resource. If I go to “http://localhost:8080/booxstore/” or “http://localhost:8080/booxstore/DisplayAction” I get “There is no action mapped” and if I tried to access directly the jsp I get a 404. Please note my war is deployed and enabled on the server.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:07:36+00:00Added an answer on June 7, 2026 at 2:07 pm

    Put index.jsp under WebContent folder, move pages folder to WEB-INF and then change the struts.xml with:

    <struts>
     <constant name="struts.devMode" value="false" />
     <package name="pages" extends="struts-default">
        <action name="afficher" class="com.booxstore.controller.DisplayAction" >
            <result name="SUCCESS">/WEB-INF/pages/center.jsp</result>
        </action>
     </package>
    </struts>
    

    I think that the problem is that the application is not finding the jsps that you are putting in the configuration files. And META-INF folder is not the place for putting your jsps pages if you don’t want to make them public, WEB-INF is better for that purpose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I guess this question will sound familiar, but I am yet another programmer baffled
Yet another IE is doing something different from other browsers question but this is
Yes, I'm yet another person to as this annoying question... but I'm not convinced
Yet another SVN guideline question, I know. I recently joined a new company which
Yet another question about which NoSQL to choose. However, I haven't found yet someone
I know this question has been asked here a few times before. But i
First of all, I apologize for yet another interface question. I thought that this
Sorry to be a nuisance, but I have yet ANOTHER question. How would I
This question is related to another question of mine: How to know if a
I know this question might be considered better on Stack UI, but I wanted

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.