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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:45:39+00:00 2026-05-22T00:45:39+00:00

I want to start using Struts 2 framework, I download Struts 2.2.3 , and

  • 0

I want to start using Struts 2 framework, I download Struts 2.2.3
, and follow this tutorial to make first example, but when I run the index.jsp which has

<%@ taglib prefix="s"  uri="/struts-tags" %>
 ....
<p><a href="<s:url action='hello'/>">Hello World</a></p>
..

This exception occurs:

org.apache.jasper.JasperException: The Struts dispatcher cannot be found.  This is usually       caused by using Struts tags without the associated filter. Struts tags are only usable when the  request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

I didn’t specify any filters in web.xml because web.xml file wass not created when I create the web application ?! There’s only sun-web.xml file that exists.

  • 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-05-22T00:45:40+00:00Added an answer on May 22, 2026 at 12:45 am

    From the tutorial which you linked yourself.

    Step 5 – Add Struts 2 Servlet Filter

    To enable the Struts 2 framework to work with your web application you need to add a Servlet filter class and filter mapping to web.xml. Below is the filter and filter-mapping nodes you should add to web.xml.

    web.xml Servlet Filter

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

    For more information about configuring the deployment descriptor for Struts 2 see web.xml. Note the url-pattern node value is /* meaning the Struts 2 filter will be applied to all URLs for this web application.

    Did you read it? Create the web.xml (the IDE should usually already have done it) and declare the filter in there as per the instructions in the tutorial.

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

Sidebar

Related Questions

I want to start using Python for small projects but the fact that a
So, I want to start using virtualenv this year. I like the no-site-packages option,
Hey everyone, I want to start using Scheme and I have two questions. First,
I want to start using maven in code I distribute but I can't find
I want to start using smart pointers in my code but I don't really
I want to start using Eclipse with the PyDev plugin, as recommended by this
I am using Zend Framework 1.9.6. I want to start using cron jobs. I
I want to start using Cygwin, but I am not pleased with the font
I want to start using GitHub Pages for my project's website. This simply requires
I want to start using Mercurial on a VB.Net project, but I'm not sure

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.