continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Louis Smith <dr.louis.sm...@gmail.com>
Subject Re: Setting appserver.base for RHEL 6
Date Sun, 11 Mar 2012 00:12:16 GMT
This is a trick we use.. .throw this into an app somewhere, and hit it.
 See what system properties are and (more importantly) are NOT being passed
in....in many servers, the env vars are NOT passed into a "child" java
run... particularly if it is a 2nd generation child...hence our defining it
as close to the internal java start command as we can..

Good luck!

file: SysProps.jsp

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>System Properties</title>
</head>
<body leftmargin="25" rightmargin="25" bgcolor="lightblue">
<%@ page language="java" import="java.util.*" %>
<%out.println("<center><h1>System Properties Listing
</h1><h1><hr></h1></center>");
//Get all system properties
Properties props = System.getProperties();
String propName = "";
String propValue = "";
// Enumerate all system properties
Enumeration e = props.propertyNames(); out.println("<ol>");
for (; e.hasMoreElements(); ) {
  // Get property name
  propName =(String)e.nextElement();
  // Get property value
  propValue =(String)props.get(propName);
  out.println("<li>Property Name: " +propName + ", Value: " );
    if(propValue.indexOf(":") >= 0 ){
      if(propValue.indexOf("http://") == 0 ){
          out.println(propValue + "</li>");
      }
      else{
        out.println("<ol>");
        String[] result = propValue.split(":");
        for (int x=0; x<result.length; x++){
                out.println("<li>" + result[x] + "</li>");
            }
        out.println("</ol>");
      }
      //out.println("</ol>");
    }
    else{
      out.println(propValue + "</li>\n");
    }
  }
  out.println("</ol>\n");
%>
<hr>
</body>
</html>

On Fri, Mar 9, 2012 at 3:22 PM, John DeStefano <john.destefano@gmail.com>wrote:

> Hi Louis,
>
> On Fri, Mar 9, 2012 at 7:15 AM, Louis Smith <dr.louis.smith@gmail.com>
> wrote:
> > Correct.  Those never took effect for us either - we always had to place
> > them into the internal scripts that are passed to the java startup
> command
> > buried in the layers and layers of scripts... have you tried starting it
> in
> > foreground vs background?  I recall that as a startup option at one time.
> > Not sure if that makes any difference.
>
> In more "normal" Tomcat deployments, running in the foreground would
> be done simply by running `bin/catalina.sh run`.  However, the RHEL 6
> Tomcat package does not ship with catalina.sh or an equivalent script.
>
> As I just mentioned in an Archiva thread regarding a similar problem,
> the sane route may be to forget managing Tomcat via the stock RHEL 6.2
> package and install it manually.  I'd much prefer to stay with the
> RPM, but unless there's a simple solution, it seems silly to keep
> fighting with these variables that should simply work.
>
> Thanks,
> ~John
>



-- 
Dr. Louis Smith, ThD
Chief Technology Officer, Kyra InfoTech
Colonel, Commemorative Air Force

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message