Domino root Directoy for Html Files

Hi! all,

I am trying to create a web base an application. In that I would like to put all the images like “.jpg”, “.gif” and some html pages in to some different directory instead of database resource. I got some help from same time database that all these files including .css are kept under

“Domino\Data\Domino\Html(NewlyCreateFolder)\abc.jpg”

for ex let say i have created a folder named “ABC” the i put all the images into this folder.

for calling the file on the page or form I used

I i used first time to create a document the images are show fine. when i saved the document and open that document all the images are not show. if i try to find the path through the properties it complet path showing

http://serverName/DbName/abc/xyz.jpg

if document is new i.e if i am creating new document its path is

http://serverName/abc/xyz.jpg and this time images are displaying well.

I am not aware why second time images path looking for it database.

Pls hlep me and also suggest me is there any other directory in to domino to put all these images and html file.

Subject: Domino root Directoy for Html Files

Have you ever taken a look at Domino URLs? The URL to open a form would be:

http://www.yourserver.com/path/db.nsf/formname?OpenForm

The path to open a document created from that form would be:

http://www.yourserver.com/path/db.nsf/viewname/documentUNID?OpenDocument

Take another look, and count the “/” characters. Can you see now that the “…/” location would be different for each?

Don’t use simple relative URLs in Domino web applications. Make ALL of your URLs relative to the server, or make them absolute:

where is computed text with the formula @WebDbName.

Subject: RE: Domino root Directoy for Html Files

Hi Stan,

It great to have your support this is second time we are corrosponding.

First time also you have supported me and trouble shoot my problem.

Now again i m distrubing you very sorry for that.

could u pls suggest me why we user @webdbName where as my images are kept abc folder.

the funny thing is that there are five images out of one showing properly and rest are not showing.

how do we make URL relative to server.

If I use its working fine

and for this its also working fine.

pls help me and explore more so that i can understand.

With Regards,

Vikas K Sinha

Subject: RE: Domino root Directoy for Html Files

The first example you posted is fine. So is the version that uses @WebDbName. It’s the version that uses “…/” that can’t work on both a form and a document. When you use that on a form, it works out to exactly the same URL as the @WebDbName version, but when you use it on a document, it will result in this URL:

http://www.yourserver.com/path/db.ndf/viewname/images/xyz.jpg

Domino can figure out that images (and other files) not stored in the database as resources can be found in the /domino/html directory, but only if the are referred to from the server or database “directory” level. As soon as you put a view name in the URL path, Domino treats the next value as a lookup key.

Subject: RE: Domino root Directoy for Html Files

“Domino can figure out that images (and other files) not stored in the database as resources can be found in the /domino/html directory, but only if the are referred to from the server or database “directory” level.”

I never knew that.

But: It doesn’t work for me. Talking about a pass-through img tag like so:

testpic

with = @WebDbName.

Tried in on a form, on a pag, with and without website documents, with PNGs, GIFs, JPGs, and BMPs. No go.

HTTP Web Server: Couldn’t find design note - testpic.png [/test.nsf/testpic.png]

Anything else to consider?

Subject: RE: Domino root Directoy for Html Files

A URL relative to the server starts with a slash. So this

will always work, if your images are inside a folder called acb/images which resides in your websites’s html folder, whereas this

might just work (or not) depending on where your current resource is in the virtual folder structure.

Stan’s last example using @WebDbName was probably intended more as a general rule when dealing with nsf based resources and not really tailored to your case of storing images in the file system.

Subject: RE: Domino root Directoy for Html Files

But friends for some document it is showing(displaying) images on the from when i open but for some document it doesn’t

One more qurey I have:

I have register a user through web but its $user view get not updatet immed. to log-in the user. it will take at least 2-3 minuts. I also used

this code

Sub EnsureUserInNAB(Byval fullname As String)

Msgbox fullname

Dim hBuf As Long     

Call NAMELookup(0, 0, 1, "$Users", 1, fullname, 1, "HTTPPassword", hBuf)

Call OSMemFree(hBuf)

Call NAMELookup(0, 0, 1, "$ServerAccess", 1, fullname, 1, "ListName", hBuf)

Call OSMemFree(hBuf)

End Sub

and in Declaration section I used:

Declare Sub NAMELookup Lib “nnotes.dll” _

(Byval serverName As Integer, _

Byval flags As Integer, _

Byval numNameSpaces As Integer, _

Byval nameSpaces As String, _

Byval numNames As Integer, _

Byval names As String, _

Byval numItems As Integer, _

Byval items As String, _

rethBuffer As Long _

)

Declare Sub OSMemFree Lib “nnotes.dll” (Byval hBuffer As Long)

Pls help me.

With Regards,

Vikas K Sinha

Subject: RE: Domino root Directoy for Html Files

“… for some document it is showing(displaying) images on the from when i open but for some document it doesn’t …”

You know, that this is impossible, IF the src properties of the img tags are identical! Check the html source code or the image properties and compare the path to the image. Try to open the image using this URI directly and you should see what is wrong.

Depending on how you construct your img tag, there can well be a difference between new documents (?OpenForm) and existing documents (?OpenDocument or ?EditDocument). But this is all down to the fact already laid out in detail by Stan: One URI contains a view name, the other doesn’t.

As for the login problem. 2-3 minutes doesn’t sound unacceptably long to me. However, all I usually do, is to refresh the ($ServerAccess) and the ($LDAPCN) view. Users can generally log immediately.