Menu

How to change default start page in AEM?

Today we are going to learn about Day CQ Root Mapping configuration setting in AEM. 
This configuration is for default landing page of your AEM instance when you browse your AEM instance with URI http://localhost:4502 only and don't specify the any page name after that.

Steps to be follow to change the default landing page:
Step 1: Open http://localhost:4503
Step 2: Login with admin credentials.
Step 3: Go to http://localhost:4502/system/console/configMgr
Step 4: Go to find option [shortcut key Press Ctrl+f] then find for CQ Root Mapping
Step 5: Click on Day CQ Root Mapping configuration which will open a pop as showing in the below email.
Step 6: Change the target value with to new target page.

  • Default the value of this configuration will be : /projects.html 
  • Possible value: You can put any page name here which you want to open. e.g. if you want to open website site admin then put the value /siteadmin

Step 7: Save the settings and logout. Go for Login gain to verify the changes.


Below is the screen shot:

CQ Root Mapping


Muhabbat ek ehsaas

Aaj Azam subah der tak so raha tha, kyunki jab se social media hamare nauzawano ke beech aya hai tab se hamare nauzawano ki raat ki need subah ko puri hoti thi. Pata nhi aisa kya hota hai usme jo unhe nawzawano ko mashgool kiye rakhti thi, har taraf aisa hi mahaul tha ye sirf Azam ki hi baat nhi thi gali ke sare ladkon ka yahi haal tha. Tabhi Azam ki ammi use jagane ayin or bahut bura bhala suna kar chalin gai phir bhi need se bedar nhi hua or sota raha. Takreeban 15-20 minutes ke bad ammi ne Azam ki chhoti bahan Ruby ko use jagane ke liye bheja. Ruby bahut hi shararti thi or ghar pe sabse chhoti hone ki wajah se sab unhe bahut pasand kiya karte the, who kisi ki nahi sunti thi or jo man me aye bas wahi karna hai. Bilkul jiddi ladki, sabke lad pyar ne use sar pe Chadha rakha tha zara sa kisi ne kuchh dhant diya ya kuchh bol diya turant naak Chadha leti thi or sabse naraz ho kar alag baith jati thi. Ruby ko ammi ne Azam ko jagane ke liye bheja to who mohtarma ek jug me pani bhar kar le ayin or azam ke upar dall kar farar ho gai. Is pani ke padhte hi Azam jhunjhla utha or chillata hua bedar hua or uske pichhe dodta hua bhaga tab tak Ruby kamre me apne aap ko bandkar chuki thi.

Ab Mr. Azam ke din ki shuruat hoti hai or who sidha apne ankhon ko malte hue washroom ki taraf chal deta hai, jhatpad who washroom se nikla or sab kam ko jaldi jaldi anzam dene laga. Sayad use kahin jana tha jaise, jiske liye who late ho raha tha. Ammi nashte ko awaz dete rahi but who wapas nhi aaya or man nhi hai aisa bol kar kar ghar se bahar nikal gya.

to be continue...

Static block and method in Java?

Can a class be static in Java?

We can not make top level class static. Only nested or inner classes can be static.

Can we call main method explicitly in Java?

Yes, we can call main method explicitly.

Can we execute a program without main method?

No, we can not execute a program without main method. Up to Java 6 we were able to run a program using static block.

How to create a static method in Java? How to create a static block in Java? Inner Class in Java?
Below is the example code:


package abctest;

public class testExa {
public static void main(String[] args) {
System.out.println("Main method is working!!");

//Explicitly call main method of other class
   rashid.main(args);
       }
/* static block start*/
static {
       System.out.println("static block called ");
       
       //Call static method inside static block
       nameUser();     
       String[] val={"ABCD","CDE"};
       
       //Explicitly call main method from static block
       main(val);
       System.out.println("exiting static block called ");
}
/* static block end*/

//Static method
public static String nameUser()
{
String UserName="Name";
System.out.println("Static method executing");
return UserName;
}

//Static class declaration; Only inner class could be declare as a static
public static class rashid{
public static void main(String args[])
{
System.out.println("Main from class Rashid");
}
}
}

Output:


static block called 
Static method executing
Main method is working!!
Main from class Rashid
exiting static block called 
Main method is working!!

Main from class Rashid