Mujir Shaikh

Greenhorn
+ Follow
since May 18, 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 Mujir Shaikh

Besides implementing Listener for the Object being kept in Session (which would clear the Object on Session Timeout), you can also catch Window Closing Event of Browser.
Though there is not direct way to catch this, what you can do is always submit thru a common script. Also keep a Javascript Variable for the Main Frame JSP. Set this Main Frame JSP Variable to 'y' in your individual JSPs before submitting each Form.
Catch window.unload Event for each Window and inside the function, check if the Variable is 'y'. If it isnt, it means
1) User has closed Browser Window,
2) User has types some other URL in Browser, in short hes leaving the site without logging out or
3) User has pressed Browser 'BACK' Button.
You can submit a Form to server with a particular hidden field set, and on Server-side check if this hidden value is set. If it is, you can clear Server Variables and invalidate the Session.
Hope that helps. You can contact me if you have some questions (bobby_oberai@hotmail.com)
21 years ago
I m having a hidden field which maps to an Action Form Bean Field (I have used <html:hidden> tag for this). If I set any values in this html hidden field via Javascript, the values are not passed to the Form Bean.
Any help on this?
21 years ago
Hi Mike,
This would happen if the JDBC Server is not up. Start the JDBC Server and rerun your program. It should work fine.
You will have to integrate your Applicationb Server with JProbe. JProbes site(www.sitraka.com) is quite clear on how to do this.
After you have completed steps for integrating your Server with JProbe, start JProbe Coverage (or Profiler or Quantify). Now start your Server. JProbe will automatically detect the Server which is on and start profiling it.
You can now send your web requests on your Server and JProbe will find out what parts of your code have been covered by it.
Hope that helps.
21 years ago

Originally posted by Bill Walker:
I have a String field with date of birth in it like this: "10161953". I need to convert it to a database Date field that looks like this 10/16/1953. How do I do it so my preparedStatement doesn't bomb?


To Convert a String to a Date Object, use parse() Method of java.text.SimpleDateFormat Object.
try the following code for your case:
String dateStr = "10161953";
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("ddMMyyyy");
java.util.Date dt = sdf.parse(dateStr);
Hope that helps.
21 years ago
Hello,
I have a Web Application, Websphere on AIX, using Servlets/JSP/Beans. Its uses Struts Framework.
If a request is taking a too long to execute (around 2 minutes) (say some DB Query is running for a long time), Internet Explorer (5.0) is automatically RESUBMITTING the request. I can see in Websphere's log that the same request has been received twice. Also Browser shows it is resubmitting the request (from Status Bar). Currently there is no Clustering being done. We are operating on Single Servers.
Any Ideas?
Your suggestion is absolutely correct Kyle. I thought of the same things before deciding to move onto Pessimitic Locking.
The first option I thoguht was managing the locking programmatically (timestamps/flags). But the stage of the project I am in, I cannot afford to spend time on coding (some things r beyond our control, business matters!).
Easiest way out was to use Pessimistic Locks (not much of work, but def. a big problem & bad design, if the user session times out, or server goes down).
But I was just thinking if it is possible to do this cleanly using Pessimistic Locks. For eg. something like we start a service on another machine which takes the SessionId and returns the Connection Object (no need for Connectiomn Object to be Serializable and our problem of Server Failure is solved). But then if this one Machine returning the Connection Object goes down, its a problem.
Any similar ideas/suggestions? I would still try to convince the Client to give time to implement Optimistic Locking, but if it isnt possible, any ideas?
22 years ago
I am not very sure, but I think the IDBDriver is used to access the Internal DB that comes with Websphere for storing its Configuration etc. If you are getting this error, I think things have not been installed properly.
22 years ago
Hi Folks,
Sorry for repeating the post here, but this is for the DB Guys esp.
I have a requirement that I acquire locks on Rows while a user is updating some fields on a Web Page (Intranet). Now the Issue is that this DB Lock should be removed only after he finishes his operations on 5-6 pages i.e. I acquire Locks on DB thru setting Transaction Isolation Levels and my DB Transaction is spread across 5-6 HTTP Requests!! How do I go about this?
One idea is to put the Connection Object in HttpSession and commit the Transaction after the 5-6 Pages. But Connection Object is not Serializable, so in case of Server Failure, safe fail-Over is not possible.
Any ideas on this guys?
Hi Folks,
I have a requirement that I acquire locks on Rows while a user is updating some fields on a Web Page (Intranet). Now the Issue is that this DB Lock should be removed only after he finishes his operations on 5-6 pages i.e. I acquire Locks on DB thru setting Transaction Isolation Levels and my DB Transaction is spread across 5-6 HTTP Requests!! How do I go about this?
One idea is to put the Connection Object in HttpSession and commit the Transaction after the 5-6 Pages. But Connection Object is not Serializable, so in case of Server Failure, safe fail-Over is not possible.
Any ideas on this guys?
22 years ago