Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old January 20th, 2006, 02:57 PM
Registered User
Join Date: Oct 2004
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

ok here is my dilemma, i work for a small company and we are working on a order entry system and our java programmer quit. i'm the only other one with any web related skills so i'm trying to pick up where he left off until someone else is hired.

currently http://www.nasinc.com/OEw01Products.java.txt gets a list of currently active products and category codes, etc. http://www.nasinc.com/store_main.jsp.txt is the jsp page which is the front for the store. near the bottom is the for loop i'm trying to make spit out the value of OEw01_prod_descr in a list. right now all its doing is spitting back null. what am i not doing right/ need to fix to get it to return this one value. thanks to anyone that can shed any kind of light on my problem. i'm not pretending to be even close to a beginner at jsp but i just need to fix this part until we hire someone else.
  #2 (permalink)  
Old January 21st, 2006, 07:07 PM
Friend of Wrox
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts

From reading through the Java file, it seems as though OEw01List is an ArrayList of OEw01_Products, which are HashMaps. The JSP seems to retrieve a similarly composed OEw01List from the database. If this is true, then you probably want to change your request.getParameter(...) to something like this:

((HashMap)OEw01List.get(i)).get("OEw01_prod_descr" )

By the way, request.getParameter(...) returns form submission values, not attributes. I don't see a reason you should be using it.

Jon Emerson

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help ASAP coding C# 1 June 6th, 2007 12:41 AM
CAN SOMEONE PLEASEEE HELP ASAP! bravooo Assembly Language 2 December 1st, 2006 04:44 PM
FSO help (ASAP) software_developer_kk Classic ASP Basics 1 April 7th, 2005 08:18 AM
Help ASAP Sheikha ADO.NET 1 September 14th, 2004 07:33 AM
HELP! HELP! Please ASAP iamucha Access 2 March 25th, 2004 11:42 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.