Results 1 to 3 of 3
  1. #1
    Marcus is offline Member
    Join Date
    Jun 2007
    Posts
    92
    Rep Power
    0

    Default 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:
    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>
    This is the html fragment passed back to the application. In both of these places:

    Java Code:
    <param name=movie value="/charts_cache/46801A53-CACEDA20.swf">
    and
    Java Code:
    <EMBED src="/charts_cache/46801A53-CACEDA20.swf"
    I need to remove the '/' before "charts_cache" for this to display properly in my application.

    Does anyone have any ideas for plucking out that one character?

    Thanks

    Marcus:cool:

  2. #2
    Felissa is offline Member
    Join Date
    Jun 2007
    Posts
    95
    Rep Power
    0

    Default

    Have you tried to do a substring on it?

    Java Code:
    string.substring(0);
    Will take off the first character and return the rest.

    Greetings.

    Felissa:p

  3. #3
    Eric is offline Senior Member
    Join Date
    Jun 2007
    Posts
    111
    Rep Power
    0

    Default

    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.

    Java Code:
    chartString = chartString.replaceAll("/charts_cache","charts_cache");
    Greetings.

    Eric

Similar Threads

  1. Problem with applying Sql order by to html table
    By sireesha264 in forum Advanced Java
    Replies: 2
    Last Post: 02-04-2008, 11:20 AM
  2. Replies: 1
    Last Post: 01-15-2008, 09:55 PM
  3. Getting character set from a website
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 11-26-2007, 01:53 PM
  4. reading text character by character
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-09-2007, 09:54 PM
  5. Problem with display the character
    By romina in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 08:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •