Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

restrict the previous page after signout

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HAi Friends
iam using the session to store the userid and password value. and after signout it's going back in previous page.so how to disable the back button of the browser or restricted the user to go back.
in my signout.jsp page iam also using the session.invalidate()function.

Manoj
[ August 06, 2008: Message edited by: Bear Bibeault ]
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't control the browser's back button, but you can prevent it from being an issue. The problem is multi-tiered and depends on Caching on the client side, and being able to re-post data that re-introduces client state to a new session on the server.

There is an article On JavaWorld that addresses the problem quite clearly, and provides the solution.

In addition to the information provided by that page, I would suggest making any servlet that receives a POST request from the client use a sendRedirect to the JSP display page, rather than a server-side forward. This will prevent the back button from being able to post the data, as the new request to the JSP would replace the POST form request.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed. This pattern is described in this article which you may find helpful.
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Friend
Thanks really that article helped me too much. i have solved my problem 80%
but how can i restriced to see the folder through URL access

Manoj
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by manoj Rksh:
Dear Friend
Thanks really that article helped me too much. i have solved my problem 80%
but how can i restriced to see the folder through URL access

Manoj



Can you please explain what you mean by this question? What is the behavior you are currently seeing, and what do you want it to change to?
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai Luke,

My all project file are in jsp and html folder so, if anybody access the folder through URL Like
http://localhost/Online/jsp
it will show the all file so iwant t restricted the user to see the folder content.

One more think Luke i want to know it is possible to create jdbc link without following the process ControlPanel--->Administrative tools--->ODBC--->SystemDsn..etc . allthose thing.


Manoj
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To prevent people from seeing the contents of a folder, you have to use a <welcome-file>. These are usually something like index.html or index.jsp. If you put one of them in every directory then you should get that index page displayed instead of the file listing.

Depending on your server there may be a specific setting that will disable the listings on all folders. And if you have a Front Controller Servlet then you could easily intercept these requests and do with them what you want.

For the second question, A JDBC Tutorial is a good place to start.
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Luks its good idea to place index.jsp or html page in each folder.
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Make a new folder in WEB-INF and name it as jsp.
now place all your jsp files in this new folder
Once you do it, no one will be able to directly access your jsp files through urls.

This is because the container restricts the direct user access to the things placed inside web-inf folder. for example you can not access this url
http://yourserver.com/yourapp/WEB-INF/web.xml

However you are free to access the objects placed in webinf folder from your servlets and jsps


Regards

Ghufran
 
Manoj semwal .
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks gulfran

Gulfran it is possible to upload a bulk data in jsp inspite of single entry in each time. like data is in excel file and upload in sql or Access.

can you help me for do that.

Manoj
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"manoj Rksh", please check your private messages for an important administrative matter. Again.
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"manoj Rksh", please check your private messages for an important administrative matter.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic