Skip to content

Tag: jsp

How do I pass JavaScript values to Scriptlet in JSP?

Can anyone tell me how to pass JavaScript values to Scriptlet in JSP? Answer Your javascript values are client-side, your scriptlet is running server-side. So if you want to use your javascript variables in a scriptlet, you will need to submit them. To achieve this, either store them in input fields and submi…

How to import java libraries in jsp code?

I have the following jsp code. I want to add libraries such as java.io. How can I do this? Answer You are almost right, but you need to close the import tag, like this: To declare multiple imports you can either duplicate that entire tag, like so: or use a comma-separated list: For a multitude of reasons, tho…

Alternatives to JSP for Spring MVC view layer [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed last year. The community revie…