request.getParameter in JSP

I haven't got too much experience with JSP but I thought that String action = request.getParameter("action"); was a fairly standard way of getting information.
If that is right, then why does IDEA hightlight getParameter in red and say cannot resolve method?


Your code is correct, and would work as expected.
Do you have the servlet API configured as a library?

For example, if you're using maven, you'd need a dependency like:

Hope that helps,

You can try like this.

<%!String action="";%>