我正在尝试修复https://stackoverflow.com/questions/21162117/simplecrud-rejects-user-password,TomEE邮件列表中的一些人要求我使用Maven复制这个bug。所以我跟踪了Apache指南
我创建了一个新目录,然后输入命令
mvn archetype:generate -DarchetypeGroupId=org.apache.openejb.maven -DarchetypeArtifactId=tomee-webapp-archetype -DarchetypeVersion=1.0.1然后
cd tomee-demo然后
mvn package tomee:run然后我把战争档案放进去
maven/tomee-demo/target/apache-tomee/webapps/并试图加载网页
http://localhost:8080/LAI_pezzi_Login/Login.xhtml但我得到了信息
The specified XML file does not have any associated style sheet. Document tree is shown below
<ui:composition template="/templates/layout.xhtml">
<ui:define name="content">
<h:form styleClass="loginPanelStyle">
<p:growl id="msgs" showDetail="true" sticky="false"/>
<p:panelGrid columns="2">
<f:facet name="header"> Login Panel </f:facet>
<h:outputText value="Username : "/>
<p:inputText id="username" value="#{loginController.username}" required="true" requiredMessage="Please Enter Username!" message="fc">
<f:validateLength minimum="1"/>
</p:inputText>
<h:outputText value="Password : "/>
<p:password id="password" value="#{loginController.password}" required="true" requiredMessage="Please Enter password!">
<f:validateLength minimum="1"/>
</p:password>
<f:facet name="footer">
<p:commandButton value="Submit" update="msgs" actionListener="#{loginController.login}" icon="ui-icon-check" style="margin:0"/>
</f:facet>
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>我还尝试将WAR文件部署到从Apache网站下载的Tomcat上,而WAR文件工作正常。
发布于 2014-02-01 18:36:58
正如注释中所讨论的,您需要通过在web.xml中指定servlet映射来告诉JSF应该处理哪些URL。
<servlet-mapping>
<servlet-name>FacesServlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>您使用剩余配置文件的经验提醒我,为什么我只使用10‘极来触摸maven。
https://stackoverflow.com/questions/21402235
复制相似问题