śr., 26 mar 2025 o 09:38 Lidin NT <li...@kottsoftware.com> 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: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to