my dog learned polymorphism*
The moose likes Servlets and the fly likes Question on Filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Question on Filter" Watch "Question on Filter" New topic
Author

Question on Filter

Ravish Shankar
Greenhorn

Joined: Feb 02, 2007
Posts: 2
Hi all,

Please find below a code I found in onjava regarding a Filter which avoids
multiple submits. Basically it queues the requests and always overwrites the
last request with the current waiting request in queue. Hence even if we
press 10 times, only first and last requests will be filtered. Its a nice
program. .

My question is how can we change this program, so that even the last request
will not be processed ? I do not want the processing to happen even two
times. I want to restrct the processing to only one time.**note that I do
not prefer a Java script client solution **. I tried many ways, but hits
balnk page or some exceptions. Please help ..

Best regards,
Ravi

-------



[ February 04, 2007: Message edited by: Bear Bibeault ]
Ravish Shankar
Greenhorn

Joined: Feb 02, 2007
Posts: 2
Dear all,

Can anyone help on this ? Thanks

Regards,
Ravi
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60767
    
  65

One reason that you may not be getting much help on this is that you posted a large block of unformatted code. Who has the time to wade through all that?

When posting code to the Ranch, please do two things:

1) Pare the code down to the portion that is giving you trouble. If more will be needed to solve the problem, you'll get asked for it.

2) Use UBB code tags to preserve the formatting. Please read this for more info.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60767
    
  65

I went ahead and added the UBB code tags to your post for you. Notice how much better the code is to read?

But it's still a lot of code to slog though...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question on Filter
 
Similar Threads
Facing problem with Filter and RequestDispatcher
HttpServletRequest equivalent on html page
custom tag help
Tomcat servlet-mapping bypass if real file requested
User filter