preload
May 27

Step1: Creating New Project
a) Goto File->New Project ( One window will open)
b) In Project Window , Select Web -> Web Application
c) Select Next
d) Enter the Name of the Project [Eg. MyServlet] and path
e) Select Next
f) Select the J2EE version and Server which you want to
deploy the web Application
[Eg : J2EE5 and Tomcat 6.1]

g) Finish the wizard.

Format of Servlet Project

MyServlet (Project Name)
|
|_Web Pages (create html,jsp files here)
|
|-Configuration Files (configure web.xml file)
|
|-Server Resources
|
|-Source Package (create java servlet here)
|
|_Test packages
|
|-Libraries (Add external jar file here)
|
|-Test Libraries

Step 2 : Creating JSP or HTML file
a) Right click on the Web Pages Folder
b) Select New -> HTML option from the pop up window.
c) Type the name of your html page.
d) Finish the wizard.

Eg. select.html


<form action="SelectDetails" method="get">Select the Branch
<select name="branch">
<option value="IT"> B.Tech - IT </option>
<option value="CSE"> B.Tech - CSE </option>
<option value="ECE"> B.Tech - ECE </option>
<option value="MECH"> B.Tech - Mech </option>
</select>
<input type="submit" value="GetDetails" />
</form>

Step 3: MySQL Database : Check Table Name : student
id    name   branch
1     Amar   IT
2     Amit    CSE
3     Antony   MECH
4     Anbu     ECE
103   Sree        MECH
102   Karthick  IT
104   Deepan   ECE
105   Moorthy   CSE

Step 4: Add MySQL Jconnector jar file under “Libraries” foleder
Libraries -> Right Click -> Select Add New Jar File / Folder
My Path : /media/Backup/mysql-connector-java-5.1.6-bin.jar

Step 5: Creating Servlet
a) Right click on the Source Package Folder
b) Select New -> Servlet option from the pop up window.
c) Type the name of your html page.
d) Finish the wizard.

Eg:SelectDetails.java

 
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
 
public class SelectDetails extends HttpServlet {
 
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        response.setContentType("text/html;charset=UTF-8");
        PrintWriter out = response.getWriter();
        Connection conn = null;
 
        try {
            String branch = request.getParameter("branch");
            String userName = "root";
            String password = "123456";
            String url = "jdbc:mysql://localhost/Check";
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            conn = DriverManager.getConnection(url, userName, password);
            Statement s = conn.createStatement();
            s.executeQuery("SELECT id, name FROM student where branch = '" + branch + "'");
            ResultSet rs = s.getResultSet();
            while (rs.next()) {
                int idVal = rs.getInt("id");
                String nameVal = rs.getString("name");
 
                out.println("id = " + idVal + ", name = " + nameVal +"   ");
 
}
rs.close();
s.close();
 
} catch (Exception e) {
out.println(e.toString());
} finally {
out.close();
if (conn != null) {
                try {
                    conn.close();
                    out.println("Database connection terminated");
                } catch (Exception e) {
                }
            }
 
        }
    }
 
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }
 
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        processRequest(request, response);
    }
}

Step 4 : Run the project.
URL => http://localhost:8084/MyServlet/select.html

Output for CSE
id = 2, name = Amit
id = 105, name = Moorthy

Mar 26

1. Connectivity
1) Bluetooth Utilities [Bluz Package]
2) Bluetooth File Sharing (in Accessories)* (Not necessary for Ubuntu 8.10 )
3) Network Manager (or)
4) Wicd
5) Samba or NFS for File Sharing on Network

2. Sound and Video
1) Amarok – Audio Player
2) Audacity – Audio Editor like Sound Forge
3) Totam Movie Player
4) Real Player for rm and rmvb file
5) MPlayer
6) VLC Media Player
7) ffmpeg – video editiong software
8) Cinelerra – Video editing s/w

3.CD/DVD Softwares
1) K3B CD/DVD Writer
2) DeVeDe – Convert Movie file to Video DVD format
3) ISO Master – Create and Edit ISO Files
4) DVD rip – Rip mp3s and Videos from DVD
5) Acrobat Reader / Professional

4. Desktop Applications
1) gtk-recordMyDesktop – Record your desktop in ogg video format
2) Acrobat Reader 8
3) Open Office.org
4) Grisbi – Personal Account Management Software
5) gnome-theme-manager
6) gdesklets
7) Dictionary softwares
8) GNU Paint
9) Kile – Latex Editor for Document Preparation
10) Oxford Advanced Learners Dictionary [comes with Oxford Dictionary]
11) WordNet English Dictionary
It can be downloaded from
i) Synaptic Package Magaer or
ii) http://wordnet.princeton.edu/obtain
12) Wine – Running Windows Applications in Linux
13) rar – Archive Software
14) chm – Compile HTML File Opener
15) PuTTy – Telnet, SSH, ftp Graphical Tool

5. Internet
1) Firefox Browser
2) Opera Browser
3) Elinks Command Line Browser
4) lynx Command line Browser
5) Evolution – Email Client
6) Pidgin Messenger
7) Skype – Audio and Video Chatting
8) Transmission Bittorrent Client

6. Programming
1) Python,PHP, Perl , C, C++,TCl/TK
2) Netbeans IDE
3) Eclipse IDE
4) GNU Ocatve
5) Scilab – Scientific Computing Package.
6) JDk 1.6 – http://developers.sun.com/downloads/
7) Computer Aided Design (CAD) – Archimedes – http://archimedes.incubadora.fapesp.br/portal/downloads
8) Blender 3D Animation Software

7.Administration
1) Partition Editor [Gparted]

8.Themes and Wallpapers

Oct 08

(Click on the picture to enlarge)