Changing the default web page

Can I change the default FactoryPMI Launch web page?
I want to make it start one of my projects. Is this possible?

This is not a supported feature, but it can be accomplished.

You can change the default web page through the (Tomcat) web server settings in the FactoryPMI Gateway. Gateway backups won’t store the change and upgrades may overwrite it.

  1. Copy your HTML file to the \FactoryPMI\tomcat\webapps\ROOT folder.
  2. Edit the \FactoryPMI\tomcat\webapps\ROOT\WEB-INF\web.xml file. Find the part where it defines the welcome-file

<welcome-file-list> <welcome-file>Launch</welcome-file> </welcome-file-list>
Change Launch to your_file.html

  1. You can make your HTML page look however you want. To have it auto-launch a project (Sample, in this case) use the following code:
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=/gateway/launch/Sample.jnlp">

This post gets into the address format for launching projects as Java Web Start or applets. It also shows how to link to the designer directly.

Where does the new my-file.html file live, so that web.xml can find it as the welcome screen?

By the way - the FactoryPMI folder is under C:\Program Files

Let me be a bit more specific re what I’ve tried.

I wrote test1.html whose body includes only the code above (<META HTTP-EQUIV="Refresh etc>). If I try to execute that file, no dice.

I modified that to read -META HTTP-EQUIV=“Refresh” CONTENT=“0; URL=http://localhost:8080/gateway/applet/test1”- (with <> in place of --; if I include <>, tag text doesn’t show up in preview). When I execute that file, I see the project. So far, so good.

I have modified web.xml on the \ROOT\WEB-INF folder to use test1.html as the welcome-file. When I start localhost:8080, I get the Gateway Projects list. Boo.

I’ve tried using the full path to test1.html, to no avail. I’ve tried the html file in a variety of locations, including the ROOT folder. No dice.

So, it appears that either web.xml can’t find test1.html, or I’m fiddling with the wrong files.

I don’t know if it matters, but I am working on this via remote desktop.

What’s up?

The web.xml file is only read on FactoryPMI Gateway startup - you probably have to restart FactoryPMI. A “soft” restart (from the FPMI Gateway configuration section) will suffice.

Also - make sure your HTML page is really an html page! You can’t just copy-and-paste the META tag from above - thats just a snippet of an HTML page. I just tried this page and it worked fine:

[code]

Hi there [/code]

Start simple, then add complexity to your page.

Got it. The html was fine. Restarting FPMI was the key.

In addition, however, I was still unable to use the META tag as written. I needed to use the whole “…localhost:8080…” URL as previously noted. This only worked when launching from the local server. To access the project from a different computer, I modified the html file, substituting the local server’s name for “localhost” (it’s IP address works as well, of course.) Otherwise, “localhost” appeared to refer to the calling PC.

I’ll try it from outside the company intranet tonight.

Thanks for the help.

Excellent. Yeah, use the server’s IP - localhost always means “this computer”, and that HTML is evaluated from the viewpoint of the client looking at the page.

That's correct. More specifically localhost resolves to the loopback IP address, 127.0.0.1, which, as Carl noted, is always "this computer" with respect to whoever is calling it. It's like yelling, "Hey, me!...".

bds - You can change the port to 80 in the Gateway Configuration Page so that you can leave the ":port" part of the URL out in your web browser.