Package com.jk.web.servlets
Class JKJspUtil
java.lang.Object
com.jk.web.servlets.JKJspUtil
This class provides utility methods for use within Jakarta Server Pages (JSP)
 in a Java application.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionintThis method retrieves the current year.booleanThis method checks if a file with the given fileName exists.getPath()This method retrieves the path of the request's URL.booleanisMobile()This method checks if the user is accessing the application from a mobile device.list(int size) This method generates a list of integers from 0 to `size - 1`.static voidThis main method demonstrate the live random value.This method reloads and returns a random value. 
- 
Constructor Details
- 
JKJspUtil
public JKJspUtil()This method constructs a newJKJspUtil. 
 - 
 - 
Method Details
- 
reloadRandom
This method reloads and returns a random value.- Returns:
 - a random value.
 
 - 
currentYear
public int currentYear()This method retrieves the current year.- Returns:
 - the current year.
 
 - 
getPath
This method retrieves the path of the request's URL.- Returns:
 - the path of the request's URL.
 
 - 
exists
This method checks if a file with the given fileName exists.- Parameters:
 fileName- Specifies the name of the file to check.- Returns:
 - true, if the file exists, false otherwise.
 
 - 
isMobile
public boolean isMobile()This method checks if the user is accessing the application from a mobile device.- Returns:
 - true, if the request is from a mobile device, false otherwise.
 
 - 
main
This main method demonstrate the live random value.- Parameters:
 args- the command-line arguments.
 - 
list
This method generates a list of integers from 0 to `size - 1`.- Parameters:
 size- Specifies the size of the list.- Returns:
 - a list of integers.
 
 
 -