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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T08:04:22+00:00 2026-06-01T08:04:22+00:00

I am trying get Struts 2 and Tiles to work and I am using

  • 0

I am trying get Struts 2 and Tiles to work and I am using netbeans 7.1 as my IDE. Most of the examples are built on eclipse and I can seem to find a working example , So i tried to follow a tutorial And tried to get it sorted. Now I have the proeject runningwell and I can access individual tiles by url.

ie.
http://localhost:8088/sample2/example/body.jsp

But the action to mapping doesnt seem to work.

below are the files :

struts.xml = http://pastebin.com/5uWLSXWj
example.xml = http://pastebin.com/UQh68YNE
web.xml = http://pastebin.com/ZgVXfW1E
LinkAction.Java = http://pastebin.com/8cvKdmai

Appreciate any guidance , and links to netbeans and struts 2 example code.

  • 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-01T08:04:24+00:00Added an answer on June 1, 2026 at 8:04 am

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

    Problem with Struts.xml file. You are loading two <package>s with same configuration.

    Thats why one package is loading(with plain JSP result), and another is silently dropped (with Tiles results.) Try combining them into one, like this :

    <struts>
    <package name="example" namespace="/example" extends="struts-default">
        <result-types>
                <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
        </result-types>
        <action name="HelloWorld" class="example.HelloWorld">
            <result>/example/HelloWorld.jsp</result>
        </action>
        <action name="Body" class="example.HelloWorld">
            <result>/example/body.jsp</result>
        </action>              
    
        <action name="*Link" method="{1}" class="example.LinkAction">
                <result name="welcome" type="tiles">welcome</result>
                <result name="friends" type="tiles">friends</result>
                <result name="office" type="tiles">office</result>
        </action>  
    </package>
    </struts>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to access a member structs variables, but I can't seem to get
Is there a way to get struts 2 (using tiles) to build the whole
I am using the Struts iterator tag and trying to get 3 elements of
I'm trying to get an Action in Struts 2 to work with an Enum
I am trying get all html links within a string and replace them using
I am trying get all html links within a string and replace them using
Trying to get parameters from a PUT request using HttpServlet#doPut: public void doPut(HttpServletRequest request,
Trying to get this to work, with no luck: [DataMember] public Type ParameterType {
Trying to get a JSON output to work with jqGrid 'userdata' option. The example
I’m using Struts 2.2.3 with Tiles 2.1.4. It works absolutely fine, but now I’m

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.