<%@ page import="com.novell.emframe.dev.eMFrameUtils,
                 java.util.Properties,
                 java.io.*"%><%

   String badVersion = "-1.-1.-1";
   try
   {
      File versionFile = new File(pageContext.getServletContext().getRealPath("/WEB-INF/version.txt"));
      BufferedReader reader = new BufferedReader(new FileReader(versionFile));
      String str = null;
      String version = null;
      while((str = reader.readLine()) != null)
      {
         if(str.equals(""))
         {
            continue;
         }

         if(str.startsWith("\""))
         {
            str = str.substring(1);
         }

         if(str.endsWith("\""))
         {
            str = str.substring(0, str.length() - 1);
         }

         if(str.startsWith("IMVersion"))
         {
            int equalsIndex = str.indexOf("=");
            if(equalsIndex != -1)
            {
               str = str.substring(equalsIndex + 1);
               version = str;
               break;
            }
         }
      }

      if(version != null)
      {
         pageContext.getOut().println(version);
      }
      else
      {
         pageContext.getOut().println(badVersion);
      }
   }
   catch(Exception e)
   {
      pageContext.getOut().println(badVersion);
   }
%>