Solved

debug this piece of code

Posted on 2014-04-08
4
195 Views
Last Modified: 2014-04-15
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
Comment
Question by:roy_sanu
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
Wasim Akram Shaik earned 500 total points
ID: 39988185
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
 

Author Comment

by:roy_sanu
ID: 39988198
can we do it from system.out.println i.e
<% System.out.println( "wur= " +
                     pageContext.findAttribute("wur") ); %> but this also do not works
0
 
LVL 16

Expert Comment

by:Wasim Akram Shaik
ID: 39988203
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
 
LVL 27

Expert Comment

by:rrz
ID: 39988990
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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Web Fraud scenarios to PoC F5  web fraud prevention 7 64
pagenation logic how it is working in my code 1 69
mysql jsp example issue 32 69
spring maven example issues 3 38
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question