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:
\_________________________________________
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:
- " + langsTemp + " ");
String[] langs = request.getParameterValues("Publisher");
if (langs !=null){
for (String langsTemp : langs){
out.print("
}
}
%>
Copy: ${param.color}
Subject:
- " + langsTemp1 + " ");
String[] langs1 = request.getParameterValues("radio");
if (langs !=null){
for (String langsTemp1 : langs1){
out.print("
}
}
%>
Price: ${param.Price}
-------------------------------------------------------------------------------------------
MY HTML CODE:
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">
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
