tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Adams <jad...@ucar.edu>
Subject Re: Why am I getting a Javascript file request instead of my servlet ?
Date Thu, 15 Nov 2001 00:27:26 GMT
tomcat-user-digest-help@jakarta.apache.org wrote:

>
>   ------------------------------------------------------------------------
>
> Subject: Why am I getting a Javascript file request instead of my servlet ?
> Date: Wed, 14 Nov 2001 12:11:49 -0700
> From: James Adams <jadams@ucar.edu>
> To: tomcat-user@jakarta.apache.org
>
> 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
>
>

It appears that this was a case of losing track of the context.

I have fixed my problem by setting the location of the Javascript file using <%=request.getContextPath()%>
and all is well now.

Thanks Raj for your suggestion, this got me past today's obstacle.


-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>


Mime
View raw message