#Warning Using jstl , I have no idea how to fix it .

77 messages · Page 1 of 1 (latest)

rain bluff
#

This is the warning message that it says :
The TagExtraInfo class for "c:forEach" (org.apache.taglibs.standard.tei.ForEachTEI) could not be
instantiated .

vivid treeBOT
#

This post has been reserved for your question.

Hey @rain bluff! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

rain bluff
#
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Menu</title>
</head>
<body>
    <ul>
        <c:forEach var="item" items="${foodItems}">
            <li><c:out value="${item}"/></li>
        </c:forEach>
    </ul>
</body>
</html>```
#

this is the JSP File 👆

#

This is the Java File 👇

#
import jakarta.servlet.RequestDispatcher;
import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;


@SuppressWarnings("serial")
@WebServlet("/FoodCart")
public class FoodCart extends HttpServlet {
    
    
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        
         //get the data from the database(model)
        String[] foodItems = {"Biryani","Pizza","Pasta","Butter_Chicken","Fried_Rice"};
        request.setAttribute("foodItems", foodItems);
        
        //redirect to a different page(view)
        RequestDispatcher dispatcher = request.getRequestDispatcher("show-food.jsp");
        dispatcher.forward(request,response);
    }

}```
clever kite
#

You are using Jakarta EE

clever kite
#

Also make sure your web.xml is using Jakarta EE specs/schema

rain bluff
clever kite
#

Jakarta EE works, you just need different URLs in the JSP files

#

Java EE has been replaced by Jakarta EE

rain bluff
#

i'll show what error i get when i use Jakarta URI

#

so can i use this ? :
http://jakarta.ee/jstl/core

clever kite
#

yes

#

something like that

rain bluff
#

now look at the error , idk what it means , but ig we cant use it right ?

clever kite
#

ok that URL isn't correct

#

maybe the old one was fine

rain bluff
clever kite
#

Can you show your web.xmk?

#

web.xml*

rain bluff
#

I haven't done anything in my web.xml , but this is how it looks :

clever kite
#

hm, that looks correct

rain bluff
#

I have been trying to search for a fix for this for over 8 hours now , but I am just exhausted at this point . I don't know what should i do 🥺

#

it's not even a big code , it's just a small tag , and i am stuck here

clever kite
rain bluff
clever kite
rain bluff
clever kite
#

set that to ignore

rain bluff
clever kite
rain bluff
#

Windows -> Prefernces -> JSP -> Validation

clever kite
#

try right-clicking on the project and selecting properties

#

Does that also have JSP > Validation?

rain bluff
#

i only see JSP Fragment

#

you mean this ?

clever kite
# rain bluff

or click the configure project specific settings link there

rain bluff
clever kite
#

or by searching for Validation

rain bluff
#

Validation is there , but not JSP Validation

clever kite
#

Is there any other JSP option?

clever kite
#

Also which Eclipse version are you using?

rain bluff
clever kite
clever kite
rain bluff
clever kite
#

if you delete the c:forEach and add it again, the error still appears, right?

rain bluff
#

i deleted and re-typed it , now it dosen't show error

#

But there isn't output as well 😭

clever kite
#

Is there a stack trace?

rain bluff
#

I will be switching off for now , i will come back online later , If you find any fix later , please let me know . Thank you for the help so far

vivid treeBOT
vivid treeBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

vivid treeBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

clever kite
#

something like

An uncaught exception occured in thread xyz: java.lang.NullPointerException
  at com.example.SomeClass.someMethod (SomeClass.java:1337ö
  ...
vivid treeBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

rain bluff
#

i thank you for your help 🙂

vivid treeBOT
# rain bluff i thank you for your help 🙂

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.