Jump to content

problem with jstl code in spring application

so i am getting this error while trying to return a .jsp page and keep getting this error but if i remove the ${result} the page is displayed fine.

image.thumb.png.2324e277337f5bbe4018a337d9256a46.png

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1" isELIgnored="false"%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Addition result</title>
</head>
<body>
    <p>The result of addition: ${result} </p>
</body>
</html>

Any idea why this is happening ? am i missing some dependencies?

Link to comment
Share on other sites

Link to post
Share on other sites

Been a hot minute since I've seen a JSP, but my guess is that your result is null. You may need to add the JSP equivalent of an If or make sure that result is initialized before the page is sent to the user.

 

I could be 100% out to lunch on this though.

CPU: Intel i7 - 5820k @ 4.5GHz, Cooler: Corsair H80i, Motherboard: MSI X99S Gaming 7, RAM: Corsair Vengeance LPX 32GB DDR4 2666MHz CL16,

GPU: ASUS GTX 980 Strix, Case: Corsair 900D, PSU: Corsair AX860i 860W, Keyboard: Logitech G19, Mouse: Corsair M95, Storage: Intel 730 Series 480GB SSD, WD 1.5TB Black

Display: BenQ XL2730Z 2560x1440 144Hz

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×