Hi, you can change to:

String s="/examples/test.jsp?name="hello world";
out.println("<a href="+s+">";
out.println("</a>");

htqduy

--- Martin Smith <[EMAIL PROTECTED]> wrote:
> Isn't it just URLEncoder.encode() ??
>
> martin
>
> Brad Wilson - BTWeb Enterprises wrote:
>
> > Deepak,
> >
> > Try using encodeURL on just the parameter that you
> are parsing.
> >
> > eg, create the URL String as:
> >     "/examples/test.jsp?name=" +
> URLEncoder.encodeURL("hello world")
> >
> > I have come across your same problem before, and I
> have found that only
> > encoding the portion of the URL that needs to be
> encoded seems to solve the
> > problem.
> >
> > - Brad
> >
> > ----- Original Message -----
> > From: "Deepak C S" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, December 25, 2000 10:49 PM
> > Subject: how to include querystring in JSP
> >
> > > Hi,
> > >
> > >         I want to include a querystring within
> an HTML anchor tag
> > >
> > > eg:
> > >
> > > <a href="/examples/test.jsp?name=hello world">
> click </a>
> > >
> > > but tomcat is giving JSP parse error as:
> > >
> > > 1)test.jsp(0,4) invalid argument
> > >
> > > I even tried encoding the href as
> > >
> response.encodeURL("/examples/test.jsp?name=hello
> world")
> > >
> > > eventhough everythgs written properly to html
> page,tomcat complains with
> > > (0,4) error..invalid declaration.
> > >
> > > can anybody let me know how to include
> querystring in links in JSPs??
> > >
> > > thanx advance,
> > >
> > > deeps
> > >
> > >
> >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED]
> with body: "signoff
> > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with
> body: "set JSP-INTEREST
> > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found
> at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with
> body: "set JSP-INTEREST DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found
> at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets


__________________________________________________
Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!
http://photos.yahoo.com/

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to