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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:52:53+00:00 2026-06-04T20:52:53+00:00

I’m trying to setup maven and struts 2 project in Eclipse, but I’m having

  • 0

I’m trying to setup maven and struts 2 project in Eclipse, but I’m having problems. I have chosen to create simple HelloWorld example and afterwards add some other functionality, but I’m having problems.


I have ‘struts.xml’ path in project: src/main/resources/struts.xml

and inside it:

<?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>

    <package name="default" namespace="/" extends="struts-default">

        <action name="Login">
            <result>/Pages/Login.jsp</result>
        </action>

        <action name="Index">
            <result>/Pages/Index.jsp</result>
        </action>

        <action name="Welcome" class="com.contactweb.main.Contact">
            <result name="SUCCESS">/Pages/Welcome.jsp</result>
        </action>
    </package>

</struts>

also I have web.xml with path src/main/web/WEB-INF/web.xml and content:

<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
    <display-name>ContactWeb</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>

</web-app>

From commandline I use ‘mvn clean install’ and I get .war file to target folder, that .war file I’m going to deploy under Tomcat (also it deploys it successfully) but when I enter url I get error:

The requested resource (/ContactWeb/Pages/Login.jsp) is not available.

same error with different url-s only path is different (/ContactWeb/Login.jsp, /ContactWeb/Login.action etc.).

In my project I do have Login.jsp, Index.jsp and also Welcome.jsp. They are under: src/main/web/Pages

I have read somewhere that in struts2 I need to but .action extension to url, but it doesn’t work and also why in struts.xml is package name and namespace? what exactly needs to be there? I have read that is for page what it is going to display?

  • 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-04T20:52:55+00:00Added an answer on June 4, 2026 at 8:52 pm

    There’s not enough information to help yet, but enough wrong that it won’t fit into a comment.

    • Why are you using an ancient servlet spec (2.3? Should be at least 2.5 for a variety of reasons.)
    • Why are you using an old version of S2 (2.0? We’re on 2.3.)
    • The result name for the Welcome action should almost certainly be the default, "success", unless you’re explicitly not using the S2 result names. Which IMO would be a bad idea.
    • We don’t know what context you’re deploying to, so we don’t know the path to your web app. If you’re deploying to the ContactWeb context, then the Login action would be at /ContactWeb/Login.action (or whatever your suffix is, if you have one).
    • You should (a) turn devMode on, and (b) turn up logging to the DEBUG level while troubleshooting.
    • Do you JSP pages live in the src/main/webapp/Pages directory? Note that it’s typical to hide JSPs from direct access by putting them under WEB-INF–I’d recommend you follow that practice.
    • Is there anything in your startup logs that would indicate the app isn’t starting up?

    I’d recommend reading some of the S2 Guides; if you don’t know what the “package” and “namespace” attributes signify then IMO you should take a step back and try to understand some of the basics before randomly throwing code and configuration at a web container.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
I want to count how many characters a certain string has in PHP, but

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.