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

Passing "\" to a cfx_ tag

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?
Of course I'm working on a time-sensitive project (aren't we all?)
 
ask the java guys if there is a function that will preserve the slash, or escape it for you or make the string 'safe'
Looks like coldfusion has done all it should by the time the error happens.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top