Cannot edit tomcat-users.xml

I think the reason is that you can’t edit files in “Program Files” without administrator rights. I had that kind of problem several times and I usually solve it by running my text editor with admin rights. For example, to edit file with notepad in Windows 7: Find it in your start menu, click on … Read more

Tomcat won’t stop or restart

I had this error message having started up a second Tomcat server on a Linux server. $CATALINA_PID was set but the specified file does not exist. Is Tomcat running? Stop aborted. When starting up the 2nd Tomcat I had set CATALINA_PID as asked but my mistake was to set it to a directory (I assumed … Read more

How does Tomcat find the HOME PAGE of my Web App?

In any web application, there will be a web.xml in the WEB-INF/ folder. If you dont have one in your web app, as it seems to be the case in your folder structure, the default Tomcat web.xml is under TOMCAT_HOME/conf/web.xml Either way, the relevant lines of the web.xml are <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> so … Read more

difference between a valve and a filter

From Tomcat documentation: A Valve element represents a component that will be inserted into the request processing pipeline for the associated Catalina container The servlet filters serve the exact same purpose, but valves are Tomcat’s specific classes, tightly coupled to Tomcat infrastructure/API. On the other hand servlet API is implemented by all compatible web containers. … Read more

org.apache.catalina.connector.ClientAbortException: java.io.IOException: APR error: -32

Most likely, your server is taking too long to respond and the client is getting bored and closing the connection. A bit more explanation: tomcat receives a request on a connection and tries to fulfill it. Imagine this takes 3 minutes, now, if the client has a timeout of say 2 minutes, it will close … Read more

Configuring Tomcat to authenticate using Windows Active Directory

From www.jspwiki.org See : ActiveDirectoryIntegration Try this in the server.xml with your ldap-settings : <Realm className=”org.apache.catalina.realm.JNDIRealm” debug=”99″ connectionURL=”ldap://youradsserver:389″ alternateURL=”ldap://youradsserver:389″ userRoleName=”member” userBase=”cn=Users,dc=yourdomain” userPattern=”cn={0},cn=Users,dc=yourdomain” roleBase=”cn=Users,dc=yourdomain” roleName=”cn” roleSearch=”(member={0})” roleSubtree=”false” userSubtree=”true”/> And define the role in the tomcat-users.xml and the web.xml of your application Edit webapp_root/WEB_INF/Web.xml file as follows: <security-constraint> <display-name>your web app display name</display-name> <web-resource-collection> <web-resource-name>Protected Area</web-resource-name> <url-pattern>*.jsp</url-pattern> … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)