struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joe Latty" <...@team2media.com>
Subject RE: JSP's in WEB-INF and action forward
Date Tue, 02 Jul 2002 07:29:05 GMT
This wont work because the actual link should be

href="/WEB-INF/jsp/company.do?action=...

which is not allowed.

-----Original Message-----
From: Amir Nashat [mailto:anashat@CJ.COM]
Sent: Tuesday, 2 July 2002 6:07 PM
To: struts-user@jakarta.apache.org
Subject: Re: JSP's in WEB-INF and action forward


Joe,

Seems like a simple solution to me but I might be over looking something.
With what you have done as long as you forward to company.do then all the
request parameters will be there. It is important to forward and not
redirect. Thus, when you do forward all the query string parameters will be
there and you can do a simple request.getParameter(parameter name goes in
here) and that should do the trick. Nothing more to it.



>>> joe@team2media.com 12:11:24 AM 07/02/02 >>>
Ok I am trying to tow the party line here...

Firstly, I have put all my JSP's in the WEB-INF directory. Now the only way
to get to these pages is by action forwards.

If I have an iterator which produces a grid which I would have previously
coded like this e.g.
<logic:iterate id="comp" name="companyForm" property="companyList"
type="CompanyBO" scope="request">
    <tr>
        <td class="gridDataNumber">bean:write name="comp.companyId" /></td>
        <td>...</td>
        <td><html:link
href="company.do?action=update&companyID=<%=comp.getCompanyId()%>)">Update</
html:link>
               <html:link
href="company.do?action=delete&companyID=<%=comp.getCompanyId()%>)">Delete</
html:link>
        </td>
    </tr>
</logic:iterate>

Now I must submit the form and have the action servlet forward onto
company.do with the correct companyId and action.
Do I have to submit the form with some javascript setting the companyId and
the action values, and then form.Submit()?

What is the preferred method?

Joe


--
To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message