facebook

URLEncode when using jsp:include

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

    The IDE is giving me this error:

    Cannot resolve symbol : method URLEncode(java.lang.String,java.lang.String)

    everywhere I have a jsp:include tag.
    Thank you.

    OS
    Windows XP Prof

    Eclipse SDK
    Version: 3.1.0
    Build id: I20050627-1435

    MyEclipse JSF Support
    Version: 3.9.210
    Build id: 20050627-4.0-Milestone-2

    JRE
    tried with both
    j2sdk1.4.2_04 and j2sdk1.4.2_05

    #234213 Reply

    Riyad Kalla
    Member

    Please past some snippets of code so we can see why this is happening.

    #234227 Reply

    snippets of code:

    <!– include a header page header page –>
    <jsp:include page=’pageHeader.jsp’><jsp:param name=”title” value=”Chart Merge Management”/></jsp:include>


    <%

    String unitNumber = request.getParameter(“unitNumber”);

    %>
    <table>
    <tr><td>
    <jsp:include page=”MergeTable.jsp” >
    <jsp:param name=”domain” value=”domain”/>
    <jsp:param name=”unitNumber” value=”<%=unitNumber%>”/>
    </jsp:include>
    </td></tr>
    </table>

    #234240 Reply

    Riyad Kalla
    Member

    I cannot reproduce this with the following example page:

    
     
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>
    
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
        <base href="<%=basePath%>">
        
        <title>My JSP 'index.jsp' starting page</title>
        
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        
        <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        -->
      </head>
      
      <body>
          <jsp:include page="header.jsp">
              <jsp:param name="title" value="Chart Merge Management"/>
          </jsp:include>
          
          <%
              String unitNumber = "3";
          %>
          
          <jsp:include page="footer.jsp">
              <jsp:param name="name" value="bob"/>
              <jsp:param name="age" value="<%= unitNumber %>"/>
          </jsp:include>
      </body>
    </html>
    
    

    Where are you seeing this error? Is it in the left margin? Is it in the right margin? Is it in the problems view?

    #234273 Reply

    The error shows as a red dot on the left side at the line of the jsp:include.
    When I hover over the dot “method URLEncode(java.lang.String,java.lang.String)” is what is in the alert.

    I did remove a 3rd party jar from the project and the error went away. I believe they might be causing a conflict with something.

    Thank you,
    –jonathan

    #234284 Reply

    Riyad Kalla
    Member

    I did remove a 3rd party jar from the project and the error went away.

    I was just about to ask this, looks like you found the culprit.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: URLEncode when using jsp:include

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