You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Elias Chavarria <el...@cwpanama.net> on 2006/08/16 19:55:39 UTC
Service start in Windows with java opts
Hi!,
I am using Tomcat 5.0 in Windows XP pro. The application i am using uses Ant in order to start tomcat with the following env keys:
<env key="JAVA_OPTS" value="-DproxySet=true -DproxyPort=80"/>
However, it always opens a new command window showing the info about tomcat starting up. I am interested in not having this window shown.
I used the Tomcat Monitor (to avoid showing the window with info about tomcat starting up) and added the following lines to the "Java Options" section:
-DproxySet=true
-DproxyPort=80
However, when i start my application, it sends errors. Is there any way to verify that this settings are being used?
Thanks for the help
Complete ant code:
<macrodef name="start_tomcat">
<attribute name="cmdPrefix" default=""/>
<element name="addArgs" implicit="true" optional="true"/>
<sequential>
<exec executable="C:/Tomcat_5.0/bin/catalina.bat">
<arg line="@{cmdPrefix}start"/>
<env key="CATALINA_BASE" value="C:/Tomcat_5.0"/>
<env key="CATALINA_HOME" value="C:/Tomcat_5.0"/>
<env key="JAVA_OPTS" value="-DproxySet=true -DproxyPort=80"/>
<addArgs/>
</exec>
<sleep seconds="10"/>
</sequential>
</macrodef>
<target description="Start Tomcat" name="start.tomcat">
<echo message="****************Tomcat starting up...*******************"/>
<start_tomcat/>
<echo message="****************Tomcat started*******************"/>
</target>
Re: Service start in Windows with java opts
Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Elias Chavarria wrote:
> -DproxySet=true
> -DproxyPort=80
>
> However, when i start my application, it sends errors. Is there any way to
> verify that this settings are being used?
Drop that as a JSP into some webapp-dir on your tomcat:
---------snip---------
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" session="false"
import="java.util.Enumeration" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>List of properties</title>
</head>
<body>
<h1>List of properties</h1>
<table>
<tr><th>property name</th><th>property value</th></tr>
<%
Enumeration propNames = System.getProperties().propertyNames();
while (propNames.hasMoreElements())
{
String propName = (String) propNames.nextElement();
String propValue = System.getProperty(propName);
%>
<tr><td><%=propName%></td><td><%=propValue%></td></tr>
<%
}
%>
</table>
</body>
</html>
---------snap---------
Regards
mks
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org