Hi all,
Is there any way to send a request attribute via href?
thanks anyone help me.

Recommended Answers

All 2 Replies

<a href="page.jsp?param1=value1&parame2=value2&param3=value3">Link</a>

Notice that only the first parameter has the '?' . The rest are separated by the '&' symbol.

And at the jsp you can do this:

String a = request.getParameter("param1"); // value1
String b = request.getParameter("parame2"); // value2
String c = request.getParameter("param3"); // value3

hai,

use "URLEncode" possible for link in url

code

String val1 = request.getParameter("t1");
String val2 =request.getParameter("t2");
// use URLEncode
String url = URLEncode("abc.jsp"?t1=val1&t2=val2);
<a href = url>click here </a>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.