You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Matthew Forder <fo...@ams.neth.seagate.com> on 2001/09/12 12:20:10 UTC
%2FIndex.vm problem
This one's a real head scratcher (for me at least).
I put some code into my SecureScreen function isAuthorised() to allow
"pass-thru" login. It works fine in every scenerio except one.
Here's the code...
String screen = data.getScreenTemplate();
DynamicURI lastUrl = new DynamicURI (data);
lastUrl.addPathInfo("template",screen);
lastUrl.addPathInfo(data.getParameters());
context.put("oldurl",lastUrl);
data.setScreenTemplate(login);
and in my login screen i'm using:
<form action="$orldurl.setAction("LoginUser")">
Everything was working fine until I started using Tomcat b7...Now the
problem is if the user requests the URL
http://www.someserver.com/app/servlet/app
In other words doesn't request a specific URL, in the final HTML source
the form action ends up looking like this...
<form
action="http://www.someserver.com/app/servlet/app/template/%2FIndex.vm/action/LoginUser">
And when the login form is submitted the page cannot be found.
Can anyone help with this or offer a suggestion on how to circumvent the
problem?
Regards,
Matt
--
____ | Matthew J. Forder | Data Center Supervisor
/ / () | Seagate Techology | Tel:+31 20 316 7468
\ \ \ | Koolhovenlaan 1 | Fax:+31 20 653 5537
()_/_/ | 1119 NB Schiphol-Rijk, NL | matthew.forder@seagate.com
Re: %2FIndex.vm problem
Posted by Matthew Forder <fo...@ams.neth.seagate.com>.
John.
Thanks, that did the trick...although it's strange the problem should occur in the first
place!!
Thanks and regards,
Matt
John McNally wrote:
> try screen = data.getScreenTemplate.replace('/',',');
>
> john mcnally
>
> Matthew Forder wrote:
> >
> > This one's a real head scratcher (for me at least).
> >
> > I put some code into my SecureScreen function isAuthorised() to allow
> > "pass-thru" login. It works fine in every scenerio except one.
> >
> > Here's the code...
> >
> > String screen = data.getScreenTemplate();
> > DynamicURI lastUrl = new DynamicURI (data);
> > lastUrl.addPathInfo("template",screen);
> > lastUrl.addPathInfo(data.getParameters());
> > context.put("oldurl",lastUrl);
> > data.setScreenTemplate(login);
> >
> > and in my login screen i'm using:
> >
> > <form action="$orldurl.setAction("LoginUser")">
> >
> > Everything was working fine until I started using Tomcat b7...Now the
> > problem is if the user requests the URL
> >
> > http://www.someserver.com/app/servlet/app
> >
> > In other words doesn't request a specific URL, in the final HTML
> > source the form action ends up looking like this...
> >
> > <form
> > action="http://www.someserver.com/app/servlet/app/template/%2FIndex.vm/action/LoginUser">
> >
> > And when the login form is submitted the page cannot be found.
> >
> > Can anyone help with this or offer a suggestion on how to circumvent
> > the problem?
> >
--
____ | Matthew J. Forder | Data Center Supervisor
/ / () | Seagate Techology | Tel:+31 20 316 7468
\ \ \ | Koolhovenlaan 1 | Fax:+31 20 653 5537
()_/_/ | 1119 NB Schiphol-Rijk, NL | matthew.forder@seagate.com
Re: %2FIndex.vm problem
Posted by John McNally <jm...@collab.net>.
try screen = data.getScreenTemplate.replace('/',',');
john mcnally
Matthew Forder wrote:
>
> This one's a real head scratcher (for me at least).
>
> I put some code into my SecureScreen function isAuthorised() to allow
> "pass-thru" login. It works fine in every scenerio except one.
>
> Here's the code...
>
> String screen = data.getScreenTemplate();
> DynamicURI lastUrl = new DynamicURI (data);
> lastUrl.addPathInfo("template",screen);
> lastUrl.addPathInfo(data.getParameters());
> context.put("oldurl",lastUrl);
> data.setScreenTemplate(login);
>
> and in my login screen i'm using:
>
> <form action="$orldurl.setAction("LoginUser")">
>
> Everything was working fine until I started using Tomcat b7...Now the
> problem is if the user requests the URL
>
> http://www.someserver.com/app/servlet/app
>
> In other words doesn't request a specific URL, in the final HTML
> source the form action ends up looking like this...
>
> <form
> action="http://www.someserver.com/app/servlet/app/template/%2FIndex.vm/action/LoginUser">
>
> And when the login form is submitted the page cannot be found.
>
> Can anyone help with this or offer a suggestion on how to circumvent
> the problem?
>
> Regards,
>
>
> Matt
>
> --
> ____ | Matthew J. Forder | Data Center Supervisor
> / / () | Seagate Techology | Tel:+31 20 316 7468
> \ \ \ | Koolhovenlaan 1 | Fax:+31 20 653 5537
> ()_/_/ | 1119 NB Schiphol-Rijk, NL | matthew.forder@seagate.com
>
>
>
> ---------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org