• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet is not called by link click, but is by UPDATE button

 
Sergey Lotvin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
here is the link to try

The problem is: I got different results when UPDATE or when click link to page.But all works fine on localhost.

My idea for now is that there is mapping problem. Index link has code:


where actDBTestConn in web.xml mapped to servlet:



and Tomcat on OpenShift for some reason doesn't get this mapping. But why UPDATE button works, I have no idea.
Using rhc and tail_all command I can see the log. So I see that click to link do not call the myServlets.DBTestConnand and its doGet method while UPDATE button do. why?
Help to understand, please!

also asked here
 
Stefan Evans
Bartender
Posts: 1807
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sergey.

I can't see any "update" button referenced here in your code, but the general reason why clicking a link doesn't register a request on the server is that it serves the page from your local cache.
If you click the link to that page, and then hit F5 to refresh does it hit the server then?

You might take a look into the FAQ about how to stop JSP pages being cached.

 
Sergey Lotvin
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stefan Evans wrote:I can't see any "update" button referenced here in your code...

"update" button is a browser button, that is equal to F5

If you click the link to that page, and then hit F5 to refresh does it hit the server then?

Yes, it was exactly like that. But this morning I'm totally suprised. Everything works as I expected. I did nothing, had my happy weekend and go to TRS link today morning and WOW!...it's self-repaired. Very strange behaviour. Do you have any idea? is it because of cache that was stored on OpenShift but was somehow cleared during a couple of days?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic