Struts not working JBoss 7
Moving a webapp from JBoss AS5 to AS7. I'm able to successfully deploy the webapp - however, pages look weird. Looks like my struts tags are not being recognized. I look at my page source and inputs look like
<html:text property="username" size="30" maxlength="30"/>
instead of
<input type="text" name="username" maxlength="30" size="30" value="">
I'm guessing I开发者_JAVA百科 have to include struts as a Dependency? I try to do this with MANIFEST.MF. My MANIFEST.MF exists in /src/main/resources/META-INF and looks like
Manifest-Version: 1.0
Dependencies: org.apache.log4j org.apache.struts
Doesn't seem to be working? Is this correct? Thanks for any advice.
If your creating a module for the struts then you need to ensure module.xml is defined all the dependencies. Also ensure there is no any servlet-api.jar in your lib. You could give the dependency for the servlets API as follows.
<dependencies>
<module name="javax.servlet.api"/>
</dependencies>
Try place struts.jar to WEB-INF/lib/ directory into your web-app.
You can add any jar file to jboss server as a global resource.. You need to create a module with that jar file and make it as global resource. Need to add the following code in standalone.xml file for make it as global resource.
<subsystem xmlns="urn:jboss:domain:ee:1.0">
<global-modules>
<module name="com.serverlib" slot="main"/>
</global-modules>
</subsystem>
com.serverlib-The module name you have created which contain the jar file
精彩评论