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

  • Home
  • SEARCH
  • 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 6144823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:42:20+00:00 2026-05-23T18:42:20+00:00

A project that Im working on uses Spring and Struts. Up until now, we

  • 0

A project that Im working on uses Spring and Struts.

Up until now, we we using using Struts 2.1.8.1. All my unit tests extended the StrutsSpringTestCase which in turn extended the StrutsTestCase. However, this used JUnit 3.8.2 and hence had no annotation support.

For Struts 2.2.3, the dev team added a Junit4 TestCase, called StrutsJUnit4TestCase. This test case however, does not the have the supporting functions that StrutsTestCase did e.g. for issuing struts actions. I tried to find some tutorials using this new test case, but haven’t had any luck.

I should mention that I’m trying to use the Rollback annotations, to rollback the automatically rollback database changes that occur during the test.

How exactly am I supposed to use this new StrutsJunit4TestCase?

  • 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-23T18:42:20+00:00Added an answer on May 23, 2026 at 6:42 pm

    at least the following one works in my computer

    public class BlaBlaBlaTestCase extends StrutsSpringTestCase {
        private final Logger log = Logger.getLogger(this.getClass());
    
        @Override
        public String getContextLocations() {
            return "applicationContext_test.xml";
        }
    
        @Test
        public void testWhatever() {
                    //...
        }
    }
    

    the getContextLocations method is important, because this is the method which defines where your applicationContext for testing is.

    oh, i’m using junit 4.4

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

Sidebar

Related Questions

I am working on a Silverlight project that uses Django on the server using
I am working on a project that uses hibernate and spring. Hibernate is encapsulated
I'm working on a project that uses both .net and java, using zeromq to
I have been working on a project which uses Grails with Hibernate... Now the
I am working on a project that uses the asp.net ajax control toolkit and
I'm working on a project that uses an MDI application with a navigation panel
I am working on a project that uses a queue that keeps information about
I'm working on a project that uses several languages: SQL for querying a database
I'm working on a project that uses the new CSS3 transform:rotate(180deg) feature. Every modern
I am working on a project that uses Java Swing. The default look and

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.