Results 1 to 3 of 3

Thread: struts question

  1. #1
    Alan is offline Member
    Join Date
    May 2007
    Rep Power

    Default struts question

    Hi everybody:
    I donīt understand a lot of things about Struts, for example, I have a jsp:

    Java Code:
     <shtml:form method="post" action="/">
    I know that when I submit will go to the listRequirementsAction, after that I receive in listRequirementsForm the parameters.

    I see in jsp this:
    Java Code:
    <a class="common_link" title="<bean:message key='listRequirements.update'/>" href="/item/;jsessionid=<%= session.getId()%>?target=work_on_requirement&id=<bean:write name="data" property="id"/>" ><bean:write name="data" property="id"/></a>
    that is a link and I understand that call this link and it execute loadRequirementAction , the doubt is:
    If I donīt submit is there another way to assign the parameters to the form???

    thank you

  2. #2
    Marty is offline Member
    Join Date
    May 2007
    Rep Power


    .... if you use queryString, you pass like this, so you can obtain the parameters, in other case you have to do a submit.
    good luck

  3. #3
    sandor is offline Member
    Join Date
    Apr 2007
    Rep Power


    Use a hidden field in the jsp form.
    Java Code:
    <html:hidden property="hiddenfield" value="whatever"/>
    make sure that variable hiddenfield is in your ActionForm.
    Then submit the form with a submit button. In the struts.config you have the
    forward go to the /loadRequirement action.

Similar Threads

  1. Question mark colon operator question
    By orchid in forum Advanced Java
    Replies: 9
    Last Post: 12-19-2010, 09:49 AM
  2. New to Struts
    By Swamipsn in forum Web Frameworks
    Replies: 4
    Last Post: 10-07-2008, 11:01 PM
  3. question about struts-config.xml
    By christina in forum Web Frameworks
    Replies: 2
    Last Post: 02-15-2008, 11:45 AM
  4. Struts or JSF?
    By Swamipsn in forum New To Java
    Replies: 0
    Last Post: 08-01-2007, 05:35 AM

Posting Permissions

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