• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

GWT and IE 6

 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is "result"? A servlet? Static resource?
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes if i use IE6 and just remove the excess /../ i can access it.
 
Maneesh Godbole
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I would conclude, you were constructing the URL wrong in the Window.open(...) code right?
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why cant you do Window.open(" http://localhost:8080/docs_for_preview/result")?
 
christine clarin
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amar Thomas,
Your post was moved to a new topic.
 
When all four tires fall off your canoe, how many tiny ads does it take to build a doghouse?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic