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

  Create a pair of programs a client and a server to

create a pair of programs a client and a server to distribute the functions of the library you developed. the client

  Fixing errors in a java program

You coded the following on line ten of the class MyApplet.java:

  What is an illustration of a javascriptr framework in the

what is an example of a javascriptr framework? in the framework you have described what is an example of an application

  Array named peopletypes that can store a maximum

Define a 1-D array named peopleTypes that can store a maximum of 50 integer values that will be entered at the keyboard. Enter a series of 1's, 2's, 3's and 4's into the array, where a 1 represents an infant, a 2 represents a child, a 3 represents..

  Your technical leader has submitted additional requirements

a - your technical leader has submitted additional requirements for your application. you have been asked to enhance

  Create an application that keeps tracks of the information

Create an application that keeps tracks of the information in such a simple social network. More specifically, your application will allow for user profiles to be added to, deleted from, or looked-up in the social network.

  Portable file system implement a portable file system with

implement a portable file system with java language. i do have some requirements.implement a portable file system pfs.

  Develop an app that generates a random number

Develop an app that generates a random number and prompts the user to guess the number - When the user clicks the New Game Button, the app selects a number in the range 1 to 100 at random.

  Object from question 1 manage its display

Write a Java statement to have the object from question 1 manage its display area by dividing it into 3 rows which have 4 columns each.

  Declare a string variable named empty

Declare a string variable named empty, and initialize it to the empty string.

  How to read data in a link list

How to read data in a link list?

  Write a version of sumpairs

Write a version of sumPairs  that sums each component of the pairs separately, returning a pair consisting of the sum of the first components and the sum of the second components. So basically [(3,1)(10,3)] would return (13,4).

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