User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 401,512 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,332 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 725 | Replies: 3
Reply
Join Date: Mar 2008
Posts: 3
Reputation: mehmedovic is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mehmedovic mehmedovic is offline Offline
Newbie Poster

Help jsp help

  #1  
Mar 23rd, 2008
Hello i created this and i dont know how to debug it because when ever i create a script the part i hate is teh debuging so can some one please help me out and thank you very much
-->
  1. <HTML>
  2. <HEAD>
  3. <TITLE>JSP Debugging</TITLE>
  4. </HEAD>
  5.  
  6. <BODY>
  7. <% import java.io.*; %>
  8. <% import java.util.Date; %>
  9. <% import java.util.Enumeration; %>
  10.  
  11. <%
  12. response.setContentType("MIME");
  13. Date today = new Date(12,20,2004);
  14.  
  15. Date created = new Date(session.getCreationTime());
  16. Date lastAccessed = new Date(session.getLastAccessedTime());
  17.  
  18. out.print("<h1>Today is " );
  19. out.print(today);
  20. out.print("</h1>" );
  21. out.print("This session has the following characteristics:<br>" );
  22. out.println("<br>ID: ");
  23. <%= session.getId(); %>
  24. out.println("Created: " + created);
  25. out.println("Last Accessed: " + lastAccessed);
  26. out.println("<br>Max Inactive Interval: " +
  27. session.getMaxInactiveInterval());
  28. %>
  29. </BODY>
  30. </HTML>
Last edited by WolfPack : Mar 23rd, 2008 at 3:33 am. Reason: Added code tags. Use them when you post code.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2008
Posts: 3
Reputation: mehmedovic is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
mehmedovic mehmedovic is offline Offline
Newbie Poster

Question jsp debuging

  #2  
Mar 23rd, 2008
hello i just debuged this so can some of you check if there is any bugs left adn if there are can you please fix them thank you
  1. <HTML>
  2. <HEAD>
  3. <TITLE>JSP Debugging</TITLE>
  4. </HEAD>
  5. <BODY>
  6. <% import java.io.*; %>
  7. <% import java.util.Date; %>
  8. <% import java.util.Enumeration; %>
  9. <%
  10. response.setContentType("MIME");
  11. Date today = new Date(12,20,2004);
  12. Date created = new Date(session.getCreationTime());
  13. Date lastAccessed = new Date(session.getLastAccessedTime());
  14. out.print("<h1> Today is " );
  15. out.print(today);
  16. out.print("</h1> " );
  17. out.print("This session has the following characteristics:<br> " );
  18. out.println("<br> ID: ");
  19. <%= session.getId(); %>
  20. out.println("Created: " + created);
  21. out.println("Last Accessed: " + lastAccessed);
  22. out.println("<br> Max Inactive Interval: " +
  23. session.getMaxInactiveInterval());
  24. %>
  25. </BODY>
  26. </HTML>
Last edited by peter_budo : Mar 24th, 2008 at 5:20 am. Reason: Keep It Organized - please use [code] tags
Reply With Quote  
Join Date: Dec 2004
Location: London or Slovakia
Posts: 2,218
Reputation: peter_budo is a jewel in the rough peter_budo is a jewel in the rough peter_budo is a jewel in the rough 
Rep Power: 10
Solved Threads: 270
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: jsp help

  #3  
Mar 24th, 2008
In the future please do not flood the forum with new threads related to same topic, just simply post bellow original and state the changes you made.
In case of posting code inside post please use [code] tags, if you have problem to use just click on message Help with Code Tags in any of the posts that have highlighted code and you will see quick tutorial
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

If we helped you to solve your problem, answered your question please mark your post as SOLVED.
Reply With Quote  
Join Date: Nov 2004
Location: Netherlands
Posts: 5,693
Reputation: jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough jwenting is a jewel in the rough 
Rep Power: 18
Solved Threads: 195
Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: jsp help

  #4  
Mar 24th, 2008
I wonder why the kid is using println statements for his html tags in a JSP...
He shouldn't of course be using ANY Java code at all, but this is the most extremely silly JSP code I've ever encountered (and I've encountered reams of it over the last decade).
42 Private messages asking for help will be ignored
In the frozen land of Nador they were forced to eat Steve's iMinstrels, and there was much rejoicing.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JSP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 2:48 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC