Cannot resolve package 'struts-default' in struts.xml

Environment: IntelliJ 9.0.3

The file struts.xml has multiple errors (in red) because struts-default.xml is not resolved.

Example:
    <package name="abc" extends="struts-default">
with the error message:
    Cannot resolve package 'struts-default'

I added:
    Project Settings / Facets / Struts 2 / My Fileset
with the missing 'struts-default.xml' (from Maven struts2-core-2.1.8.1.jar!/struts-default.xml)

This does not resolve the problem.

What other settings are required to clear this error message?

Thanks
Mark

7 comments

I assume your own struts.xml is included in the same fileset? Where is it located? It must be inside any source-roots, also make sure to include corresponding source root in web facet source roots (checkbox).  Yann

0

Sure, struts.xml is included. It is in Default File Set for Struts 2 Facet.

0

Is this an existing project or a new project created with IDEA's project wizard?  It sounds like a more general problem with your project setup. Can you send me a stripped down ZIP of your project

? Thanks.
0

Please find attached iml-file for the project.

Which .idea files could be helpful?



Attachment(s):
ABC.iml.zip
0

your own struts.xml is not in the same fileset as struts-default.xml, please try to group them

0

THANKS. This resolved the issue.

0

Please sign in to leave a comment.