From 284e7da6f01cb3b0e7269fe6476a8e2eeb77b8c2 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 12 May 2009 14:43:16 +0000 Subject: mocca catalina.policy git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@352 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- BKUOnline/src/main/webapp/help.jsp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'BKUOnline/src/main/webapp/help.jsp') diff --git a/BKUOnline/src/main/webapp/help.jsp b/BKUOnline/src/main/webapp/help.jsp index d7dbf0ef..5b39547e 100644 --- a/BKUOnline/src/main/webapp/help.jsp +++ b/BKUOnline/src/main/webapp/help.jsp @@ -18,16 +18,21 @@ pageEncoding="UTF-8"%> <%@ page import="java.io.File"%> <% + String path; + String helpDir = "/helpfiles"; + String pathInfo[] = (request.getPathInfo() != null) ? request .getPathInfo().split("/") : new String[] {}; - String language = pathInfo[1].split("_")[0]; - String filename = pathInfo[2]; - String helpDir = "/helpfiles"; - String path; - if ((new File(helpDir + "/" + language.toLowerCase())).isDirectory()) { - path = helpDir + "/" + language.toLowerCase() + "/" + filename; + if (pathInfo.length < 2) { + path = helpDir + "/index.html"; } else { - path = helpDir + "/de/" + filename; + String language = pathInfo[1].split("_")[0]; + String filename = pathInfo[2]; + if ((new File(helpDir + "/" + language.toLowerCase())).isDirectory()) { + path = helpDir + "/" + language.toLowerCase() + "/" + filename; + } else { + path = helpDir + "/de/" + filename; + } } System.out.println(path); %> -- cgit v1.2.3