You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guofeng Zhang <gu...@radvision.com> on 2012/02/14 11:39:48 UTC

Web fragment - static resources is not returned (Tomcat 7.0.25)

Hi,

I create a web fragment, which contains servlets and static HTML and CSS files. The following  is their location in the fragement JAR file:
/META-INF
           +---web-fragment.xml
/resources
          +---style.css
          +---hello.html
/com
         .... The servlet classes

This jar placed in another jsr315.war's WEB-INF/lib directory.

It is OK when  I access the servlet in the web fragment, but when I try to access the static HTML using http://localhost:8080/jsr315/hello.html, I got a 404 error.

What I did it wrong?

Thanks

Guofeng


Re: Web fragment - static resources is not returned (Tomcat 7.0.25)

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/2/14 Guofeng Zhang <gu...@radvision.com>:
> Hi,
>
> I create a web fragment, which contains servlets and static HTML and CSS files. The following  is their location in the fragement JAR file:
> /META-INF
>           +---web-fragment.xml
> /resources

The above should be /META-INF/resources
See chapter 4.6 Resources of servlet-3_0-mrel-spec.pdf

>          +---style.css
>          +---hello.html
> /com
>         .... The servlet classes
>
> This jar placed in another jsr315.war's WEB-INF/lib directory.
>
> It is OK when  I access the servlet in the web fragment, but when I try to access the static HTML using http://localhost:8080/jsr315/hello.html, I got a 404 error.
>
> What I did it wrong?
>

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org