On 17/05/2021 06:24, Hans Schou wrote:
Hi

I got this error when accessing my site:

org.apache.jasper.JasperException: /mainframenotlogged.jsp (line: [1], column: 
[2]) JSP file [../am_databaseopen.jsp] not found

The URL I'm accssing is like
https://example.org/interfaceparts/mainframenotlogged.jsp
and when I go into the directory with a console and list the file 
../am_databaseopen.jsp it is there.

"../am_databaseopen.jsp" is a relative URL.

It is relative to
"https://example.org/interfaceparts/mainframenotlogged.jsp";

So the absolute URL is:
"https://example.org/interfaceparts/../am_databaseopen.jsp";

The normalises to:
"https://example.org/am_databaseopen.jsp";

Assuming that
"https://example.org/interfaceparts/mainframenotlogged.jsp";
is located at
"$CATALINA_HOME/webapps/interfaceparts/mainframenotlogged.jsp"

then
"https://example.org/am_databaseopen.jsp";
will be located at:
"$CATALINA_HOME/webapps/ROOT/am_databaseopen.jsp"

Note the addition of ROOT.

$CATALINA_HOME/webapps is not equivalent to httpd's document ROOT. Each webapp application has a context path and is located in a directory/WAR in $CATALINA_HOME/webapps. The mapping of those directory/WAR names to context paths is described in:
http://tomcat.apache.org/tomcat-8.5-doc/config/context.html#Naming

Note the special case for the root web application with context path "".

Mark


I then tried to make a symlink to ../am_databaseopen.jsp in the sub-directory 
and changed the file mainframenotlogged.jsp to use that but it gave the same 
error (but pointing to a file ind the same directory).

I have gone through permissions and all files are owned by user "tomcat" so 
that should not be the problem.

The server did chrashed and som configuration got lost and there is no backup.  
A new site with Tomcat 8.5.66 has been setup.

Any help much appriciated.


bets regards
Hans



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to