mercredi 22 avril 2015

how to pass context value to css

i have to add background image for my webpage, so i have added below code css for body

body {
    font-family: Verdana, Geneva, sans-serif;
    font-weight: 400;
    color: #666;
    font-size: 12px !important;
    line-height: 20px;
    background-image: url(../resources/img/background_img.jpg);
}

but i have to add background-image as

url(${context}/resources/img/background_img.jpg);

, where context will be passed from jsp (instead of absolute path). put conext param doesnt work, is there any alternative way or am i doing wrongly. Need help

Aucun commentaire:

Enregistrer un commentaire