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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Java Tag in ColdFusion not accepting /

Status
Not open for further replies.

EdGioja

Programmer
Nov 6, 2003
39
US
I wrote a very basic JAVA tag. I've now stripped it down to the following:


import com.allaire.cfx.*;
import javax.swing.*;

public class GetFileName implements CustomTag
{
public void processRequest( Request request, Response response )
{
// String strName = request.getAttribute( "FULLNAME" ) ;
String strName = "Hello there";
response.write(strName);
}
}


When I call this tag with as follows:


<cfx_GetFileName FULLNAME="#trim(GetDocument.dm_doi)#">


and GetDocument.dm_doi = "/app07/ILNB_dochome_app07/docs0887/ILNB.1.5.bk.62199.13008789.3"


I get the following error:

String index out of range: -35

35 is the character position of the last /, and will change if I change the string. If I change all of the / to \, the tag works fine. Unfortunately, I'm working with a UNIX system and require the slashes to be /.

Help please? I posted this in ColdFusion. It was suggested I try posting it here.
Of course I'm working on a time-sensitive project (aren't we all?)
 
out of interest, what happens if you try :

"\/app07\/ILNB_dochome_app07\/docs0887\/ILNB.1.5.bk.62199.13008789.3"

or

"//app07//ILNB_dochome_app07//docs0887//ILNB.1.5.bk.62199.13008789.3"

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
If its length is 35, the last char will be in the 34 position, but anyway you're getting a -35.

Do you have a stacktrace of the exception? Are you doing some processing or the exception is thrown by the system itself?

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top