Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to set the Browser action url to be Context path

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am working in Struts application and i have mapped Struts-Cofig for each action processed from client end .So My browser always change the URL on each action.
Like one action http://localhost:7001/SICApp/manageDealGrp.do
on clicking another Menu it show me
http://localhost:7001/SICApp/loadViewDeal.do


Id there any URL Gripping in struts for security point of View i am sure it must be there some way to do it?
Can i restrict the URL in the Browser someway so that user can see only Context path http://localhost:7001/SICApp/ or other standard URL
for all actions..

regards,
Rajan
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why you would want to do this. Security is normally handled by putting logic in the Action classes themselves or in the struts-config file to detect whether a user is authorized to perform that function or not, not by hiding or modifying the URL in the browser.

About the only way I can think of to accomplish what you want is to play tricks with frames. For example, you could set up the wecome page so that it has an <iframe> that takes up the whole page. Once this page is displayed, from then on, everythng is posted to the IFrame. In this manner, the only URL that is shown on the browser is the one for the welcome page, even though other actions are being performed and other URLs called.
 
soodrajanso sood
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you send a piece of Code to use iframe tag.?
 
I love a good mentalist. And so does this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!