Hello,

thank you for your answer.

Actually,  the image is in the portlet application.

I think that you are right ... i have to replace the .css
file by a jsp.

I have made the following change in my new .jsp (the one
which was my .css file):
<%RenderResponse renderResponse = null;
if ( PortletServlet.isPortletRequest(pageContext.getRequest())) 
{  
        renderResponse =
(RenderResponse)pageContext.getRequest().getAttribute("javax.portlet.response");
} 
%>
LI.blue_item {
        list-style-image:
url(<%=renderResponse!=null?renderResponse.encodeURL(request.getContextPath()+"/img/bullet_blue.gif"):request.getContextPath()+"/img/bullet_blue.gif"%>);
        list-style-position : inside;
}

Thank you for your idea.

Kind regards,
Adrien

---------- Initial Header -----------

From      : "Kevin Irmscher" <[EMAIL PROTECTED]>
To          : [email protected]
Cc          : 
Date      : Thu, 22 Feb 2007 13:15:06 +0100
Subject : Re: Image use in css

Hi Adrien,

I'm not sure whether I understand the question right. Where
are the
images located? If they are included in the file structure
of the
portlet application, it shouldn't be a problem. You can do
something
like this in a JSP:

list-style-image:
url(<%=response.encodeURL(request.getContextPath() +
                                   "/img/bullet_blue.gif")%>);

It doesn't matter if you use the portlet locally or consume
it via WSRP.

If the files are located somewhere else, you just need to
include to
complete URL:

list-style-image:
url(http://www.myCompany.com/img/bullet_blue.gif);

Again, there is no difference between a local and a remote
portlet.

Regards,
Kevin

On 2/22/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am currently migrating an application to a wsrp portlet
> and i am strucked with an issue with image in css style for
> list or background image.
>
> Please find below an example of style for a list ;
> LI.blue_item {
>         list-style-image: url(../../img/bullet_blue.gif);
>         list-style-position : inside;
> }
>
> It is clear that in wsrp context, the producer can not get
> the image. I do not have any idea about the way to solve
> this issue
>
> Does somedy has already facing this kind of problem ?
> Does somedy see a workaround or have any ideas on the way to
> solve this issue ?
>
> Thank you by advance,
>
> Kind regards,
>
> Adrien


--------------------- ALICE SECURITE ENFANTS ---------------------
Protégez vos enfants des dangers d'Internet en installant Sécurité Enfants, le 
contrôle parental d'Alice.
http://www.aliceadsl.fr/securitepc/default_copa.asp


Reply via email to