facebook

Image doesn’t display

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #256354 Reply

    joegaber
    Member

    I have index.jsp at the root level. I this redirects to xrate.jsp at the following path: WEB-INF/views/jsp. At the same level is include.jsp and includeTop.jsp. My images are at WEB-INF/images. CSS files are at WEB-INF/styles. Here’s thier jsp declaration code:

    xrate.jsp

    <%@ include file="includeTop.jsp"%>
    <%@ include file="include.jsp"%>
    
    <html>
        <head>
            <title></title>
        </head>
        <body>    
            <h1>
                 Application - Borrower System
            </h1>
        </body>
    </html>

    include.jsp

    <%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8"
        contentType="text/html; charset=utf-8"%>
    <%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>

    includeTop.jsp

    <%@ include file="/WEB-INF/views/jsp/include.jsp"%>
    <html>
        <head>
            <title></title>
            <link rel="stylesheet" type="text/css" href="../../styles/xrate.css" />
        </head>
        <body>
     
            <div id="logo">
                <img src="../../images/xrate-logo.jpg" width="720"  height="140" border="0" alt="Logo" />
    
            </div>
        </body>
    </html>
    

    xrate.css

    
    div#logo {
        width: 720px;
        height: 140px;
        background: #A8A8A8;
    }

    When xrate.jsp loads, I get everything except the image doesn’t display, just its placeholder with the alternate text.

    I am using MyEclipse’s jsp visual designer and in the preview mode, the image properly shows. I’ve checked the deployed files and everything is in the correct location. Also, the browser is set to allow images to download.

    Any ideas anyone??[/img]

    #256679 Reply

    Riyad Kalla
    Member

    You cannot host images from WEB-INF dir, it’s a protected server-side only dir.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Image doesn’t display

You must be logged in to post in the forum log in