Abstract Classes Compared to Interfaces

Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. However, with abstract classes, you can declare fields that are not static and final, and define public, protected, and private concrete methods. With interfaces, all fields are automatically public, static, and

configure ssl

Export from JKS to PKCS #12. keytool -importkeystore -srckeystore keystore.jks -destkeystore keystore.p12 -deststoretype PKCS12 -srcalias <jkskeyalias> -deststorepass <password> -destkeypass <password> mv keystore.p12 /root cd /root convert to key openssl rsa -outform der -in private.pem -out private.key nano /etc/httpd/conf.d/ssl.conf find the line <VirtualHost _default_:443> uncomment ServerName and type servername:443 uncomment: SSLEngine on SSLCertificateFile /root/downloadedcertificate.crt SSLCertificateKeyFile /root/private.key

Configure SSL on Apache and Glassfish and forward traffic to Glassfish

keytool -keysize 2048 -genkey -alias tugrulaslan.net -keyalg RSA –dname “CN=tugrulaslan.net,O=company,L=Istanbul,S=Istanbul,C=TR” -keystore keystore.jks keytool –certreq –alias tugrulaslan.net –keystore keystore.jks –file cert_req.csr keytool -import -alias tugrulaslan.net -keystore keystore.jks -trustcacerts -file yourdomain.com.crt send that csr to generate your ssl file then download x509 certificate from geotrust then move the certificate to /root IMPORT SSL INTO KEYSTORE   download

Binding of variables and methods at compile time and runtime

You can use reference variables of a base class to refer to an object of a derived class. With inheritance, the instance variables bind at compile time and the methods bind at runtime. Examine the following code: class Employee { String name = "Employee"; void printName() { System.out.println(name); } } class Programmer extends Employee { String name

Adding a new attribute in Hybris Model

All object models extends ItemModel class, there are such steps to add a new attribute where database will happen to have it created in the target table. So simply at work to test it out I created a field called “Profession” in the registration page in “yacceleratorstorefront” module. I am assuming you’ve imported all corresponding projects into

Apache Mod_proxy to forward http traffic to Java App server 8080

In my vps server I wanted to forward http port 80 to glassfish 8080 ports without having glassfish config changed. So I assume httpd apache server is installed. So cd /etc/httpd/conf nano httpd.conf Add the below lines and save and restart apache <VirtualHost *:80> # Your domain name ServerName Domain_NAME_HERE ProxyPreserveHost On ProxyPass / http://localhost:8080/

Major OOP concepts in Java

Abstract classes and abstraction This is a way of hiding implementation & ignoring the body of a method. The method bodies will be filled in derived classes. Remember the base class has to add “abstract” modifier in all of the provided methods  and the derived methods from the base class have to have the same

Why a class can’t extend multiple classes

In Java, a class can’t extend multiple classes. Why do you think this is so? Let’s examine this issue using an example, in which the class Programmer is allowed to inherit two classes: Employee and Philanthropist. Figure 6.9 shows the relationship between these classes and the corresponding code. If class Programmer inherited the method receiveSalary,