Hey,

2010/12/19 yufeng <[email protected]>:
> hi:
>   I  download jwt-3.1.7a.zip,and try to develop my first web ,if in my
> JMyWebServlet extends WtServlet  add this
> "app.useStyleSheet("/index.css");",there are some problem.if remove
> it ,no problem.

The gotcha is the following: you deploy the servlet at the context
"/*" which matches every request, including /index.css. The solution
is to changes the location of the app in your web.xml, e.g.:

<url-pattern>/app/*</url-pattern>

Using a relative link for your stylesheet ("index.css") then it works.

Alternatively you can serve static resources (like css) from a
different web server instead of the web app itself.

Regards,
koen

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to