facebook

relative paths for jsp’s forwarded by a servlet

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #220590 Reply

    I’ve got a problem using relative path’s in my JSP’s that are forwarded by one servlet. Making the path relative to the servlet’s path results in Eclipse specifying warnings in my pages for broken links in my JSP’s as the paths are relative to the servlet and not to the jsp. Putting the paths relative to the jsp’s solves my eclipse problem, but results in errors in the pages (as the links are not correct)

    Can anyone help me out please.

    🙄

    #220603 Reply

    Riyad Kalla
    Member

    Jan,
    Can you provide some concrete examples/code for what you are asking?

    #220698 Reply

    Hi,

    This is a example of my jsp.

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
    <%@ include file=”../../includes/wbcctags” %>
    <HEAD>
    <META name=”GENERATOR” content=”IBM WebSphere Page Designer V3.5 for Windows”>
    <META http-equiv=”Content-Style-Type” content=”text/css”>
    <title><%=vadMacros.getLabel(“PENSCTITLE1″) %></title>

    <META http-equiv=”Content-Type” content=”text/html; charset=windows-1252″>
    <META content=”IBM WebSphere Page Designer V3.5.1 for Windows” name=”GENERATOR”>
    <META http-equiv=”Content-Style-Type” content=”text/css”>
    <LINK rel=”stylesheet” href=”../theme/Master.css” type=”text/css”>
    <SCRIPT language=”JavaScript” src=”../JavaScript/controle.js”>
    </SCRIPT>
    <SCRIPT language=”JavaScript”>

    I want to make the path href=”../theme/Master.css” relative to my server, but doing that I receive broken link warnings in Eclipse.

    #220709 Reply

    Riyad Kalla
    Member

    Jan,
    Can you clarify the “broken link warning” part of your report? Where is this showing up? Is it in your problems view? What is the exactly text of the message?

    I’m asking because neither our JSP Validator or HTML Validator care what path you give for style sheets… I’m wondering if you are even using our editor. Can you right click on your file > Open With > MyEclipse JSP Editor… is that the default?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: relative paths for jsp’s forwarded by a servlet

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