开发者

Wicket WAR in Jetty: .html files not on classpath

I deployed a Wicket-based app's .war file to Jetty 7.0.2. The problem is that Jetty copies the classpath to a temp dir, but only copies *.class, so *.html is not available for the classloader and I get the error:

WicketMessage: Markup of type 'html' for component 'cz.dynawest.wicket.chat.ChatPage' not found.

Copying the war as an expanded directory helped. Still, I am 开发者_开发问答wondering how to configure Jetty to copy everything.

And, with mvn jetty:run I get the same error.

Thanks, Ondra


Check your pom.xml, that your resource folder is also src/main/java. Here are the fragment from my working pom.xml

<build>
  <resources>
    <resource>
      <filtering>false</filtering>
         <directory>src/main/resources</directory>
    </resource>
    <resource>
       <filtering>false</filtering>
       <directory>src/main/java</directory>
       <includes>
          <include>**</include>
       </includes>
       <excludes>
           <exclude>**/*.java</exclude>
       </excludes>
    </resource>
  </resources>

Also, y can to try to run jetty:run-exploded. I don't remember reason, but it's working better for me.


Since you're using maven, are you sure your html/css files are in the same package as the java file, but in the src/main/resources dir and not in src/main/java ?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜