Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

403 error in URL.openStream()  RSS feed

 
Galen Palmer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is less, a servlet question than a URL question, but I hope to implement the solution in my servlet. If there is a more appropriate forum please let me know...

I have a web application where the user can enter the URL of their blog or web page for their profile. In the validator for the EditProfileServlet class that I've created, I try and verify that the URL that they have entered is valid. I'm using code like this:



This has worked live without errors for a year or so, but suddenly I have a user who can not validate his blog. The error returned indicates that it's a 403 error. However, I can go the URL with my browser and see their blog without issues.

Can someone think of a situation where the web page would be visible to my browser but not to a servlet? (I've tested this locally, so the browser and the servlet are both sending the request from the same physical computer)
 
Galen Palmer
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, I just had a brainstorm and looked for the site's robots.txt file which reads:

User-agent: * Disallow:


Is that my problem? It may just be a coincidence. However, it never occurred to me that the JVM(or is it Tomcat) would check for this file in a URL much less obey it...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Galen Palmer:
This is less, a servlet question than a URL question, but I hope to implement the solution in my servlet. If there is a more appropriate forum please let me know...


Moving to our "Sockets and Internet Protocols" forum for you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!