Bharat Shah

Greenhorn
+ Follow
since Apr 21, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bharat Shah

I resolved the issue by making changes to the table design, where I no longer allow FIELD_THREE to be null. In the table, I fill in any null values in FIELD_THREE with spaces.

That also results in simplified query (the 'is null' check is not required).

Thank you.
First a quick background:

I am trying to create a form where the user can 'browse' records in a table by clicking a <Next> or <Previous> button.

The table has FIELD_ONE, FIELD_TWO and FIELD_THREE as primary key and the browsing is by design based on these three fields with sort order as FIELD_ONE/ FIELD_TWO / FIELD_THREE.

It is possible for FIELD_THREE to have <null> values.


Now, for my problem:

The <Next> button works just fine, even with records with <null> values in FIELD_THREE. Here is the 'script' I use to implement the <Next> logic:



HOWEVER, the <Previous> script does not work. While browsing backwards in a table, it works fine until it reaches a record that has <null> in FIELD_THREE, and then (on clicking <Previous> it skips the record just previous to the record with <null> in it.

Here is the 'script' to implement <Previous>, which is a 'mirror' of that for <Next>:



Any suggestions on what is going wrong?

Thanks in advance.
Thank you for the quick reply.

I was doing all along what you suggest, but it did not yield results - the stack was pointing me in the wrong direction.

Anyway, today I was looking at the place where I am logging database failure activities, and I found my error. I was writing to a file /temp/logfilename, and there is no such directory in a unix system. I changed that to /tmp/logfilename, and voila, everything works as expected.
17 years ago
I need some directions - I developed a simple JSP form to fetch/insert/update/delete records in a simple table, using servlets to handle all database actions. The 'system' works just fine on localhost under Tomcat.

BUT, when I 'deploy' it to JRUN, I get a null pointer error. By 'deploy', I mean, I copied the entire directory structure under my 'root' to the recommended directory under JRUN.

Any hints to correct this will be appreciated.

Thanks in advance.
17 years ago
I am trying to create a program that will support the standard functionality of Add/ Find/ Change/ Delete/ First Record/ Next Record/ Previous Record/ Last Record/ Exit, to begin with for an underlying table having a few simple fields. (The functions (Add/ etc.) could be buttons on the user interface).

I am looking for guidelines to take me on the correct path to develop this using JSP as the user interface and servlets as the back-end that deals with saving and navigation of data. Alternately, using JApplet as user interface and still servlets at the back end. This is so the application will be web-based, and does not require any client side installations.
What I am specifically looking for is how to structure the functions - will there be as many JSPs as there are functions, for example, one for ADD, one for Delete, and so on.

Thanks in advance.
17 years ago
JSP
I am trying to create standard way of storing software objects when using servlets and applets.

When I use the following structure, things work o.k. in that, my applet will be successfully loaded, which in turn calls the servlet successfully:
[my execution call is http://localhost:8080/myapplications/temp (index.html calls callapplet.html)].

HOWEVER, when I move the applet.class file down to temp under WEB-INF, it does not work. I tried various combinations of CODEBASE parameters in the callapplet.html file, but maybe I am missing something - the applet just does not get loaded.

Is there a solution that I am missing or is this a limitation that one has to live with? The reason I am wanting to move the applet.class file down under WEB-INF/classes/temp is to keep all the class files in one place.

Is there an alternative arrangement of directory structure?

Thanks in advance.


[BSouther Edit: added code tags]
[ April 18, 2006: Message edited by: Ben Souther ]
17 years ago
Maybe you have sorted this out by now, but here goes:
I think you should define

as

Regards.
[ June 12, 2002: Message edited by: Bharat Shah ]
[ June 12, 2002: Message edited by: Bharat Shah ]
21 years ago