Write an HTML web form and the accompanying servlet for a login
```
```
```
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Login extends HttpServlet {
public void doPost (HttpServletRequest req,
HttpServletResponse res)
throws ServletException, IOException
{
//The content type of the response body
// should be set first
res.setContentType("text/html");
//Get an output stream to write the response body
ServletOutputStream out = res.getOutputStream();
String homepage = "http://www.csc.calpoly.edu/~mliu/",
name = null, password=null;
String theName = "lucky", thePassword="12345";
name = req.getParameter("name").trim( );
password = req.getParameter("password").trim( );
if (name.equals(theName) && password.equals(thePassword))
out.println("
+ "\">\n");
else
out.println("
Sorry, invalid account "+
" information
");}
} //end class
```
You might also like to view...
____ is one of the options available from the Page Layout group on the PRINT PREVIEW tab when previewing how a report will print.
A. Changing page orientation B. Changing the report name C. Adding conditional formatting D. Changing font colors
Answer the following statement(s) true (T) or false (F)
1. The selection of good color is a science. 2. Harmony is objective. 3. When selecting a color for small text, you should select the color that is the complement of your background. 4. When using an analogous color scheme, you need to ensure that your composition does not become bland and visually uninteresting.