struts2 - Servlet 3.0 tiles definition in jar META-INF resources -


i using new servlet 3.0 approach of packaging web resources (such javascript, css, , jsps) in jar files. approach says under jarroot/src/meta-inf/resources mounted war root when application starts. works file css , javascript not struts tiles.

this structure have in jar:

base.jar |--src/ |----meta-inf/ |------base.tld |------resources/ |--------base/ |----------css/ |----------js/ |----------basetiles.xml 

in application (war) web.xml got tiles:

<context-param>     <param-name>org.apache.tiles.impl.basictilescontainer.definitions_config</param-name>     <param-value>/web-inf/tiles.xml,/base/basetiles.xml</param-value> </context-param> 

when start application not errors basetiles.xml assume tiles files. however, trying reference tile jsp (using <tiles:insertattribute> tag) fails

org.apache.tiles.jsp.taglib.nosuchattributeexception: attribute 'base.nav' not found. 

what think is?

summary , other info:

  • using jboss eap 6.1 alpha
  • using struts 2.1.4
  • the base jar included war in lib directory
  • the base jar contain files mentioned above (including basetiles.xml)

thank help!!

problem solved! must point right schema in web.xml...

<web-app version="3.1" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/web-app_3_1.xsd"> 

now works automagically !!


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -