wood burning stoves 2.0*
The moose likes Servlets and the fly likes Problem forwarding a request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem forwarding a request" Watch "Problem forwarding a request" New topic

Problem forwarding a request

Umberto Fabbrucci

Joined: Aug 30, 2004
Posts: 6
Hi all, I have a problem with a servlet forwarding a client's request
The code in my servlet is the following:

For some users I get an exception when trying to forward:
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
The weird fact is that the forward inside my catch block works fine!

I'm using Weblogic 5.1 and jdk 1.4

Thank you.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299

I have never been able to get a forward to work without adding a / before the page.

You may need to supply more than just the page name as this will look at the root of your context.
[ September 24, 2004: Message edited by: Gregg Bolinger ]

GenRocket - Experts at Building Test Data
subject: Problem forwarding a request
Similar Threads
Can I forward a local variable to another servlet?
forward method in jsp
Problem with RequestDispatcher
how to transfer Streams from one servlet to another servlet
How to arraylist value pass servlet action to JSP file