How can i enable TLS 1.2 for Tomcat 0.6.32? - protocols

How can i enable TLS1.1 and TLS 1.2 for Tomcat 0.6.32?
i did until now,
Java Version from 1.6.0_22 to 1.7.0_79
Openssl Version from 0.9.81 to 1.0.2
from Windows 2008 to Windows 2008 R2
but in that Server when i type with Openssl s_client -connect server:443 -tls1_2
still not work.
i checked Registry of Windows also to enable tls1.2
what more options must be checked ?
The server.xml is as follows.
====================================================================================
-->
<Connector SSLEnabled="true" acceptCount="100" clientAuth="false" disableUploadTimeout="true" enableLookups="false" keystoreFile="keystore" keystorePass="keystore" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8443" protocol="org.apache.coyote.http11.Http11Protocol" scheme="https" secure="true" sslProtocol="TLS" sslEnabledProtocols="+TLSv1+TLSv1.1+TLSv1.2" useBodyEncodingForURI="true" ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA256,TLS_RSA_WITH_AES_256_CBC_SHA"/>
<!--
====================================================================================
I tried all of the following phrases.
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslEnabledProtocols = "TLSv1,TLSv1.1,TLSv1.2" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocols = "TLS" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol = "TLSv1.2" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocols="TLSv1.2" protocols="TLSv1.2"/>
Both the tls1.1 and tls1.2 protocols are not active.
I've dealt with other Tomcat, but I can't guess what kind of error it is on that server.
Is there any other reason? Or did you miss anything?

Related

Wildfly https redirect

I'm currently trying to redirect my http to https on wildfly 10.
In Standalone.xml I have the following configuration:
<management>
<security-realms>
<security-realm name="SSLRealm">
<server-identities>
<keystore path="/home/vagrant/key-cert.pem keystore-password="password"/>
</security-realm>
</security-realms>
</management>
<subsystem xmlns="urn:jboss:domain:undertow:3.1">
<buffer-cache name="default"/>
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
<https-listener name="https" socket-binding="https" security-realm="SSLRealm" enable-http2="true"/>
</server>
</subsystem>
The rest of document is untouched.
What i'm missing?
Kind regards.

RedHat on port 80

I got Apache Tomcat running some app on RedHat server, now listening on port 8081. I want the app to listen to port 80, but not working. My RedHat server not using firewall so iptables has no relavance. How can i make it work? Here is my server.xml:
<?xml version='1.0' encoding='utf-8'?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note: A "Server" is not itself a "Container", so you may not
define subcomponents such as "Valves" at this level.
Documentation at /docs/config/server.html
-->
<Server port="8005" shutdown="SHUTDOWN">
<!-- Security listener. Documentation at /docs/config/listeners.html
<Listener className="org.apache.catalina.security.SecurityListener" />
-->
<!--APR library loader. Documentation at /docs/apr.html -->
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
<Listener className="org.apache.catalina.core.JasperListener" />
<!-- Prevent memory leaks due to use of particular java/javax APIs-->
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<!-- Global JNDI resources
Documentation at /docs/jndi-resources-howto.html
-->
<GlobalNamingResources>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users
-->
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<!-- A "Service" is a collection of one or more "Connectors" that share
a single "Container" Note: A "Service" is not itself a "Container",
so you may not define subcomponents such as "Valves" at this level.
Documentation at /docs/config/service.html
-->
<Service name="Catalina">
<!--The connectors can use a shared executor, you can define one or more named thread pools-->
<!--
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
maxThreads="150" minSpareThreads="4"/>
-->
<!-- A "Connector" represents an endpoint by which requests are received
and responses are returned. Documentation at :
Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
Java AJP Connector: /docs/config/ajp.html
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8081" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="84431" />
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="80431"/>
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<!--
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host).
Documentation at /docs/config/engine.html -->
<!-- You should set jvmRoute to support load-balancing via AJP ie :
<Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
-->
<Engine name="Catalina" defaultHost="localhost">
<!--For clustering, please take a look at documentation at:
/docs/cluster-howto.html (simple how to)
/docs/config/cluster.html (reference documentation) -->
<!--
<Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
-->
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
Ports below 1024 can only be opened by a root user. So If you want tomcat to listen on port 80 you will need to start it as the root user.
Or else you can configure an Apache proxy to redirect traffic o port 80 to port 8081 on which tomcat will be listening on

Add files in program data using wix

I am developing an Outlook addin using addin express. I am using a .wxs file in my program's setup project. It helps me to install my program in roaming folder. I want to add Redemption.dll to the path C:\programData\Flow. So I modified the code as mentioned below. But it is not working. Please advice me.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<!--Modified[Id]-->
<Product
Id="faa8e62a-0834-4efa-aad3-b2f7903a3a6c"
Name="FlowOutlook"
Language="1033"
Version="1.1.4"
Manufacturer="Default Company"
UpgradeCode="faa8e62a-0834-4efa-aad3-b2f7903a3a6d"
Codepage="1252">
<Package
InstallerVersion="200"
Compressed="yes"
InstallScope="perUser"
Description="FlowOutlook"
Manufacturer="Default Company"
Languages="1033"
SummaryCodepage="1252"
InstallPrivileges="limited"
/>
<!--Added-->
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="faa8e62a-0834-4efa-aad3-b2f7903a3a6d">
<!--Should be same as "UpgradeCode"-->
<UpgradeVersion
Minimum="1.0.0" Maximum="1.1.4"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!--Romoved-->
<!--<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />-->
<Media Id="1" Cabinet="FlowOutlook.cab" EmbedCab="yes" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<Feature Id="ProductFeature" Title="FlowOutlook" Level="1" ConfigurableDirectory="INSTALLFOLDER">
<ComponentRef Id="INSTALLFOLDER" />
<ComponentGroupRef Id="ProductComponents" />
<!--<ComponentRef Id="Redemption.dll" />-->
<!--Added-->
</Feature>
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
<!-- Pics-->
<!-- Pics-->
<Binary Id="adxregistrator_exe" SourceFile="$(var.ADX_PATH)\Redistributables\adxregistrator.exe" />
<CustomAction Id="RegisterApp" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/install="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user /returnExitCode=false' Impersonate="yes" />
<CustomAction Id="RollbackApp" BinaryKey="adxregistrator_exe" Execute="rollback" ExeCommand='/uninstall="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user' Impersonate="yes" Return="ignore" />
<CustomAction Id="UnregisterApp" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/uninstall="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user' Impersonate="yes" Return="ignore" />
<!--Added-->
<CustomAction Id="RegisterRedemption32" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe "C:\ProgramData\Flow\Redemption.dll"'></CustomAction>
<!--self registering Redemption 32-bit -->
<CustomAction Id="UnregisterRedemption32" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /u "C:\ProgramData\Flow\Redemption.dll"'></CustomAction>
<!--self unregistering Redemption 32-bit -->
<CustomAction Id="RegisterRedemption64" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe "C:\ProgramData\Flow\Redemption64.dll"'></CustomAction>
<!--self registering Redemption 64-bit -->
<CustomAction Id="UnregisterRedemption64" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /u "C:\ProgramData\Flow\Redemption64.dll"'></CustomAction>
<!--self unregistering Redemption 64-bit -->
<!--Added-->
<InstallExecuteSequence>
<Custom Action="RegisterApp" After="StartServices"><![CDATA[$ProductComponent>2]]></Custom>
<Custom Action="RollbackApp" After="RegisterApp"><![CDATA[$ProductComponent>2]]></Custom>
<Custom Action="UnregisterApp" After="MsiUnpublishAssemblies"><![CDATA[$ProductComponent=2]]></Custom>
<!--Added-->
<RemoveExistingProducts Before="InstallInitialize" />
<Custom Action="RegisterRedemption32" After="InstallFinalize">NOT Installed</Custom>
<!--self registering Redemption 32-bit-->
<Custom Action="UnregisterRedemption32" After="InstallFinalize">REMOVE="ALL"</Custom>
<!--self unregistering Redemption 32-bit-->
<Custom Action="RegisterRedemption64" After="InstallFinalize">NOT Installed</Custom>
<!--self registering Redemption 64-bit-->
<Custom Action="UnregisterRedemption64" After="InstallFinalize">REMOVE="ALL"</Custom>
<!--self unregistering Redemption 64-bit-->
<!--Added-->
</InstallExecuteSequence>
<!-- Properties for all current versions of the .NET Framework are available here: http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm -->
<PropertyRef Id="NETFRAMEWORK40CLIENT"/>
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40CLIENT]]>
</Condition>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="INSTALLFOLDER" Name="FlowOutlook" >
<Component Id="INSTALLFOLDER" Guid="cdca45fb-ce6c-4a00-9865-29b24123c62a">
<RemoveFolder On="both" Id="INSTALLFOLDER"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Value="FlowOutlook" />
</Component>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<Directory Id="TARGETDIR2" Name="SourceDir2">
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="Flow"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" >
<Component Id="ProductComponent" Guid="2596359b-ed35-42f1-be52-2ff4625189f5" DiskId="1" Directory="INSTALLFOLDER" >
<RegistryKey Root="HKCU" Key="Software\[Manufacturer]\[ProductName]">
<RegistryValue Type="string" Name="Installed" Value="[INSTALLFOLDER]" KeyPath="yes" />
</RegistryKey>
<File Id="_$(var.FlowOutlook.TargetName)_dll" Name="$(var.FlowOutlook.TargetFileName)" Source="$(var.FlowOutlook.TargetPath)" />
<File Id="_adxloader_dll_manifest" Name="adxloader.dll.manifest" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_adxloader_dll" Name="adxloader.dll" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_adxloader64_dll" Name="adxloader64.dll" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_AddinExpress_MSO_2005_dll" Name="AddinExpress.MSO.2005.dll" Source="C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\" />
<File Id="_AddinExpress_OL_2005_dll" Name="AddinExpress.OL.2005.dll" Source="C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\" />
<File Id="_Newtonsoft_Json_dll" Name="Newtonsoft.Json.dll" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Microsoft_Vbe_Interop_dll" Name="Microsoft.Vbe.Interop.dll" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Newtonsoft_Json_pdb" Name="Newtonsoft.Json.pdb" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Newtonsoft_Json_xml" Name="Newtonsoft.Json.xml" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Redemption_dll" Name="Redemption.dll" Source="$(var.FlowOutlook.TargetDir2)" />
<File Id="_Newtonsoft_Json_xml" Name="Redemption64.dll" Source="$(var.FlowOutlook.TargetDir2)" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Thanks for helping. Kushan Randima
The C:\ drive requires admin privileges for writing. You need to run the installer elevated (Run As Admin).
To do this, I had to create another element as a child element of and I had to add some extra code under . Please see below code to see working solution.
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<!--Modified[Id]-->
<Product
Id="faa8e62a-0834-4efa-aad3-b2f7903a3a6c"
Name="FlowOutlook"
Language="1033"
Version="1.1.5"
Manufacturer="Default Company"
UpgradeCode="faa8e62a-0834-4efa-aad3-b2f7903a3a6d"
Codepage="1252">
<Package
InstallerVersion="200"
Compressed="yes"
InstallScope="perUser"
Description="FlowOutlook"
Manufacturer="Default Company"
Languages="1033"
SummaryCodepage="1252"
InstallPrivileges="limited"
/>
<!--Added-->
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
<Upgrade Id="faa8e62a-0834-4efa-aad3-b2f7903a3a6d">
<!--Should be same as "UpgradeCode"-->
<UpgradeVersion
Minimum="1.0.0" Maximum="1.1.5"
Property="PREVIOUSVERSIONSINSTALLED"
IncludeMinimum="yes" IncludeMaximum="no" />
</Upgrade>
<!--Romoved-->
<!--<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />-->
<Media Id="1" Cabinet="FlowOutlook.cab" EmbedCab="yes" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<Feature Id="ProductFeature" Title="FlowOutlook" Level="1" ConfigurableDirectory="INSTALLFOLDER">
<ComponentRef Id="INSTALLFOLDER" />
<ComponentGroupRef Id="ProductComponents" />
<!--<ComponentRef Id="Redemption.dll" />-->
<!--Added-->
</Feature>
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
<!-- Pics-->
<!-- Pics-->
<Binary Id="adxregistrator_exe" SourceFile="$(var.ADX_PATH)\Redistributables\adxregistrator.exe" />
<CustomAction Id="RegisterApp" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/install="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user /returnExitCode=false' Impersonate="yes" />
<CustomAction Id="RollbackApp" BinaryKey="adxregistrator_exe" Execute="rollback" ExeCommand='/uninstall="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user' Impersonate="yes" Return="ignore" />
<CustomAction Id="UnregisterApp" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/uninstall="[INSTALLFOLDER]$(var.FlowOutlook.TargetFileName)" /privileges=user' Impersonate="yes" Return="ignore" />
<!--Added-->
<!--self registering Redemption 32-bit -->
<CustomAction Id="RegisterRedemption32" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /s "C:\ProgramData\Flow\Redemption.dll"'></CustomAction>
<!--self unregistering Redemption 32-bit -->
<CustomAction Id="UnregisterRedemption32" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /s /u "C:\ProgramData\Flow\Redemption.dll"'></CustomAction>
<!--self registering Redemption 64-bit -->
<CustomAction Id="RegisterRedemption64" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /s "C:\ProgramData\Flow\Redemption64.dll"'></CustomAction>
<!--self unregistering Redemption 64-bit -->
<CustomAction Id="UnregisterRedemption64" Directory="INSTALLFOLDER" ExeCommand='regsvr32.exe /s /u "C:\ProgramData\Flow\Redemption64.dll"'></CustomAction>
<!--Added-->
<InstallExecuteSequence>
<Custom Action="RegisterApp" After="StartServices"><![CDATA[$ProductComponent>2]]></Custom>
<Custom Action="RollbackApp" After="RegisterApp"><![CDATA[$ProductComponent>2]]></Custom>
<Custom Action="UnregisterApp" After="MsiUnpublishAssemblies"><![CDATA[$ProductComponent=2]]></Custom>
<!--Added-->
<RemoveExistingProducts Before="InstallInitialize" />
<!--self registering Redemption 32-bit-->
<Custom Action="RegisterRedemption32" After="InstallFinalize">NOT Installed</Custom>
<!--self unregistering Redemption 32-bit-->
<Custom Action="UnregisterRedemption32" After="InstallFinalize">REMOVE="ALL"</Custom>
<!--self registering Redemption 64-bit-->
<Custom Action="RegisterRedemption64" After="InstallFinalize">NOT Installed</Custom>
<!--self unregistering Redemption 64-bit-->
<Custom Action="UnregisterRedemption64" After="InstallFinalize">REMOVE="ALL"</Custom>
<!--Added-->
</InstallExecuteSequence>
<!-- Properties for all current versions of the .NET Framework are available here: http://wix.sourceforge.net/manual-wix3/wixnetfxextension.htm -->
<PropertyRef Id="NETFRAMEWORK40CLIENT"/>
<Condition Message="This application requires .NET Framework 4.0. Please install the .NET Framework then run this installer again.">
<![CDATA[Installed OR NETFRAMEWORK40CLIENT]]>
</Condition>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="AppDataFolder">
<Directory Id="INSTALLFOLDER" Name="FlowOutlook" >
<Component Id="INSTALLFOLDER" Guid="cdca45fb-ce6c-4a00-9865-29b24123c62a">
<RemoveFolder On="both" Id="INSTALLFOLDER"/>
<RegistryValue Root="HKCU" Key="Software\[Manufacturer]\[ProductName]" Type="string" Value="FlowOutlook" />
</Component>
</Directory>
</Directory>
<!-- Reference the Program Files folder -->
<Directory Id="CommonAppDataFolder">
<Directory Id="APPLICATIONDATADIRECTORY" Name="Flow"/>
</Directory>
</Directory>
</Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" >
<Component Id="ProductComponent" Guid="2596359b-ed35-42f1-be52-2ff4625189f5" DiskId="1" Directory="INSTALLFOLDER" >
<RegistryKey Root="HKCU" Key="Software\[Manufacturer]\[ProductName]">
<RegistryValue Type="string" Name="Installed" Value="[INSTALLFOLDER]" KeyPath="yes" />
</RegistryKey>
<File Id="_$(var.FlowOutlook.TargetName)_dll" Name="$(var.FlowOutlook.TargetFileName)" Source="$(var.FlowOutlook.TargetPath)" />
<File Id="_adxloader_dll_manifest" Name="adxloader.dll.manifest" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_adxloader_dll" Name="adxloader.dll" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_adxloader64_dll" Name="adxloader64.dll" Source="$(var.FlowOutlook.ProjectDir)Loader\" />
<File Id="_AddinExpress_MSO_2005_dll" Name="AddinExpress.MSO.2005.dll" Source="C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\" />
<File Id="_AddinExpress_OL_2005_dll" Name="AddinExpress.OL.2005.dll" Source="C:\Program Files (x86)\Add-in Express\Add-in Express for .NET\Bin\" />
<File Id="_Newtonsoft_Json_dll" Name="Newtonsoft.Json.dll" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Microsoft_Vbe_Interop_dll" Name="Microsoft.Vbe.Interop.dll" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Newtonsoft_Json_pdb" Name="Newtonsoft.Json.pdb" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Newtonsoft_Json_xml" Name="Newtonsoft.Json.xml" Source="$(var.FlowOutlook.TargetDir)" />
</Component>
<Component Id="ProductComponent2" Guid="2596359b-ed35-42f1-be52-2ff4625189f6" DiskId="1" Directory="APPLICATIONDATADIRECTORY" >
<File Id="_Redemption_dll" Name="Redemption.dll" Source="$(var.FlowOutlook.TargetDir)" />
<File Id="_Redemption64.dll" Name="Redemption64.dll" Source="$(var.FlowOutlook.TargetDir)" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
You need to use the Windows Installer property CommonAppDataFolder in a directory element that is a child of the TARGETDIR directory element. Then create a child directory element beneath this for your company name and use this directory element in your component authoring.
FWIW I maintain an open source project called ISWIX that makes this as easy as right click select CommonAppDataFolder right click new subfolder followed by typing the name and then dragging your content into that folder and clicking save.

Direct access of protected JSF pages doesn't work by using HTTPS

Today I started to implement SSL in my Java EE project. Everything worked fine until I tried to directly access a protected area with an logged out customer. Instead of being redirected to the log in page, a single question mark appeared.
This behavior only produces FireFox, IE works fine
Without SSL, also FireFox works fine.
I'm using Tomcat 7.0 and JSF 2.1
The protected pages are:
Everything within SubDir /admin needs role ADMIN to be accessible
Everything within SubDir /customer needs role CUST to be accessible
The strange thing is that this question mark is displayed only by accessing some of the pages in SubDir /customer ! By trying to access all others (including those in /admin) the Login page is displayed correctly (All pages are structured in the same way).
Finally, I brought the web site up and running correctly by using the TCP port 443 instead of 8443. Now both browsers correctly display the login page before someone is able to access a protected page.
So my question. Does anyone have any idea why this behavior occurs if port 8443 is used? And is there a way that port 8443 can still be used?
Below you can find the tomcats server.xml file.
Thanks in advance!
<?xml version="1.0" encoding="UTF-8"?>
<Server
port="8005"
shutdown="SHUTDOWN" >
<Listener
SSLEngine="on"
className="org.apache.catalina.core.AprLifecycleListener" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource
name="UserDatabase"
auth="Container"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml"
type="org.apache.catalina.UserDatabase" />
</GlobalNamingResources>
<Service name="Catalina" >
<Connector
connectionTimeout="20000"
port="8080"
protocol="HTTP/1.1"
redirectPort="443" />
<Connector
SSLEnabled="true"
clientAuth="false"
keystoreFile="C:\Program Files (x86)\apache-tomcat-7.0.30\conf\BookStore.keystore"
keystorePass="myPwd"
maxThreads="200"
port="443"
protocol="HTTP/1.1"
scheme="https"
secure="true"
sslProtocol="TLS" />
<Connector
port="8009"
protocol="AJP/1.3"
redirectPort="443" />
<Engine
name="Catalina"
defaultHost="localhost" >
<Realm className="org.apache.catalina.realm.LockOutRealm" >
<Realm
className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase" />
</Realm>
<Realm
className="org.apache.catalina.realm.JDBCRealm"
connectionURL="jdbc:mysql://localhost/bookstore?user=bookstore&password=book$tore"
driverName="org.gjt.mm.mysql.Driver"
roleNameCol="role"
userCredCol="pwd"
userNameCol="eMail"
userRoleTable="roles"
userTable="customer" />
<Host
name="localhost"
appBase="webapps"
autoDeploy="true"
unpackWARs="true" >
<Valve
className="org.apache.catalina.valves.AccessLogValve"
directory="logs"
pattern="%h %l %u %t "%r" %s %b"
prefix="localhost_access_log."
suffix=".txt" />
<Context
docBase="BookStore"
path="/BookStore"
reloadable="true"
source="org.eclipse.jst.jee.server:BookStore" />
</Host>
</Engine>
</Service>
</Server>
That question mark appears when you're trying to use http on a https connection. You can't see what protocol you are using because the default settings within FF hide the protocol.
Enter about:config within the browser url and look for browser.urlbar.trimURLs, and set it to false. Now you'll see the http:// in front of your browser url. Switch it to httpS and the question mark will disappear.
Edit: The url you are trying to access is shown in the tab, it's http instead of https.

Can someone tell me how the request is routed in the following IIS-Tomcat isapiredirect(2.0) config?

I have the following settings:
1. Tomcat server.xml
<Server port="8005" shutdown="SHUTDOWN">
<Service name="Catalina">
<Connector port="8080"
maxHttpHeaderSize="8192" maxThreads="150"
minSpareThreads="25" maxSpareThreads="75"
useBodyEncodingForURI="true" enableLookups="false"
redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
<Connector port="8009"
enableLookups="false" redirectPort="8443"
protocol="AJP/1.3" />
2. worker.properties
[channel.socket:localhost:8009]
info=Ajp13 worker, connects to tomcat instance using AJP 1.3 protocol
tomcatId=localhost:8009
3. IIS
Has a website with port 80 that have isapiredirect filter enabled.
My initial guest is
"port HTTP80->HTTP8009->HTTPS8443"
"port HTTP8080->HTTP8443"
Your AJP Connector (8009) is not HTTP, it uses the AJP protocol
If a clients connects via IIS, the flow will be
IIS Http80 -> Tomcat AJP 8009
or via Https
IIS Https443 -> Tomcat AJP 8009
As far as I know the AJP13 protocol does not support encryption of the data involed in IIS to Tomcat communications, but you can set a parameter to let tomcat know that the front webserver is HTTPS so that request.isSecure() returns true.
Your connectors on pour 8080/8443 on tomcat will only be used if you connect directly to tomcat.

Resources