cancel
Showing results for 
Search instead for 
Did you mean: 

Images not visible in Preview

willson
Champ in-the-making
Champ in-the-making
In a Web Project, reduced to its simplest form with an index.html and a jpg in /assets/images/, the virtualization server is not seeing the image file as called in a line such as <img border="none" src="/assets/images/logos/sample.jpg"… of the html. It will see src="./assets/… or src="assets/… but not with only the leading slash (which indicates root of the virtual site).

Is there a configuration step someplace that I've missed or is the virtualization server only a partial implementation?

Note: I'm not running with the Alfresco Tomcat; my Alfresco runs under Glassfish - but I am using, of course, the Alfresco Virtual Tomcat for virtualization.
4 REPLIES 4

willson
Champ in-the-making
Champ in-the-making
Additional info
It's not just images; it's links too. Anything href or src from root (with a diagonal slash) also fails to be found or linked.
Note: The part of the project being previewed is in a Webapp folder, not in ROOT. 

So the question becomes… how to configure WCM Preview for a Webapp Flolder so that href and src and img find their targets if written with a leading slash to indicate root?

The preview url is something like
http://admin.alfrescosample.www--sandbox.94-294-194-94.ip.alfrescodemo.net:8180/docroot

sethatrothbury
Champ in-the-making
Champ in-the-making
Did you set the "isVirtualWebappRelative" property correctly in your ssi servlet/filter?

willson
Champ in-the-making
Champ in-the-making
Thanks for the pointer.   That did happen to be set correctly.
But it led me to
<!– IMPORTANT: To use the SSI servlet, you also need to rename the       –>
<!–            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file   –>
<!–            to $CATALINA_HOME/server/lib/servlets-ssi.jar             –>
which was a step I hadn't done.  I did the rename and stopped/started the virtual server.
It's still not working as desired.  It seems to be caching some old versions of files (its not the browser cache; I checked). I'll have to go in and make sure everything is clean.

I looked, again, into the Alfresco documentation of this topic - - isVirtualWebappRelative gets no mention at all in online documentation and Server Side Includes only a passing mention; nothing relevant.  The documentation situation with Alfresco makes me crazy. It makes a seemingly excellent product remarkably discouraging to use.

sethatrothbury
Champ in-the-making
Champ in-the-making
Are you using the Servlet or the Filter? Other things to check would be that you have the right extensions turned on for your virtualization. ex:

    <servlet-mapping>
        <servlet-name>ssi</servlet-name>
        <url-pattern>*.htm</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ssi</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>

Just don't set it to "/". It does not like that… at all.