You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "jinyong zhang (JIRA)" <ji...@apache.org> on 2018/04/08 22:53:00 UTC

[jira] [Updated] (ARCHETYPE-546) while using maven to create a new web project,the web.xml file maven generated can not be recognised by spring mvc

     [ https://issues.apache.org/jira/browse/ARCHETYPE-546?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jinyong zhang updated ARCHETYPE-546:
------------------------------------
    Description: 
when using eclipse & maven & spring & springMVC as development inviroment,we create a new web project,maven generates web.xml  cannot  be parsed by springMVC,while we debug the project,springmvc logs the messages,no handler was found for [url],no mapping was found for controller, and every time we create a new web project with maven, the problem happpens again, and ervey time we should copy a new web.xml file from somewhere else;

 

!image-2018-04-09-00-20-50-573.png! the first picture is the wrong web.xml head generated by maven and the second picture is right one we copy from somewhere else

!image-2018-04-09-00-21-39-534.png!

  was:
使用eclipse+maven+spring+springMVC, 在构建新项目时,maven生成的web.xml无法被springMVC识别,导致项目运行后,springmvc会报找不到handler ,找不到mapping,

需要自己重新创建web.xml

!image-2018-04-09-00-20-50-573.png!

上边这个是maven自动生成的web.xml的头,

!image-2018-04-09-00-21-39-534.png!

这个是sprimgMVC能识别的web.xml的文件头

        Summary: while using maven to create a new web project,the web.xml file maven generated can not be recognised by spring mvc  (was: 使用maven构建web项目时,maven自动生成的web.xml格式问题)

> while using maven to create a new web project,the web.xml file maven generated can not be recognised by spring mvc
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: ARCHETYPE-546
>                 URL: https://issues.apache.org/jira/browse/ARCHETYPE-546
>             Project: Maven Archetype
>          Issue Type: Bug
>          Components: Archetypes
>    Affects Versions: 3.0.1
>            Reporter: jinyong zhang
>            Priority: Major
>         Attachments: image-2018-04-09-00-20-50-573.png, image-2018-04-09-00-21-39-534.png
>
>
> when using eclipse & maven & spring & springMVC as development inviroment,we create a new web project,maven generates web.xml  cannot  be parsed by springMVC,while we debug the project,springmvc logs the messages,no handler was found for [url],no mapping was found for controller, and every time we create a new web project with maven, the problem happpens again, and ervey time we should copy a new web.xml file from somewhere else;
>  
> !image-2018-04-09-00-20-50-573.png! the first picture is the wrong web.xml head generated by maven and the second picture is right one we copy from somewhere else
> !image-2018-04-09-00-21-39-534.png!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)