Question: I USE JAVA EE WITH SERVER AND TOMCAT 9 TO EXECUTE THIS CODE; MY QUESTION IS HOW CAN I USE IF AND ELSE STATEMENT IN

I USE JAVA EE WITH SERVER AND TOMCAT 9 TO EXECUTE THIS CODE; MY QUESTION IS HOW CAN I USE IF AND ELSE STATEMENT IN "ISBN" INPUT > IF "ISBN" == NUL THE MESSAGE APPEARS" ISBN IS REQUIRED"

My JSP code:

\_________________________________________

Library Confirmation

The book has been added:


Book Title: ${param.BookTitle}


Author: ${param.Author}


ISBN: ${param.ISBN}

    String[] a = request.getParameterValues("Publisher");

    if (a == null){

    out.print("2222");

    }

    %>


Publisher:

    String[] langs = request.getParameterValues("Publisher");

    if (langs !=null){

    for (String langsTemp : langs){

    out.print("

  • " + langsTemp + "
  • ");

    }

    }

    %>

Copy: ${param.color}


Subject:

    String[] langs1 = request.getParameterValues("radio");

    if (langs !=null){

    for (String langsTemp1 : langs1){

    out.print("

  • " + langsTemp1 + "
  • ");

    }

    }

    %>

Price: ${param.Price}


-------------------------------------------------------------------------------------------

MY HTML CODE:

Library Registration Form

body, html {

height: 100%;

font-family: Arial, Helvetica, sans-serif;

}

* {

box-sizing: border-box;

}

/* Add styles to the form container */

.container {

position: absolute;

right: 0;

margin: 20px;

max-width: 300px;

padding: 16px;

background-color: white;

}

/* Full-width input fields */

input[type=text], input[type=BookTitile] {

width: 100%;

padding: 15px;

margin: 5px 0 22px 0;

border: none;

background: #f1f1f1;

}

/* Full-width input fields */

input[type=Submit] {

position:fixed;

bottom: 0;

right: 630px;

width: 200px;

height: 50px;

font-size: 18px;

border: 3px solid #93AD41

}

input[type=text]:focus, input[type=Author]:focus {

background-color: #ddd;

outline: none;

}

/* Set a style for the submit button */

.btn {

background-color: #04AA6D;

color: white;

padding: 16px 20px;

border: none;

cursor: pointer;

width: 100%;

opacity: 0.9;

}

.btn:hover {

opacity: 1;

}

"viewport" content="width=device-width, initial-scale=1">

Wellcome to Montreal Library

"room41.jpg" alt = "Wellcome to Justine equipment Compnay" width = "1390">

"2.jsp">

Book Title: "text" name = "BookTitle"/>


Author: "text" name = "Author"/>


ISBN: "text" name = "ISBN"/>


"Publisher" list = "Publishers" placeholder = " Publisher">

"Publishers">


"color" type = "radio" value = "Hardcover" > Hard cover

"color" type = "radio" value = "PaperBack" > Paper Back



Subject:

"checkbox" name = "radio" value = "Classic" > Classic

"checkbox" name = "radio" value = "Fantasy" > Fantasy

"checkbox" name = "radio" value = "History" > History

"checkbox" name = "radio" value = "Horror" > Horror



Price: "text" name = "Price"/>


"Submit" value = "Add Book" >


Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!