[jboss-user] [JBoss Portal] - Portlet 2.0 serveResource ..... question ?

ericmacau do-not-reply at jboss.com
Tue Aug 12 06:02:35 EDT 2008


Hello,

I want to load the static resources from the JAR, and portlet 2.0 has a new feature .....

public void serveResource(ResourceRequest request, ResourceResponse response)


Anyway, if I want to load a CSS from JAR, but in the CSS, it has some background image, how can I do that? For example, in the CSS :

#logoName {
   background-image: url( images/logo.gif );
   background-repeat: no-repeat;
   float: left;
   width: 250px;
   height: 25px;
   z-index: 2;
   position: absolute;
   left: 20px;
   top: 10px;
}


In above styles, I have a image logo.gif in the CSS file. But in the serveResource(..) method, I just need to load the CSS file and output it to the page. But it cannot load the logo.gif. 

How can it load automatically or I have to load it by manually?

Best regards,
Eric


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170038#4170038

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170038



More information about the jboss-user mailing list