This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to hit the servlet continously?  RSS feed

 
Shanmugam nagaraj
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How to hit the servlet continously 50 times...
Any sample program you have please help me out...

this is the actuall thing is there but I need to hit this servlet for 50 times
response.sendRedirect( url);
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on your requirements, it could be as simple as



I'm not sure what it has to do with redirects, though.
 
Shanmugam nagaraj
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ulf Dittmer
But
Actually I need to hit that url concurrently not one after another, so I came to the loadbalancing in going properly in the weblogic... this is the concept.
 
Freddy Wong
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then maybe you can spawn a number of threads and have those threads hit your servlet concurrently.
[ August 14, 2007: Message edited by: Freddy Wong ]
 
Akhilesh Trivedi
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Freddy Wong:
Then maybe you can spawn a number of threads and have those threads hit your servlet concurrently.

[ August 14, 2007: Message edited by: Freddy Wong ]


Yes! That should help.
[ August 14, 2007: Message edited by: Akhilesh Trivedi ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For any load simulation more complex than a simple GET, consider the HttpClient toolkit - here is the home page.

Bill
 
Shanmugam nagaraj
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks I got an idea what all are the steps to achive this,

Can any body give me sample thread program to achive this ...
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't like to just post ready-to-run programs here at JavaRanch. We prefer for members to come up with their own solutions, and help them get there.

Are you familiar with threads? Can you create code that uses one thread to access a URL? If not, you might want to start by going through Sun's concurrency tutorial.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!