File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes [U]Problem retrieving values from a database in a seating arrangement web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "[U]Problem retrieving values from a database in a seating arrangement web application" Watch "[U]Problem retrieving values from a database in a seating arrangement web application" New topic
Author

[U]Problem retrieving values from a database in a seating arrangement web application

Sridhar Venkataraman
Ranch Hand

Joined: May 22, 2006
Posts: 76
Hi all,

I'm going to spill all the beans here so that the post is as informative as possible.

I am building a JSP application which is supposed to dynamically render floor plans. This basically means that I read some coordinates off of a database and place corresponding pictures in the pages that render so the pictures make up a floor plan.

I started off by making the first page, which is index.jsp. This page asks the user to select a floor. The dropdown list is populated with values from a database which holds the configured floor numbers in a table. The code for this page is here


All requests in the app are handled by a servlet named SeatPlanRequestServlet.java


I have checked and rechecked the database queries that I am using to find out these values, and they work correctly in the mySQL query browser. The "floorselected" parameter is also being set and passed successfully. There are no exceptions being thrown anywhere by any of the code which deals with the database.

I tried replacing the datamanager method calls with hardcoded values, and I still get the same result. This means that somehow the calls to datamanager are not producing the expected results, and I don't know why because the very same datamanager works fine when invoked in the index.jsp page.

All the database properties are set in the web.xml file, and they work because I was successfully able to populate the drop down list in the index.jsp page with floor numbers that were obtained by querying the database.

I am stuck with this error and cannot proceed with this application. I'd greatly appreciate some guidance on why this is happening. If any more information is needed, I'd be more than happy to provide it.

Thanks all for your patience in reading this. If the error seems amateurish, I beg your pardon because I'm a novice.

[ January 13, 2008: Message edited by: Sridhar Venkataraman ]

[ January 13, 2008: Message edited by: Sridhar Venkataraman ]

[ January 13, 2008: Message edited by: Bear Bibeault ]

[ January 13, 2008: Message edited by: Sridhar Venkataraman ]

[ January 15, 2008: Message edited by: Sridhar Venkataraman ]
[ January 15, 2008: Message edited by: Sridhar Venkataraman ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Sridhar,
While I'm sure this post does contain all the information, it actually contains too much information. On my computer, it is 17 screens long. This is a lot to ask a volunteer to read to get to the bottom of the problem.

If you don't get any replies, here's a bit of advice: try to come up with a smaller version of the app that demonstrates the same problem. For example, "I call the following sql/JDBC code with these parameters and it returns an unexpected value" or "the following JSP doesn't pass the expected parameters to my servlet."

This will help you isolate the problem (which you may have done - I didn't read the whole 17 screens), provide initial debugging steps and give a manageable chunk of problem to readers.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

In addition to paring down the problem to as few lines as demonstrate the issue (please read this for more information.), please be sure to take the time to compose descriptive subjects for your posts; read this for more information. " A problem that's puzzling me" could be anything!
[ January 13, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sridhar Venkataraman
Ranch Hand

Joined: May 22, 2006
Posts: 76
I normally do keep things as short as possible. However, in this app there are so many linkages that I will invariably get people asking me questions about what a particular class/page does, or elaborate on the code for a page etc.

It did look ugly to me even

Let me do something to make the topic much more readable. Let me outsource the code and link it up here. The official java forums have a scrolling mechanism for code posts, which is why I linked to a topic I started there in a prior thread. But that was disallowed.

[ January 13, 2008: Message edited by: Sridhar Venkataraman ]
[ January 13, 2008: Message edited by: Sridhar Venkataraman ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [U]Problem retrieving values from a database in a seating arrangement web application
 
Similar Threads
Error with my web.xml configuration?
Error while setting values from a database to a drop down list
Creating a HTML table to display values from a database
HTML hyperlink problem
Package error while compiling servlet