Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat context.xml resource password not allow special charcaters

Tags:

tomcat6

I have been trying for add data source in tomcat conf/context.xml as below.

<Resource name="jdbc/DS1"
                        auth="Container"
                        type="javax.sql.DataSource"
                        driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
                        url="jdbc:sqlserver://121.111.11.91;databaseName=DB_NAME"
                        username="testUanme"
                        password="TT&123$"
                        maxPoolSize="50"
                        removeAbandoned="true"
                        removeAbandonedTimeout="1000"
                        logAbandoned="true"
                        /> 

After set Data Source entry in config file i m restarting tomcat and it gives error like:

The reference to entity "TT" must end with the ';' delimiter.

Password not allowing special characters which i have used & and $.

Please suggest what should be there which allows me to enter special characters in password..

Thanks in advance.

like image 274
Sweety Avatar asked Oct 09 '13 08:10

Sweety


People also ask

What is Tomcat context xml?

xml. context. xml file is the application deployment descriptor for the Apache Tomcat server. In a deployed application, this file is located in the META-INF folder of the web application directory or the WAR file, for example, tomcat/webapps/app-core/META-INF/context.

Where is Tomcat server config xml?

The two most important configuration files to get Tomcat up and running are called server. xml and web. xml. By default, these files are located at TOMCAT-HOME/conf/server.

What is context root in Tomcat?

The context path of a web application defines the URL that end users will access the application from. A simple context path like myapp means the web app can be accessed from a URL like http://localhost:8080/myapp.


1 Answers

If you replace & in your password with &amp; you should be fine.

like image 148
Mark Thomas Avatar answered Nov 22 '22 10:11

Mark Thomas