ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | enhydra List | January 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [enhydra] AW: Static Content after upgrading from enhydra 3.1


Hi,

More details about "Server.ClassPath[]", "Server.PresentationPrefix" and "Application.DefaultUrl" configurational parameters.

Meaning of these parameters:

-----------------------------------

Server.ClassPath[] - Comma separated CLASSPATH directories and files used by this application.

Assumes run from the output directory for debugging. If you run from the

jar you must rebuild after every change to the app.

 

Server.PresentationPrefix - Prefix used to derive presentation object class names and paths

from URLs. Assumes run from the output directory for debugging.

 

Application.DefaultUrl - If the URL "/" for this application is accessed, the user will be

redirected to this URL. This should be a relative URL.

 

For example:

You have Your "classes" directory that contains "test" subdirectory.

Server.ClassPath[] = "<path_to_patent_directory>/classes"

Server.PresentationPrefix = "test"

Application.DefaultUrl = "media/Enhydra.gif"

 

NOTE: Server.PresentationPrefix has to (relatively from the parent directory, defined as Server.ClassPath[]

element) lead to subdirectory of directory defined in Server.ClassPath[].

 

If static resource is referenced from file that is placed in Server.PresentationPrefix directory

(or it's subdirectories) it should be referenced "relatively from file that it is referenced from"!

NOTE: Static resource that is referenced has to be placed in Server.PresentationPrefix directory

(or it's subdirectories) also!

 

Regards,

Sinisa Milosevic,

Together Serbia

 

 

----- Original Message -----
Sent: Wednesday, January 14, 2004 12:10 PM
Subject: Re: [enhydra] AW: Static Content after upgrading from enhydra 3.1

Hi!

I understand how it all works with the default presentation prefix, relative urls, director etc, as I said, we were having no problems under enhydra3.1.

If I put say 'Server.PresentationPrefix = "media"' in my appname.conf, then have an an <img src=""> and static.gif is in the 'media' directory in the root of my apps classpath (Server.ClassPath[] = "/srv/appname/classes"), then the image is loaded. However, if the image resides at /srv/appname/classes/media/subappname/static.gif, then <img src=""> does not load the image. In short, it seems I can only load static content through enhydra if it resides in the directory specified by Server.PresentationPrefix, but not from directories below it.

I hope my explanation makes sense - it can be hard to describe these things.

Regards,
James.

On Fri, 2004-01-09 at 16:43, Madl Alfred wrote:
Hi !
 
Looks like a problem with "absolute" vs. "relative" paths. What does the
exact URL in your HTML page look like ?
 
By the way: we suggest to move static HTML elements to a static website
on your webserver and reference them in your HTML-pages from there.
Heavy load of concurrent users can produce VERY HIGH request-rates for
static ressources and consume application server threads. This is a big
issue, if your application is memory-bound and you have to limit the
maximum number of concurrent threads to avoid OutOfMemory !
 
If you have no seperate webserver, you could at least move your static
elements to a seperate application (FileServerServlet ?!!!) and
reference them from there !
 
Greetings.
 
Alfred

-----Ursprüngliche Nachricht-----
Von: James Carnegie [mailto:james@xxxxxxxxxxxxxx] 
Bereitgestellt: Freitag, 09. Jänner 2004 15:49
Bereitgestellt in: Enhydra
Unterhaltung: [enhydra] Static Content after upgrading from enhydra 3.1
Betreff: [enhydra] Static Content after upgrading from enhydra 3.1


Hi All,

We at multicom are finally beginning our migration from enhydra 3.1 to
enhydra 5.
Problem:

In enhydra 3.1, if we wanted to load a static resource from enhydra, the
url would take the form: http://myserver/appname/static.gif
<http://myserver/appname/static.gif>  which would be loaded from
appname/presentation on the classpath (in this case,
/srv/appname/bin/presentation/static.gif)

However, since upgrading to enhydra 5, we get an error message:
WARN  org.enhydra.Appname  [Thread-14] - RID:1: page not found:
/static.gif

Any help would be much appreciated.

James. 


<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.