How does your FindEditorData class get called? It is the responsibility of
the caller to tell this class who the user is. I assume that there is an
Action mixed in here since the call is made in response to an HTML form
being submitted. Have your Action figure out who the user is
Caroline,
The best way I use it to pass parameters to the action class is via a hidden
attribute in the form, in your case the articleForm
you can define the hidden attribute using
input type=hidden name=hiddenField
value=%=request.getRemoteUser();%/
Good luck.
- Original Message -
I know how to pass a hidden field. The problem is how
to retrieve it in my Java class. I have illustrated
that my Java class does not extend HttpServlet or
Action.
This Java class has a mapping in the struts-config.xml
file:
type=org.apache.struts.scaffold.ProcessAction
Actually, you haven't illustrated it. You've just stated it.
In the ActionForm there are methods like validate() that accept as
parameters an ActionMapping and an httpServletRequest, and from the
httpServletRequest you can call getSession().
Same holds true in the Action class' execute() method.
Actually, you haven't illustrated it. You've just stated it.
In the ActionForm there are methods like validate() that accept as
parameters an ActionMapping and an httpServletRequest, and from the
httpServletRequest you can call getSession().
Same holds true in the Action class' execute() method.
It is wonderful to know that there are some ActionForm
methods that holds true in the
scaffold.ProcessAction's execute() method. It gives
the hope that my problem could be resolved.
Via a submit button in my JSP, I try to pass two
variables; username and keyName, to my Java class
6 matches
Mail list logo