• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 294
  • Last Modified:

debug this piece of code

Hi,

I would like to debug this piece of code in the jsp whether value available or not


Alert does not work on it



<c:forEach var="sur" items="${UserProfile.UserRights}">
        <tr>
          <td><input type="checkbox" name="RightKey" value="${sur.UserRightKey}" checked="checked" /></td>
          <td>${sur.descrip}</td>
        </tr>      
      </c:forEach>

Thank you
0
roy_sanu
Asked:
roy_sanu
  • 2
1 Solution
 
Wasim Akram ShaikCommented:
as you said JSP, one way to debug is to set log on server level and check the output in server.log while invoking the jsp from browser.
0
 
roy_sanuAuthor Commented:
can we do it from system.out.println i.e
<% System.out.println( "wur= " +
                     pageContext.findAttribute("wur") ); %> but this also do not works
0
 
Wasim Akram ShaikCommented:
yes.. then it means.. control is not coming to that place.. then do place the system.out.println before the statement

--<c:forEach var="sur"---
0
 
rrzCommented:
What does your server send to the browser? Look at the source code that the browser receives.
To start debugging, on your JSP, before you start using JSTL, I would try using  
First descrip is  ${UserProfile.UserRights[0].descrip}   

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now