You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Rishi N <re...@hotmail.com> on 2000/03/01 19:37:50 UTC

Resend:Sample tst::Does tomcat have trouble processing javascript?

Hi all,

sorry to bug you with this, i'm sure you have more important issues to work 
on, but i'm pretty much out of ideas here. I hope someone can help me with 
this, or at least let me know if you have been able to run javascript in 
tomcat. Is there anything special i need to do in the configuration, so that 
it can run javascript?

rishi


>Hi again,
>
>i'm attaching a jar file, which should help replicate the problem.
>
>unjar the file in the examples directory of tomcat. then try to open the
>file 'host:xxxx/examples/test/mine1.html' in your browser. the errors 
>should
>show up in the window where you did the 'startup.sh' for tomcat. If it
>doesn't show up the first time, hit 'reload'.
>
>Please let me know if i can provide any other info.
>
>thanks again,
>rishi
>
>
>>From: "Rishi N" <re...@hotmail.com>
>>Reply-To: general@jakarta.apache.org
>
>>
>>Hi gurus,
>>
>>i'm having some trouble running javascript in tomcat.
>>
>>this is the setup in server.xml:
>>
>>AjpservMount /test /root
>>
>>Under /test, i have some html files, which include some javascript files
>>from the same directory. anytime i try to display any of these html
>>files(as
>>"http://myhost:8080/test/myfile.html")  i get the error below. I do not
>>understand why the servlet engine gets invoked while trying to load an 
>>html
>>file with javascript in it. would you happen to know what is happening? if
>>i
>>understand correctly,  the purpose of having a context, like "/test" in
>>server.xml, is for apache to invoke tomcat whenvever a request with
>>".../test/..." comes in, but I am not able to figure out why javascript
>>would cause it to give errors.
>>
>>Putting all the html stuff(with the jscript) outside the /test context 
>>make
>>everything work fine.
>>
>>My questions:
>>
>>1. Does this mean that tomcat has some trouble understanding javascript?
>>2. Or am i not setting up my context correctly? Are html and javascript
>>files supposed to be placed somewhere else than the /test context?
>>
>>Since i am currently placing all our application-related stuff under the
>>/test context, and we use a lot of javascript, this could be a big
>>issue for us. Also, we do not see this problem in JavaWebserver2.0
>>
>>I see the problem in both tomcat3.0 and tomcat3.1m2r2
>>
>>Any pointers/suggestions/solutions appreciated!
>>
>>TIA,
>>
>>rishi
>>
>>------------------------
>><l:ctx path="/test" >Broken pipe /test/jslib/container.js</l:ctx>
>>
>><l:ctx path="/test" ><b>Internal Servlet Error:</b><br>
>>
>><pre>
>>java.io.IOException: Broken pipe
>>        at java.net.SocketOutputStream.socketWrite(Native Method)
>>        at java.net.SocketOutputStream.write(SocketOutputStream.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.service.http.HttpResponseAdapter.doWrite(HttpResponseAdapter.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.core.BufferedServletOutputStream.doWrite(BufferedServletOutputStream.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.core.BufferedServletOutputStream.reallyFlush(BufferedServletOutputStream.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.core.BufferedServletOutputStream.write(BufferedServletOutputStream.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.servlets.DefaultServlet.serveStreamAsStream(DefaultServlet.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.servlets.DefaultServlet.serveStream(DefaultServlet.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.servlets.DefaultServlet.serveFile(DefaultServlet.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.servlets.DefaultServlet.doGet(DefaultServlet.java,
>>Compiled Code)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java,
>>Compiled
>>Code)
>>        at javax.servlet.http.HttpServlet.service(HttpServlet.java,
>>Compiled
>>Code)
>>        at
>>org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.core.ContextManager.service(ContextManager.java, 
>>Compiled
>>Code)
>>        at
>>org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java,
>>Compiled Code)
>>        at
>>org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
>>Compiled Code)
>>        at java.lang.Thread.run(Thread.java, Compiled Code)
>>
>>----------------------
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>---------------------------------------------------------------------
>To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: general-help@jakarta.apache.org

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com