Top Posts in Python
5 Ways to Read a File in Java – BufferedReader, FileInputStream, Files, Scanner, RandomAccessFile
In my last post, I was going through with different options we have for SimpleDateFormat. Today I am providing a program for reading file in Java.
I am using BufferedReader for reading the file because it buffers the input from the specified file. Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient.
Here I am providing three functions.
1. Read complete file as String
2. Read file line by line and return list of String
3. Count the occurrence of a String in the given file.
AXIS2 Web Services Tutorial
Recently I was trying to upgrade my Apache Axis2 skills from 1.3 to latest version 1.5.4 and I was not able to find out any tutorial that is self-explanatory and covering the latest release. So it forms the basis of my post for Axis2 Web Services Tutorial.
Who Should Use This Tutorial
This tutorial is intended for Java programmers who are interested in developing and deploying Web Services using Apache Axis2.
The scope of this tutorial is to use Axis2 for creating web services and invoking the web service using Java client program and testing web service using Soap UI tool. Basic understanding of Java, Web Services, XML, Ant and application server (Tomcat) is required to understand the tutorial with ease.
40+ HTML5 Tutorials and Examples for Web Developers
HTML5 input, required, pattern, datalist
Java JSch Example to run Shell Commands on SSH Unix Server
Earlier I wrote a program to connect to remote database on SSH server. Today I am presenting a program that can be used to connect to SSH enabled server and execute shell commands. I am using JSch to connect to remote ssh server from java program.
My 25 Favorite Programming Quotes that are Funny too
Recently I was looking for some good programming quotes for one of my presentation. I was amazed to find that there are some good programming quotes that are really funny and need some brains to figure out the fun part.
Here are 25 of them I like in random order.
Java Program to connect to MySQL over SSH using JSch and JDBC
Recently in one of my project I had to connect to a remote database that was setup on SSH enabled server. Since it was on SSH enabled server, we can’t connect it directly using JDBC connection API. To achieve this, we first need to create SSH session and then using Port Forwarding we can forward the request to server and connect to database. I achieved this using JSch Port Forwarding and then connecting to database.
Java Generate CSR Programmatically
Recently I had to write a program to generate Certificate Signing Request (CSR) using Java API. Here I am providing the steps I followed with Java Program to generate CSR. After that we will also make sure that its valid by validating it with verisign CSR validator tool.
How to install Oracle WebLogic on Mac and Creating WebLogic domain
Oracle Weblogic is one of the most widely used application server. Recently I have installed it on Mac OS X (10.6.4) system and created a domain. This article is intended to provide the steps for installation and creating domain and then starting and stopping domain with Terminal. I have setup Oracle Weblogic 10.3.3.0 on my system but I am sure that the setup instructions will work for other versions also.
Prerequisite for Oracle Weblogic Server Installation
1. Oracle Weblogic setup – You can download it from Oracle website for development purpose.
2. JDK 6 – Oracle Weblogic 10.3 requires Java 6 and it comes with the default Mac OS X system. You can check whether its installed or not. It will be in “/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home” directory.
Java Read URL to String
In my current project, I had a requirement to read the WSDL file from the URL and store it into database as Clob. There was no validation required, so it was kind of reading URL as String and then storing it into database table.
Here is the program I wrote to read URL to String.