URL String Substitution

I have stored a URL in a varchar2 column in an oracle table, and used the
LINK feature in htmldb to create a link out of the text for the
column. However, when I try to run the page which was gotten from that text in the database, it fails to perform substitution of the session state variables (e.g &APP_ID.) which was part of the text stored in the database.
Is there some way to get the substitution to work, or handle the URL text
differently in the db?
I am trying to get a "list" of urls that I can search on- which is why I
chose a table.. There may be a better way of doing this.
thanks for any help..
larry

Larry,
try to code the url in your table this way (use the pseudo-variables #APP_ID# and #SESSION# and replace them with the actual values in your report):
f?p=#APP_ID#:1:#SESSION#Then use the following select in a report region:
SELECT HTF.anchor (REPLACE (REPLACE (url, '#SESSION#', :app_session)
                          , '#APP_ID#'
                          , :app_id)
                 , 'click me!') AS "myLink"
  FROM mytableSee the following example using dummy values and dual:
SELECT HTF.anchor (REPLACE (REPLACE ('f?p=#APP_ID#:1:#SESSION#', '#SESSION#', :app_session)
                          , '#APP_ID#'
                          , :app_id)
                 , 'click me!') AS "myLink"
  FROM DUAL~Dietmar.

Similar Messages

  • Japanese Characters working as URL parameters, turning to question marks when in URL string itself

    I'm having some trouble getting coldfusion to see japanese
    characters in the URL string.
    To clarify, if I have something like this:
    http://my.domain.com/index.cfm?categorylevel0=Search&categorylevel1=%E3%82%A2%E3%82%B8%E3% 82%A2%E3%83%BB%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
    All of my code works correctly and the server is able to pass
    the japanese characters to the database and retrieve the correct
    data.
    If I have this instead:
    http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA
    My script (which works fine with English characters) parses
    CGI variables and converts these to the same URL parameters that I
    had in the first URL using a loop and a CFSET url.etc..
    In the first example, looking at the CF debug info shows me
    what I expect to see:
    URL Parameters:
    CATEGORYLEVEL0=Search
    CATEGORYLEVEL1=アジア・ビジネス開発
    In the second example it shows me this:
    URL Parameters:
    CATEGORYLEVEL0=Search
    CATEGORYLEVEL1=???·??????
    Can anyone suggest means for debugging this? I'm not sure if
    this is a CF problem, an IIS problem, a JRUN problem or something
    else altogether that causes it to lose the characters if they are
    in the URL string but NOT as a parameter.

    My suggestion was that you test with the
    first url, not the second. However, I can see a source of
    confusion. I overlooked your delimiter, "/". It should be "?" and
    "=" in this case. With these modifications, we get
    <cfif Len(cgi.query_string) neq 0>
    <cfset i = 1>
    <cfloop list="#cgi.query_string#" delimiters="&"
    index="currentcatname">
    <cfoutput>categorylevel#i# =
    #ListGetAt(currentcatname,2,"=")#</cfoutput><br>
    <cfset i = i + 1>
    </cfloop>
    If it is a failing of Coldfusion, the above test should fail,
    too.
    Now, an adaptation of the same test to your second url.
    <cfset url2 = "
    http://my.domain.com/index.cfm/Search/%E3%82%A2%E3%82%B8%E3%82%A2%E3%83%BB%E3%83%93%E3%82% B8%E3%83%8D%E3%82%B9%E9%96%8B%E7%99%BA">
    <cfset query_str =
    ListGetAt(replacenocase(url2,".cfm/","?"),2,"?")>
    <cfif Len(query_str) neq 0>
    <cfset i = 1>
    <cfloop list="#query_str#" delimiters="/"
    index="currentcatname">
    <cfoutput>categorylevel#i# =
    #currentcatname#</cfoutput><br>
    <cfset i = i + 1>
    </cfloop>

  • Can I pass variables in the URL string?

    I am trying to get some variables into a loaded swf at
    runtime. The variables will carry information so the swf can load
    the correct xml file. I thought we could pass them through the URL
    string like so:
    new URLRequest("testing.swf?myVar=varOne
    but it just throws an URL cannot be found error. How can I
    get variables into my swf at runtime?

    What you are doing is fine. But you will always get that
    error when testing
    the movie (Ctrl+Enter). Try it in a browser and it should
    work.
    BTW, another way of doing the same is to use a URLVariables
    object, like so:
    var req:URLRequest = new URLRequest("testing.swf");
    var vars:URLVariables = new
    URLVariables("myVar=varOne&myVar2=varTwo");
    req.data = vars;

  • URL String works for weeks, then decides to give up on life.

    I have a game that uses the twitter API to call 20 recent tweets from the accoun the URL string is set up to, iot has been working for weeks no problems untill todya, when it just shouted at me! saying:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: file:////http://search.twitter.com/search.json?lang=en&q=Lady%20Gaga&rpp=100
              at DocumentMain()[F:\Documents and Settings\Scott Mitchell\Desktop\Comb Over Charlie Style Game\DocumentMain.as:88]
    Sometimes i get another error, but thats if i change the url to: https://api.twitter.com/1/statuses/user_timeline.json?screen_name=LadyGaga
    The code i have now to get the tweets is:
    var loader:URLLoader = new URLLoader(new URLRequest("//http://search.twitter.com/search.json?lang=en&q=Lady%20Gaga&rpp=100"));
                                  loader.addEventListener(Event.COMPLETE, loadComplete);
    public function loadComplete(e:Event):void
                                  processData(e.target.data);
                        public function processData(data:String):void
                                  var tweets:Array = JSON.decode(data) as Array;
                                  for (var i:int=0; i<21; i++)
                                            TweetHolder.tweet1.text = tweets[1].text;
                                            TweetHolder.tweet2.text = tweets[2].text;
                                            TweetHolder.tweet3.text = tweets[3].text;
                                            TweetHolder.tweet4.text = tweets[4].text;
                                            TweetHolder.tweet5.text = tweets[5].text;
                                            TweetHolder.tweet6.text = tweets[6].text;
                                            TweetHolder.tweet7.text = tweets[7].text;
                                            TweetHolder.tweet8.text = tweets[8].text;
                                            TweetHolder.tweet9.text = tweets[9].text;
                                            TweetHolder.tweet10.text = tweets[10].text;
                                            TweetHolder.tweet11.text = tweets[11].text;
                                            TweetHolder.tweet12.text = tweets[12].text;
                                            TweetHolder.tweet13.text = tweets[13].text;
                                            TweetHolder.tweet14.text = tweets[14].text;
                                            TweetHolder.tweet15.text = tweets[15].text;
                                            TweetHolder.tweet16.text = tweets[16].text;
                                            TweetHolder.tweet17.text = tweets[17].text;
                                            TweetHolder.tweet18.text = tweets[18].text;
                                            TweetHolder.tweet19.text = tweets[19].text;
                                               TweetHolder.tweet20.text = tweets[20].text;
                                            TweetHolder.tweet21.text = tweets[21].text;

    haha thanks your a genius. But i removed it and its still not working, I get this error now:
    But it seems it does not like this function:
    private function loadComplete(e:Event):void
                                       processData(e.target.data);
    its saying:
    at DocumentMain/loadComplete()[F:\Documents and Settings\Scott Mitchell\Desktop\Comb Over Charlie Style Game\DocumentMain.as:539]
              at flash.events::EventDispatcher/dispatchEventFunction()
              at flash.events::EventDispatcher/dispatchEvent()
              at flash.net::URLLoader/onComplete()

  • Can set charset in jdbc url string?

    can set charset in jdbc url string
    like mysql
    ?

    China,
    As far as I know, you cannot set the charset in the JDBC URL string. However, there are ways to set it. Although I have no experience with setting the charset, I believe the "Oracle JDBC User's Guide and Reference" contains this information. The guide is available from:
    http://tahiti.oracle.com
    Allow me to give you some advice. Each DBMS does things differently. Oracle's JDBC driver does not work exactly the same way as the JDBC driver for "mySQL". You need to learn how Oracle's JDBC driver does things. In my opinion, the "Oracle JDBC User's Guide nad Reference" is very good for learning how to use Oracle's JDBC driver.
    Good Luck,
    Avi.

  • String Substitutions with PL/SQL Function

    Hello, i user APEX 4.2.1.00.08 in Database 11g
    I new in apex and a try to use String Substitutions.
    When I define a String like CONST with static value like '999' in Edit Applications Definition it's work fine.
    But I need to define the same String 'CONST' but with value to return from PL/SQL function like.. Package.function
    It's Possible ??
    Thanks !!

    No, you'll need to use application items instead - or pass the value as parameter to your function.
    Passing parameters like this makes for good practice anyway, since your modules become more testable outside the apex environment, and more robust.

  • String substitution on Weblogic

    Hi experts.
    As you know, the WLS domain template provides the string substitution mechanism.
    (startscript.xml and stringsubs.xml)
    Here you should specify your entries that will be processed during the template applying.
    After being applied, these entries are "registered" in DOMAIN_HOME/init-info/ startscript.xml and startscript-unsub.xml
    Can these strsubs tasks be modified later?
    1) Is there any UI (or WLST functions) available for strsubs modification?
    Sure, I can edit xml files, but I think that it is not the convinient (and graceful) way to do it.
    2) As there is the startscript-unsub.xml file,
    does it mean that these string substitutions can be rolled back later?
    If yes - then how can it be done?
    Thanks

    There is currently no mechanism to perform string substitution after the config.xml has been created.

  • Hacker changing URL string

    this is frustrating-- our server is getting pounded (and so
    running JRUN up to 100%) with some hacker changing the URL to
    different things. I'm running CFMX 6.1 on Windows 2003. Here's a
    sample of query strings that have been changed:
    Fuseaction=events&amp;amp;amp;section=events&amp;amp;View=http%3A%2F%2Fwww.vacacionalhouse .com%2Fen%2Fimg%2Fvohe%2Fseyon%2F
    Fuseaction=http%3A%2F%2Fwww.psikolojikyardim.org%2Fetkinlik%2Finclude%2Feto%2Fnixaz%2F
    Fuseaction=Day&amp;amp;amp;amp;amp;amp;sm=2&amp;amp;amp;amp;amp;amp;sy=http%3A%2F%2Fwww.so easywebsite.com%2Fsoeasycasino%2Fixu%2Fxotem%2F&amp;amp;amp;amp;amp;amp;sd=27&amp;amp;amp; amp;amp;View=all&amp;amp;amp;amp;View=all&amp;amp;amp;View=all&amp;amp;View=all
    --&gt;I've added a catch for these where it redirects
    them to the main page, but this doesn't seem to stop them
    --&gt;notice the ;amp;amp;amp;amp; in that last one....
    None are the same IPs and hail from Russia, Portugal, etc. so
    I can't block the offending IP, and they're using a normal browser
    so I can't block by user-agent
    Any ideas?

    quote:
    Originally posted by:
    SilentBob'secretfusion
    This is what I do. I pass the variable twice in the url
    string. The first unencrypted, the second encrypted. I compare the
    two on the next page and if the don't match, I know I am dealing
    with an asshat.
    Great idea! (And appropriate name too)

  • Dynamic String Substitution in Eclipse with JSP

    Hi folks,
    I'm wondering if it is possible to dynamically change token for ant that are present in my jsp with the dynamic string substitution in jsp inside tomcat. Right now, I'm loading the bootstrap with my runner and pointing to my application. In preference, I've put some token like @STATIC_URL@ that should replace by something else. But It seem that Tomcat goes directly to the source of the jsp and does'nt really care about the string substition of eclipse. Is there a way to do that?

    Hi there,
    Since this is more of an Ant or an Eclipse question it is better to post the question in those forums / mailing lists as people on those lists will be able to help you better:
    Here's the link to subscribe to the Ant User Mailing List, once you subscribe send a new e-mail to the list:
    http://ant.apache.org/mail.html
    Forum for Eclipse:
    http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?cat=28&forum=472

  • How can i get getwayed url string using pluggable nav in news portlet?

    hi.
    How can i get getwayed url string using pluggable nav in news portlet?
    A code just like below is what I want.
    <param value="param=http://.../portal/server.pt/gateway/PTARGS_.../http/...">
    I tryed the following, but didn't work as I wanted.
    1.<param value="<pcs:valueexpr='var'/>">
    -> transformed. but I want the prefix 'param=' in the enquoted string's too.
    2. <param value="param=<pcs:valueexpr='var'/>">
    -> not transformed.
    Any idea?
    Hiroyuki

    Hi all,
    We have HPROF functionality in our latest roadmap, so you will see that feature in our next major release called JRockit R28.
    I recommend, above from the MemLeak documentation suggested by Makiey, the following information on how to use JRockit tools.
    Performance Tuning & Profiling:
    http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_02.html
    Using JRockit tools:
    http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_03.html
    Diagnostics & Troubleshooting
    http://download.oracle.com/docs/cd/E13150_01/jrockit_jvm/jrockit/geninfo/diagnos/part_04.html
    Best Regards,
    Tuva
    JRockit PM

  • Passing variables through the URL String

    I have a template and outside the basic html - all the content is grabbed from a db. I want to use 1 template to generate all of the other pages for the site. So basically, the only way to identify the page would be through the URL string.
    So, something like -
    www.mysite.com/template.jsp?page_section=aboutus&pageID=1
    That string would query the database and output the content for page 1 of the about section.
    Does this make sense and where would I start to learn how this is done?.
    Again, I appreciate your help.
    Mark

    since database connections are costly affair i better use
    jsp include tag ratter then getting dadta from database
    assumming that u can devide your comman pages in 4 parts
    just assume
    top - logo
    bottom - common links
    center - data
    left - menu
    my jsp page would look like this (aboutus.jsp)
    <%@ include file="top.html" %>
    <%@ include file="left.html" %>
    <%@ include file="aboustus.html" %>
    <%@ include file="bottom.html" %>
    2) disclaimer.jsp
    <%@ include file="top.html" %>
    <%@ include file="left.html" %>
    <%@ include file="disclaimer.html" %>
    <%@ include file="bottom.html" %>
    this would reduce ur maintainnce as if u want to change top logo only top.html needs to be changed and it would affect in all pages
    regards
    [email protected]

  • What does DUMMY=1 mean in the URL string

    Hello,
    I am executing WAD template that contains a query for my planning layout. When I look at the URL link of the WAD in the browser, it has the following in it:
    http://xxx.xxx.com:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZFI_ZFIFMAL02_WT0001&DUMMY=1
    What is that DUMMY=1 at the end of the URL string mean ? I have also seen DUMMY=0 in some queries in QA and development systems. Any idea?
    thanks

    Hi,
    thanks a lot for this helpful reply. One question I do have though. So, say I created an iView in portal with the link that points directly to my WAD template and the link has say DUMMY=2 in the query string. Now, if I do update my WAD template, would I need to change the link to DUMMY=3? So far what I have noticed that I do save links with DUMMY=X in the URL and then if I do update my WAD, when the user clicks on the link in portal, the WAD still gets updated. So, do you really need DUMMY=X in your link in that case?
    Thanks

  • GetConnection(String URL) vs. (String URL, String user, String password)

    Hi,
    would have a question referring to the documention at http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.html where the forms of getConnection are described.
    I would like to convert from using a signature that takes the URL, user name, and password as separate parameters to using a signature that takes the URL, user name, and password all as part of a URL parameter.
    While I was able to successfully connect to my database using the form getConnection(String URL, String, user, String password); I am not able to achieve the same when using getConnection(String URL).
    Here are the code snippets, maybe someone can point out the reason why the second approach is not working?
    approach 1 - working fine
    String driver = "oracle.jdbc.driver.OracleDriver";
    try {
              Class.forName(driver);
              } catch(java.lang.ClassNotFoundException e) {
              String connectionURL = "jdbc:oracle:thin:@localhost:1521:PMT";
              String pgUser = "\"James.Smith@000\"";
              String pgPwd = "\"js\"";
         try {
                   Connection conn = DriverManager.getConnection(connectionURL, pgUser, pgPwd);
    approach 2 - error: java.sql.SQLException: The Network Adapter could not establish the connection
    String driver = "oracle.jdbc.driver.OracleDriver";
    try {
              Class.forName(driver);
              } catch(java.lang.ClassNotFoundException e) {
    String connectionURL = "jdbc:oracle:thin:\"James.Smith@000\"/\"js\"@localhost:1521:PMT";
         try {
                   Connection conn = DriverManager.getConnection(connectionURL);
    Thanks a lot in advance
    Kind regards
    Thomas

    Let me get this clear.
    You want a login dialog.
    Some program calls the dialog and waits untile user respond
    once the user press ok or cancel it reutrn the users input to the caller.
    You can do this directly using JFrame
    but you can do it wil JDialog if you use it as aModal dialog.
    it will look like this
    class LogInDialog  extends JDialog implements ActionListener{
       String value;
       public LogInDialog(){
          setModel(true);
        // This is what you invoke
        public String loadDialog(){
            setVisible(true);
            return value;
        public void actionListener(..... e){
            if (e.getSource() == bCancel)
               value = null;
            else if (e.getSource() == bOk)
               value = //generate the string
            dispose();
    }

  • URL openStream problem. URL String length

    Hi,
    My problem is about length of the url string. I'm simply creating a URL and trying to call openStream() to get content. But if the length of url string exceeds 118 characters, I'm getting an exception. It says Server returned Http response code 505.
    If I try the same url string in a browser it's working.
    Thanks for all replies in advance...

    the problem solved, it was about white space not length... I didn't notice the white space there sorry!

  • String substitution in a file

    What is the appropriate strategy to do string substitution within a file. Is it simply loading the contents of the file into a string, do the substitution on the string, then rewrite the string back to the same file? Is there a regex class that performs string substitution on a file?
    Thanks

    Depends. If the substitute string is the same length, than RandomAccessFile can be use affectively. Otherwise, read in the old file and write out the new one with the changes, then delete the old one.
    Regex is avail and is used indirectly via String methods such as replaceAll, etc.
    Refer to java.io. and java.lang.string.

Maybe you are looking for