Apply css for a jsp file inside xforms-jsp directory

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Apply css for a jsp file inside xforms-jsp directory

karthik Jayaraman
Hi guyz ! Today i created a JSP file at the location orbeon\xforms-jsp called test.jsp. And included the css as

<style> .one { float:left; background-image: url(images/ui_submit.png); } </style>
and i placed the image inside the folder called images located at \orbeon\images. The other styles got applied except the background image. I tried the same procedure for a different application (other than orbeon) and got the background image. I even tried to place the images folder in the same directory as the jsp file but still did not get the background image. I just wanna know whether i have to include some content in web.xml to get the background image. The CSS i have applied is inline CSS. Help !

Edit: I forgot to mention, even i tried this also

background-image: url(./images/ui_submit.png); and
background-image: url(../images/ui_submit.png);

and all such permutations and combinations as well
Reply | Threaded
Open this post in threaded view
|

Re: Apply css for a jsp file inside xforms-jsp directory

Louis Ratzesberger-2
Hi Karthik,

Did you try an absolute path to the image as well, e.g. ?

  url(/images/ui_submit.png)

and perhaps as a test, drop an image in the resources
directory and then try

  url(/test.png)

I think style elements should inherit their url context,
but reality may be different.

Cheers,
Hank

Quoting karthik Jayaraman <[hidden email]>:

>
> Hi guyz ! Today i created a JSP file at the location orbeon\xforms-jsp called
> test.jsp. And included the css as
>
> <style>
> .one
> {
> float:left;
> background-image: url(images/ui_submit.png);
> }
> </style>
>
> and i placed the image inside the folder called images located at
> \orbeon\images. The other styles got applied except the background image. I
> tried the same procedure for a different application (other than orbeon) and
> got the background image. I even tried to place the images folder in the
> same directory as the jsp file but still did not get the background image. I
> just wanna know whether i have to include some content in web.xml to get the
> background image. The CSS i have applied is inline CSS. Help !
> --
> View this message in context:  
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Apply-css-for-a-jsp-file-inside-xforms-jsp-directory-tp2279606p2279606.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>


--
Hank Ratzesberger
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Apply css for a jsp file inside xforms-jsp directory

karthik Jayaraman
This post was updated on .
I tried your suggestion but unfortunately it doesnt work !  
Reply | Threaded
Open this post in threaded view
|

Re: Apply css for a jsp file inside xforms-jsp directory

karthik Jayaraman
Any suggestions>?
Reply | Threaded
Open this post in threaded view
|

Re: Re: Apply css for a jsp file inside xforms-jsp directory

Louis Ratzesberger-2

Hi Karthik,

Perhaps just a work-around, but have you also tried a an absolute path  
with the protocol specified?  That way, url-rewriting done by servlet  
will leave it alone, e.g.,

background-image: url(http://example.org/images/some.png);

HTH,
Hank

Quoting karthik Jayaraman <[hidden email]>:

>
> Any suggestions>?
> --
> View this message in context:  
> http://orbeon-forms-ops-users.24843.n4.nabble.com/Apply-css-for-a-jsp-file-inside-xforms-jsp-directory-tp2279606p2282706.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>



--
Hank Ratzesberger
[hidden email]



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Apply css for a jsp file inside xforms-jsp directory

Alessandro  Vernet
Administrator
In reply to this post by karthik Jayaraman
Karthik,

I recommend you use Firebug to figure this out. In the HTML tab, find
the element. Then on the left you'll see the CSS, including the
"background-image: ...". Right click on the link, and choose open in
new tab. You'll then see what URL is produced, and what was wrong with
the initial URL.

Alex

On Thu, Jul 8, 2010 at 11:57 AM, karthik Jayaraman <[hidden email]> wrote:

>
> Any suggestions>?
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Apply-css-for-a-jsp-file-inside-xforms-jsp-directory-tp2279606p2282706.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Apply css for a jsp file inside xforms-jsp directory

karthik Jayaraman
This post was updated on .
Ya .. I tried using firebug .

My code in the login.jsp present in orbeon.war/xforms-jsp directory was

--------------------------------------------------------------------------------------------------

<style> <div style="background-image:url(./some-Logo.png); height:100px; width: 257px;"></div> </style>

and the some-Logo.png resides @ orbeon/orbeon/xforms-jsp directory

--------------------------------------------------------------------------------------------------

When using firebug i saw the css, the location of the image was

http://localhost:8080/orbeon/xforms-jsp/some-Logo.png

but when i open the image in the new tab i can see only a blank page but not the image.

In chrome i observed the following error

--------------------------------------------------------------------------------------------------

http://img249.imageshack.us/img249/7469/csserror.png

--------------------------------------------------------------------------------------------------

When i tried this same jsp along with the same css in another application it was working fine. I can see the image. I suspect whether it has something to do with orbeon.


Also when i put the image in orbeon-resources-private.jar inside the ops folder and changing the url in the css corrspondingly, its working fine. Any suggestions?
Reply | Threaded
Open this post in threaded view
|

Re: Re: Apply css for a jsp file inside xforms-jsp directory

karthik Jayaraman
K thanks i got it working !
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Apply css for a jsp file inside xforms-jsp directory

pappleby
Out of Office AutoReply: Apply css for a jsp file inside xforms-jsp directory

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG

 

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Apply css for a jsp file inside xforms-jsp directory

Alessandro  Vernet
Administrator
In reply to this post by karthik Jayaraman
Karthik,

Excellent, I am glad you found the solution to this one.

Alex

On Mon, Jul 12, 2010 at 1:47 AM, karthik Jayaraman <[hidden email]> wrote:

>
> K thanks i got it working !
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Apply-css-for-a-jsp-file-inside-xforms-jsp-directory-tp2279606p2285868.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Out of Office AutoReply: Re: Apply css for a jsp file inside xforms-jsp directory

pappleby
Out of Office AutoReply: Re: Apply css for a jsp file inside xforms-jsp directory

I am out of the office until 26th July

***********************************************************************************************

This email, including any attachment, is confidential and may be legally privileged. If you are not the intended recipient or if you have received this email in error, please inform the sender immediately by reply and delete all copies from your system. Do not retain, copy, disclose, distribute or otherwise use any of its contents.

 

Whilst we have taken reasonable precautions to ensure that this email has been swept for computer viruses, we cannot guarantee that this email does not contain such material and we therefore advise you to carry out your own virus checks. We do not accept liability for any damage or losses sustained as a result of such material.

 

Please note that incoming and outgoing email communications passing through our IT systems may be monitored and/or intercepted by us solely to determine whether the content is business related and compliant with company standards.

***********************************************************************************************

The Stationery Office Limited is registered in England No. 3049649 at 10 Eastbourne Terrace, London, W2 6LG