Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Newbe Problem with parameter passing to href in jsp document.

Reply
Thread Tools

Newbe Problem with parameter passing to href in jsp document.

 
 
Vladimir.Sakharuk@gmail.com
Guest
Posts: n/a
 
      02-23-2006
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.getPar ameter("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,1 The value of attribute "href"
associated with an element type "a" must not contain the '<' character.

Please advise thanks.
\/lad

 
Reply With Quote
 
 
 
 
Alex
Guest
Posts: n/a
 
      02-23-2006
Try:

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

Alex
http://prepared-statement.blogspot.com
http://learn2host.blogspot.com

 
Reply With Quote
 
 
 
 
Vladimir.Sakharuk@gmail.com
Guest
Posts: n/a
 
      02-23-2006
Have tried 2 permutations

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

<li><a
href="BlockingProcesses.jsp?id=<jsp:expression>=re quest.getParameter("id")</jsp:expression>&host=<jsp:expression>request.getPa rameter("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.

 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      02-24-2006
Can you paste the whole page here? Looks like your problem might be
elsewhere.

Alex

 
Reply With Quote
 
Vladimir.Sakharuk@gmail.com
Guest
Posts: n/a
 
      02-24-2006
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.getParam eter("id")%>&host=<%=request.getParameter("host")% >&action=kill">Kill</a></li>
</div>
</jsp:root>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
newbe cant get mysql with jsp joe Java 1 02-28-2007 01:07 PM
href="javascript:func()" vs href="#" onclick="javascript:func()" CRON HTML 24 06-20-2006 08:05 PM
onClick method question (this.href and document.location.href) yogesh.bhardwaj@gmail.com Javascript 2 02-03-2005 02:38 PM
difference between location.href and window.location.href? saiho.yuen Javascript 3 09-14-2004 06:51 PM
Problem: Setting MSIE iframe innerHTML change relative href/src to absolute href/src Soren Vejrum Javascript 4 07-05-2003 01:47 PM



Advertisments