• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

URGENT! DeadLine today!

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when i pass parameters through
<A href="rr_JobDetailsServlet?jobId=<%= jobId %>&agencyName=<%= agencyName %>&title=<%= title %>" ><%= jobTitle %></A>
when i click on the link
with
jobId = 62;
agencyName = "PATHWAY, INC.";
title = "foo";
works in IE
http://localhost:8080/project/servlet/rr_JobDetailsServlet?jobId=62&agencyName=PATHWAY,%20INC.&title=foo
fails in Netscape = 4.76
http://localhost:8080/project/servlet/rr_JobDetailsServlet?jobId=66&agencyName=PATHWAY, INC.&title=foo
because after PATHWAY,
IE adds %20
and Netscape doesn't
please i want to get it work on netscape
HELP!!!
urgent
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try URLEncoding the variables, really something you should do whenever you do something like this anyway, to avoid the exact problem you are having.
Something like this should work:


HTH;
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whoops, be careful with those two methods.

static String java.net.URLEncoder.encode(String s) is what changes spaces to %20

HttpServletResponse.encodeURL(String in) will perform URL re-writing. Which , by the way, you should ALSO do. And, if you use this method, you should encode the *entire* URL.


But another way to fix this (well, it would involve a bit more... but why not use agency id, instead of agency name? But this is maybe stepping into the 'data domain'. Whatever.
 
Wanna see my flashlight? How about this tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic