tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajah Kalipatnapu" <ra...@soundpipe.com>
Subject RE: Why am I getting a Javascript file instead of my servlet ?
Date Wed, 14 Nov 2001 21:52:54 GMT

>From my experience you might be facing this problem with Netscape browser.
If you try the same with explorer you may not face this problem.

This is only one possibility I know. There may be some other reasons which
I cannot guess.

Ok, lets c if you can access your page through IE( thought IE says that
there are errors in page)
and not through Netscape, that means in the result page you have a wrong
path to your javascript file.

Its always possible when you use a relative path in your servlet or jsp
output page
and use servlet to get that page.

I would rather use
<%=request.getContextPath()%>/javascriptDirectory/myjsfile.js

instead of some thing like   ../../javascriptDirectory/myjsfile.js

hope this helps,
Raj

-----Original Message-----
From: jadams@acd.ucar.edu [mailto:jadams@acd.ucar.edu]On Behalf Of James
Adams
Sent: Wednesday, November 14, 2001 10:55 AM
To: tomcat-user@jakarta.apache.org
Subject: Why am I getting a Javascript file instead of my servlet ?


I have a page (JSP) which contains a form with a servlet as the action
of the form.  However whenever I submit the form I am getting a Not
Found 404 error telling me that a Javascript file which is used for
Javascript on the page is not found.  I am perplexed as to why this is
happening, especially since the Javascript is working as it should.  I
should instead be forwarded to the servlet which will handle the form
parameters.  Can anyone suggest ways to find out what is going wrong
?  Thanks in advance for any suggestions...

-James


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message