How to Open URL value stored in a variable in JSP

Hi all,
I want to know how i can use value of a string variable in a JSP as url to open.
<% String abc="some url value" ; %>
then i want to open abc as URL in JSP
Please suggest something on this.
any help in advance will be highly appreciated.
thanks,
savdeep.

thanks rahul but,
I want to open the URL in
<% String URLvariable="abc.htm" ; %>
<% out.println("< a href=URLvariable>"+rs.getString("Some JSP value")+"</a>"); %>
please suggest how should i open the above URL value stored in JSP variable.
any help will be highly appreciated.
thanks,
savdeep.

Similar Messages

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • How to open url photoshop on mac OSX ?

    How to open url photoshop on mac OSX ?
    Safari doesn't know internet adress starting by "aam://" please help me...

    http://helpx.adobe.com/creative-cloud/kb/cc-download-button-gives-aam.html

  • I want to assign the value of a Javascript variable to JSP Variable

    I want to assign the value of a Javascript variable to JSP Variable .. for example :
    <%
    Bla Bla Bla
    %>
    <script>
    var JavaScriptVariable="hello"
    </script>
    <%
    String JSPVariable=// The Value of JavaScriptVariable ;
    %>
    How can i do that ??
    Thanks

    >I want to assign the value of a Javascript variable to JSP Variable
    cannot be done.Friend try to understand concepts properly Javascript is always excuted by the browser @clientside where as JSPCode is executed Websever(ServletContainer) @serverside.Through you are combining JSP Code blocks(Tags,Expressions,scriptlets...) & javascript under a single page webserver can only identify what is their under JSP Code blocks.
    Hope this could be an appropriate answer for your question.
    However,you can as well submit a request by encoding your URL with request parameters and the submit to the page and then collect it using request.getParameter(name).
    But under a single context state it is not possible
    REGARDS,
    RaHuL

  • How to open a report stored in the CMS with the RDC ?

    Hello,
    With CRXIR2, reports can be stored in the CMS.
    Does anybody knows how to open such a report with the RDC (version 11.5) ?
    I really need to use the RDC because I have to save subreports on HDD
    and it is unavailable with the RAS SDK (neither Java nor .Net).
    Thank you for your help.
    Alain

    Hi Don,
    Thanks for your answer,
    Why saving subreports ?
    - orthogonality reasons... we can import them, why c'ant we do the opposite?
    - consitency reasons... we should be able to do the same as we do with the designer, (why this option is available in the Designer ?)
    Furthermore, the job is already done in Crystal, it should not be so difficult to port it to the RAS.
    - regression reasons... this is something we could do in the past (from Delphi, with the RDC), now the RDC is gone....
    Now I will tell you my personal reason:
    We have huge reports (about 30 subreports), based on huge business views.
    As a result, just loading the report (openClientDocument) takes more than one minute.
    In a production environment the custommers do not want to accept that.
    So:
    - we keep the business views at design time because it's a requirement
    - Once the report designed I try to cut the BusinessViews and replace them by SQL commands
    I suppose you know the RAS to be aware that it can't do that by far.
    I wrote a program to disconnect all the ReportObjects from the BusinessView, it's Ok
    Now I need to remove the BusinessViews from the report and all subreports.
    I can automate CrystalReports for it, but only at the report level...
    This is my particuliar reason for saving subreports.
    Am I the only one to have this request ?
    If you want, of course, I'm ready to help developing those missing things in the RAS.
    I'm serious, tell me if you are interested.
    Thank you again and best regards
    Alain

  • How to compare the values stored in the list

    Hi,
    I am having the requirement that i want to compare the values stored in the list.How to store the values in the list and compare the list values stored inside it.
    Regards,
    Ahamad

    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collections.html#sort(java.util.List,%20java.util.Comparator)
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Comparator.html
    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html

  • How to Print all values stored in an Associative array

    DB version:10gR2
    There can be multiple results(multiple rows) for the below query. So, i'll have to declare the variables v_sid_serial, v_orauser, v_objectname,v_objecttype as associative arrays.
    SELECT l.session_id||','||v.serial# sid_serial, l.ORACLE_USERNAME,o.object_name,o.object_type,
           into v_sid_serial, v_orauser, v_objectname,v_objecttype
    FROM dba_objects o, v$locked_object l, v$session v
    WHERE o.object_id = l.object_id
          and l.SESSION_ID=v.sid;But I want to store the results from the above query in flat file. I want the result set to look like
    SID_SERIAL      ORA_USER               OBJECT_NAME           
    742,32914    SCOTT                        EMP
    873,49832    HR                           EMPLOYEES
    893,9437     mytestschema                 emp_dtls
    .            .How can i print the values in Associative arrays in the above manner so that i can spool the result set to a flat file?
    Edited by: user10373231 on Sep 29, 2008 5:19 AM

    user10373231 wrote:
    is there any way to print all values stored in an Associative arrayPrint to where?
    You could use DBMS_OUTPUT to get the output on the screen within SQL*Plus.
    You could also output (pipe) the data from PL/SQL using a pipelined function that you select from SQL. An example of a pipelined function...
    SQL> CREATE OR REPLACE TYPE myrec AS OBJECT
      2  ( col1   VARCHAR2(10),
      3    col2   VARCHAR2(10)
      4  )
      5  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE myrectable AS TABLE OF myrec
      2  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE FUNCTION pipedata(p_str IN VARCHAR2) RETURN myrectable PIPELINED IS
      2    v_str VARCHAR2(4000) := REPLACE(REPLACE(p_str, '('),')');
      3    v_obj myrec := myrec(NULL,NULL);
      4  BEGIN
      5    LOOP
      6      EXIT WHEN v_str IS NULL;
      7      v_obj.col1 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
      8      v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
      9      IF INSTR(v_str,',')>0 THEN
    10        v_obj.col2 := SUBSTR(v_str,1,INSTR(v_str,',')-1);
    11        v_str := SUBSTR(v_str,INSTR(v_str,',')+1);
    12      ELSE
    13        v_obj.col2 := v_str;
    14        v_str := NULL;
    15      END IF;
    16      PIPE ROW (v_obj);
    17    END LOOP;
    18    RETURN;
    19  END;
    20  /
    Function created.
    SQL>
    SQL> create table mytab (col1 varchar2(10), col2 varchar2(10));
    Table created.
    SQL>
    SQL> insert into mytab (col1, col2) select col1, col2 from table(pipedata('(1,2),(2,3),(4,5)'));
    3 rows created.
    SQL>
    SQL> select * from mytab;
    COL1       COL2
    1          2
    2          3
    4          5... which you can easily adapt to output whatever data you want e.g. you could loop through your associative array and pipe out the values within it.

  • How to set a value to a Presentation Variable using GO URL?

    Hi All,
         I am working on a drill (GO URL) from Dashboard page1 to Dashboard page2.
         The problem I am facing is, I am not able to pass a value to the presentation variable through GO URL. (I have to pass "Customer Category" static
    value to The presentation variable present in Dashboard Page2 ).
         The Dashboard page2 is having a view select in which we are using presentation variable to select the report based on the value selected in
    View Select.
         For example: If the user selects "Customer Category" value in View select and clicks on GO button Customer Category report will show the out put.
         When i am drilling from Dashboard Page1 I have to pass a value to the presentation variable used in view select and also pass some filter condition in
         GO URL.
         Please let me know if it is feasible to pass a value to the presentation variable through GO URL in OBIEE 10.1.3.4.
         It will be greate if you can provide me with the syntax to set a value to the presentation variable of dashboard page2 through GO URL.
    Thanks and Regards,
    Sagar Vishwanathwar.

    1) You have to navigate to dashboard page, not to answer request = you have to use "Dashboard URL API" not GO URL API.
    2) On the target page, you have to place dashboard prompt, which sets required presentation variable.
    3) Refer to the target using Dashboard URL API and set filter on prompt column using URL parameters. Example: http://localhost:9704/analytics/saw.dll?Dashboard&PortalPath=%2Fusers%2Fadministrator%2F_portal&Page=page%201&Action=Navigate&P0=1&P1=eq&P2=D_TIME.YEAR_CODE&P3=%221996%22
    Do not forget to use Action=Navigate. The syntax for setting filters using url parameter is the same as for GO URL API described in Business Intelligence Presentation Services Administration Guide.
    This is the way, you can implement navigation to parametrized direct SQL reports including passing filter values...
    Regards K.

  • How to open a PDF stored on my computer with FF PDF js?

    I want to open PDF files stored on my computer with FF PDF js.
    Reason: This way I can search my local PDFs loaded in a FF Window together with other tabs in a FF Window using the FF ad-on HUGO or any other search tool for tabs.
    Thank you for your help
    Ludwig Müller

    Thank you for your reply. My problem is that what you describe does exactly not work. When I say "open with firefox" I am prompted with the pop-up window "what should firefox do with this file?" - and then choosing FF creates an empty "New Tab" and I am prompted again with the same pop-up.
    What differentiates FF PDF js from all other PDF viewers is, that it is an OPEN APPLICATION, which means I can search it with FF search tools across all tabs.
    Example: I do have 50 tabs open and I want to search for a specific term in one go over 50 tabs, I can do this with the add-on HUGO (I was the co-developer for this add-on, the author is Allasso Travesser) for tabs with html or PDFs that are loaded in FF PDF js Viewer. Now, with PDFs from the internet no problem, but I can't load my own PDFs into FF.

  • How to pass a value to a bind variable in a query report in oracle apex

    Hi Guys,
    I have requirement to send weekly reports via email to some users. The users should receive their own records in the report. The user details is stored in a table. What I am planning to do is to create a report query in oracle apex to generate the report and then run a function/procedure via a scheduler to email the report to respective users. Now my query is ............. is it possible to pass a value (user name) to the report query to pull records of only that user? I know we can have bind variables in the report query but I have no idea how to pass a value for bind variables from a function/procedure.
    Can anyone help me on this issue or suggest a better approach?
    Thanks,
    San

    You need to use dynamic sql
    But please keep in mind that since you're using Oracle you may be better off posting this in some Oracle forums
    This forum is specifically for SQL Server
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to open a local file from javascript in a jsp-page

    Hi
    I have created an iview from a PAR file. In the par file I have a jsp-page with some javascript code. From the javascript coe I want to open a new window with an Excel file.
    I have tried window.open("c:
    test.xls", "test_window"), but it doesn't seem to work. I have created a small HTML page locally with the same command and there a new window opens with the Excel file.
    If I change the local file path with an URL it also works.
    Any idea how to open a local file ?
    Thanks
    /Jakob

    Jacob,
    I'm not 100% (but 99,9%) and it has to do with security ristrictions of the browser not allowing to have local workstation interation from the web. This is ofcourse very dangerous if the browser would allow it... So therfore it is blocked. What if somone would point to a file/executable that formats your drive so for that reason it is not allowed to have web interaction with a local file. Only with Java Applets this is possible but still with many limitations, and what I remember Google Gears and Adobe Air do have some limited web 2 local file interaction... So best and most simple solution you are left with is pointing to a url instead of a file on a c:\ drive.
    PS The reason why it works when you start the html from your local PC has todo with the fact that the browser detects that the html is not running in the web at that moment therefor allowing the access.
    Cheers,
    Benjamin Houttuin

  • How to overwrite the value of a struts variable value using struts only

    Say i define a variable using struts in my jsp
    <bean:define id="aVar" value="abc" />
    Now the variable has a value of abc , how can i overwrite it again to have another value --say "123"..
    I need to change its value using struts only and not scriplet.
    Kindly help ....

    This page may be helpful:
    http://www.exampledepot.com/egs/javax.servlet.jsp/usebean.jsp.html

  • How to pass a value to a BC4J method from JSP/ADF and get a return value.

    How i can access and application module method from my jsp using JSTL passing a value and hope a return value from BC4J method already exposed using interfase and droped from data control to my jsp page
    Any suggestions ?
    Mensaje editado por:
    mr2k

    Hi,
    Check the size of that Window in which you are displaying this Text of 130 characters.
    May be it is less
    in that case split that string into 2 strings and pass the two strings from ITCSY structure to script and use.
    reward if useful
    regards,
    ANJI

  • How to open a Filechooser on a button click from jsp page

    can anyone tell me how to open a Filechooser on a button click from a jsp page.
    Thanks

    <input type="file" name="myfile">

  • How to give different value to a static variable???

    Hi all:
    Is there any solution to set different values to a static variable???I had try two ways but all have errors!
    1.Way_1
    protected String tmp=null;
    protected void initSituation(int sayorpress)
    if (sayorpress==0)
    tmp = "string1";
    else if (sayorpress==1)
    tmp = "string2";
    protected static String RESOURCE_STRING = tmp; <---error
    Error:non-static variable tmp cannot be referenced from a static context
    2.Way_2
    protected void initSituation(int sayorpress)
    if (sayorpress==0)
    protected static String RESOURCE_STRING = "string1"; <---error
    else if (sayorpress==1)
    protected static String RESOURCE_STRING = "string2"; <---error
    Error:illegal start of expression at
    not an expression statement at
    Thank you very mich!!!

    Try this:
    protected static String RESOURCE_STRING = null;
    protected void initSituation(int sayorpress)
    if (sayorpress==0)
    yourClass.RESOURCE_STRING = "string1";
    else if (sayorpress==1)
    yourClass.RESOURCE_STRING = "string2";
    You cannot declare a static variable inside a method. But you can access a static variable thorugh your class.

Maybe you are looking for

  • Error while posting in payroll

    Dear All I have assigned wage type to symbolic account and these symbolic accounts are assigned to GL account's. After that when I am running posting through Eassy Access I am getting error like "Posting could not be promoted" Please guide me the nec

  • SQL Query Performance needed.

    Hi All,    I am getting performance issue with my below sql query. When I fired it, It is taking 823.438 seconds, but when I ran query in, it is taking 8.578 seconds, and query after in   is taking 7.579 seconds. SELECT BAL.L_ID, BAL.L_TYPE, BAL.L_NA

  • Accessing files on boot camp windows partition and Mac OSx partition

    Before I install Windows 7 64 bit on my iMac using Apple's instruction manual, I have a question. The manual states: *+FAT-Provides better compatibility, allowing you to read and write files on the Windows volume from Mac OS X. This partition must be

  • Question on IDM11g installer and OID 10g DAS self service tool

    Hi, I have setup the Oracle IDM 11g on windows box(XP). I have explored the same and found that, IDM11g has lot of differences when compared to IDM10g. One of the change that I have observed is the OID DAS Self service tool(Web GUI based). In OID 10g

  • Login keychain going crazy

    My login keychain is set (via Keychain first aid) to "always remain unlocked". However, it seems to lock itself from time to time anyway. (I've set the machine to require a password to unlock the screen saver.) Even when the menu bar shows it to be u