Make a class named main.java

Assignment Help JAVA Programming
Reference no: EM13768512

Make a class named Main.java after through the following steps. From step: 10 is related to your Main.java. Copy/paste your Main.java under the word:

1. Make an empty folder for eclipse.

2. Make a server (Tomcat v7.0 Server).

3. Make a dynamic project named: Project

4. Make an html document in eclipse named: Main.html.

5. Replace the content of Main.html by the following:

<<!-- Main.html. Do not change this html document -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>To display name and age</title>
</head>
<body>
<form action="https://localhost:8080/Project/Main" method = "get">
Enter Your Name: <input type="text" name="yourName"><br>
Enter Your Age&nbsp;&nbsp;&nbsp;&nbsp;:<input type="text" name="yourAge"><br>
<input type="submit" value="Click to submit">
</form>
</body>
</html>

6. Make a servlet named: Main.java.
7. Replace the class Main.java by the following.
Note: Only replace the class Main.java. Everything else is intact.

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.util.Enumeration;

@WebServlet("/Main")
public class Main extends HttpServlet {
private static final long serialVersionUID = 1L;
public Main() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse
response) throws ServletException, IOException {
Enumeration<String> names = request.getParameterNames();
String name = (String)names.nextElement();
String value = request.getParameter(name);
String name2 = (String)names.nextElement();
String value2 = request.getParameter(name2);
System.out.println(value + " " + value2);
}
}

Reference no: EM13768512

Questions Cloud

Write an analysis essay on challenging veteran stereotypes : Write an Analysis Essay on Challenging Veteran Stereotypes by Ken Harbaugh. Introdation: Text, audie nce, purpose, genre, context, kairos. Thesis statement, effective or not?
The elimination of the domestic currency : Dollarization is when residents of a foreign country use the U.S. dollar alongside or instead of the domestic currency
Describe the flow of resources from one entity to another : Describe how each of these activities affects government, households, and businesses. Describe the flow of resources from one entity to another for each activity. Relate at least one current event to the activities.
Biology should be applied to a criminal investigation : Provide 2 significantly different examples where forensic biology should be applied to a criminal investigation. Justify your examples
Make a class named main.java : Make a class named Main.java after through the following steps. From step: 10 is related to your Main.java. Copy/paste your Main.java under the word:
By using r code : By using R code, Data on last year's sales ( y, in 100,000s of dollars) in 15 sales districts are given in the file sales. This file also contains promotional expenditures(x1, in thousands of dollars), the number of active accounts(x2), the number of..
Create a scenario in which you explain the overall manner : Create a scenario in which you explain the overall manner in which these functions interact. Justify your response with examples.
Research the affordable care act : Using the internet, research the Affordable Care Act. Summarize the intent of the law, as well as some of the controversy surrounding it. Specify how your state has adapted to this new policy
Differences between a t test and an f test : Explain the differences between a "t" test and an "F" test. In other words, under what circumstances, would a researcher uses the F test over the t test

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd