且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Servlet实例差异

更新时间:2023-12-04 12:18:40

大家好,



我找到了答案。我在这个论坛上通过另一个问题得到了协助;



使用SSL的Servlet安全性 [ ^ ]



发现在我的Eclipse开发环境中有两个context.xml文件可能导致配置冲突。



此外,发现Java服务器的两个实例,即Test和Live可以在同一个实例Tomcat上运行,然后显然可以在同一台机器上运行,但不能实现SSL。使用SSL实现,一次只能部署一个实例。除非有人知道这方面当然我会欢迎任何反馈



问候



AJFarroll

Hi all,

I have a Java servlet (Java 1.6.0.29) running in Tomcat 7.0 all in Windows. SSL has been set up to encrypt information between the servlet and databases. Also, I have a test instance of the servlet and a Live instance. I am using SoapUI to simulate web requests and Wireshark to check the encryption. The problem is in the Test servlet communication is encrypted fine in both TO AND FROM a SQL Server database server. However, in the Live instance only some of the communication TO and FROM the same SQL Server database server is encrypted.

Could someone please tell me what differences I should check in the instances?

I have checked that each servlet instance has the following XML in the APPLICATIONS web.xml file

<security-constraint>
    <web-resource-collection>
    <web-resource-name>securedapp</web-resource-name>
    <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>



Thanks in advance

AJFarroll

Hi all,

I found an answer to this. I was assisted through another question on this forum;

Servlet Security with SSL[^]

Discovered that in my Eclipse development environment there were two context.xml files that were probably causing conflicting configurations.

Also,iscovered that two instances of a Java servelt, i.e. Test and Live can run on the same instance Tomcat and then same machine obviously, but NOT with SSL implemented. With SSL implemented only one instance can be deployed at once. Unless someone knows a way around this of course I would welcome any feedback

Regards

AJFarroll