GeeCON Prague 2014*
The moose likes GWT and the fly likes GWT and IE 6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT and IE 6" Watch "GWT and IE 6" New topic
Author

GWT and IE 6

christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
hello,

I'm trying to open a file outside of my current application, now it works in all browsers except for IE 6. May I know what I should do for this? (I'm not sure if this is the best section to post into - but i'm using GWT and I don't know where else to ask - I really hope you could help me...)

This is my current directory structure

Tomcat
- webapps
-- docs_for_preview
-- my_app

now i used this code:



so that i could open the files under docs_for_preview with the filename result, this works for all browsers such that the window launches to http://localhost:8080/docs_for_preview/result but in IE 6 it opens to http://localhost:8080/../docs_for_preview/result that's why the file cannot be found.

How do I fix this?

I will appreciate all the help that I can get.

Thank you very much.

Regards,

Chris
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
oh sorry just a correction, the code that works for all browsers (except IE 6) is this:



this DOES NOT WORK at all:



what do you think can i do? my client refuses to change his IE6 he wants that browser and I have to make my code work on that
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

What is "result"? A servlet? Static resource?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
oh sorry, result is just a string which contains the filename of the file i want to view so in this case, result = "/docs_for_preview/filename", i tried result = "/../docs_for_preview/filename" but still ie6 recognizes the "/../" as a literal string rather than to push the directory one level up



Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

Ok.
Lets leave aside the GWT app for now.
Can you open http://localhost:8080/docs_for_preview/result directly from IE?
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
yes if i use IE6 and just remove the excess /../ i can access it.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

So I would conclude, you were constructing the URL wrong in the Window.open(...) code right?
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
yes, I would think so, I wanted to reach the folder docs_for_preview which is in the same level as where my_app is (my_app is where I call Window.open(..)). I assumed that using the characters "/../" would solve it, since i just have to go one level up from my_app and then I can access docs_for_preview. It worked for others but IE 6 keeps taking "/../" as a literal and treats it as if it's a folder name, i'm not sure why. is there a way to do this in IE 6 that would also do the same for all the other browsers?

Thanks a lot for all your help, I'm sorry if I keep repeating my explanation, just wanted to make sure I get it across.

Thanks!!!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

I don't know why the /../ works in some browser, and doesn't in some. But the way I look at things the /../ is not the correct approach.

Consider you have deployed apps in tomcat under webapps.
You would access them by http://hostName:8080/appA and http://hostName:8080/appB .

In your scenario, you are trying to access appB via appA. Why do it this way when you can access it using the second url directly? Does this make sense?
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
well basically, docs_for_preview is not an app, it's just a directory I don't want to put inside my_app so as not to overwrite it whenever I deploy, now if I do just this:

Window.open("/docs_for_preview/result");

my browser would open to: http://localhost:8080/my_app/docs_for_preview/result which I don't want since docs_for preview is outside of my app. now this

Window.open("/../docs_for_preview/result");

opens to http://localhost:8080/docs_for_preview/result which I want but not for IE 6, is there a way to do this in IE 6?

thanks!

Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

Why cant you do Window.open(" http://localhost:8080/docs_for_preview/result")?
christine clarin
Ranch Hand

Joined: Feb 05, 2005
Posts: 106
Hi I'm very sorry for the delayed reply, didn't have internet the past few days, anyway the reason why I can't directly do this: Why cant you do Window.open(" http://localhost:8080/docs_for_preview/result") is because I am not only using my localhost as the container for the application. I am deploying it in some other server and I wouldn't be able to hardcode this: localhost:8080 in there. I am also launching the my_app application, remember in my directory:

TOMCAT
- webapps
-- docs_for_preview
-- my_app

and so, when Window.open launches, it launches via the context root: http://hostt:port/my_app/docs_for_preview/result which does not work since docs_for_preview is outside of my_app. What can I do such that even if Window.open is called from my_app, it can still call dynamically go back to http://host:port/docs_for_preview?

Thanks!!!
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10425
    
    8

Amar Thomas,
Your post was moved to a new topic.
 
GeeCON Prague 2014
 
subject: GWT and IE 6