2013年9月12日星期四

struts1 background when using the timer class

how to call injection Question 1 . Directly through the backstage access to the action method , how to pass mapping, form, request, response of these parameters , and call the service to be injected will appear java.lang.NullPointerException.
Question 2 . background timer task class inherits TimerTask how to send http request after the call action, or how to call HibernateDaoSupport the method .
can find a
------ Solution ------------------------------- -------------
not directly call action.






create a direct access to the database backend hibernate
------ For reference only --------------------------- ------------
not quite understand what you mean.
------ For reference only -------------------------------------- -


a java class to access a specified action of ActionForward method
For example, there
public ActionForward wrtie (ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception

In my java class, how to call the write method , or call the write method how to pass (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) ; these four parameters
------ For reference only ------------------------------- --------
inheritance can not I ?
what parameters you want to pass ?
------ For reference only -------------------------------------- -


First, I use struts 1
such as I said above, call the write method needs to pass parameters (mapping, form, request, response)
In my java class four parameters now I do not how to call write
There my java class has inherited the TimerTask
------ For reference only --------------- ------------------------
TimerTask can use the new way to achieve , inheritance action try
------ For reference only ---------------------------------------



this is the need to pass parameters to do the same , or did not solve the problem .
------ For reference only -------------------------------------- -
# 5 score: 0 Reply to: 2013-03-07 11:13:15
TimerTask can use the new way to achieve , inheritance action try
------ For reference only ------------------- --------------------
possible new out , ah, give him time to instantiate the parameters

没有评论:

发表评论