This week's book giveaway is in the Web Services forum.
We're giving away four copies of Microservices in Action and have Morgan Bruce & Paulo A. Pereira on-line!
See this thread for details.
Win a copy of Microservices in Action this week in the Web Services forum!

John Lark

Ranch Hand
+ Follow
since Feb 08, 2010
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by John Lark

Okay, thanks for the clarification. I'll revisit the article when I have time.
4 years ago
That's correct I read this "Sets do not have any particular order" and moved on.
4 years ago
Hi all,

I couldn't find the Set implementation that kept its order. In the end I decided it would be easier just to use an array list. Thanks for your replies everyone!
4 years ago
I call a set of numbered results form the database. They results are returned in order lets say 1-10. When I get the results back I use a while loop to add them to a result hash set. However, if I look at the contents of the hash set it shows the numbers out of order like:

1-6-2-7-3-8-4-9-5-10

Notice how 1-5 are shown every other entry and then 6-10 every other entry.

Why is the Set<T> reordering my results? Is there a way to prevent this?
4 years ago
Hey,

I have a login problem with my Struts 1.1 Web Application. When a user logged into my web application navigates away from the webpage and then comes back their login information which is stored in the session is still active. Is there a way to remove my applications login information from the users session when they navigate away from the site?

Thanks,
5 years ago
Okay so that works, I implemented something similar but instead of using a max interval I am storing a current time value then using a series of if statements to determine if my refresh cycle has expired. Seems to be working.

Thanks guys!
5 years ago
JSP
Sorry to break this open again after a month. My first attempt was to simply decrease the number of SQL connections made to the database, but if the user hammers the refresh they can still reproduce the issue. I haven't been able to figure a good way to handle it on the client side, most of the internet seems to be struggling with resubmitting information through a form my problem comes when loading the page with information from the database. Gaurav if you had a link to some documentation that would better explain your suggestion I would appreciate it. I would like to do like Source Forge does, if you hit the refresh too many times too fast they deny you access to the server. Can that be handled by the application? Tomcat? Is that going to require a third party app?
5 years ago
JSP
Hello all,

I have a struts web application that is giving me a problems. I recently came across a problem where if the user hit F5 multiple times it would cause an out of memory SQL exception. I found the issue and resolved the situation, however I want to ensure that this won't happen again even if something gets done incorrectly. I have been told that its possible to ignore the refresh if someone hits it multiple times in a short period. However, I can't seem to find any good documentation on how to do anything but disable the F5 button in IE and Firefox. Can someone help me with resources? Or Confirm that it simply isn't possible. I see a lot of mixed answers some indicating it is possible and then others that its not. I am under the impression that it can kind of sorta be done in certain browsers under specific situations, but nothing fool proof. Just trying to exhaust my resources before I give up on this one.
5 years ago
JSP
Hey Everyone,

I am modifying an RPM that previously ran in 32 bit Centos to 64 bit Centos. Previously I would create a folder i386 (drwxrwxrwx) and write a couple files to it. This worked fine, then I changed the name of the folder I was creating to x86_64, and when I attempt to write to it I receive an error informing me its not a directory. When I do an ls -al I get -rwxrwxrwx... however I am using the same line syntax "mkdir -p %{_topdir}/RPMS/x86_64 or /i386" Is this related to the underscore? Is their a way to compensate here? I feel like this shouldn't be an issue. Also as a side NOTE before the Linux gurus freak out I am not a actually using rwxrwxrwx it just to hopefully better illustrates that the d is missing.

Thanks guys!
6 years ago
Sorry forgot to come back to this, we ended up redirecting the user to an error page using a configuration in the web.xml! Thanks for the responses!
6 years ago
Hey Guys,

So I have two struts applications running each are using roles as entries in the struts-config.xml file. In one application the user is redirected back to the index page and forwarded to my login page. My second application just throws up a completely blank page with nothing on it!? I am trying to figure out how to make the first application react like the second one. So I am basically asking if their is a way to specify the page that the application is redirected to when a user try's to access a link without having the proper role. Their must be for the first application to work but I can't seem to find where the key piece is.
6 years ago
Perhaps this is not correctly entitled but I couldn't figure out a better way to say it. I have a process page to perform calculations when leaving a specific page in my web application. When the user calls my process page directly by pasting a link that they copied or saved earlier I get an error because their is no button to map ergo the class does not know what method to call and I recieve an error 500. Is their a default Method I can set in this ActionFoward class that will be called by default which could allow me to control where the customer ends up?
6 years ago
War B is HTTPS, and we don't want to install the cert on the server.
7 years ago
I am running kind of a weird rig. I have two different pieces to my application on the same machine running in different war files, I needed War A to tell War B to reset his database connection. So in this situation it will all run on one machine.
7 years ago
Fair enough! I found my problem I ran a netstat -a and realized that the port that my Socket Server was supposed to be listening on wasn't there. I had miss-understood when the Socket Server was getting created, so my Client was trying to talk to it too soon!

Thanks,
7 years ago