Documents Required & Lab Manual
Complete guide to all the documents you need for your pilgrimage journey. Also find Java Lab Manual resources for students below.
Advanced Java Programming Lab
Part B: JSP Programs
1. JSP Order Form
<form method="post">
Item: <input name="item"><br>
Price: <input name="price"><br>
Quantity: <input name="qty"><br>
<input type="submit" value="Calculate">
</form>
<%
if(request.getParameter("item") != null){
double price = Double.parseDouble(request.getParameter("price"));
int qty = Integer.parseInt(request.getParameter("qty"));
double total = price * qty;
%>
<b>Total Price: <%= total %></b>
<% } %>
Total Price: 600.0
2. JSP Login System
<form method="post">
Username: <input name="user"><br>
<input type="submit" value="Login">
</form>
<%
if(request.getParameter("user") != null){
session.setAttribute("user", request.getParameter("user"));
out.print("Welcome " + session.getAttribute("user"));
}
%>
3. Currency Converter (INR to USD)
<form method="post">
Amount: <input name="amt"><br>
Convert to <select name="cur">
<option>USD</option><option>INR</option>
</select>
<input type="submit" value="Convert">
</form>
<%
if(request.getParameter("amt") != null){
double amt = Double.parseDouble(request.getParameter("amt"));
String cur = request.getParameter("cur");
// 1 USD = 83 INR (Example rate)
double res = cur.equals("USD") ? amt * 0.012 : amt * 83.0;
out.print("Converted Amount: " + res);
}
%>
Converted Amount: 1.2
Java AWT & Swing Programs
4. Mouse Events (Adapter Class)
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MouseEventAdapterDemo extends JFrame {
JLabel label;
public MouseEventAdapterDemo() {
label = new JLabel("Move or click the mouse");
label.setBounds(50, 50, 200, 30);
add(label);
setSize(300, 200);
setLayout(null);
setVisible(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
label.setText("Mouse Pressed at (" + e.getX() + ", " + e.getY() + ")");
}
public void mouseReleased(MouseEvent e) {
label.setText("Mouse Released at (" + e.getX() + ", " + e.getY() + ")");
}
});
addMouseMotionListener(new MouseMotionAdapter() {
public void mouseMoved(MouseEvent e) {
label.setText("Mouse Moved at (" + e.getX() + ", " + e.getY() + ")");
}
});
}
public static void main(String[] args) {
new MouseEventAdapterDemo();
}
}
5. Keyboard Events
import java.awt.*;
import java.awt.event.*;
public class KeyboardEventDemo extends Frame {
Label label;
public KeyboardEventDemo() {
label = new Label("Press any key...");
label.setBounds(50, 80, 200, 30);
add(label);
setSize(300, 200);
setLayout(null);
setVisible(true);
addKeyListener(new KeyAdapter() {
public void keyPressed(KeyEvent e) {
label.setText("Key Pressed: " + e.getKeyChar());
}
public void keyReleased(KeyEvent e) {
label.setText("Key Released: " + e.getKeyChar());
}
public void keyTyped(KeyEvent e) {
label.setText("Key Typed: " + e.getKeyChar());
}
});
// Close window on click
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
}
});
}
public static void main(String[] args) {
new KeyboardEventDemo();
}
}
6. Basic Calculator
import java.awt.*;
import java.awt.event.*;
public class BasicCalculator extends Frame implements ActionListener {
TextField tf;
double num1 = 0, num2 = 0, result = 0;
char operator;
public BasicCalculator() {
setLayout(new BorderLayout());
tf = new TextField();
add(tf, BorderLayout.NORTH);
Panel panel = new Panel();
panel.setLayout(new GridLayout(4, 4, 5, 5));
String[] buttons = {"7", "8", "9", "/", "4", "5", "6", "*", "1", "2", "3", "-", "0", "C", "=", "+"};
for (String b : buttons) {
Button btn = new Button(b);
btn.addActionListener(this);
panel.add(btn);
}
add(panel, BorderLayout.CENTER);
setTitle("Calculator");
setSize(300, 300);
setVisible(true);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) { dispose(); }
});
}
public void actionPerformed(ActionEvent e) {
String input = e.getActionCommand();
if (input.charAt(0) >= '0' && input.charAt(0) <= '9') {
tf.setText(tf.getText() + input);
} else if (input.equals("C")) {
tf.setText("");
num1 = num2 = result = 0;
} else if (input.equals("=")) {
num2 = Double.parseDouble(tf.getText());
switch (operator) {
case '+': result = num1 + num2; break;
case '-': result = num1 - num2; break;
case '*': result = num1 * num2; break;
case '/': result = num2 != 0 ? num1 / num2 : 0; break;
}
tf.setText(String.valueOf(result));
} else {
num1 = Double.parseDouble(tf.getText());
operator = input.charAt(0);
tf.setText("");
}
}
public static void main(String[] args) { new BasicCalculator(); }
}
7. Ice Cream Menu (Checkbox)
import java.awt.*;
import java.awt.event.*;
public class IceCreamMenu extends Frame implements ItemListener {
Label label;
Checkbox vanilla, chocolate, strawberry, mango;
CheckboxGroup flavors;
public IceCreamMenu() {
setTitle("Ice Cream Menu");
setLayout(new FlowLayout());
label = new Label("Select your favorite flavor:");
add(label);
flavors = new CheckboxGroup();
vanilla = new Checkbox("Vanilla", flavors, false);
chocolate = new Checkbox("Chocolate", flavors, false);
strawberry = new Checkbox("Strawberry", flavors, false);
mango = new Checkbox("Mango", flavors, false);
add(vanilla); add(chocolate); add(strawberry); add(mango);
vanilla.addItemListener(this);
chocolate.addItemListener(this);
strawberry.addItemListener(this);
mango.addItemListener(this);
setSize(300, 200);
setVisible(true);
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) { dispose(); }
});
}
public void itemStateChanged(ItemEvent e) {
Checkbox selected = flavors.getSelectedCheckbox();
label.setText("You selected: " + selected.getLabel());
}
public static void main(String[] args) { new IceCreamMenu(); }
}
8. Gender Selection (Radio Button)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class SimpleRadioButton extends JFrame implements ActionListener {
JRadioButton male, female;
ButtonGroup genderGroup;
JLabel resultLabel;
public SimpleRadioButton() {
setTitle("Gender Selection");
setSize(250, 150);
setLayout(new FlowLayout());
setDefaultCloseOperation(EXIT_ON_CLOSE);
male = new JRadioButton("Male");
female = new JRadioButton("Female");
genderGroup = new ButtonGroup();
genderGroup.add(male);
genderGroup.add(female);
male.addActionListener(this);
female.addActionListener(this);
resultLabel = new JLabel("Select your gender");
add(male); add(female); add(resultLabel);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
if (male.isSelected()) {
resultLabel.setText("You selected: Male");
} else if (female.isSelected()) {
resultLabel.setText("You selected: Female");
}
}
public static void main(String[] args) { new SimpleRadioButton(); }
}
9. Hobby Selector (Checkbox)
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class CheckBoxDemo extends JFrame implements ActionListener {
JCheckBox music, sports, reading;
JLabel label;
public CheckBoxDemo() {
setTitle("Hobby Selector");
setSize(300, 200);
setLayout(new FlowLayout());
setDefaultCloseOperation(EXIT_ON_CLOSE);
music = new JCheckBox("Music");
sports = new JCheckBox("Sports");
reading = new JCheckBox("Reading");
music.addActionListener(this);
sports.addActionListener(this);
reading.addActionListener(this);
label = new JLabel("Select your hobbies");
add(music); add(sports); add(reading); add(label);
setVisible(true);
}
public void actionPerformed(ActionEvent e) {
String selected = "You selected: ";
if (music.isSelected()) selected += "Music ";
if (sports.isSelected()) selected += "Sports ";
if (reading.isSelected()) selected += "Reading ";
label.setText(selected.trim());
}
public static void main(String[] args) { new CheckBoxDemo(); }
}
General Documents Required
These documents are required for all pilgrims traveling for Hajj or Umrah:
Valid Passport
Passport with at least 6 months validity from the date of travel. Must have at least 2 blank pages for visa stamping.
Note: Passport should be in good condition without any damage.
Download ChecklistPassport Size Photographs
Recent passport size photographs with white background. Women should wear hijab in photos.
Note: Photos should not be older than 6 months.
Photo GuidelinesMedical Certificate
Certificate from a registered medical practitioner confirming fitness for travel.
Note: Must include vaccination records for meningitis and COVID-19.
Download FormNational ID Proof
Aadhaar card, Voter ID, or any other government-issued identity proof.
Note: Self-attested copy required.
ID GuidelinesTravel Insurance
Comprehensive travel insurance covering medical emergencies, trip cancellation, and lost baggage.
Note: Must be valid for the entire duration of your stay.
Insurance RequirementsFlight Tickets
Confirmed return flight tickets with all details clearly visible.
Note: Keep both digital and physical copies.
Ticket GuidelinesHajj Specific Documents
Additional documents required specifically for Hajj pilgrimage:
Hajj Application Form
Duly filled Hajj application form with all details and recent photograph.
Note: Form must be signed by the applicant.
Download FormMeningitis Vaccination Certificate
Certificate proving vaccination against meningococcal meningitis.
Note: Must be administered at least 10 days before travel.
Vaccination DetailsHajj Fee Receipt
Receipt of payment for Hajj fees and other associated charges.
Note: Keep both original and photocopy.
Fee DetailsGroup Documentation
Group registration documents if traveling with a group.
Note: Must include group leader details and group member list.
Group GuidelinesUmrah Specific Documents
Documents required specifically for Umrah pilgrimage:
Umrah Visa Application
Duly filled Umrah visa application form with all details.
Note: Form must be signed by the applicant.
Download FormHotel Booking Confirmation
Confirmed hotel booking details in Makkah and Madinah.
Note: Must include booking reference and dates.
Booking GuidelinesTravel Itinerary
Detailed travel itinerary including flight details and accommodation.
Note: Should include all dates and locations.
Itinerary TemplateDocuments for Women Pilgrims
Additional documents required for women pilgrims:
Mahram Information
Details of Mahram (male guardian) accompanying the woman pilgrim.
Note: Required for women under 45 years of age.
Mahram FormNo Objection Certificate
NOC from husband/father for women traveling without Mahram (if applicable).
Note: Required for women over 45 traveling alone or in groups.
NOC TemplateMarriage Certificate
Marriage certificate for married women.
Note: Self-attested copy required.
GuidelinesDocuments for Senior Citizens
Additional documents required for senior citizen pilgrims:
Detailed Medical Report
Comprehensive medical report from a registered medical practitioner.
Note: Should include all existing medical conditions and medications.
Medical FormMedication Prescription
Valid prescription for all medications being carried during the journey.
Note: Should include generic names of all medicines.
Prescription GuidelinesFitness Certificate
Certificate confirming fitness to perform Hajj/Umrah rituals.
Note: Should be issued by a registered medical practitioner.
Fitness Form