Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calling a servlet from javascript

Status
Not open for further replies.

scejja

Programmer
Dec 20, 2005
2
ES
Hi,

I'm using a javascript widget: jscalendar 1.0 and I've tried my question in that site, but no response.

The problem is that I try to call a servlet from a javascript code and everything works fine, except I get a page not found 404 exception in log files. It doesn't produce any problem to the application but I want to know how can I avoid it.

Thanks in advance !! Juanjo

The function used to make the request is dateChanged (in a jsp page):

function dateChanged(calendar) { if (calendar.dateClicked) { // OK, a date was clicked, redirect to /yyyy/mm/dd/index.php var y = calendar.date.getFullYear(); var m = calendar.date.getMonth(); // integer, 0..11 var d = calendar.date.getDate(); // integer, 1..31 // redirect... if (dateIsSpecial(y, m, d))

window.location="<%=response.encodeURL("myservlet")%>?m=3&v="+ d +"-"+ (m+1) +"-"+ y +"&a=0";

}

And the Stack trace:

2007-06-20 01:16:08 org.apache.catalina.core.StandardHostValve@8d2280: Exception Processing ErrorPage[errorCode=404, location=/noEncontrada.htm] ClientAbortException: java.net.SocketException: Software caused connection abort: socket write error at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:331) at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:297) at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.java:537) at org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:238) at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:303) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:147) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top