grab our rss feed  Follow us on twitter

s2sgateway

Practical Learning of Programming languages such us j2ee,java,jsp

To Download Our Web-Application Free E-book Enter your Mail Address Below

Enter your E-mail Address to Subscribe Tutorials and Free Projects:

  Powered by FeedBurner

Entries for the ‘Java’ Category

Convert jar to exe file

ShareToday we are going to learn about the importance of conversion of jar to exe files.
Eventhough we are generating class files and make it to jar, It executes when double click on it but window user like to have in exe form so i list here certain exe converters for java try yourself and comment [...]

Comments

How to extract war file in java

ShareToday we are going to learn how to extract war file in java.
War files are important in deploying the web applications.It is a web-archive file bundled with all classes,jsp files,jar files etc.
We already saw a tutorial about how to create a war file.
After extracting war file we can paste the folder to the webapps folder [...]

Comments

Students management java project download

ShareToday you are going to download a simple students management project done completely in java
In this project you can add the students details with year,department,reg no,date etc…
You can modify/delete the records by selecting the name.
You can search the student by regno,name etc
Finally you can view complete report by year wise and department wise.
Download s2sgateway students [...]

Comments

compare current time with database retrieved time in jsp

ShareThis is the viewer question asked by smiten.
how can i compare the database stored time to current time?
I had previously written an article about how to display time in jspNow just make some changes retrieve the database time and split the values of hours,minutes,seconds and finally check the values to get the real time.

<%@ page [...]

Comments

captcha project in jsp/servlet

ShareAlready i wrote a post about creating random image using servlet that is loacted here http://s2sgateway.com/?p=378,With the continuation here i give you complete code for
creating captcha to validate a form to differentiate/protect from robots and spams
.In this project i had placed one form page for submitting information with two servlets one for creating captcha and [...]

Comments

pagination in jsp,java

ShareHai all today we are going to learn how to create a pagination in jsp.
Understanding Pagination is first of all important,Retrieving and showing 50 values in a page is not a problem if it is more than 100 or 200 values then page which is showing is too long and time to load so know [...]

Comments

Finding created/modified time of files in a folder

ShareToday we are going to learn about how to retrieve the created time and date of all files in a folder.
This is useful when you want to track the session information of certain files or folders.Lets look the code below.

<%@ page contentType=”text/html; charset=iso-8859-1″ language=”java” import=”java.io.File, java.util.Date, java.util.Calendar” errorPage=”" %>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
</head>

<%
String [...]

Comments

Creating captcha(random letter image) in jsp

ShareToday we are going to learn how to create a random letter image known as captcha using servlet.
Just a simple coding can do it copy the code below and save it and compile it you can directly view the servlet in tomcat using url “http://localhost:8080/captcha/servlet/CaptchaServlet” for this make adjustment in web.xml file by adding servlet [...]

Comments

Reading Html code of all the url using java

ShareA simple tricky program that can read all the html codes of given url using java the following code does that

import java.net.*;
import java.io.*;

public class URLReader {
public static void main(String[] args) throws Exception {
URL yahoo = new URL(”http://www.yahoo.com”);
BufferedReader in = new BufferedReader(
new InputStreamReader(
yahoo.openStream()));

String inputLine;

while ((inputLine = in.readLine()) != null)
[...]

Comments

create a file from form input in java,jsp

ShareHere we are going to learn how to create the file from form input ie when we submit the form one file is created

<form name=”f” method=”get” action=”#”>
File Name:<input type=”text” name=”name”/>
Msg:<input type=”text” name=”msg”/>
<input type=”submit” value=”submit”>
</form>

<%@page import=”java.io.*”%>
<%
String name = request.getParameter(”name”);
if(name==”"||name==null)
{
name=”Filename:example”;
}
else
{
out.println(”<script type=’text/javascript’>alert(’File created in c: with your given file name’);</script>”);
}
String msg = request.getParameter(”msg”);
if(msg==”"||msg==null)
{
msg=”Created in c:/example.txt”;

}

String path = “c:\\”+name+”.txt”;
File [...]

Comments