śr., 26 mar 2025 o 09:38 Lidin NT <[email protected]> napisał(a):
> Why is ServletActionContext.getRequest() returning null in JSP?

Calling JSPs directly is a Bad Idea
https://struts.apache.org/security/#never-expose-jsp-files-directly

And calling JSPs directly means you skip the whole Action related
machinery, with security checks and so on. That's why the context is
empty.

> How can I fix this issue so that userViewUtil returns the expected value?

As already mentioned by Wolfgang, wrap JSP with an action. If you
using the Convention plugin it should be as simple as Wolfgang says or
you can use Wildcard mapping


Regards
Łukasz

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to