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 8483679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:10:21+00:00 2026-06-10T20:10:21+00:00

I have a problem if I remove the .action extension inside my Struts2 application.

  • 0

I have a problem if I remove the .action extension inside my Struts2 application. I put this in my struts.xml:

<constant
    name="struts.action.extension"
    value="" />

The application works correctly except in the index page. I have in my web.xml this:

<welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

When I access to http://localhost/myApp/, I get the following error:

There is no Action mapped for namespace [/] and 
action name [index.jsp] associated with context path [/myApp]. 
- [unknown location]

However if I access to http://localhost/myApp/fooAction, I’m not getting any errors and works perfectly.

If I change the extension for a non empty extension (like "html"), I see the index page perfectly if I access to http://localhost/myApp/.

So then, is there something wrong in what I’m doing? Why am I getting this error when I remove extension? Is there any posible way of not getting it?

Edit: If I put an action in the <welcome-page> the error is the following:

There is no Action mapped for namespace [/] and action name [] 
associated with context path [/myApp].
  • 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-10T20:10:22+00:00Added an answer on June 10, 2026 at 8:10 pm

    I was having same issue in one of the application where i need to call an Action on page load in place of index.jsp or welcom.jsp in <welcome-page>.I did the following steps

    Placed the following entry in my web.xml.

     <welcome-file-list>
                <welcome-file>index</welcome-file>
    </welcome-file-list>
    

    I created an empty file with name index in my web-app folder and finally placed the following entry in my struts.xml file

    <action name="index" class="welcomeAction">
         <result>/ab.jsp</result>
     </action>
    

    So in this case when i was hitting this URL www.myapp.com/myApp,its calling index action of Struts2 and i was able to do all init work for my welcome page.

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

Sidebar

Related Questions

I have a problem calling EJB object in struts action. I deployed my application
i have problem with my code. I use this JS $(document).ready(function() { //Default Action
I have this list: ADD X ADD Y REMOVE Z ADD X NO ACTION
I have a problem where I need to remove all code and triggers from
I am using GWT/JAVA for development. I have following problem: I want to remove
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I have the following problem deploying my application. It uses JMS and a remote
My Action class have the following methods, 1.add 2.edit 3.loadEdit 4.remove 5.list 6.execute in
I have some problem with delation of associations, this is my code : Classe
I have this concrete problem, but if You find my initial design idea crazy

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.