You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Zaheer Mohammad <za...@gmail.com> on 2010/01/20 10:22:59 UTC

Hiding URL in struts1.2

Hi All,
          Hi i am working on Struts1.2 Project.
          Can Anyone help me in hiding parameters in Url without using
Frameset In struts1.2.

Example : http://localhost:8180/webproject/loginv.do?dispmethd=showHome

I want to get like this

                       http://localhost:8180/webproject

through out the project.


hiding   *loginv.do?dispmethd=showHome*
**

Can anyone know how to do it


Thanks and Regards
Zaheer Mohammad

Re: Hiding URL in struts1.2

Posted by Nikhil Walvekar <wa...@gmail.com>.
Hi Zaheer,

I would like to understand requirement of hiding actual URL.

Shomehow actual URL should be known to your browser otherwise it wont be
able to send server request.
If user is not going to do view source and check whats there in HTML then
prob you can use frames or if you want to hide your server or webapp then
you can try using apache fronting. But the solution will depend on the
reason why you want to hide the URL.

But as Brian said user will not be able to bookmark your site pages.

Regards,
Nikhil

On Thu, Jan 21, 2010 at 8:08 PM, Brian Thompson <el...@gmail.com>wrote:

> You'll have to communicate the parameters *somehow*, whether that's using
> POST for all your requests (but that's bad form when your requests are
> simply looking up data in the database), exposing the full url, or mapping
> parameters to url path elements.
>
> I suppose you could also write the front-end to do everything with Ajax
> calls, but I'd advise against it.  Such sites are annoying to end-users.
> Imagine going to Amazon, bookmarking a product, then going back to the
> bookmark the next day...and it takes you to the homepage!  Not very
> user-friendly.
>
> However you resolve this, please make a follow-up post to the list.  I'm
> curious to see how you handle this issue.
>
> -Brian
>
>
>
> On Thu, Jan 21, 2010 at 12:09 AM, Zaheer Mohammad
> <za...@gmail.com>wrote:
>
> > HI,
> >  Thanks to all for your valuable sugestions
> >
> >   Actually i want to hide all parameters form the Url
> >
> > actual Url's are like this :
> >
> >
> >
> http://localhost:8280/mspui/custumerAuthrtn.do?dispmethd=custumerAuthorize&accountNumber=12345
> >
> > but I should get
> >
> >
> > http://localhost:8280/mspui/
> >
> > by hiding parameters in the url.
> >
> > this is  already developed project and this is a enhancement. using post
> > means i have to change much of code.is there any simple alternative  way
> > of
> > acheiving this.
> >
> >
> > Thanks in Advance
> >
> > Zaheer Mohammad
> >
> > On Thu, Jan 21, 2010 at 9:47 AM, Raghuveer <raghuveerv@infotechsw.com
> > >wrote:
> >
> > > Could you elaborate your requirement?
> > > URL will be changed when you use
> > >
> > > <action name=" loginv "
> > > class="com.test.actions.LoginAction ">
> > > <!-- Home -->
> > >        <result name="app_home_action" type="redirectAction">
> > >                showHome
> > >        </result>
> > > </action>
> > > <action name=" showHome " class="com.utc.pw.spanas.actions.CHome">
> > > </action>
> > >  -----Original Message-----
> > > From: Brian Thompson [mailto:elephantium@gmail.com]
> > > Sent: Wednesday, January 20, 2010 9:13 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: Hiding URL in struts1.2
> > >
> > > I would look into using URLRewrite [1].  It would be easy to go from
> > > showing
> > > this in the browser:
> > >
> > > http://localhost:8180/webproject/showHome
> > >
> > > to the application processing this:
> > >
> > > http://localhost:8180/webproject/loginv.do?dispmethd=showHome
> > >
> > >
> > >
> > >
> > > [1] - http://tuckey.org/urlrewrite/
> > >
> > > On Wed, Jan 20, 2010 at 5:23 AM, chen thomas <th...@gmail.com>
> > > wrote:
> > >
> > > > Maybe you could use post method of Form to do this
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
>



-- 
Nikhil

Re: Hiding URL in struts1.2

Posted by Brian Thompson <el...@gmail.com>.
You'll have to communicate the parameters *somehow*, whether that's using
POST for all your requests (but that's bad form when your requests are
simply looking up data in the database), exposing the full url, or mapping
parameters to url path elements.

I suppose you could also write the front-end to do everything with Ajax
calls, but I'd advise against it.  Such sites are annoying to end-users.
Imagine going to Amazon, bookmarking a product, then going back to the
bookmark the next day...and it takes you to the homepage!  Not very
user-friendly.

However you resolve this, please make a follow-up post to the list.  I'm
curious to see how you handle this issue.

-Brian



On Thu, Jan 21, 2010 at 12:09 AM, Zaheer Mohammad
<za...@gmail.com>wrote:

> HI,
>  Thanks to all for your valuable sugestions
>
>   Actually i want to hide all parameters form the Url
>
> actual Url's are like this :
>
>
> http://localhost:8280/mspui/custumerAuthrtn.do?dispmethd=custumerAuthorize&accountNumber=12345
>
> but I should get
>
>
> http://localhost:8280/mspui/
>
> by hiding parameters in the url.
>
> this is  already developed project and this is a enhancement. using post
> means i have to change much of code.is there any simple alternative  way
> of
> acheiving this.
>
>
> Thanks in Advance
>
> Zaheer Mohammad
>
> On Thu, Jan 21, 2010 at 9:47 AM, Raghuveer <raghuveerv@infotechsw.com
> >wrote:
>
> > Could you elaborate your requirement?
> > URL will be changed when you use
> >
> > <action name=" loginv "
> > class="com.test.actions.LoginAction ">
> > <!-- Home -->
> >        <result name="app_home_action" type="redirectAction">
> >                showHome
> >        </result>
> > </action>
> > <action name=" showHome " class="com.utc.pw.spanas.actions.CHome">
> > </action>
> >  -----Original Message-----
> > From: Brian Thompson [mailto:elephantium@gmail.com]
> > Sent: Wednesday, January 20, 2010 9:13 PM
> > To: Struts Users Mailing List
> > Subject: Re: Hiding URL in struts1.2
> >
> > I would look into using URLRewrite [1].  It would be easy to go from
> > showing
> > this in the browser:
> >
> > http://localhost:8180/webproject/showHome
> >
> > to the application processing this:
> >
> > http://localhost:8180/webproject/loginv.do?dispmethd=showHome
> >
> >
> >
> >
> > [1] - http://tuckey.org/urlrewrite/
> >
> > On Wed, Jan 20, 2010 at 5:23 AM, chen thomas <th...@gmail.com>
> > wrote:
> >
> > > Maybe you could use post method of Form to do this
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>

Re: Hiding URL in struts1.2

Posted by Zaheer Mohammad <za...@gmail.com>.
HI,
  Thanks to all for your valuable sugestions

   Actually i want to hide all parameters form the Url

actual Url's are like this :

http://localhost:8280/mspui/custumerAuthrtn.do?dispmethd=custumerAuthorize&accountNumber=12345

but I should get


http://localhost:8280/mspui/

by hiding parameters in the url.

this is  already developed project and this is a enhancement. using post
means i have to change much of code.is there any simple alternative  way of
acheiving this.


Thanks in Advance

Zaheer Mohammad

On Thu, Jan 21, 2010 at 9:47 AM, Raghuveer <ra...@infotechsw.com>wrote:

> Could you elaborate your requirement?
> URL will be changed when you use
>
> <action name=" loginv "
> class="com.test.actions.LoginAction ">
> <!-- Home -->
>        <result name="app_home_action" type="redirectAction">
>                showHome
>        </result>
> </action>
> <action name=" showHome " class="com.utc.pw.spanas.actions.CHome">
> </action>
>  -----Original Message-----
> From: Brian Thompson [mailto:elephantium@gmail.com]
> Sent: Wednesday, January 20, 2010 9:13 PM
> To: Struts Users Mailing List
> Subject: Re: Hiding URL in struts1.2
>
> I would look into using URLRewrite [1].  It would be easy to go from
> showing
> this in the browser:
>
> http://localhost:8180/webproject/showHome
>
> to the application processing this:
>
> http://localhost:8180/webproject/loginv.do?dispmethd=showHome
>
>
>
>
> [1] - http://tuckey.org/urlrewrite/
>
> On Wed, Jan 20, 2010 at 5:23 AM, chen thomas <th...@gmail.com>
> wrote:
>
> > Maybe you could use post method of Form to do this
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: Hiding URL in struts1.2

Posted by Raghuveer <ra...@infotechsw.com>.
Could you elaborate your requirement?
URL will be changed when you use

<action name=" loginv "
class="com.test.actions.LoginAction ">
<!-- Home -->
	<result name="app_home_action" type="redirectAction">
		showHome
	</result>
</action>
<action name=" showHome " class="com.utc.pw.spanas.actions.CHome">
</action>
-----Original Message-----
From: Brian Thompson [mailto:elephantium@gmail.com] 
Sent: Wednesday, January 20, 2010 9:13 PM
To: Struts Users Mailing List
Subject: Re: Hiding URL in struts1.2

I would look into using URLRewrite [1].  It would be easy to go from showing
this in the browser:

http://localhost:8180/webproject/showHome

to the application processing this:

http://localhost:8180/webproject/loginv.do?dispmethd=showHome




[1] - http://tuckey.org/urlrewrite/

On Wed, Jan 20, 2010 at 5:23 AM, chen thomas <th...@gmail.com> wrote:

> Maybe you could use post method of Form to do this
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Hiding URL in struts1.2

Posted by Brian Thompson <el...@gmail.com>.
I would look into using URLRewrite [1].  It would be easy to go from showing
this in the browser:

http://localhost:8180/webproject/showHome

to the application processing this:

http://localhost:8180/webproject/loginv.do?dispmethd=showHome




[1] - http://tuckey.org/urlrewrite/

On Wed, Jan 20, 2010 at 5:23 AM, chen thomas <th...@gmail.com> wrote:

> Maybe you could use post method of Form to do this
>

Re: Hiding URL in struts1.2

Posted by chen thomas <th...@gmail.com>.
Maybe you could use post method of Form to do this