Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

window.showModalWindow problem

 
Veshnu Ramakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a code in my jsp page which would open a modal window.

window.showModalWindow("/jsps/something.jsp");
The path of the page is correct. If i run this code the modal window shows the jsp code instead of compiled html. it treats as a text file. but i have set the content-type of the file to be "text/html". It works in my development box which is a windows machine. but not in my production box with is a sun machine. can anyone help me in this.
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You seem to have alot of confusion about JavaScript.

1) JavaScript has nothing to do with Java or JSP

2) JavaScript runs on the client not the server.

3) It's possible your webserver is misconfigured. But I have some doubts that you are looking at the right thing here.
 
Veshnu Ramakrishnan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know what javascript and jsps are. But i just don't know how a jsp file is sent across wire without compilation and generation of HTML. It is considered as a text file. There are two machines both of same configuration with same build. but this happens only in one machine.
 
Maximilian Xavier Stocker
Ranch Hand
Posts: 381
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Veshnu Ramakrishnan:
I know what javascript and jsps are. But i just don't know how a jsp file is sent across wire without compilation and generation of HTML. It is considered as a text file. There are two machines both of same configuration with same build. but this happens only in one machine.


But this has nothing to with JavaScript whatsoever! Surely you would know that.

This is a webserver issue. Namely it is serving a request for your jsp page by sending the raw source rather than sending it along to the JSP engine.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to JSP since it is a server problem...

Eric
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64696
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you type the URL to the JSP directly in the browser? Does it get served correctly?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic