"cannot resolve package" in web.xml in multi-module project
Did my best to search for this in the forums, but I'm still stumped.
I've got a multi-module project ... J2EE app module, EJB module, and web module.
The EJB module contains all the java source, including servlets. Yes, I know this isn't
optimal .. it's just what we need to do since package restructuring is the more painful option.
The web module contains all the JSPs, static content, web.xml, etc.
The web module has the EJB module as a dependency. I've checked and checked this part.
It's definitely listed there.
Here's my problem ... the web.xml has repeated "cannot resolve package" red errors for
each of the servlet class references. I'm able to ignore web.xml to get an EAR deployed,
but my question is ... why? What can I do to get rid of the red servlet classes and validate
the web.xml file?
请先登录再写评论。
Which IntelliJ IDEA version are you using?
Is your web.xml configured correctly as deployment descriptor in your
Web module settings?
Version is 6.0.4, and yes, web.xml appears in "web module settings / deployment descriptors".
Also, application.xml and jboss-app.xml appear in "Java EE Application module settings / DDs"
And, ejb-jar.xml and jbosscmp-jdbc.xml appear in "EJB module settings / DDs"
Are you usign package prefixes? I once had the same problem and could
only solve it by restructuring the directory structure to match the
package hierarchy.
Timothy Falconer wrote:
--
Martin Fuhrer
Fuhrer Engineering AG
http://www.fuhrer.com
Are you saying I shouldn't be using package prefixes?
Right now the source root is:
./source/com/domain/project
And I set the package prefix to com.domain.project
Are you saying I should set the source root to "source" and not use a package prefix?
Can anyone else confirm that this is a problem?
Timothy Falconer ?????:
Unfortunately seems that it's so. Could you file a JIRA request please?
No, I'm saying that Peter should fix it... :)