Solved

debug this piece of code

Posted on 2014-04-08
4
169 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Introduction (All good things must come to an end (http://en.wikipedia.org/wiki/All_Good_Things...)) The original MySQL API (http://php.net/manual/en/book.mysql.php) has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all curre…
Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now