You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Slava Zimine <sl...@japgod.mine.nu> on 2002/04/08 23:27:58 UTC

Re: Explorer newapp access problem. Resolved

Hi. 

I've managed to resolve this  problem.

in tdk2.2b1 it is caused by infinite redirects   and appending of   
"redirect/true" to each URL. 

Eric Dobbs wrote a patch for turbine-2 to handle this and it is now in
cvs src jakarta-turbine-2

Thank you for this patch!

Steps I did to compile  jakarta-turbine-2


from  http://jakarta.apache.org/site/cvsindex.html

cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout
jakarta-turbine-2


cd jakarta-turbine-2

mv build.properties.sample  build.properties

ant env  # check your lib.repo  is defined to lib

ant  # this compiles and jars turbine-2  into bin/turbine-2.2-b2-dev.jar



if compile failes, try  first 
ant update-jars


replace turbine-2.2-b1.jar  in your newapp/WEB-INF/lib  by   the
compiled  bin/turbine-2.2-b2-dev.jar


restart tomcat where newapp is deployed to see the effect. 




Accessing japgod.mine.nu:8080/newapp22/servlet/newapp22  is quick  in
explorer. 
Minor problem is that  

<img src="$ui.image($ui.logo)">  in DefaultTop.vm  is resolved as

<img
src="http://127.0.0.1:8080/newapp22/resources/ui/skins/default/images/tdm.jpg">

and not as 

http://japgod.mine.nu:8080/newapp22/resources/ui/skins/default/images/tdm.jpg

and the image therefore is not showed in  explorer. 

Anybody has a thought  on UI configuration  to correct this ? 

Regards to all,

Slava












On Mon, 2002-04-08 at 03:07, Slava Zimine wrote:
> Hi. 
> Few days ago i've posted a message explaining my unhappiness to access a
> tdk2.2b1 newapp  from explorer. 
> 
> 
> tdk2.2b1 newapp was built successfully after reading list posts, and
> with Akmal's help. 
> 
> http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg07255.html
> 
> 
> essentially, trying to access  the 
> yourserver:8080/newapp/servlet/newapp in  explorer is successful but 
> it takes about 1.5 minutes for Explorer to load the login page
> 
> If i click in a URL adress field  and hit an 'Enter'  the login page
> loads immediately.
> 
> in netscape6.2 linux, there is no such a problem.  the login page loads
> after 4 secs. 
> 
> 
> in tdk2.1 (tomcat 4.0)  there is no such a problem for explorer, loading
> newapp is quick. 
> 
> in scarab, there is no such a problem for explorer. (turbine3,
> tomcat-4.0.4)
> 
> 
> I've tried to copy  webapps/newapp from tdk2.1  to a standalone
> jakarta-tomcat-4.0.4b2.  In explorer I got the same problem accessing
> the Login page. 
> 
> 
> I invite those using  IE5.x  try to access my newapp  at
> 
> http://japgod.mine.nu:8080/newapp22ak/servlet/newapp22ak
> 
> see if you observe a delay.
> 
> and have their opinion if possible. 
> 
> Slava. 
> 
> p.s.
> Given  that explorer is a dominan web-browser  and average user does not
> hit 'Enter' in adress URL field, I think the issue should be resolved. 
> 
> 
> attached adre jpegs from ethereal  for  linux netscape 6 local access
> and ie5.5 access stopped during the waiting period
> 
> 
> 
> 
> 
> 
> 
> 
> ----
> 

> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: setTemplate() vs doRedirect()

Posted by Jeff Jones <jj...@trap9.com>.
Hello Turbine-Users,

If a user isn't logged in, I want them to be taken to a login screen.

However, if I use setTemplate() (or data.setScreenTemplate()) in
isAuthorized() to redirect them (as suggested in the turbine documentation,
and in the newapp sample), the doBuildTemplate() method is not called in the
target page, so my context is not populated and the target login page fails.

Is this the correct behavior for setTemplate() / data.setScreenTemplate()?

If I use doRedirect instead (as listed below), it works fine - halting the
current screen and forwarding to the other.  But I'm not sure I'm supposed
to do that (for example, what is the return value of isAuthorized() used
for?)...

Any thoughts on when to use doRedirect instead of setTemplate() and why?

Jeff

PS.  Thanks for a great framework, Turbine team.

--

public class OnlineMainScreen extends VelocitySecureScreen {

    public void doBuildTemplate(RunData data, Context context) {
        System.out.println("building online,main screen");
        OnlineScreen.insertScreenTools(data,context);
    }

    protected boolean isAuthorized( RunData data )  throws Exception {
        boolean isAuthorized = false;
        if(customerAuthenticated()) {
            System.out.println("customer authenticated");
            isAuthorized = true;
        } else {
            System.out.println("customer not authenticated - sending to
online,Default.vm");
            //data.setScreenTemplate("online,Default.vm");
            //OnlineScreen.insertScreenTools(data,getContext(data));
            //setTemplate(data,"online,Default.vm");
            doRedirect(data, "online,Default.vm");
        }
        return isAuthorized;
    }
}



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Explorer newapp access problem. Resolved

Posted by Eric Dobbs <er...@dobbse.net>.
On Monday, April 8, 2002, at 03:27  PM, Slava Zimine wrote:

> Eric Dobbs wrote a patch for turbine-2 to handle this and it is now in
> cvs src jakarta-turbine-2

I only reviewed and applied the patch.
The original author was Peter Lynch.
-Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>