0
votes

I'm developing a webapp using Apache Tomcat. Once it's finished, this webapp will be deployed in a server which hosts other webapps. What I'd like to do now, is to set up SSL authentication just for this webapp on which I'm working. In order to do that and not affect the other apps, instead of changing the "server.xml" file in the "conf" directory of Tomcat, I've understood that I have to define the context of my webapp, creating a file called "context.xml" in the META-INF folder of my webapp. The problem is I don't know what I am supposed to write in that .xml file. This guide (http://www.avajava.com/tutorials/lessons/how-do-i-set-up-ssl-on-tomcat.html;jsessionid=74F4B4F842431DB25BCABB847643AC4F) just tells me which changes I have to make in the server.xml file and so I really don't know how to proceed. Can anyone help me, please? Thanks.

EDIT: SOLVED Apache Tomcat: multiple webapps

1
possible duplicate of Apache Tomcat: multiple webappsuser207421
I don't see why that's a solution. It just says to use conf/[enginename]/[hostname]/[YourWebappName].xml, which is just a clumsier version of META-INF/context.xml, which you already knew about.user207421

1 Answers

0
votes

Tomcat must be set up it with a Connector for HTTPS, in server.xml. Otherwise it won't even be listening to an HTTPS port. You can't accomplish that in context.xml. <Context> cannot contain a <Connector>. There's nothing useful concerning HTTPS that you can put into a context.xml file.