Skip to Content

How to set the scheme tomcat?

Dec 15, 2017 at 06:52 PM


avatar image
Former Member

I have an application that is use to download files from a file repository that is not located on the BI server. The application does use a universe on the BI server to locate the files in the repository. It is crazy to me that something as simple as creating a link is so time consuming. I could have used a formattedtext to accomplish this in minutes however, formattedtext does not allow the <a> tag. I have come across limitations like this on almost everything i have done in Design Studio and Lumira Designer. It seems to me that all the restrictions of the javascript and components stifle innovation. I'm not sure why the developers of DS and LD feel the need to be so restrictive. I’m trying to get the SDK and samples working with Lumira Designer but have been unsuccessful. I can only find instruction for Design Studio. I have had Design Studio SDK working for a while now. Is there a new SDK I have to download and new documentation on setting it up? I’m unable to find anything but the SDK for Lumira Discover.

The part of a URL before the : is called the "scheme". Examples include "http", "https", "ftp", as well as "file".

The scheme tells the browser "what to do" with the rest of the URL, different schemes can have different formats after the :.

All I need to know is what config file to edit and the syntax to use. I need to allow Tomcat to serve local file request:

<a href="file://///server/Attachments/area/17-00123/">CaseFolder</a>

This was working before we upgraded Tomcat, so I know it is possable.

This is what I have found so far.

Apache Tomcat Configuration Reference - See Scheme Section

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Joe Peters Dec 15, 2017 at 08:09 PM

It's a browser thing. An html page retrieved from via the http protocol will not link to a file with the file:// protocol

Try this: create a simple html file on your computer with the following:

<a href='file://server/attachments/DID/17-00123/72433877%201.pdf'>Click me</a>

Save it as c:\temp\test.html, then open it with a web browser. The link should work (assuming the file is there).

Now, move test.html to a web server, and open it (ex. http://server/test.html). The page should come up correctly (you'll see "Click me"), but the link won't do anything.

This is a security measure to prevent malicious web sites from being able to execute applications locally.

You'll need a web server to host that pdf file.

10 |10000 characters needed characters left characters exceeded
Joe Peters Dec 15, 2017 at 07:05 PM

If the browser is opening a local file, then no connection is being made to the web server. In your example above, you're opening the local file via UNC -- there is no connection being made to Tomcat.

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

You are right, sorry, bad example. This is what I trying to use to open the file. I just did not want to get in to the issue of this being a Lumira Designer thing.

Denis Konovalov
Dec 15, 2017 at 07:35 PM

I'm not sure how Lumira is involved here or the BOE platform, sounds like a question that should be asked on tomcat forums - could you please clarify the workflow you're trying to achieve ?

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Please see the update I have made to my original post.


that doesn't really explains what you're trying to achieve or why you think this is a problem in BOE/Lumira/DS code.
As you said yourself - it worked before you upgraded tomcat. So clearly, it was Tomcat version that changed things.
Most likely tomcat fixed their lax default security, so you need to talk to tomcat dev's on how to load files now.

If you're using BOE SDK, then you never have to actually load files from repository manually - SDK code does that via corba calls to CMS/FRS.