Thanks Dave,
I'll try to catch that exception in Roller application
and handle it there, probably there are several places
in app. where I have to apply the same fix, it's
better than to wait for response from IBM.
fix:
String mimeType = null;
try{
mimeType =
RollerContext.getServletContext().getMimeType(page.getLink());
}catch(Exception e){
System.out.println("getMimeType method of
javax.servlet.ServletContext for WAS6.1 throws
java.lang.StringIndexOutOfBoundsException WE NEED IBM
HELP ON THIS");
}
if (mimeType != null) {
// we found a match ... set the content type
contentType = mimeType + "; charset=utf-8";
} else {
contentType = "text/html; charset=utf-8";
}
--- Dave <[EMAIL PROTECTED]> wrote:
> On Wed, May 21, 2008 at 8:37 AM, uros kotnik
> <[EMAIL PROTECTED]> wrote:
> > I installed roller application succesfully, also I
> > enabled this as suggested in another thread
> > "The following WebContainer custom property must
> be
> > set to
> > 'true' for this new behaviour to be enabled:
> >
> 'com.ibm.ws.webcontainer.invokeFiltersCompatibility'
> >
> > Application starts without any problems, I can
> create
> > a new weblog, but after that when I try to access
> that
> > newly created weblog I get this exception, same
> > exception I get when I try to view newly created
> > entry:
> >
> > [5/21/08 16:02:23:275 CEST] 0000007a ServletWrappe
> E
> > SRVE0068E: Uncaught exception thrown in one of the
> > service methods of the servlet: PageServlet.
> Exception
> > thrown :
> java.lang.StringIndexOutOfBoundsException:
> > String index out of range: 1
> > at
> java.lang.String.substring(String.java:1067)
> > at
> >
>
com.ibm.ws.webcontainer.webapp.WebApp.getMimeType(WebApp.java:2250)
> > at
> >
>
com.ibm.ws.webcontainer.facade.ServletContextFacade.getMimeType(ServletContextFacade.java:94)
> > at
> >
>
org.apache.roller.weblogger.ui.rendering.servlets.PageServlet.doGet(PageServlet.java:365)
>
> Hmm... when Roller tries to look up a MIME type
> based on
> file-extension, WebSphere blows a
> StringIndexOutOfBoundsException.
> Looks like a bug in WebSphere's WebApp.getMimeType()
> method. IBM tech
> support might be able to give you some sort of
> work-around or fix.
>
> - Dave
>