Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

image refresh  RSS feed

 
sujesh Katri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
some one please tell me where i did mistake below..I place all my images where my jsp file exist.But that application does n't run and i'm using netbeans 6.7.1..i did not place web.xml for this;
<%--rotate.jsp--%>
<jsp:useBean id="id1" class="pack.rotatebean" scope="session"/>
<%response.setHeader("refresh","4");
id1.bm();
%>
<center>
<img src='<jsp:getProperty name="id1" property="image"/>' width="1000%" height="1000%"></img>
</center>

//rotatebean.java
package pack;
public class rotatebean
{
private int index=-1;
private String image[]={"IMG_0101.JPEG","IMG_0102.JPEG","IMG_0137.JPEG","IMG_0152.JPEG"};
//bm() for finding indexes like index[0],index[1] etc
public void bm()
{
index=(index+1)%image.length;
}
public String getImage()
{
return image[index];
}
}
can i assign image tag(<img>) to url of the <meta http-equi>..I assigned image tag to url then refreshing happend normally but my image not displayed..Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!