my dog learned polymorphism*
The moose likes Servlets and the fly likes Problem bookmarking page with doGet method. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem bookmarking page with doGet method." Watch "Problem bookmarking page with doGet method." New topic
Author

Problem bookmarking page with doGet method.

Mark O' Sullivan
Ranch Hand

Joined: Aug 17, 2009
Posts: 160
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

Joined: Jan 10, 2002
Posts: 60822
    
  65

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Saifuddin Merchant
Ranch Hand

Joined: Feb 08, 2009
Posts: 597

if that's all your doGet method is doing, I don't see where it is actually dispatching to the 'view'?


Cheers - Sam.
Twisters - The new age Java Quiz || My Blog
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Lets see your web.xml where the app named singleRelease is defined.

Bill
Miku Ranjan
Ranch Hand

Joined: Oct 11, 2011
Posts: 98
Hi,
Bookmark should not be any issue that related to your application.
Anjaneya Reddy
Greenhorn

Joined: Feb 14, 2011
Posts: 1
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
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

Joined: Aug 17, 2009
Posts: 160
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.
 
jQuery in Action, 2nd edition
 
subject: Problem bookmarking page with doGet method.
 
Similar Threads
How to call HEAD method ?
Not able to run sample servlet + jsp
Having trouble injecting EJB into a servlet
use diffrent servlet values (how to unload a servlet)
Handling dynamic configuration data