Newbe Problem with parameter passing to href in jsp document.

Discussion in 'Java' started by Vladimir.Sakharuk@gmail.com, Feb 23, 2006.

  1. Guest

    I am trying to pass 3 variables in jsp on tomcat 5.5. here is one of my
    permutations.


    <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html; charset=UTF-8" />

    <li><a
    href="<%=BlockingProcesses.jsp?id="+request.getParameter("id")+"%26host="+request.getParameter("host")+"%26action=kill%>"
    >kill</a></li> <!-- this is line 28-->


    </jsp:root>

    I am getting exception
    org.apache.jasper.JasperException:
    /web/BlockingProcessDetail.jsp(28,18) The value of attribute "href"
    associated with an element type "a" must not contain the '<' character.

    Please advise thanks.
    \/lad
     
    , Feb 23, 2006
    #1
    1. Advertising

  2. Alex Guest

    Alex, Feb 23, 2006
    #2
    1. Advertising

  3. Guest

    Have tried 2 permutations

    suggested
    <li><a
    href="BlockingProcesses.jsp?id=<%=request.getParameter("id")%>&host=<%=request.getParameter("host")%>&action=kill">Kill</a></li>

    <li><a
    href="BlockingProcesses.jsp?id=<jsp:expression>=request.getParameter("id")</jsp:expression>&host=<jsp:expression>request.getParameter("host")</jsp:expression>&action=kill">Kill</a></li>

    got:

    org.apache.jasper.JasperException:
    /web/BlockingProcessDetail.jsp(28,43) The value of attribute "href"
    associated with an element type "a" must not contain the '<' character.
     
    , Feb 23, 2006
    #3
  4. Alex Guest

    Can you paste the whole page here? Looks like your problem might be
    elsewhere.

    Alex
     
    Alex, Feb 24, 2006
    #4
  5. Guest

    Alex,
    I am really appricaite your help.
    Thanks.
    Here it is:

    <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:display="urn:jsptld:http://displaytag.sf.net">
    <jsp:directive.page contentType="text/html; charset=UTF-8" />
    <jsp:directive.page import="com.mis.b1usage.*" />
    <jsp:directive.page import="org.apache.log4j.Logger" />
    <jsp:include page="templates/navigation_header.html"/>

    <style type="text/css" media="all">
    @import url("menu2.css");
    @import url("styles.css");
    </style>
    <jsp:include page="templates/navigation.html"/>

    <jsp:declaration>
    private static Logger logger =
    Logger.getLogger("web.BlockingProcesses");
    </jsp:declaration>

    <div id="contentbox">

    <h2>Blocking process</h2>
    <ul class="rootlist">
    <li>Host
    <jsp:expression>request.getParameter("host")</jsp:expression></li>
    <li>Process Id
    <jsp:expression>request.getParameter("id")</jsp:expression></li>
    <li><a
    href="BlockingProcesses.jsp?id=<%=request.getParameter("id")%>&host=<%=request.getParameter("host")%>&action=kill">Kill</a></li>
    </div>
    </jsp:root>
     
    , Feb 24, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. CRON
    Replies:
    24
    Views:
    200,844
    Adrienne Boswell
    Jun 20, 2006
  2. joe
    Replies:
    1
    Views:
    365
  3. Soren Vejrum
    Replies:
    4
    Views:
    630
    Lasse Reichstein Nielsen
    Jul 5, 2003
  4. saiho.yuen
    Replies:
    3
    Views:
    437
    kaeli
    Sep 14, 2004
  5. Replies:
    2
    Views:
    482
Loading...

Share This Page