user447607
user447607

Reputation: 5469

Is there a way to make JavaScript mandatory in Struts 2?

What I'm thinking is that I want to use the Struts 2 JSON result type to load all of my data for my pages where ever possible. In theory, this will eliminate or at least greatly reduce the use of JSTL, Struts 2 tags, OGNL, Struts 2 page mappings, Scriptlets, etc. etc. My pages will be nearly, if not completely pure HTML and JavaScript/JQuery.

Consequently, I would like to know if there is a means within Struts 2 or some other means to require that JavaScript be enabled? An Interceptor, perhaps? Anyone know of such a trick? Perhaps if I use HTML 5?

Upvotes: 2

Views: 179

Answers (1)

Perception
Perception

Reputation: 80623

No, you can't require Javascript to be enabled from with the Struts framework itself. But you can put checks on your pages to warn users that Javascript is required in order to access the application.

Upvotes: 3

Related Questions