Results 1 to 3 of 3
- 07-04-2007, 05:28 AM #1
Member
- Join Date
- Jun 2007
- Posts
- 92
- Rep Power
- 0
Problem with '/' character in HTML and JSP
I'm using an outside application to create charts and graphs, inside of my JSP page.
This application takes parameters, creates a flash movie and passes back a html fragment that you can display on your page to load the flash movie.
My problem is, there is a '/' character in a path variable that needs to be removed from this fragment.
For example:
This is the html fragment passed back to the application. In both of these places:Java Code:<OBJECT width=600 height=300 classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"> <param name=movie value="/charts_cache/46801A53-CACEDA20.swf"> <param name=quality value=high> <EMBED src="/charts_cache/46801A53-CACEDA20.swf" width=600 height=300 quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash"> </EMBED> </OBJECT>
andJava Code:<param name=movie value="/charts_cache/46801A53-CACEDA20.swf">
I need to remove the '/' before "charts_cache" for this to display properly in my application.Java Code:<EMBED src="/charts_cache/46801A53-CACEDA20.swf"
Does anyone have any ideas for plucking out that one character?
Thanks
Marcus:cool:
- 07-04-2007, 05:30 AM #2
Member
- Join Date
- Jun 2007
- Posts
- 95
- Rep Power
- 0
Have you tried to do a substring on it?
Will take off the first character and return the rest.Java Code:string.substring(0);
Greetings.
Felissa:p
- 07-04-2007, 05:32 AM #3
Senior Member
- Join Date
- Jun 2007
- Posts
- 111
- Rep Power
- 0
Well it looks like you're calling replaceAll correctly.
So you must be doing something else wrong.
Are you putting the string back.
You may need to provide more information or show us the rest of your code.
Greetings.Java Code:chartString = chartString.replaceAll("/charts_cache","charts_cache");
Eric
Similar Threads
-
Problem with applying Sql order by to html table
By sireesha264 in forum Advanced JavaReplies: 2Last Post: 02-04-2008, 10:20 AM -
Problem either with BufferedReader or sending a newline character
By aikanaro in forum NetworkingReplies: 1Last Post: 01-15-2008, 08:55 PM -
Getting character set from a website
By Java Tip in forum Java TipReplies: 0Last Post: 11-26-2007, 12:53 PM -
reading text character by character
By bugger in forum New To JavaReplies: 2Last Post: 11-09-2007, 08:54 PM -
Problem with display the character
By romina in forum New To JavaReplies: 1Last Post: 07-25-2007, 07:43 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks