Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2006

Tip: Looking for answers? Try searching our database.

Newbe Problem with parameter passing to href in jsp document.

Thread view: 
Vladimir.Sakharuk@gmail.com - 23 Feb 2006 15:03 GMT
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
Alex - 23 Feb 2006 21:32 GMT
Try:

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

Alex
http://prepared-statement.blogspot.com
http://learn2host.blogspot.com
Vladimir.Sakharuk@gmail.com - 23 Feb 2006 22:07 GMT
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.
Alex - 24 Feb 2006 17:20 GMT
Can you paste the whole page here? Looks like your problem might be
elsewhere.

Alex
Vladimir.Sakharuk@gmail.com - 24 Feb 2006 20:23 GMT
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>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.