Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dynamically set background-image within a DIV tag

807580Mar 2 2010 — edited Mar 2 2010
Hi,

I have a jsp, the relevant piece as follows:

<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page session="false" %>
<%@ taglib uri="/WEB-INF/tld/portlet.tld" prefix="portletAPI" %>
<portletAPI:init /><%
String welcomeImage=portletResponse.encodeURL("/images/welcome_image.jpg");
%>
<div id="welcome_img_div" style="margin-left:5px;width:715px;height:190px;background-image:url('<%=welcomeImage%>');background-repeat:no-repeat;">

I want to rotate around a series of images as the 'background-image'
..but it is not clear to me how to adapt the jsp. Please can anyone help?

many thanks!

Matt
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 30 2010
Added on Mar 2 2010
10 comments
372 views