<domino:attachments> tag remotely on BEA

I am trying to use the domino:attachments and domino:attachmentlist tags on a BEA Weblogic 6.1 that connects remotely to a Domino 6.5.3 server. I can get the rest of the Form to work fine but when I try to add an attachment tag, I get Servlet failed with Exception java.lang.NullPointerException.

I have added the UploadHandler stuff to the web.xml.

I created a folder called “Attachments” and placed the “iNotes6.cab” in it, but where should that folder go? And where does the codepath parameter start from?

Any ideas of what I am doing wrong?

Here is some of my JSP:

<%@ taglib uri=“domtags.tld” prefix=“domino” %>

<%@ taglib uri=“domutil.tld” prefix=“util” %>

<domino:db

id="db"

dbname="some test/TestData.nsf"

dbserver="some server name"

host="some host name"

user="some username"

password="some password"

onfailure="inline"

debug="true"

time="true"

<domino:form

name="Sample"

schema="Sample"

debug="true"

time="true"

<domino:editdoc text=“Edit Document”></domino:editdoc>

domino:savedocSave this Document</domino:savedoc>



Sample Form

Text Field #1:

<domino:input type=“text” name=“Text1” datatype=“text”/>

…

…

…

Attachments:

domino:ifdisplaymode

<domino:attachmentlist

target="_self"

debug="true"

onfailure="inline"

time="true"

/>

</domino:ifdisplaymode>

domino:ifeditmode

<domino:attachments

name="uploadCtl"

codepath="Attachments"

width="650"

debug="true"

onfailure="inline"

time="true"

/>

</domino:ifeditmode>

</domino:form>

</domino:db>

Subject: domino:attachments tag remotely on BEA

I think I have made some progress:I can now upload attachments and “Open” them in “Edit” mode.

The fix I used is from this document →

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/793394470c74e63985256f5c006f50c8?OpenDocument

I still am getting problems with the attachment list created by the attachmentlist tag in “Display” mode. When I click on a attachment link it returns an error. Here is the error:

Error 404–Not Found

From RFC 2068 Hypertext Transfer Protocol – HTTP/1.1:

10.4.5 404 Not Found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

If the server does not wish to make this information available to the client, the status code 403 (Forbidden) can be used instead. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address.

Subject: RE: domino:attachments tag remotely on BEA

try adding the attribute target=“_self” to the attachmentlist tag. If that fixes it, you are using a domtags.jar from an older release, as this was fixed in 6.0.4/6.5.3.

If not, please paste the url here and let’s see what’s going wrong.

Thanks,

-sl

Subject: RE: domino:attachments tag remotely on BEA

I made sure I had the target=“_self”

I also upgraded the Domino server to 6.5.4 and updated all the needed files on the BEA server.

Here is an example of the URL that is generated for the attachment using the attachmentlist tag:

http://some.server.com/jsptestdata/UploadHandler?dbname=Dev/JspTestData.nsf&unid=3780D74D8D4369F185257000006DD142&tagaction=download&filename=tempstuff.txt&debug=1

Subject: RE: domino:attachments tag remotely on BEA

that looks pretty reasonable.

The UploadHandler needs to find some things in the HttpSession that the page containing the attachmentlist tag stored there. Please check that the page directive on that jsp does not set session=‘false’. If that’s not it, I will try Monday to reproduce in my BEA server, version 8.1.

Take care,

-sl

Subject: RE: domino:attachments tag remotely on BEA

I didn’t see any session=‘false’.

I found it strange that my url contained the subfolder of my jsp code. like"…/jsptestdata/UploadHandler?dbname=…" for the UploadHandler servlet.

So I made copies of my jsp files in the root folder. When I try the link on those pages I get a different result. My url to the link was “…/UploadHandler?dbname=…” which makes more sense (to me at least). When I click on these links, instead of an error I get one of the following (depending of the attachment type): 1. I get a file download prompt with a File name: UploadHandler, File type: , and a From: OR 2. I get a html page of garbage (probably the file as ascii).

Let me know what you think?

It it my web.xml setup?

Here is a portion of my web.xml:

<welcome-file>index.html</welcome-file>

domtags.tld

/WEB-INF/tld/domtags.tld

domutil.tld

/WEB-INF/tld/domutil.tld

UploadHandler

UploadHandler

lotus.domino.upload.UploadHandler

UploadHandler

/UploadHandler

Thanks for the help!!!

Steve Smillie

Subject: RE: domino:attachments tag remotely on BEA

I am no BEA guru. I set up a test web app in the BEA WebLogic Workshop, version 8.1.3, and the attachmentlist tag works pretty much as it should.

My jsps are in the WEB-INF directory, and I could right click on a text file attachment and open it, If I did a saveas, it wanted the name of the file to be ‘UploadHandler.nsf’, but if I change it to test.txt, it correclty downloads the file’s contents.

Hope that helps!

-sl

Subject: RE: domino:attachments tag remotely on BEA

Thanks for the help!

I guess I am seeing similar to you, but only if I have a text file. But if the attachment is a pdf or doc (word), I get undesirable results.

On click of a pdf it asks to Open or save, save is similar to your description but open it doesn’t know to open with Adobe and prompts for a program.

On click of a doc, it opens the document but as ascii junk in the browser not by launching Word as an end user expects.

I suppose we could always use the iNotes/QP attachment control, but can we make it have less functionality in read mode? Currently it acts like you can add attachements even in read mode.

Subject: RE: domino:attachments tag remotely on BEA

What happens if you use Domino’s http commands to access the document having the pdf attachment, and then open the attachment? If the JSP tags don’t exhibit the same behavior, it’s a bug!

-sl

Subject: RE: domino:attachments tag remotely on BEA

I just tested it out using standard HTTP and the download worked as expected. For example when I click on a pdf, it loads the file with the Adobe viewer in my browser window. Same with Word, it used the word viewer in my browser. Other types, like zip it ask about download lcoation and has the proper filename and such.

The jsp upload control is not doing any of these things correctly for me.

Subject: RE: domino:attachments tag remotely on BEA

How is the upload failing? Error messages, other clues?

Adding attachments only works for existing documents, so if you are creating a new mail message, you need to save it, then add attachments, then send it.

Subject: RE: domino:attachments tag remotely on BEA

Uploads are fine. I understand the limits about new vs saved documents. And have that working good.

My current problems are all on downloads.

The browser doesn’t recognize the file types, thus launching and saving is not functioning correctly.

When it should launch the word or pdf viewer, it instead tries to display the doc as text (thus garbage) or it prompts for the program to view with. With standard http (using the same db and doc), the browser knows how to handle them and show the correct viewers.

On saves, the filename and type is not correct and must be manually changed to get the file to save. This also functions fine on the same doc using standard http.

Thanks!

Subject: RE: domino:attachments tag remotely on BEA

Steve Leland,

Have you had any progress recreating this issue?

Is this a problem with the tag libraries or my configuration?

Any more ideas or workarounds?

If this is an issue any idea when a fix might be available?

Thanks,

Steve Smillie