Question 1

You are required to write the code for sevlet which will take username and password from the html file and matches with database which contains two columns; one for username and other for password.

Providing correct information leads to welcome page otherwise to a login page again.

You are required to write the code for servlet only.

Question 2

Consider the following way for defining initialization parameters of servlet in web.xml.

<init-param>

<param-name> userName </param-name>

<param-value> admin </param-value>

</init-param>

<init-param>

<param-name> password </param-name>

<param-value> vu </param-value>

</init-param>

You are required to write the two ways for reading initialization parameters from web.xml and display its value on html file.

Question 3

You are required to write the XML equivalent tags for the following elements of JSP (Java Server Page).

1)

  <%!

      String str ;



      public String concatenateStr(String s1, String s2){

        return s1+s2 ;

      }

  %>

2)

  <%

      String s1= request.getParameter(“str1”);

      String s2= request.getParameter(“str2”);

      str = concatenateStr(s1, s2);

  %>

3)

<%@page import = “java.util.*” %>

Did you have a question?

We are not here to do your homework/quizzes for you.

Welcome mc080201812.

Before you post anything you must read How to post your problem & source code?

Source code must be surrounded with BB code tags.

Your post must be moved to JSP forum.

So from what you have read, that was the problem with mc080201812's post. Not using code tags

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.