Solved

debug this piece of code

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

A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
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.

790 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