tssinfo Posted July 2, 2018 Share Posted July 2, 2018 H, I want to add the datasource tags in tomcat Context.xml, can you please let me know, how can I do that? Thanks in advance. Regards,TSSInfo Link to comment Share on other sites More sharing options...
wolstech Posted July 2, 2018 Share Posted July 2, 2018 You can't. Assuming the attribute only affects your site, what exactly needs to be added? Krydos may be able to add it for you, but we can't make any changes that might break other users on the server. Link to comment Share on other sites More sharing options...
tssinfo Posted July 3, 2018 Author Share Posted July 3, 2018 (edited) Kindly add the following properties to context.xml, thanks in advance. <Resource name="jdbc/SMTDS" global="jdbc/SMTDS" auth="Container" type="javax.sql.DataSource" maxTotal="100" maxIdle="30" maxWaitMillis="10000" username="tssinfo_root" password="<removed>" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://tommy.heliohost.org:3306/tssinfo_savemytime?useSSL=true"/> </Context> Edited July 4, 2018 by Krydos removed password Link to comment Share on other sites More sharing options...
wolstech Posted July 3, 2018 Share Posted July 3, 2018 Lets see what Krydos says about this. Link to comment Share on other sites More sharing options...
Krydos Posted July 4, 2018 Share Posted July 4, 2018 Please don’t post your database password. Context.xml goes in META-INF. You can put it there yourself. Link to comment Share on other sites More sharing options...
tssinfo Posted July 4, 2018 Author Share Posted July 4, 2018 Oh..Sorry, I will change it now itself only..thanks so much for the hint. Link to comment Share on other sites More sharing options...
tssinfo Posted July 4, 2018 Author Share Posted July 4, 2018 I have kept the context.xml under META-INF, but still I am not getting DB connection through DataSource. Btw I have also kept the logging mechanism for my Application and given the separate path for my log. It was working fine in my local, but not on HelioHost. Could you please help to get these 2 issues resolved. Thanks in advance. Link to comment Share on other sites More sharing options...
tssinfo Posted July 4, 2018 Author Share Posted July 4, 2018 Wonderful! I am able to call data source from context.xml as Krydos suggested. It is working fine. Thanks so much Krydos for the inputs. Logs issue still there, I will log as new topic. Thanks so much for both of you for helping me. Link to comment Share on other sites More sharing options...
Recommended Posts