I'm trying to get some information from a database in my application. I have a class with an execute method that uses request.getParameter("username"). The problem is, I don't know how to invoke the class directly from the JSP. I know that in Struts, I use an action path in a form, and I need an actionform class, and an action class that uses the form information. In this case, I only need the information from the request, and not a form, So I don't want an empty form in my application. To sum up, I need a way to invoke a class with an execute method that uses request information directly from the JSP.
Thanks in advance,
One cannot simply use scriptlets in JSP. And also, mycaruba.
Modern JSPs do not contain Java code. Rather, your class should be called by the page controller for the JSP, and any data that the JSP needs be placed in request scope so that, on the JSP, the JSTL and EL can be used to display it.
Please read this article to understand how modern web applications are structured.