Search Results for: java 8
-
InetAddress
How to get IP address in Java using InetAddress
An Internet Protocol address (IP address) is a numerical label assigned to each device (e.g., computer, printer) participating in a…
Read More » -
InputStream
How to Convert InputStream to String in Java
In this tutorial we are going to show three different methods that you can use in order to read a…
Read More » -
servlet
Sample Java Servlet
In this example we are going to see how to create a simple Java Servlet. As Oracle states in it’s…
Read More » -
mail
Sending emails with JavaMail
Sending a simple text message // Common variables String host = "your_smtp_server"; String from = "from_address"; String to = "to_address";…
Read More » -
jsp
Use Java Code in JSP page
With this example we are going to demonstrate how to use Java code in a JSP page. JavaServer Pages (JSP)…
Read More » -
jsp
Sample JSP Java Server Page
This is an example of how to create a sample JSP page. JavaServer Pages (JSP) is a server-side programming technology that…
Read More » -
jpa
Map Java Enum type in JPA
In this example we shall show you how to map a Java Enum type in JPA. The Java Persistence API…
Read More » -
decorator
Java EE 6 Decorators advanced usage
The example we’ll use is a Social media feed processor. So I have created an interface:  public interface SocialFeedProcessor…
Read More » -
decorator
Decorating classes at injection time with Java EE 6
Let’s say you have a ticket service that lets you order tickets for a certain event. The TicketService handles the…
Read More »