Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem bookmarking page with doGet method.

 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing an application and deployed the war file for testing under Apache. I have my doGet and doPost methods set up properly but when I bookmark a page that uses a doGet method in the servlet, I cannot access that servlet for some reason. Let me explain. I can access my page like this through the application but when it is bookmarked and I try to return to it, it gives me page not found even though my doGet method starts like this in the servlet.

Any idea what could be the issue?
Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65218
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There should be no difference between typing a URL into the browser address field and hitting a bookmark with the same URL. Are you sure that they are identical?
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if that's all your doGet method is doing, I don't see where it is actually dispatching to the 'view'?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lets see your web.xml where the app named singleRelease is defined.

Bill
 
Miku Ranjan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Bookmark should not be any issue that related to your application.
 
Anjaneya Reddy
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark O' Sullivan wrote:Hi,
I'm developing an application and deployed the war file for testing under Apache. I have my doGet and doPost methods set up properly but when I bookmark a page that uses a doGet method in the servlet, I cannot access that servlet for some reason. Let me explain. I can access my page like this through the application but when it is bookmarked and I try to return to it, it gives me page not found even though my doGet method starts like this in the servlet.

Any idea what could be the issue?
Thanks.



Hi,

Instead of using the doGet() can you please try with public void servicet(HttpServletRequest request, HttpServletResponse response).I think it will be work.Because we not set method name like GET,POST .

If any thing wrong my analyses please correct me.
 
Tim Moores
Bartender
Posts: 2946
46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anjaneya Reddy wrote: Instead of using the doGet() can you please try with public void servicet(HttpServletRequest request, HttpServletResponse response).

No, don't do that. Overriding the service method should only be done in very specific, rather arcane, situations - which this is not.

Maybe you can tell us what "I cannot access that servlet for some reason" means, exactly.
 
Mark O' Sullivan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm after discovering that the bookmarking is working in other browsers apart from FireFox, for example, opera, chrome, etc. Very strange one, but seems to be a browser related problem, FireFox is the one I usually use for testing. Thanks very much for all your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic