Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Command problems

  1. #11
    Join Date
    Mar 2006
    Location
    Bangalore, India
    Posts
    242

    Default

    Hi,

    please put the following code in the onsubmit method of your controller,

    Code:
    protected ModelAndView onSubmit(
    			HttpServletRequest request,
    			HttpServletResponse response, 
    			Object command,
    			BindException errors)
    	throws Exception{
    		
    	// basically you are enriching the command object from the file object //that you have recieved.
    // after calling the method that returns you the enriched command object
    ReportCommand reportCommand = crearReportCommandConDatosRequest(file);
    // add this line of code
    ModelAndView mv = new ModelAndView("viewname",getCommandName(),reportCommand);
    The framework is designed in such a way that it removes the form object from the session whenever there is a form submission.
    Sami

  2. #12

    Default

    Hi Sami25,

    Thank you for your answer, but it still doesn't work.

    I'm going to put more information:

    In the Controller I have 3 method from SimpleFormController:

    - referenceData
    - onSubmit
    - formBackingObject

    In the three I have put a message to see in server log and I can see that the application enter into the formBackingObject then enter in referenceData and never enter in onSubmit.

    In this way, I think that the problem not in the onSubmit method. The problem must be before of the onSubmit method.

    Thank you a lot

  3. #13

    Default Problem found but not resolved

    Hi all!

    I'm using the application server Glassfish (Sun application server). It is the first time that I use it, before Apache Tomcat 6 was using.

    I try to run my new application with Apache Tomcat and surprise! It's works!

    Now the problem is, How can I use Glassfish application server?

    Should I open a new post?

    Thank you,

    Praedos

  4. #14
    Join Date
    Aug 2008
    Posts
    10

    Default i got similar problem but i cleared it in this way

    since form submission is 2 stage process.For the first time u must pass GET request to the controller.This can be done in this way just provide a a link that points to Contextpath/AltaReport.htm

    hope this helps u

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •