Menu

#107 Action/Servlet for downloadAttachment missing

closed
nobody
None
7
2012-09-18
2006-11-20
No

the module-projects/downloadAttachment is missing and therefore cannot download attachments from database.

Discussion

  • Chris Lim

    Chris Lim - 2006-12-05

    Logged In: YES
    user_id=264705
    Originator: NO

    The missing module-projects/downloadAttachment definition is just the tip of the iceberg.

    Some discoveries that I found:

    1. It should point to /servlets/AttachmentDownloadController instead of module-projects/downloadAttachment
    2. AttachmentDownloadController is a plain servlet. Some keys are not synchronized with the rest of the code. (It still uses the "user" key instead of Constants.USER_KEY
    3. There are some code duplication between GenericController and ItrackerBaseAction
    4. There seems to be some wrong logic inside View rights. (Need to confirm this)
    5. It seems to me that the attachment is not properly saved in the first place (Need to confirm this)
     
  • Marky Goldstein

    Marky Goldstein - 2006-12-15

    Logged In: YES
    user_id=1008661
    Originator: NO

    That comment I found is maybe interesting...

    /**

    • @deprecated Use org.itracker.web.actions.admin.attachment.DownloadAttachmentAction instead.
      */
      public class AttachmentDownloadController extends GenericController {

      public AttachmentDownloadController() {

     
  • Marky Goldstein

    Marky Goldstein - 2006-12-16

    Logged In: YES
    user_id=1008661
    Originator: NO

    I think that currently we have a forward in struts-config.xml

    <forward name="downloadattachment" path="/servlets/AttachmentDownloadController"></forward>

    And that is wrong. You can not forward to a servlet. You can only forward to an Action, Tile, or URI (a file / jsp in the Web folder) - according to my IDE. I guess we have to programme an Action "AttachmentDownload" and then somehow redirect to the Servlet. (but why do we need a Servlet for this anyway?).

     
  • Marky Goldstein

    Marky Goldstein - 2007-01-18

    Logged In: YES
    user_id=1008661
    Originator: NO

    This seems to be fixed...

     

Log in to post a comment.

MongoDB Logo MongoDB