Skip to main content

Posts

Maven vs Gradle

What is Gradle? Gradle Build Tool is a fast, dependable, and adaptable open-source build automation tool with an elegant and extensible declarative build language. Gradle is a widely used and mature tool with an active community and a strong developer ecosystem. •            Gradle is the most popular build system for the JVM and is the default system for Android and Kotlin Multi-Platform projects. It has a rich community plugin ecosystem. •            Gradle can automate a wide range of software build scenarios using either its built-in functionality, third-party plugins, or custom build logic. •            Gradle provides a high-level, declarative, and expressive build language that makes it easy to read and write build logic. •            Gradle is fast, scalable, and can bui...
Recent posts

Java: How to count the special characters in a String input without space?

We can go with String method and matching regex pattern to find the count of special char's in a string Input. Example: public class Testing {     public static void main(String[] args) {         String inputStr = "1234 Special Char count test example@$$%^^$&**() using String method @@#@";         System.out.println(inputStr.replaceAll("[0-9A-Za-z\\s]", ""));         System.out.println("Count:"+(inputStr.replaceAll("[0-9A-Za-z\\s]", "").length()));    } } Output: @$$%^^$&**()@@#@ Count:16

Java : How to find the counts of digits/numbers in a string using Java?

We can go with String method using regex pattern to find the count of valid digits in a string Input. Example: public class Test {       public static void main(String[] args) {           String inputStr = "1234 Number count test example using String method @@#@";         System.out.println("Digits Count:"+(inputStr.length()-inputStr.replaceAll("[0-9]", "").length()));           } Output: Digits Count:4

Swagger UI with Java RESTful Service

Swagger Implementation with REST API This is the post to explain how we can integrate swagger UI with existing REST API application for live documentation. Pre-requisites:      Swagger UI       Download the UI files from Git Hub repository and extract the zip file from     https://github.com/swagger-api/swagger-ui/releases  (download latest version API)     Find the dist folder and copy all the files to our project path “web” folder in our project.            Swagger Jars         To download the jar dependency go to the repository site to get all jar without missing dependency files(swagger-jersey2-jaxrs version 1.5.9)                          https://jar-download.com/?search_box=swagger-jersey2-jaxrs         Download it from the above link and ex...

SAP - Java Application Development with Jco3 Connection

This is the post to explain the way of achieve the connection between non SAP Web application interacting with SAP backend RFC's through Jco3 connector. Mandatory Files: * sapjco3.jar (place in lib folder) * sapjco3.dll (required only windows based machine ,need to place under " C:\Windows\System32 " folder.) Required to download it from SAP market place with valid credentials,consider the version 32/64 bits depends on your work environment) Steps to connect SAP Backend: 1. Create a Stand alone/web application using any development tool. 2. Include jar and dll files in above specified folder 3. Create a connection class to connect backend with valid credentials 4. Create a service or consumer class with RFC call code to utilise the connection 5. Close the connection Make sure you have access and no firewall blocks for the SAP backend connection. Example Connection Code: sapConnect.java import com.sap.conn.jco.JCoDestination; import com.s...

JSF2 with Mysql CRUD Web Application Demo

Java based CRUD demo application development with the combination of JSF2 framework ,Mysql database using Netbean IDE. Beginners can  understand initial configuration steps in JSF2  application development. Steps Followed: *  Install MySql Server with proper configuration and create some table with set of records or restore from your backup ,If you have anything. *  Download mySql Connector Drivers from official site. *  Install Netbean IDE with Server either Tomcat or Glassfish *  Create New Web Application and select the server and Framework (JSF2 used for this demo with Primefaces ). * Select the JPA framework to create a datasource connection and it will generate the the DAO and service classes based on Facade Design pattern. * Create JSF managed beans and Xhtml pages from the Pojo's (It's an automated process when you follow the video). * This video will help to understand the basic connection between frontend DAO's and business log...

JSF2 ,FACELETS TEMPLATE

Follow the steps to create an simple facelet template and client template page using JSF2 framework . 1. Open the netbean IDE tool . 2.Open the new project and choose Java web folder->web application -> enter your project name->select the server(Glassfish server 3.x ->choose the Framework as JAVA SERVER FACES-> choose the configuration and select the Facelet option from list box. -> finish 4.Right click your project and choose Others->java server faces ->facelet template->select any one predefined template shown below -> click finsh 5.Again do the same steps 4 and choose the facelet client template and move to next select existing template from the web-inf folder -> finish. 6.run the web application and can see the output from facelet template. 7.see this attached images may helpful to you.