views:

275

answers:

2

Hi,

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

A: 

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 ?

Jawher
A: 

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.

leonidv
The html files are in the WAR. They are just ommited by the containers during deployment. But it must be some misconfiguration, because quickstart works. I'll update when I get to it.
Ondra Žižka