Login Example: JSP and Servlets: Part II.

Hello Friends,

This is part II of jsp and servlets login example. Check Part I here.

Step 4) Now, we need to create a Servlet file for the redirection of the jsp pages. In the src folder under the package code2java, add the Servlet file and name it as LoginServlet. As discussed earlier this servlet file will get the user details from the Bean file and then it will create a Session for that user only if the user is a valid user. And accordingly it will redirect to the respective jsp pages. You can use the default code which Eclipse generates while Servlet creation, the only change you need to do is in doGet() method. Continue reading “Login Example: JSP and Servlets: Part II.”

Login Example – JSP and Servlets: Part I.

Hello Friends,

This is one of the tutorials on JSP and Servlets. In this we will discuss and create a simple login application using servlets and JSP where we will connect to the DB for the user credentials and then authenticate the users accordingly. First of all we will discuss about what we will need for this.

JSP Pages:

We will create three JSP pages which will be the only viewable parts of our code. The three pages will be as Login Page, Login Success page and the Invalid Login page. Continue reading “Login Example – JSP and Servlets: Part I.”

JDBC – Insert, Update and Delete example.

Hello Friends,

This is the simple example for executing the SQL statements to INSERT, UPDATE or DELETE any records from the database using JDBC. In the below code I have explained all the three operations. When we insert, update or delete any records from the database we are updating the database, hence we use the executeUpdate() function with the Statement.

Continue reading “JDBC – Insert, Update and Delete example.”

JDBC and MySQL Connection tutorial.

Hello Friends,

One of the significant characteristic of any programming language is its connectivity with the database and its operations. Java supports many options to connect to the database and one of the most used database is MySql. JDBC (Java Data Base Connectivity) is used for connecting the java code with the database and it provides cross-DBMS connectivity to a wide range of SQL databases and access to other tabular data sources, such as spreadsheets or flat files. This tutorial shows the jdbc and mySql connection establishment and its use.

Continue reading “JDBC and MySQL Connection tutorial.”

Error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

Hello Friends,

You may have come across “java.lang.ClassNotFoundException: com.mysql.jdbc.Driver” error/exception while working with java and JDBC. The error occurs mainly when we try to connect to the mySql database from our java code. The error message itself give the clear indication about what we are missing. It says that it is unable to find the Class – “com.mysql.jdbc.Driver”. Continue reading “Error: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver”

Selenium Script for removing users from jira groups.

Hi Team,

This is another tutorial from jira side for the removal of jira users from specific or all groups using a simple selenium script. Selenium makes it easier for the user to perform the task which will take real good time when done manually. In the below example, I have not taken the users list from any external source, but the same is explained in my previous tutorials. Here the user list is a simple string where users are separated by comma and the same are iterated using the for loop.

Continue reading “Selenium Script for removing users from jira groups.”

Selenium script to add Custom Field Options in JIRA.

Hello Friends,

This is one of my tutorials regarding the use of Selenium script in the Jira Configuration. Most of the Jira users may know about the Cascading Type of the Custom fields, there we need to add multiple options against the single one. Now, doing this configuration manual y is really a time consuming job. So, to avoid this, we can use the Selenium Script. All the manual work will be replaced by a single script and it will do everything for you in a very less time.

Continue reading “Selenium script to add Custom Field Options in JIRA.”

Selenium Script to add users in JIRA.

Hello Friends,

This is one of the tutorials for Jira users who can use the Selenium script as an automation for adding the users in jira and updating the groups of the users. As you may know, adding the users in jira is a manual effort, and is a kind of repetitive task, so its always a ease to automate the repetitive work. Selenium is the one of the best alternative for removing the repetitive actions.

Continue reading “Selenium Script to add users in JIRA.”

Selenium Script for Java using Eclipse.

Hello Friends,

This is one of my tutorials regarding the use of Selenium IDE for testing and automation purpose. Most of the users who are in Testing field, they may know about this. But for those who are newbies, this will be a helpful tip. Selenium IDE is a Firefox add-on that allows the user to copy or record the actions one perform on the browser, it also allows the user to Playback the same multiple times. This is why it is used as the testing tools. It allows the user to generate a language specific code to run the tests with Selenium Remote Control. It itself is a vast topic, so we will be discussing it on short terms. For now, we will first learn how to use this tool for testing and automation. Continue reading “Selenium Script for Java using Eclipse.”