Handling this in the portal is pretty much the same as handling it for a regular web site. First, one of the HTML pages you uploaded to CMS needs to have links to the files you would like user to be able to download. Second, you have to be aware of the types of files being downloaded. If the file is HTML, it will appear in the CMS portlet. Other file types will appear in a separate window/tab (the Reference Guide provides details on this, rather than my looking it up to confirm what I just wrote I leave it to you to verify this). If the browser believes it can display the file, it will do so. If not, it will pop up the file download dialog box. Of course, the user can always right-click on any link and choose download. Knowing this browser behavior, I usually add "right-click to download" next to links for files the browser can display.
But I want to store the files in the CMS (not in any other filesystem). I'm not
going to use the CMS portlet -- I'w writing my own. What I'm willing to do
is display in my portlet something like link -- clicking on them would trigger the download from the CMS.
I've read about using servlet in the same WAR archive where I have my portlet, but I don't know how exactly to do this. Any step-by-step instructions would be very helpful.
I never said anything about how you store the files. My entire post assumed that the files were stored in CMS. Did you read the sections on CMS in both the User's Guide and the Reference Guide? They describe how URLs for binary files stored in CMS are constructed. Providing such a URL in your portlet display should be sufficient for doing a download - the user simply clicks on the link.
Thanks, it really helps a lot.