Solved

debug this piece of code

Posted on 2014-04-08
4
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
contractual requirements for app hosting 3 125
web application structure 18 128
junit initializtion error 2 18
JVM error from eclipse 1 23
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…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

738 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