1

I am working on a Struts 2 project. Tomcat is taking too long to load .action URLs (or Struts 2 actions). While loading them, it keeps on displaying several mime type XML tags as follows:-

  <mime-mapping>
    <extension>book</extension>
    <mime-type>application/vnd.framemaker</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>mmf</extension>
    <mime-type>application/vnd.smaf</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>mmd</extension>
    <mime-type>application/vnd.chipnuts.karaoke-mmd</mime-type>
  </mime-mapping>
  <mime-mapping>
    <extension>pptm</extension>
    <mime-type>application/vnd.ms-powerpoint.presentation.macroenabled.12</mime-type>
  </mime-mapping>
  ...

I don't have any idea what plugin might have caused it. I tried to remove .action extension altogether but unable to do so as asked here. Can anybody please help solve this problem?

Community
  • 1
  • 1
Prakhar Mishra
  • 1,586
  • 4
  • 28
  • 52

1 Answers1

-2

The easiest solution is to RESTART FROM SCRATCH.

Use Maven, or Gradle, create an empty project by running a Struts2 Maven Archetype.

I suggest you the Blank Convention Archetype:

mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
                          -DartifactId=myWebApp \
                          -DarchetypeGroupId=org.apache.struts \
                          -DarchetypeArtifactId=struts2-archetype-convention \
                          -DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
                          -DremoteRepositories=http://struts.apache.org

Generally, but this depends on the type of your project, the only plugins you should care about at the beginning should be the Convention-Plugin, the Json-Plugin, and the jQuery-Plugin.

Be sure to take all the latest versions of each library, ensure that all the versions are aligned too.

Finally, check out the project dependencies on the Struts2 page, and be sure to include everything, and in the right version.

Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243