Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to access the status code  RSS feed

 
murali ganesh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
i am a little new to this topic. i have a list of link in my database based on some services. when the user wants to select a service i want to check if the current links are up i.e if the page is not found(status code=404). how can i check it? please help me out guys
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66188
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From a JSP? Not the best place to be doing anything but creating HTML.

In a servlet or some other Java class, you can use the classes in java.net to poll the URL to see if it is "live".

I've moved this post to a more appropriate forum.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!