Hey Larry,
   
  Finally a refresh click brought a smile on my face :-)
   
  Yeah, it is one of those scenarios where people want backward support as 
against to moving forward.
   
  One thing that I dont understand is that the UIs are working very well. In 
fact I am able to change the password (that is when these exceptions are 
thrown) and is updated as well. Then why this backend exception. Any thoughts 
here?
   
  Also, there is a forward that is called before the "include" as you pointed 
out. Do you have any ideas on what tweaking I can try?
   
  Thanks again for your reply.
   
  Sid
   
  

Larry Isaacs <[EMAIL PROTECTED]> wrote:
  Sid,

The code where the exception is occurring is:

private final String getAbsolutePathRelativeToContext(String relativeUrlPath) {
String path = relativeUrlPath;

if (!path.startsWith("/")) {
String uri = (String) 
request.getAttribute("javax.servlet.include.servlet_path");
if (uri == null)
uri = ((HttpServletRequest) request).getServletPath();
401 String baseURI = uri.substring(0, uri.lastIndexOf('/'));
path = baseURI+'/'+path;
}

return path;
}

The code is trying to convert the "weblmpagetop.jsp" relative
path to a path from the root of the webapp. What Jasper has to
work with to establish where "weblmpagetop.jsp" is located is
failing the "uri.lastIndexOf('/')". This suggests the problem
is related to the "forwards" that are occurring prior to reaching
the "include". Perhaps there is something that needs to start with
a '/' that doesn't.

I can't say that this isn't due to a quirk, bug, or spec ambiguity,
as opposed the webapp doing something wrong with respect to
the Servlet 2.2 spec. It sounds like you are stuck with 3.3.1
as is. Hopefully a reasonable workaround can be found.

Cheers,
Larry


> -----Original Message-----
> From: Siddhartha Mehta [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, January 10, 2006 1:50 AM
> To: users@tomcat.apache.org
> Subject: Error loop for R - Tomcat 3.3.1a
> 
> I am currently working on a web application that uses 
> Tomcat 4.1.27 and JDK 1.4.2_03.
> 
> The same piece of code now needs to be supported on Tomcat 
> 3.3.1 and JDK 1.4.2_08. I managed to get the classes, jsps 
> coompile and built by modifying the ant script. In fact even 
> the application runs perfect and the functionalities are 
> working as expected. Although, all is not good as it seems 
> so. In the backend, the tomcat - startup windows isn't quite 
> happy with the changes. I repeatedly get the following error 
> and I can make out very little from it.
> 
> I can think of possible cause as this code in my jsp but not 
> really sure:
> 
> ....
> 
> 
> " name="body-title-text">
> > %>" name="body-location-text">....
> 
> Exception thrown in tomcat-start up window is below:
> 
> 2006-01-10 11:48:04 - Ctx(/WebLM) : Exception in R( /WebLM + 
> /weblmlogin.jsp + n
> ull) - javax.servlet.ServletException: String index out of range: -1
> at 
> org.apache.jasper.runtime.PageContextImpl.handlePageException(PageCon
> textImpl.java:460)
> at com.avaya.weblm.weblmlogin._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source)
> at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
> a:423)
> at com.avaya.weblm.weblmlogin._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
> a:423)
> at com.avaya.weblm.index._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.
> java:917)
> at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833
> )
> at 
> org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> Http10Interceptor.java:176)
> at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :494)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:516)
> at java.lang.Thread.run(Thread.java:534)
> Root cause:
> java.lang.StringIndexOutOfBoundsException: String index out 
> of range: -1
> at java.lang.String.substring(String.java:1444)
> at 
> org.apache.jasper.runtime.PageContextImpl.getAbsolutePathRelativeToCo
> ntext(PageContextImpl.java:401)
> at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.jav
> a:411)
> at com.avaya.weblm.weblmlogin._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> com.avaya.weblm.WebLMServlet.forwardToNextPage(Unknown Source)
> at com.avaya.weblm.WebLMClientLogin.doPost(Unknown Source)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
> a:423)
> at com.avaya.weblm.weblmlogin._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispa
> tcherImpl.java:272)
> at 
> org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatc
> herImpl.java:174)
> at 
> org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.jav
> a:423)
> at com.avaya.weblm.index._jspService(Unknown Source)
> at 
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java)
> at 
> org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java
> :574)
> at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
> at org.apache.tomcat.core.Handler.service(Handler.java:235)
> at 
> org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:4
> 85)
> at 
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.
> java:917)
> at 
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:833
> )
> at 
> org.apache.tomcat.modules.server.Http10Interceptor.processConnection(
> Http10Interceptor.java:176)
> at 
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
> :494)
> at 
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
> ool.java:516)
> at java.lang.Thread.run(Thread.java:534)
> 
> 2006-01-10 11:48:04 - ErrorHandler: Error loop for R( /WebLM 
> + /weblmlogin.jsp +
> null) error javax.servlet.ServletException: String index out 
> of range: -1
> 
> Any help/pointer/suggestion is highly appreciated.
> 
> Thanks
> 
> Sid
> 
> 
> 
> ---------------------------------
> Yahoo! DSL Something to write home about. Just $16.99/mo. or less
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


                
---------------------------------
Yahoo! Photos – Showcase holiday pictures in hardcover
 Photo Books. You design it and we’ll bind it!

Reply via email to