Is it possible to access my CSS using dynamic html in java?

I am creating dynamic HTML using a java agent. I want to access my style sheet, but it doesn’t seem to be working. Is this supported? If so, what is the command?

out.println(“<LINK REL="stylesheet" TYPE="text/css" HREF="…/iNet_main.css?OpenFileResource">”);

Thanks,

roger

Subject: Is it possible to access my CSS using dynamic html in java?

Try this:

PrintWriter pw = getAgentOutput();

pw.println(“@import url(/”+mainDatabaseURL+“/itl.css?OpenCssResource);” );

Hope this helps.

Thomas

Subject: Is it possible to access my CSS using dynamic html in java?

Your agent and your CSS file are database peers:

http://www.wherever.com/path/db.nsf/AgentName?OpenAgent

http://www.wherever.com/path/db.nsf/file.css?OpenFileResource

Kill the “…/” (which means “up one level”, and would apply only to documents, not design elements), and you’ll be okey-dokey.

Subject: RE: Is it possible to access my CSS using dynamic html in java?

Stan, you should have called me! I just figured it out and was getting ready to write up what teh mistake was :slight_smile: I don’t know where the heck I got the slash from. I was using it to literal my quotes and I must have deleted a quote and not the slash.

But, I think this is a post that will benefit more people who will be doing this sort of thing. Thanks.

In the meantime, I used ?OpenCSSResource, in my efforts to find the problem and it worked. How come I can’t find it documented anywhere?

Thanks for your help

Subject: RE: Is it possible to access my CSS using dynamic html in java?

I think you’ll find that if you put the CSS Resource into a form/page HTML Head using the Create>Resource method, Domino will generate a reference tag using ?OpenCSSResource. Why there’s a specialized call, I don’t know, but the CSS resource is also a file resource. Maybe it had to do with getting the service MIME type correct early in the ND6 development cycle. Frankly, the query string isn’t necessary anyway, so I never use it for static files.