Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread Internal EWB Server Returns A 404 Error If Output Is Not Below Project Directory
Fri, Aug 10 2018 11:12 AMPermanent Link

Frederick Chin

My project directory is \AAA\BBB. If my output directory is OUTPUT, i.e. in \AAA\BBB\OUTPUT, the project can be compiled and run fine by the internal EWB server.

However, if I change the output directory to \CCC and EWB changes the output field to ..\..\CCC, the internal EWB server throws up a 404 error.

The HTML and JS files are correctly created in \CCC.

What could be the problem here?

--
Frederick
Sun, Aug 12 2018 3:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< What could be the problem here? >>

You need to make sure that your output directory is a sub-directory of the project directory of the EWB Web Server will not be able to load the content from there (it will think that it's invalid).

If you want to use a path that is completely separate from the project directory, then you need to run an external instance of the EWB Web Server, set its content directory accordingly, and run against that server.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Aug 12 2018 6:52 PMPermanent Link

Frederick Chin

Tim,

/*
You need to make sure that your output directory is a sub-directory of the project directory of the EWB Web Server will not be able to load the content from there (it will think that it's invalid).
*/

Is there any particular technical limitation why the output directory needs to below the project directory for the content to be displayed?

I thought that if I selected the external EWB server to run the application from within EWB, it would work but EWB still displays the 404 error whether the output directory is "output" or C:\CCC.

/*
If you want to use a path that is completely separate from the project directory, then you need to run an external instance of the EWB Web Server, set its content directory accordingly, and run against that server.
*/

That is how I am doing it now. It is a good thing that the compilation is so fast. Otherwise, I would be pulling my hair out switching back and forth. Smile

--
Frederick
Mon, Aug 13 2018 2:47 AMPermanent Link

ooptimum

Frederick, if your file system is NTFS (I believe it's so), you can make \CCC a hard-link or a directory junction to \AAA\BBB\output folder. If you don't want to link whole folder, you can soft-link on a file level one by one.

Frederick Chin wrote:

> My project directory is \AAA\BBB. If my output directory is OUTPUT, i.e. in \AAA\BBB\OUTPUT, the project can be > compiled and run fine by the internal EWB server.

> However, if I change the output directory to \CCC and EWB changes the output field to ..\..\CCC, the internal EWB > server throws up a 404 error.
Mon, Aug 13 2018 3:09 AMPermanent Link

Uli Becker

Frederick,

> That is how I am doing it now. It is a good thing that the compilation is so fast. Otherwise, I would be pulling my hair out switching back and forth. Smile

What do you mean with "switching back and forth"? If you define an
external webserver with a URL pointing to your output directory, you can
choose this webserver for your project. Just press F9 and you are all
done. No switchin back and forth necessary. Is that what are doing?

If not, see the attached screenshots.

Uli



Attachments: Clip1.png Clip 2.png
Mon, Aug 13 2018 7:21 AMPermanent Link

Uli Becker

Addition:

In my case my EWBServer's content directory (localhost) points to a folder where all my websites are stored in subdirectories.
"MemoryM" is such a subdirectory.

That's why the URL is "http://localhost/MemoryM

Uli
 
Mon, Aug 13 2018 10:03 AMPermanent Link

Frederick Chin

Uli,

/*
In my case my EWBServer's content directory (localhost) points to a folder where all my websites are stored in subdirectories.
"MemoryM" is such a subdirectory.

That's why the URL is "http://localhost/MemoryM
*/

I've managed to get it to work. Originally, my URL for the external web server was http://localhost/myprg.html. The EWB web server's content directory is C:\MYDIR.

When I changed the URL to just http://localhost, the EWB app was displayed automagically! I am a happy camper. Smile

Thanks for giving me the push in the right direction.

--
Frederick
Mon, Aug 13 2018 3:57 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Frederick,

<< Is there any particular technical limitation why the output directory needs to below the project directory for the content to be displayed? >>

Actually, I looked at this again and it should work as-is, so I've got to look into 2.06 further and see why the expansion of the relative path is failing.

Tim Young
Elevate Software
www.elevatesoft.com
Image