Dipesh Majumdar

Blog and Paintings

Adobe cq5, dispatcher, apache - Fundamental Questions and Answers - 3

Let me start with the DisclaimerAll these tiny nuggets of AEM information are my own endeavor to search in the internet, or asking knowledgeable people and some from my own experience and I DON'T TAKE any responsibility if any of these is followed and something goes wrong. Please refer Adobe Documentation for verifying all information.

This is the third part of FAQ on AEM.  Click here for the first part; and here for the second.


  1. What is Xms and Xmx in the start script parameter? Answer:  -Xms is used for assigning initial heap size and -Xmx is used for assigning maximum heap size that the JVM can expand to. So Xmx is always greater than equal to Xms. -XX:MaxPermSize=512m stores 512 of permanent memory for java objects etc needed by JVM.
  2. Provide some exclude, include examples that can be used for rules in cq5 packages -
    1. root path: /content/www-website-com/xyz 
      rule: exclude=> .*/dip.*    
      meaning: the package will be built and installed in destination application for all paths under the root path excluding any content under root path that starts with dip. It's easy to test this - suppose i create a page dipesh.html under the root path and when i dump the content after building the package, i should not be able to see dipesh.html.
    2. root path: /content/www-website-com/xyz  
      rule: exclude: .+\.pdf     meaning ->
      means ecludes all pdf files under root path
    3. root path: /content/www-somewebsite-com/xyz  
      rule: include: /content/www-somewebsite-com/xyz/dip.*  
      meaning - this means only include the contents that start with dip under the root path.  
    4. root path: /content/www-somewebsite-com/xyz  
      rule: include/exclude: /content/www-somewebsite-com/xyz/[a-z].*    
      meaning - only include/exclude files that start from a to z under root path
  3. While building/installing packages the output starts with A, U etc - what are meaning of these: Answer ->
    1. A is Added Node,
    2. U is updated Node,
    3. D is deleted Node and
    4. E means there was some error which needs to be checked.
  4. While configuring agents, there is something called retry delay - what's this and what's the default value
    Answer: The retry delay is the time after which one more time replication takes place after failing for some reason. Default value is 60,000ms or 1 minute
  5. What are different type of replication agent log levels?
    1. Error - only errors are logged
    2. Info - Error, information and warnings are logged
    3. Debug - Maximum information is logged in debug mode
  6. How is authentication handled by cq5 Dispatcher cache?
    Answer: Requests that have authentication in header are not cached. However this default behaviour can be changed by setting /allowauthorized .  Sometimes there may be a case where you will see in the logs that the request is not getting rendered from cache but percolating down to publisher from the dispatcher - so you might be thinking what could be the cause - but in the logs you can see that there is no caching because of authentication in header.
  7. Gernerally cq5 dispatcher doesn't cache in which cases?
    answer: In these cases
    1. when http method is not GET then caching is bypassed. Sometimes http method can be POST or HEAD. (Post for form data and head for header.)
    2. when request uri contains a cache burster ( or a Question mark)
    3. authenticaton is set in header. (How it is set is a different question and will be addressed in another blog post).
    4. absence of .html or .jpg (or any file extension) from request uri end part
  8. How to make a particular page not get cached by dispatcher - 
    Answer: In order to disable caching in dispatcher, add the header "Dispatcher: no-cache" in JSP - 
      response.setHeader("Dispatcher", "no-cache");
  9. From where can the admin password be changed. Or for that matter, from where the password of any user can be changed?
    Answer: From this location http://author_OR_publihser:Port/libs/granite/security/content/useradmin.html
  10. How to check if network connections are getting established from a particular ip - say for example you are browsing a website at your computer - and you want to verifiy if requests from this browsing of yours are generating some network connections?
    Answer: this is the way to check from command line:
    netstat -atnp |grep your_computer_ip
    it also tells you whether it is the putty session or some other process in the output. it gives information about port as well.
  11. how to simulate post method request using curl?
    curl -v -X POST
    now you can use this to check the output - for https - which say - comes on port 81. and you need to find out for method GET. you can also cat cat1.txt to find the html code of the page. 
    curl -v -X GET >cat1.txt

  12. How to count number of occurenrences of a particular word or string in a file  in linux?
    Answer: grep -c "word-or-string" file_name

  13. How to do a svn rollback?
    suppose the former version of a file - is 1000 and the later version is 1001 and you want to rollback to 1000 then this is what you have to do:
    from the command prompt: svn merge -r 1001:1000
    then commit: svn ci -m "rolling back file to previous version 1000"

Go Back