i used tomcat 7 and netbeans 7.4
when i start my web application i get
Cannot deploy the module. The context.xml file seems to be broken. Check whether it is well-formed and valid. The module has not been deployed.
it's my context.xml file
<?xml version='1.0' encoding='utf-8'?>
<Context>
<Resource name="jdbc/shareDS" auth="Container" type="javax.sql.DataSource"
maxActive="50" maxIdle="10" maxWait="100000"
username="${db.user}" password="${db.password}" driverClassName="com.mysql.jdbc.Driver"
url="${db.url}"
timeBetweenEvictionRunsMillis="1800000" autoReconnect="true"
removeAbandoned="true" removeAbandonedTimeout="300" logAbandoned="true"/>
</Context>
when i try to validate my context file, i get
Cannot find the declaration of element 'Context'. [19]
any idea?
Figured it out. The Netbeans deployment process wants you to add 1 simple parameter to the Context tag, namely: path. It needs to know what path the application will be on.
For example, this was my (opening) Context tag:
<Context antiJARLocking="true" path="/sas/">
My application is deployed at the /sas/ context root.
And now, Netbeans deploys my application without any further errors.
FYI: the antiJARLocking is something I put in to avoid locking of JAR's. It's not mandatory. For more information on the antiJARLocking, refer to the documentation over at: http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With