facebook

Problems creating an action class

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #206267 Reply

    petem1030
    Member

    When I am creating an action class I run into two problems. First, when I type in the path to the form it says form does not exist. In my case, the path is com.ual.struts.form.WfsSenGradeForm. The second problem is that after creating the action it no longer automatically updates the struts-config.xml file.

    #206273 Reply

    Riyad Kalla
    Member

    First, when I type in the path to the form it says form does not exist. In my case, the path is com.ual.struts.form.WfsSenGradeForm

    I’m not sure which part of the wizard you are referring to. The Action wizard asks for a Form. You can use the “Browse” button to pick one from your struts-config file. This is just the forms name that you assigned it in the form-beans section of the file, not the entire class name.

    The second problem is that after creating the action it no longer automatically updates the struts-config.xml file.

    Please be more specific. What is not being updated? What action did you take that didn’t have the expected result? What result did you think should have happened?

    #206276 Reply

    petem1030
    Member

    When I hit the browse button, it says that no forms exist.

    Please be more specific. What is not being updated? What action did you take that didn’t have the expected result? What result did you think should have happened?

    I thought that when you use the Wizard to create an action class that it added the action mappings to the struts-config.xml file.

    #206278 Reply

    Riyad Kalla
    Member

    When I hit the browse button, it says that no forms exist.

    If you look at the struts-config.xml file, at the top do you see a tag that looks like:

    
    <form-beans />
    

    If so, then you infact don’t have any beans, and will need to add an entry so you can reference it in your action’s. If you select the form-bean node (like you selected the action-mapping node) you can use another wizard to create a new form entry. If your bean already exists and you want to use it, then you will manually need to add the form using the source editor, it will probably look something like this:

    
    <form-bean name="wfsSenGradeForm" type="com.ual.struts.form.WfsSenGradeForm" />
    

    I thought that when you use the Wizard to create an action class that it added the action mappings to the struts-config.xml file.

    Yes it definately should, are you sure you are completing the entire wizard and hitting Finish at the end?

    #206571 Reply

    petem1030
    Member

    What I figured out is that I was using James Holmes struts config editor to edit struts-config.xml. When I changed it to use My Eclipse as the default editor, then it worked.

    #206572 Reply

    Riyad Kalla
    Member

    Good news, thank you for following up with us.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Problems creating an action class

You must be logged in to post in the forum log in