Send innerHTML text to url in JSP

How to send innerhtml tag text in url to onclick event handler on JSP page and get this value on another JSP page? Here is my code

<a href="DocumentViewer.jsp">Hello</a>

I want to send Hello with a URL. Help?

+6
source share
1 answer

You must pass the value to the onclick event url and get it using

 request.getParameter() 

on the JSP page. Below is a sample code

 <a href="DocumentViewer.jsp?proces=something">Hello</a> 

and get it in jsp like that.

 String pro=request.getParameter("proces"); 
+2
source

Source: https://habr.com/ru/post/976861/


All Articles