This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem forwarding a request

 
Umberto Fabbrucci
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic