Bonjour Cimballi,
voici le code de la classe ChargementParamAction (la ligne 66 est dans la
fonction execute : le return SUCCESS:
public class ChargementParamAction extends ActionSupport {
private static final long serialVersionUID = 1L;
//utilisateur concern�
private
Je doute que le problème soit sur return success, comme tu as un
NPE, c'est obligatoirement sur une ligne avec un accès à un objet.
Peut-être as-tu changé la classe entre temps, tu devrais réexécuter
ton code et vérifier le numéro de ligne.
A part ça, dans la variable user tu as mis admnin et non
Hi,
I am using struts2, spring with spring convention plugin.
SO all my action classes has been specified in application-Context.xml.
One of my action class got Bean as a property. So I can dealt with the bean
properties in JSP.
The problem, when I am working with my validation i am getting
Je pense que ces deux lignes regard suspect:
Theme theme = param.displayTheme (user);
themeActuel = theme.getTheme();
Si la première ligne renvoie null, alors la deuxième ligne jettera NPE (bien
sûr!). Est quelque chose va mal dans param.displayTheme()?
Vous avez
You might look into using the Preparable interface [1]. It's useful for
these types of situations; just add the code to generate the list into a
prepare() method on your action class instead of in execute().
Hope this helps,
-Brian
[1] -
Je reviens vers vous avec toutes mes excuses pour ce dérangement!
Avec votre orientation sur les données de la base, je me suis rendu compte
en effet que j'ai corrigé certaines erreurs de saisie dans la base mais pas
au niveau des fichiers de config...
Et dans l'erreur générée dans tomcat, rien
Hi Brian,
I have seen that interface.
If I got more than one action method in one action class.
Then when ever you execute/call method(action) in that action class,
this prepare method will be called and this setting of list will be
executed.
But My main question why the list setting to null
I'm guessing that you have something like
this.myList = populateList();
inside your execute() method. When validation fails, it just sends you back
to the jsp without redoing execute(), so of course the list will be null.
-Brian
On Tue, Jan 26, 2010 at 10:26 AM, nani2ratna
Flow in my project works like this.
When user request one web page, action method searchPm will execute.
This calls populatePm method in service call.
Then it will call some dao methods.
I have JavaBean as a property in action class. This java bean get populated
in service(dao) and return from
Hi Guys,
I came to know that there is a scope attribute that we need to consider if
we manage all our actions through spring.
default it is singleton. Means it will create only one instance.
If we change scope = prototype, it will create as many instances.
scope = request, it will create for
Hi,
I assume, since it doesn't call any action class if validation fails,
stack got only values from jsp which are already populated into bean
properties when we submit before valdiation.
Since bean is not in session, it should not have any values.
But we have already submitted the form so thats
Hi friends,
I have encountered an unusual behaviour with respect to file upload
capability in Struts 1 application.
I have configured the max upload file size limit using the controller tag
in struts configuration file as follows.
controller maxFileSize=500K /
Struts uses common fileupload
On 26.01.2010 18:19, nani2ratna wrote:
Hi Guys,
I came to know that there is a scope attribute that we need to consider if
we manage all our actions through spring.
default it is singleton. Means it will create only one instance.
If we change scope = prototype, it will create as many
Our Struts2 application has java.lang.Exception mapped to a global
result called 'error'. Our 'error' global result is setup as a CHAIN
type to send the user to our ExceptionHandlerAction. This action is
designed to capture the exception, log it, email it to an administration
mailbox and then
(I found the chain result type somewhat problematic, so I avoid it
every time I can.)
Having said that, if your action ONLY captures the exception, log it,
email it and then forward the output to an error.jsp page, AND you are
using Log4J you may find useful to attach more than one appender to
15 matches
Mail list logo