Adding a hyperlink in java code

Please let me know the procedure to add a hyperlink in java code.
For example, I want to add a link in the following code to the output
out.write("\n Sum : " + sum);
Output should be
Sum : 24
In the above answer, I need 24 o be displayed as a hyperlink which will redirect me to some webpage on clicking.
Awaiting the reply.

Praveen_Forum wrote:
i guess you are looking for something similar to this
out.write("<a href = " + url + ">" + you text + "</a>");
Only problem Praveen is that it makes the assumption that out is writing to a browser as in:
PrintWriter out = response.getWriter() ;
out.println("something here") ;
// etcIf out writes somewhere else that won't work.
PS.

Similar Messages

  • Adding rows to J2ME WTK/Settings/User Defined (through Java code)

    Hi all..
    Just a quick question..
    Is it possible to add Key/Value pairs to a MIDlet's 'User Defined' field through Java code..(ie) - add a new row to the User Defined field..
    If not, can anyone tell me how a Bluetooth-Client GUI can save an image it has been sent by a Bluetooth-Server GUI?
    Thanks in advance..
    Rookie

    if i understand you, you want to call application module method when user clicks on add button on the UI and your table is from VO
    so what i can come up for now is:
    1) create variable binding from the iterator for both name and price.
    2) on your UI action button :
    <af:commandButton actionListener="yourbean.addToCart">
    <f:attribute name="pName" value ="binding.<created name bind variable>"
    <f:attribute name="pPrice" value = "binding.<created price bind variable>"
    </af:commandButton>
    3) custom Managed Bean:
    //yourBean.java
    public void addToCart(ActionEvent e){
    // get binding here
    // use executeWitParams method to send parameter to the function "testMethod" and execute
    //AppModuleImp.java
    public void testMethod(String pName,String pPrice) {
    CardVOImpl vo = this.getCartVO1();
    CardVORowImpl r = (CardVORowImpl)vo.createRow();
    r.setAttribute("NAME", pName);
    r.setAttribute("PRICE", pPrice);
    vo.insertRow(r);
    Hope this helps...
    Let me know if not..
    Thanks
    Edited by: MavenDev on Oct 30, 2011 8:08 PM

  • Test.jsp not able to display the output from the java code.

    when i try to invoke http://localhost/papz/test.jsp
    I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
    <html>
    <head>
    <title>Test</title>
    <body>
    <%
    out.println("Hello World");
    %>
    asdfasdfasdf
    </body>
    </html>
    i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
    when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
    Any clues whats going on...?
    I followed the instructions...over and over again... but it doesnt seem to help.
    win nt 4.0
    apache 1.3.12
    jserv 1.1.1
    Pls help. Thanks

    Hi,
    Have you solved your problem?
    I4m trying to do the same, but I installed portal 30, then portal to go, and when I try to run test.jsp I get the following error:
    Request URI:/papz/test.jsp
    Exception:
    java.lang.NoSuchMethodError: oracle.jsp.util.JspUtil: method
    stripTarget(Ljava/lang/String;C)Ljava/lang/String; not found
    Thanks
    Pablo Lopera
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by NewBie:
    when i try to invoke http://localhost/papz/test.jsp
    I dont see anything. The page is blank. And there are no error messages in any log files. When i click on view source in IE i get to see the entire source code, including the jave code.
    <html>
    <head>
    <title>Test</title>
    <body>
    <%
    out.println("Hello World");
    %>
    asdfasdfasdf
    </body>
    </html>
    i added in the asdfasdf to see whehter it will be printed or not... It does print that stuff out.
    when i try to invoke the login.jsp page, i get the dialog box "save this file to disk"
    Any clues whats going on...?
    I followed the instructions...over and over again... but it doesnt seem to help.
    win nt 4.0
    apache 1.3.12
    jserv 1.1.1
    Pls help. Thanks<HR></BLOCKQUOTE>
    null

  • Is there any way to determine if a link is a book mark or hyperlink in java script

    Is there any way to determine if a link is a book mark or hyperlink in java script
    Sub Problem:
    I am making an array of quads of all the hyperlinks in a document. I would like to automatically skip over all the bookmarks in the starting pages of a document and just get the links of the hyperlinks.
    Now I have to manually set the pages that contain bookmarks so they are not included in the array.
    Is there any way to determine if a link is a book mark or hyperlink in java script?
    It would help automate the conversion I need below
    John
    Main Problem:
    I have been working on converting a set of pdf files with 1000’s of hyperlinks like www.site.com\folder1\file1.pdf#page=10
    To jump to a local copy of the files with a relative type link
    ../folder1/file1.pdf and then go to the proper page.
    I have found that it can be done manually by changing the hyperlink to a javascript
    var otherDoc = app.openDoc('../folder1/file1.pdf', this);otherDoc.pageNum = 10 - 1;
    and setting each destination file with a disclose()=true;
    Based on the help so far that java script cannot access the hyperlink value in a link
    See: http://forums.adobe.com/thread/1039908?tstart=60
    I have resorted to the following plan using acrobat javascript, an external keyboard macro recorder and excel in combination to get around the problem
    Four folder level acrobat javascripts with “buttons”
    One to get all the link quads in an array, in the pdf and report the total number
    The second creates a form field in the far corner of the first page and moves there.
    The third jumps to each link found by creating a form field just to the left of the link and zooms in so it can be selected by a “mouse click” from the keyboard macro recorder 
    The forth deletes the form field
    The keyboard macro recorder runs javascript 2 and then 3 then clicks on the link just to the right of the middle of the screen and uses keys to get to the advanced editing to get to edit the hyperlink .
    The hyperlink is then copied to excel where it is converted using string functions to the needed javascript text to be copied back.
    To the acrobat file into a java script (after deleting the hyperlink)
    Rinse/lather/repeat
    I have been able to convert about 150 links an hour.
    Better then hand typing, but not like having java access to the links.
    I am looking to improve the solution

    thanks for your help.
    I may have been confusing a "acrobat bookmark" and a bookmark in a word file that is converted to a pdf and ends up being a
    link of the type:
    "Go to a page in this document"
    which I do not want in my array vs
    a link of the action type:
    "Open a web link"
    Which I do want
    John
    My code, note how I have to skip pages with "Go to a page in this document" links depending on the document, I would like to use the same code for each document and skip over the "Go to a page in this document" links :
    global.ilinkindex = 1; 
    global.aLinkquads = [ [0, 1, 1, 0, 0],
           [0, 0, 0, 0, 0] ];
    function GetLinkArray()
    global.ilinkindex = 1;
    var iTotalLinks=0;
    // for ( var p = 0; p < this.numPages - 8 ; p++)                   // end before bookmarks for each page of the file x.pdf
    //  for ( var p = 0; p < this.numPages; p++)                     // for each page of the file
    for ( var p = 23; p < this.numPages; p++)                     // start after bookmarks for each page of the file y.pdf
      var cropbox = this.getPageBox("Crop", p);
      var alinksonpage = this.getLinks(p, cropbox);            // get array of links on page
      for ( var ll = 0; ll < alinksonpage.length; ll++)
       var linkquads = alinksonpage[ll].rect;     // get link Quads
       linkquads[4] = p;          // add page number to link Quads array
        global.aLinkquads[global.ilinkindex] = linkquads; // add quads to global link Quads array
        global.ilinkindex++;
    iTotalLinks = global.aLinkquads.length - 1;
    global.ilinkindex = 1;
    app.alert("Number of Links in Document is " + iTotalLinks );

  • Calling java code from oracle apps form

    I've created my own java .class file and am attempting to call it from an oracle applications form. I am getting a runtime error while running the form, but I don't know what the error is because nothing is being reported to me.
    I've created the .java file in JDeveloper, compiled it into a .class file, deployed it to a .jar file, and placed it on the application server in a directory that the CLASSPATH can see it. I've added it to the archive parameter of the appsweb.cfg file and see that the .jar file is being downloaded when the JInitiator of Oracle Apps is started.
    I have also imported the .class file into the form via the Program -> Import Java Classes which resulted in PL/SQL package stubs created to call the .class methods.
    When I run the form, the java code is activated on a triggering event, PRE-INSERT. There is no java bean item in a block or on a canvas anywhere. I dont' think I need there to be since I am simply using the java code to perform actions during PRE-INSERT, not to display anything on the canvas.
    I have placed debug messages throughout my code and see that the error is occuring in the PL/SQL packaged stub at the line "JNI.GET_CLASS()" where the parameter to that call is the name of my class. I know it's erroring there because I am handling the "java_error" exception. I am displaying "ora_java.last_error" in the exception handling, but it is null.
    I am at a loss as to determine why I am having problems and how to display an error. Any suggestions? I'm happy to outline my steps and problem in more detail if I have missed something obvious.
    We are using Forms 6.0.8.21.3 with Oracle Apps 11.5.7.
    Shane.

    Shane,
    Don't loose the heart. You have come too close to end.
    The scenario you have mentioned is very unique and something which will fit more in the forms forum. So I think that was a sincere answer to help you and not a "pass the buck" card type game :)
    You are lucky that you got Tapash interested into this issue, otherwise you see there is no OAF component involved out here.
    I have an article promised to some of the guys but will follow this issue.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error: ORA-03113 while executing complex java code from Oracle PL/SQL

    Hi,
    I am trying to execute a complex java code from Oracle PL/SQL. The classes were resolved successfully. But in the middle of execution, I am getting the following error:
    ERROR:
    ORA-03114: not connected to ORACLE
    begin
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    Process ID: 13685
    Session ID: 21 Serial number: 20
    Is there a way to debug the Java classes loaded into oracle? Or is there any utility to find out why the connection was lost?
    Regards,
    Saravana

    Hi Saravana:
    You could use simply System.out.println(..) at your Java code and see the output at the .trc files generated for your Oracle session.
    Or better than this adding Java Util Logging messages at your code, to see how to use JUL API at the OJVM please see this blog post [Using JUL API inside the OJVM|http://marceloochoa.blogspot.com/2007/11/getting-logging-entering-exiting-and.html].
    Best regards, Marcelo.
    PD: ora-0600 generally are associated with RDBMS bugs, but these bugs can be bypassed by replacing the code which throws the exception by other with a workaround.

  • Hyperlink in java

    Is it possible to create hyperlink in java. If so please give me some suggestions

    use
    getAppletContext().showDocument
    (new URL("URL_TO_YOUR_IMAGE"));
    getAppletContext().showDocument
    (new URL("http://www.whatever.com"),"HTML FRAME
    ID");
    If "HTML frame ID" do not exists then a new browser
    window will be opened. The following "HTML frame ID"
    have special meanings :
    "_self" current frame
    "_parent" parent frame
    "_top" base frame
    "_blank" new window
    a complete example of a button :
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    ublic class GotoURLButton extends Applet implements
    ActionListener {
    tton b;
    TextField t;
    public void init() {
    t = new TextField(20);
    t.setText("URL_TO_YOUR_IMAGE");
    add(t);
    b = new Button("Go to this URL");
    add(b);
    b.addActionListener(this);
    public void actionPerformed(ActionEvent ae) {
    if (ae.getSource() == b) {
    try {
    getAppletContext().showDocument(new
    URL(t.getText()));
    catch (Exception e) {
    e.printStackTrace();
    is this your stock response to every "hyperlink in java" question?? what if the question isn't related to applets? what if it's not even related to web-based code at all?
    @OP: you need to be a bit more specific about what you mean by "hyperlink". don't just give me a description of what a hyperlink does ("I want something where you click and it goes to the web page" isn't good enough). where do you want this link to be present? in a swing application? a JSP? an applet? where?

  • [UCCx] Change volume of an audio file (java code)

    Hello guys,
    Thanks to the many examples I compiled on the subject, I was able to create a script that mixes 2 audio wav files into a 3rd one. Basically the goal is to mix a first audio file containing some speech with a second one containing some music, these files being encoded identically (8 bits, 8KHz, mono wav files). The resulting file must be encoded in the same format than the initial ones.
    The mixing operation is performed thanks to the MixingAudioInputStream library found online (it can be found here).
    It is not the most beautiful Java code (I am no developer), but it works:
    Document doc1 = (Document) promptFlux1;
    Document doc2 = (Document) promptFlux2;
    Document docFinal = (Document) promptFinal;
    javax.sound.sampled.AudioFormat formatAudio = null;
    java.util.List audioInputStreamList = new java.util.ArrayList();
    javax.sound.sampled.AudioInputStream ais1 = null;
    javax.sound.sampled.AudioInputStream ais2 = null;
    javax.sound.sampled.AudioInputStream aisTemp = null;
    javax.sound.sampled.AudioFileFormat formatFichierAudio = javax.sound.sampled.AudioSystem.getAudioFileFormat(new java.io.BufferedInputStream(doc1.getInputStream()));
    java.io.File fichierTemp = java.io.File.createTempFile("wav", "tmp");
    ais1 = javax.sound.sampled.AudioSystem.getAudioInputStream(doc1.getInputStream());
    formatAudio = ais1.getFormat();
    aisTemp = javax.sound.sampled.AudioSystem.getAudioInputStream(doc2.getInputStream());
    byte[] bufferTemp = new byte[(int)ais1.getFrameLength()];
    int nbOctetsLus = aisTemp.read(bufferTemp, 0, bufferTemp.length);
    java.io.ByteArrayInputStream baisTemp = new java.io.ByteArrayInputStream(bufferTemp);
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(ais2);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The only downside to this is that the music can be a little loud comparing to the speech. So I am now trying to use the AmplitudeAudioInputStream library to adjust the volume of the second file (it can be found here).
    Here are the additional lines I wrote to do this:
    ais2 = new javax.sound.sampled.AudioInputStream(baisTemp, formatAudio, bufferTemp.length/formatAudio.getFrameSize());
    org.tritonus.dsp.ais.AmplitudeAudioInputStream amplifiedAudioInputStream = new org.tritonus.dsp.ais.AmplitudeAudioInputStream(ais2, formatAudio);
    amplifiedAudioInputStream.setAmplitudeLinear(0.2F);
    audioInputStreamList.add(ais1);
    audioInputStreamList.add(amplifiedAudioInputStream);
    MixingAudioInputStream mixer = new MixingAudioInputStream(formatAudio, audioInputStreamList);
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    The problem is I always get the following exception when executing the code:
    could not write audio file: file type not supported: WAVE; nested exception is: java.lang.IllegalArgumentException: could not write audio file: file type not supported: WAVE (line 30, col:2)
    The error is on the last line (the write method), but after many hours of tests and research I cannot understand why this is not working... so I have added some "debugging" information to the code:
    System.out.println("file1 audio file format: " + formatFichierAudio.toString());
    System.out.println("file1 file format: " + ais1.getFormat().toString());
    System.out.println("file2 file format: " + ais2.getFormat().toString());
    System.out.println("AIS with modified volume file format: " + amplifiedAudioInputStream.getFormat().toString());
    System.out.println("Mixed AIS (final) file format: " + mixer.getFormat().toString());
    AudioFileFormat.Type[] typesDeFichiers = AudioSystem.getAudioFileTypes(mixer);
    for (int i = 0; i < typesDeFichiers.length ; i++) {
    System.out.println("Mixed AIS (final) #" + i + " supported file format: " + typesDeFichiers[i].toString());
    System.out.println("Is WAVE format supported by Mixed AIS (final): " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, mixer));
    System.out.println("Destination file format: " + (AudioSystem.getAudioFileFormat((java.io.File)f)).toString());
    AudioInputStream aisFinal = AudioSystem.getAudioInputStream(f);
    System.out.println("Is WAVE format supported by destination file: " + AudioSystem.isFileTypeSupported(AudioFileFormat.Type.WAVE, aisFinal));
    try {
    // Ecriture du flux résultant dans un fichier
    javax.sound.sampled.AudioSystem.write(mixer, formatFichierAudio.getType(), fichierTemp);
    return fichierTemp;
    catch (Exception e) {
    System.err.println("Caught Exception: " + e.getMessage());
    Which gives the following result during execution:
    file1 audio file format: WAVE (.wav) file, byte length: 146964, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    file1 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    file2 file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    AIS with modified volume file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) file format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame,
    Mixed AIS (final) #1 supported file format: WAVE
    Mixed AIS (final) #2 supported file format: AU
    Mixed AIS (final) #3 supported file format: AIFF
    Is WAVE format supported by Mixed AIS (final): true
    Destination file format: WAVE (.wav) file, byte length: 146952, data format: ULAW 8000.0 Hz, 8 bit, mono, 1 bytes/frame, , frame length: 146906
    Is WAVE format supported by destination file: true
    So everything tends to show that the format should be supported and the mixed AIS should be written to the file... but I still get the error.
    I am really confused here, if someone could help it would be great.
    Thanks in advance!
    PS: I have attached print screens of the actual script, without the "volume adjustment" code.

    Hi,
    well I started writing a similar solution but it did not work either so I just put it on hold.
    I also tried to get hold of the streaming "device" abstraction of UCCX to adjust the volume while "playing" but that was a dead end, too, unfortunately.
    Sorry about my previous comment on your StackOverflow post, that time I thought it was kind of out of context but I believe you only wanted to ask about this issue on all available forums.
    G.

  • Show errors on UIX page from Java code?

    Hello all:
    I've got a simple Login page in Jdev 10g (9.0.5.2) that I'm setting up. The basics work fine -- if I type in a valid login/password, it works. If I type in an incorrect login/password, it loops back to the login page. The problem is that I can't seem to get my Invalid Login error message to appear.
    The loginPage.uix is based on a template. The template contains the following code:
    <messages>
    <messageBox automatic="true" />
    </messages>
    as a named child inside a <pageLayout> UIX node. The login page is:
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40"
    xmlns:pas="http://www.paslists.com/pas/templates"
    expressionLanguage="el">
    <templates xmlns="http://xmlns.oracle.com/uix/ui">
    <templateImport source="pasPageLayout.uit"/>
    </templates>
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui" >
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="PAS Login Page"/>
    </metaContainer>
    <contents>
    <body>
    <contents>
    <pas:pasPageLayout selectedGlobalHeader="3">
    <contents>
    <stackLayout>
    <contents>
    <spacer height="10"/>
    <styledText text="Please enter your Web ID and Password, then press the Log In button."/>
    <spacer height="10"/>
    <flowLayout>
    <contents>
    <styledText text="If you don't have an ID, please send an e-mail to our "/>
    <link destination="mailto:[email protected]" text="Web Administrator" />
    <styledText text=" requesting one."/>
    </contents>
    </flowLayout>
    <spacer height="10"/>
    <form name="loginForm" method="POST">
    <contents>
    <labeledFieldLayout labelWidth="25%" fieldWidth="80%" columns="2" width="80%" >
    <contents>
    <messageTextInput prompt="ID:" name="username" columns="20" />
    <messageTextInput prompt="Password:" name="password" secret="true" columns="20" />
    </contents>
    </labeledFieldLayout>
    <rowLayout hAlign="right">
    <contents>
    <submitButton text="Log In" formName="loginForm" event="goLogin"/>
    <spacer width="10" />
    <resetButton text="Reset" formName="loginForm" />
    <spacer width="10" />
    </contents>
    </rowLayout>
    </contents>
    </form>
    </contents>
    </stackLayout>
    </contents>
    <start>
    <flowLayout>
    <contents>
    <sideNav selectedIndex="0">
    <contents>
    <link destination="login.do" text="Logging In"/>
    <link destination="logoff.do" text="Log Off"/>
    </contents>
    </sideNav>
    </contents>
    </flowLayout>
    </start>
    </pas:pasPageLayout>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    <event name="goLogin">
    <go name="login"/>
    </event>
    </handlers>
    </page>
    My Java code is:
    public class LoginAction extends DataAction
    public void findForward(DataActionContext actionContext) throws Exception
    HttpServletRequest request = actionContext.getHttpServletRequest();
    HttpSession session = request.getSession();
    ActionErrors errors = actionContext.getActionErrors();
    String target = "fail";
    //Get the result of the Model Method Call
    JUCtrlActionBinding method = actionContext.getCustomMethod();
    boolean successfulLogon = ((Boolean)method.getResult()).booleanValue();
    Integer attempts = (Integer)session.getAttribute("loginAttempts");
    int intAttempts = 0;
    if (attempts != null)
    intAttempts = attempts.intValue();
    if (!successfulLogon || intAttempts > 3)
    // If the Logon fails we need to do the follwoing
    // 1. Increment the counter. Once this exceeds 3 any logon will fail
    // 2. Create an error message to display on the logon screen.
    // Be sure that this is non-specific so crackers can't tell if
    // a portion if the username is correct or that there is a
    // Max attempts value.
    session.setAttribute("loginAttempts",new Integer(++intAttempts));
    errors.add("InvalidLogin",new ActionError("loginerr.invalid"));
    actionContext.setActionErrors(errors);
    else
    session.setAttribute("loginStatus", new String("true"));
    target = "success";
    actionContext.setActionForward(target);
    This goes to a "success" actionForward if the login works and a "fail" actionForward if the login fails.
    My ApplicationResources.properties file contains:
    loginerr.invalid=Invalid username/password. Please try again.
    This matches up with the key I used in the new ActionError() statement above.
    My structs-config.xml for this section looks like this:
    <action path="/mainAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataAction" name="DataForm">
    <set-property property="modelReference" value="loginUIModel"/>
    <forward name="success" path="/loginPage.do"/>
    <forward name="login" path="/loginAction.do"/>
    </action>
    <action name="DataForm" path="/loginAction" className="oracle.adf.controller.struts.actions.DataActionMapping" type="com.paslists.view.LoginAction">
    <set-property property="modelReference" value="loginUIModel"/>
    <set-property property="methodName" value="loginUIModel.login"/>
    <set-property property="resultLocation" value="${requestScope.methodResult}"/>
    <set-property property="numParams" value="2"/>
    <set-property property="paramNames[0]" value="${param.username}"/>
    <set-property property="paramNames[1]" value="${param.password}"/>
    <forward name="fail" path="/mainAction.do"/>
    <forward name="success" path="/getHomePageAction.do"/>
    </action>
    <action name="DataForm" path="/loginPage" forward="/loginPage.uix" validate="false"/>
    mainAction has a success forward to loginPage.uix. loginPage.uix has a "login" event attached to the submit button, which forwards to loginAction. loginAction executes the code declaratively and forwards to success or fail. If success, it continues on. If fail, it loops back to mainAction.
    Again -- this all works (almost). The only thing that does not work is that my ActionErrors() are not displaying on the web page.
    What am I doing wrong here?

    Solved my own problem. See the following thread for the answer:
    Displaying Struts messages/errors in 10g
    I modified my error code to be:
    actionContext.getActionErrors().add(ActionErrors.GLOBAL_ERROR,new ActionError("loginerr.invalid"));
    this.saveErrors(request,actionContext.getActionErrors());
    I modified my template to contain:
    <struts:dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <contents>
    <messageBox messageType="error" automatic="true"/>
    </contents>
    </struts:dataScope>
    I also added xmlns:struts="http://xmlns.oracle.com/uix/struts" to the templateDefinition.
    It now works.

  • Java Code to Connect to OIM on HTTPS

    Hi All,
    I have recently disabled the HTTP Port for OIM and enabled only HTTPS Port. I have java code that I used to connect to OIM on HTTP Port but that doesn't working anymore.
    I have update the OIM_URL to use t3s but not sure what else in system property I need to add (I think its has to be keystore path). So, i added System Property
    weblogic.security.SSL.trustedCAKeyStore = "Path of Kesytore"
    but I am getting below error:
    javax.security.auth.login.LoginException: java.lang.NoSuchMethodError: com/certicom/net/ssl/SSLContext.getCertificateSupport()Lcom/certicom/tls/interfaceimpl/CertificateSupport;
    at com.bea.sslplus.CerticomSSLContext.setTrustManager(Unknown Source)
    at weblogic.security.utils.SSLContextWrapper.<init>(SSLContextWrapper.java:62)
    at weblogic.security.utils.SSLContextWrapper.getInstance(SSLContextWrapper.java:55)
    at weblogic.security.utils.SSLSetup.getSSLContext(SSLSetup.java:323)
    Any pointers on what I have to add?
    TIA

    The issue was due to the order of jar files in build path:
    This is the correct order :
    1. Crypto.jar
    2. wlfullclient.jar
    3. wlcipher.jar
    4. webserviceclient+ssl.jar
    I use the JDK Keystore configured with IDE cacerts, import root ca cert and it worked.

  • Class Not found Exception for invoking BPEL process through the Java code

    Hi.
    The JDeveloper IDE raise the Exception From the invoking the BPEL process through the java code .Class Not Found Exception (Locator,ID.......).What is process of importing these classes from API.

    In your code (.bpel file) import the library using the bpelx:exec tag. For example the adding the following entry in your .bpel file imports the com.oracle.bpel.client.util library.
    <bpelx:exec import="com.oracle.bpel.client.util.*"/>

  • How do you set the text of a Hyperlink component in code

    I am using Visual Web pack in NB 6.0. How do you set the text of a hyperlink component in code?
    Please see screenshots at
    http://coba.usf.edu/departments/isds/faculty/agrawal/projects/java/
    I have a hyperlink in a grid panel. I am using
    hyperlink1.setText("Hello"); in prerender(),
    but the Hyperlink shows up with the text "Hyperlink", whereas I was expecting "Hello". However,
    hyperlink1.setUrl("http://www.usf.edu"); works as expected.
    I tried nesting a static text in the hyperlink as suggested in the Creator guide (ed 2, Google project). I deleted the "Hyperlink" text in the properties editor but then the page turned out blank.
    Thanks
    Manish

    Hi Manish,
    Great to know you were able to fix your issue. The following blog entry has the list of resources you would like to look at for future.
    http://blogs.sun.com/NetBeansSupport/entry/useful_resources_for_visual_web
    Thanks
    K

  • Calling functions of the inner class in .java code file

    Hello,
    I created a .java code file in Visual J#.Net and converted it into
    the application by adding the "public static void main(String args[])"
    function.
    I have created the two classes one extends from Applet, and the other
    extends from Frame. The class which I inherited from the Frame class becomes
    the inner class of the class extended from the Applet. Now How do I
    call the functions of the class extended from Frame class - MenuBarFrame
    class. the outline code is
    public class menu_show extends Applet
    ------init , paint action function---------
    public class MenuBarFrame extends Frame
    paint,action function for Menu
    public static void main(String args[])
    applet class instance is created
    instance of frame is created
    Menu , MenuBar, MenuItem instance is created
    and all these objects added
    I have Created MenuBarFrame class instance as
    Object x= new menu_show().new MenuBarFrame
    ????? How to call the functions such as action of MenuBarFrame class - what
    should be its parameters??????
    }

    Here's how I would do it:
    interface Operation {
        public int op(int y);
    class X {
        private int x;
        public X(int x) {
            this.x = x;
        private class Y implements Operation {
            public int op(int y) {
                return x+y;
        public Operation createOperation() {
            return new Y();
        public static void main(String[] args) {
            X app = new X(17);
            Operation f = app.createOperation();
            System.out.println(f.op(-11));
    }Your code, however, has some serious "issues". You typically don't
    instantiate an applet class -- that's the job of the applet viewer or Java plugin
    your browser is using. If you instantiate the applet directly, you're going
    to have to supply it an AppletStub. Do you really want to go that way?
    Again, use an applet viewer or browser, or better yet, why write applets at all?

  • Provide the java code for the following scenario.

    Hi Experts,
    I have tried with all the combinations for this scenario. As per my understanding i require java code for the following scenario
    so that it becomes easy........
    I require a Message mapping for this Logic.
    In the Source there are 4 fields and, the Target side, the fields should appear like this.
    Source Structure- File
    Record
    |-> Header
    Order_No
    Date
    |-> Item
    Mat_No
    Quantity
    Target Structure-IDoc
    IDoc
    |-> Header
    |-> Segment
    Delivery_Order_No
    Recv_Date
    |-> Item
    |-> Segment
    Delivery_Order_No
    Material_Num
    Recv_Quantity.
    The Logic is for every Order number an IDOC is generated.And if the Material num matches then the quantity should be added. and important note is that the material numbers are different for every order number. That means if a material number is 2 in the order number A. Then the material number can never be 2 in any of the order numbers.Here is the following with an example for the above scenario.
    For example:-
    we have
    Source Structure- File
    Order-no Date Mat_No Quantity
    1 01/02/2011 A 10
    1 01/02/2011 B 15
    1 01/02/2011 A 10
    2 01/02/2011 C 10
    2 01/02/2011 C 10
    3 01/02/2011 D 20
    3 01/02/2011 D 10
    3 01/02/2011 E 25
    Target Structure-IDoc
    Delivery_Order_No Recv_Date Material_Num Recv_Quantity
    1 01/02/2011 A 20
    1 01/02/2011 B 15
    2 01/02/2011 C 20
    3 01/02/2011 D 30
    3 01/02/2011 E 25
    So for this example total of 5-Idocs created. That means for this example if Order_No is 1 When the Mat_No is A the quantity gets added. For this Scenario 1 IDoc with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) is generated by adding the quantity field in the Target Side. Similarly if Order_No is 1 when the Mat_No is B then separate IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) in the Target Side. Similarly, if Order_No is 2 when the Mat_No is C, an IDoc is generated with four Fields 2 in Header(Delivery_Order_No, Recv_Date) and 2 in Item(Material_Num, Recv_Quantity) by adding the quantity field in the Target Side. ike wise the process goes on upto 3.Kindly do the needy..
    Kindly provide the java code.
    Thanq very much in advance..

    what i have understood from ur example is that u want to generate an idoc for unique combination of  Order-no and Mat_No
    if yes then chk the below mapping..
    change the context of Order_No, Date, Mat_No and Quantity to Record (right click-> context)
    1)
    Order-no
    ----------------------concat[;]---sort----splitbyvalue(valuechanged)-----collapse context---IDoc
    Mat_No
    2)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context---UDF1--splitbyvalue(each value)--Delivery_Order_No
    Mat_No
    3)
    Order-no
    -----------concat[;]---sortbykey----------------------- \
    Mat_No                       /                            \
    Date--------------- /                                       \
    ----------------------------------------------------------FormatByExample-----collapsecontext---splitbyvalue(each value)----Recv_Date
    Order-no                                                 /
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    4)
    Order-no
    --------concat[;]---sort----splitbyvalue(value changed)---collapse context-UDF2--splitbyvalue(each value)--Material_Num
    Mat_No
    5)
    Order-no
    -----------concat[;]---sortbykey
    Mat_No                       /
    Quantity --------------- /
    ----------------------------------------------------------FormatByExample-----SUM(under statistic)----Recv_Quantity
    Order-no
    -----------concat[;]---sort----splitbyvalue(value changed)
    Mat_No
    UDF1:
    String [] temp= a.split(";");
    return temp[0];
    UDF2:
    String [] temp= a.split(";");
    return temp[1];

  • New problem  --  My java code can't see my CLASSES from Mapping Workbench

    Donald and others -
    I am VERY new to TopLink......
    I was at the last Oracle Developer Days in Northern Virginia. Donald convinced me and my co-workers to use TopLink for our upcoming project. I have been having tons of problems getting it to work correctly. Maybe I need a TOPLINK license plate, like Donald!!!
    Here is my newest problem. I can create a DatabaseSession, login to it, write a query and log out of it.
    However, I can only do this if I remove my classes from the Mapping Workbench. As soon as I add even one class to the Mapping Workbench......I get an error as follows:
    LOCAL EXCEPTION STACK:
    EXCEPTION [TOPLINK-3007] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ConversionException
    EXCEPTION DESCRIPTION: The object [mil.usa.lbit.isr.TestIsr], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Please ensure that the class [class java.lang.Class] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager
    INTERNAL EXCEPTION: java.lang.ClassNotFoundException: mil.usa.lbit.isr.TestIsr
    Can anyone tell me where I need to put my class files so the java code can see them via the ISR.xml deployment file.
    I currently have these files in a .jar file on the system path and in my web-inf folder and in my project settings. I put them everywhere I could think of, but no luck.
    Here is my code:
    package mil.usa.lbit.isr;
    import mil.usa.lbit.LbitColors;
    import java.util.*;
    import java.math.*;
    import oracle.toplink.sessions.*;
    import oracle.toplink.tools.schemaframework.*;
    import oracle.toplink.exceptions.*;
    import oracle.toplink.expressions.*;
    import oracle.toplink.queryframework.*;
    import oracle.toplink.tools.workbench.*;
    public class TestIsr extends ISR {
    public DatabaseSession session;
         public Project project;
    public TestIsr() {
    this.name = "TestISR";
    this.color = LbitColors.AMBER;
    this.metric = 97.00;
    public boolean isConnected() {
    if (session == null)
    System.out.println("Not Connected");
    return false;     
    System.out.println("Connected");
    return session.isConnected();
    public void loginToDatabase() {
    Project builderProject;
    System.out.println("Attempt to login to database using TopLink:");
    project = XMLProjectReader.read("C:\\LBIT TopLink\\ISR\\ISR.xml");
    session = project.createDatabaseSession();
    session.login();
    System.out.println("Logged in");
    public void runQuery() {
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression expression = builder.get("isr_id").equal(3);
    System.out.println(expression);          
    //TestIsr isr = (TestIsr) session.readObject(TestIsr.class, expression);
    //System.out.println(isr);     
    public void logoutOfDatabase() {
    session.logout();     
    System.out.println("Logged out");          
    public static void main(String[] args) {     
    TestIsr testing = new TestIsr();
    testing.isConnected();     
    testing.loginToDatabase();          
    testing.isConnected();
    testing.runQuery();
    testing.logoutOfDatabase();     
    Thanks in advance.
    Donald please email me and maybe we can chat on the phone if you want to offer some help.
    Andy

    Thanks for the reply!
    However, I did try to implement that yesterday.
    When I add the "getClass().getClassLoader()" to the "XMLProjectReader.read" call, the codes loses site of my project (.xml) file.
    Here is the new line:
    project = XMLProjectReader.read("C:\\LBIT TopLink\\ISR\\ISR.xml", getClass().getClassLoader());
    Here is the new error:
    EXCEPTION [TOPLINK-7099] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
    EXCEPTION DESCRIPTION: Could not find xml project file which is specified in properties file: xmlProjectFile=C:\LBIT TopLink\ISR\ISR.xml.
         oracle.toplink.exceptions.ValidationException oracle.toplink.exceptions.ValidationException.projectXMLNotFound(java.lang.String, java.lang.Exception)
         oracle.toplink.sessions.Project oracle.toplink.tools.workbench.XMLProjectReader.read(java.lang.String, java.lang.ClassLoader)
    But my code could find that file before I added the "getClass().getClassLoader()" code.
    Maybe I can avoid this problem by "deploying the XML file in my application jar?" Could you please explain more about this option after answering the first part of my question.
    Any other posters feel free to help me too.
    I know TopLink is a powerful tool, I just keep hitting these hurdles. ARRRRRRRGGGG!!!
    Thanks again,
    Andy

Maybe you are looking for

  • FIM Sync and SharePoint Foundation 2013

    I'm looking into syncing to SharePoint via the FIM synchronisation engine, not using the FIM Portal at all. There's a connector(MA) for SharePoint but it requires UPA, User Profile Service, which isn't in the foundation version. I want to use foundat

  • Approvers are not visible in an Replacement Vacancy

    hi Im trying to create a replacement vacancy for which the approvers are not not visible. The issue is not existing for new vacancies? Can anyone please help ?

  • Running TS execution from LabVIEW results in debug error

    Hi everyone I'm attempting to launch TS 4.0.1 , I then load and execute a sequence. I'm doing all of this from a very very simple LabVIEW interface (8.2) using ActiveX The code runs as epxected and my execution runs without error. Once complete my La

  • Extreme permsions problem - desperate please help!!!

    I have repaired permissions three times, run tech tools twice, deleted preferences etc and it is not fixing the problem - which has got to be a permissions problem- here is what happens: 1. In illustrator CS:- when you have a file open and you have m

  • Hi Guys, I'm sorry if this question has appeared before...

    I've re-installed itunes and i've tried adding more albums onto my ipod but as i do this a little stop sign appears which effectively stops me from transferring them to my ipod. Any ideas? Thanks in advance