Java

Introduction to Servlets, JSP, and Servlet Engines

Introduction to Servlets, JSP, and Servlet Engines

Fadıl

What are Servlets?

Servlets are the Java Technologies’ answer to CGI programming. They are programs that run on the server-side and generate dynamic content. Why would one prefer to use Servlets over traditional CGI programming?

  • Efficiency – Using CGI programming, each time an HTTP request is received a new process is started, which can result in poor performance and scalability issues. Using Servlets, the Java VM is always running, therefore, starting a Servlet creates a Java thread as opposed to a system process.
  • Power – Servlets allow you power unknown by traditional CGI. They allow you to do things that would either be very difficult or otherwise impossible because they have access to the entire family of Java APIs. Servlets easily share data and maintain the information, making session tracking and other chores a breeze.
  • Security – Servlets can be run by the Servlet engine in a restrictive sandbox, similar to a web browser’s sandbox for applets. This helps protect against malicious Servlets.
  • Cost– There are plenty of “free” or low-cost web servers available for either personal use or low volume traffic. If you have a web server, chances are you can add Servlet technology quickly, easily, and best of all, cheaply.
  • Portability – The Servlet API takes advantage of the Java platform. It is a fairly simple API that is supported by nearly all web servers so that Servlets may be moved from platform to platform, usually without any modification whatsoever.

A Servlet is a Java class and thus needs to be executed by the Java VM, called a Servlet engine. Servlets are loaded by the engine when they are called and remain running until the servlet is explicitly unloaded or the engine is shut down.

How to Install Android Studio on Linux  [4 Method]

How to Install Android Studio on Linux [4 Method]

Fadıl

With Android Studio, the official IDE of Android, you can develop high-quality Android apps for Android devices. Android Studio hosts the tools required for Android developers.

How to Install Android Studio?

Before you try one of the following installation methods, you need to install java on your computer. You can use the links below to install OpenJDK or Oracle JAVA.

[1. Method] Installation Method on Android Studio’s Site

  1. Download Android Studio for Android version from Android Studio ‘s own site.
  2. Remove the downloaded zip file to a suitable location for your applications (eg / usr / local / or / opt / for shared users ) for your user profile.
  3. To start Android Studio, open the terminal and enter the android-studio /bin/directory and run studio.sh.
  4. A window will appear asking you to import your previous Android Studio settings. Click OK.
  5. The Android Studio Setup Wizard will help guide you through the installation.

Tip: If you want Android Studio to appear in the list of your apps, select Tools> Create> Desktop Launcher from the menu bar of Android Studio.

How To Install JAVA (OpenJDK) 11 On Linux

How To Install JAVA (OpenJDK) 11 On Linux

Fadıl

You have multiple options to develop a Java application on Linux (Ubuntu or Debian).

Use OpenJDK (Open Java Development Kit), an open and free implementation of the standard Java platform, or use Oracle Java SE JDK from Oracle. Oracle JDK is recommended by the IDE developer (Google), especially for those who prefer the new integrated development environment Android Studio. Other than that, you can choose between these two JDKs as you use standard Java libraries while developing an Android app.

Professional Java Security : Symmetric Encryption Part 3

Professional Java Security : Symmetric Encryption Part 3

Fadıl

Key Storage

One of the primary difficulties in establishing good security through cryptography is key storage. In order for a key to be useful, it must be persistent. But by keeping the key around, we risk it being compromised. Let’s imagine that we want to encrypt some personal files on our computer so that no one can read them. We create a 448-bit Blowfish key and encrypt our files with it, thinking that our files will now be secure. But if someone were to get into our machine, they’d be able to read the key and decrypt the files. In order for the files to be safe, we have to protect the key that we used to encrypt those files.

Professional Java Security : Symmetric Encryption Part 2

Professional Java Security : Symmetric Encryption Part 2

Fadıl

Password-Based Encryption (PBE)

The examples that we’ve given so far have used binary keys. These keys need to be stored in some fashion –  on a hard drive or floppy disk for instance. Password-based encryption (PBE) uses a password as the key. This is convenient because the security then rests with the user rather than in a physical medium. Unfortunately, password-based encryption in general isn’t as secure as algorithms with binary keys like TripleDES or Blowfish. To demonstrate this, let’s say we use Blowfish with a key size of 128 bits. That gives us a keyspace of 2128. Password-based encryption typically uses ASCII characters. An average user’s password might be 6 characters in length. If it’s entirely lowercase, there are only 266 possible keys, or roughly 228. Adding capital characters and symbols helps quite a bit, but it cannot even approach the keyspace of a good symmetric algorithm.