HELP NEED FOR INVOKING THE JAVA CODE INSIDE JSP

Hello,
any one knows how to Write a java code inside the .jsp files... please if any one knows it please ....help me .....

hi .
Use scriptlets , for example :
<html>
<%
int x;
for(x=1;x<=5;x++)
out.println(x);
%>
</html>

Similar Messages

  • Help needed in understanding the Java code.

    Hi All,
    I have recently started learning the Java language. I came across this example and had a problem in understanding the output of the program. I could follow that if the continue statement is present in the below program the output is "Found 9 p's in the string" . But if the continue statement is removed I could not understand why the output would be "Found 35 p's in the string" .Is it because of the spaces and characters other than p... (eter ier icked a eck of ickled eers)
    Example-----------------------
    The continue statement skips the current iteration of a for, while , or do-while loop. The unlabeled form skips to the end of the innermost loop's body and evaluates the boolean expression that controls the loop. The following program, ContinueDemo , steps through a String, counting the occurences of the letter "p". If the current character is not a p, the continue statement skips the rest of the loop and proceeds to the next character. If it is a "p", the program increments the letter count.
    class ContinueDemo {
    public static void main(String[] args) {
    String searchMe
    = "peter piper picked a " +
    "peck of pickled peppers";
    int max = searchMe.length();
    int numPs = 0;
    for (int i = 0; i < max; i++) {
    // interested only in p's
    if (searchMe.charAt(i) != 'p')
    continue;
    // process p's
    numPs++;
    System.out.println("Found " +
    numPs + " p's in the string.");
    Here is the output of this program:
    Found 9 p's in the string.
    To see this effect more clearly, try removing the continue statement and recompiling. When you run the program again, the count will be wrong, saying that it found 35 p's instead of 9.

    The answer is already in your example - "The unlabeled form skips to the end of the innermost loop's body and evaluates the boolean expression that controls the loop."
    It unloads the current loop iteration when condition is matching. Loop is again starting from boolean expression inside loop declaration.
    Java Programming - java forum

  • Calling Java code inside JSP page and sending toString on object to Servlet

    Hi.
    I am trying to setup a way to make testing my application easier. Using a web-based method will work best. Here is what I am trying to accomplish:
    - Have a web page that will prompt the user to enter data, fill in text fields, make choices, etc. When done, they press the Submit button. I don't need to keep info between sessions. Just open browser, execute, view results, close browser, repeat.
    - I then want to take this data and use some Java Classes I have to create a Java object.
    - I then want to send the toString() results of this Java object to a known Java servlet. The result of the servlet's actions should be displayed as a response on the screen.
    This is what I currently have (Ignore the
    's - I don't know why they are showing up - its not important):
    Web page:
    <html>
    <head><title>TestGroup</title></head>
    <body>
    <form name=f method=post action=http://localhost:100/Servlet>
    Name: <br>
    Group: <input name=group type=text><br>
    <br>
    <input type=submit value=Submit>
    <input type=reset value=Reset>
    </form>
    </body>
    </html>The Java code in the JSP (where to put it?):
    <%
    Group g = new Group();
    g.setGroupName(request.getParameter("group"));
    String output = g.toString(); // I want this to go to the Servlet.
    %>But, now I am stuck as to how to piece these together. I have some JSP experience, but not quite like this.
    As I said, when the user presses the Submit button, I want to perform the Java code above, and have the results of the toString method sent to the Servlet, plus clear all other parameters (so they are not sent to the servlet).
    Does anyone have any advice/comments? I am open to alternative designs too, this is just the simplest one I could think of. If another JSP page is needed, that's fine too.
    Thanks.

    Hi.
    I am trying to setup a way to make testing my application easier. Using a web-based method will work best. Here is what I am trying to accomplish:
    - Have a web page that will prompt the user to enter data, fill in text fields, make choices, etc. When done, they press the Submit button. I don't need to keep info between sessions. Just open browser, execute, view results, close browser, repeat.
    - I then want to take this data and use some Java Classes I have to create a Java object.
    - I then want to send the toString() results of this Java object to a known Java servlet. The result of the servlet's actions should be displayed as a response on the screen.
    This is what I currently have (Ignore the
    's - I don't know why they are showing up - its not important):
    Web page:
    <html>
    <head><title>TestGroup</title></head>
    <body>
    <form name=f method=post action=http://localhost:100/Servlet>
    Name: <br>
    Group: <input name=group type=text><br>
    <br>
    <input type=submit value=Submit>
    <input type=reset value=Reset>
    </form>
    </body>
    </html>The Java code in the JSP (where to put it?):
    <%
    Group g = new Group();
    g.setGroupName(request.getParameter("group"));
    String output = g.toString(); // I want this to go to the Servlet.
    %>But, now I am stuck as to how to piece these together. I have some JSP experience, but not quite like this.
    As I said, when the user presses the Submit button, I want to perform the Java code above, and have the results of the toString method sent to the Servlet, plus clear all other parameters (so they are not sent to the servlet).
    Does anyone have any advice/comments? I am open to alternative designs too, this is just the simplest one I could think of. If another JSP page is needed, that's fine too.
    Thanks.

  • Help needed for downloading the image from Inage URL

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

    Hello everyone,
    I need some help regarding setting a timeout for dowloading image from image URL
    Actually I have a hash table with set of image URL's...
    for example:
    http://z.about.com/d/politicalhumor/1/0/-/6/clinton_portrait.jpg
    which gives a image.
    for(Enumeration e = google_image_links.elements() ; e.hasMoreElements() ;) {
                                      //System.out.println("final");
                                       //System.out.println(e.nextElement());
                                       try{
                                            System.out.println("Images download started....");
                                            //System.out.println(e.nextElement());
              //imageio is the BufferedImagereader object     
                                               imageio = ImageIO.read(new URL((String) e.nextElement()));
                                            image_title = created_imagepath +"\\"+ array_words[i] + counter_image_download + "." + "jpg";
                                            img = ImageIO.write(imageio,"jpg", new File(image_title));     
                                            imageio.flush();
                                       }catch(Exception e1){
                                            System.out.print(e1);
                                       if(img){
                                            System.out.println("The image " + image_title + " has been saved to local disk succesfully.");
                                       counter_image_download++;
                                  }//end of for loopi am using the above code to download all the image from the Image URL's that r present in hashtable.
    The problem i have been encountered with is...
    Some URL's does not return any bytes, The code is not totally broken. In such cases, my code is hanging off at that particular URL and waiting to get some output data from the URL. The execution does not proceed furthur But if the URL is a totally broken link, the code is throwing an exception and I am able to handle it successfully.
    But in the case of partially broken links, I am not able to go furthur because the code keeps waiting to get some data.
    So for this reason I want to setup a timer and tell the code to wait for 5-10 min, in that time if it does not get any data, proceed furthur to download other links...
    Please tell me how can I do this.. or plzzz tell me an alternative...
    Please help me ans its a bit urgent plzzzz.
    Thank you,
    chaitanya

  • Help needed in running the HTML code

    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no");
    msg.document.write("<HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write("<body>Hi</body>");
    </script>
    </head>
    <body>
    <form>
    <input type="button" name="Button1" value="Push me" onclick="WinOpen()">
    </form>
    </body>
    </html>
    whenever i save the abouve code in .htm extension and try to run it, I am able to run it sucessfully.
    But whenever I run the below code by saving it as .htm extension then its not running sucessfully:
    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no");
    msg.document.write("<HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write("<body><form>
    <TABLE cellSpacing=1 cellPadding=1 width="75%" bgColor=silver border=1>
    <TR>
    <TD><STRONG>Enter Numeric Value *:</STRONG> </TD>
    <TD><INPUT name="tbAlphaNumeric" CatsType="NUMERIC" label="Alphanumeric" Mandatory="YES"> </TD>
    </TR>
    </TABLE>
    </form></body>");
    </script>
    </head>
    <body>
    <form>
    <input type="button" name="Button1" value="Push me" onclick="WinOpen()">
    </form>
    </body>
    </html>
    Here I want to display text box in a new fresh field...
    Thanks in advance:)

    Hi,
    The code did work. But I am not sucessfully able to display the values entered in 2nd page in the 3rd page.Please find the code below:
    <html>
    <head>
    <script language="LiveScript">
    function WinOpen() {
    if (document.form1.cap.value == "")
    alert("Enter value in text box");
    return;
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Yo!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>This is really cool!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form2">');
    for(var i =0; i < document.form1.cap.value; i++)
    msg.document.write("<INPUT type=text name=tbAlphaNumeric>");
    msg.document.write("<br>");
    msg.document.write('<input type="button" name="Button2" value="Steal" onClick="javascript:window.opener.WinShow();">');
    msg.document.write('</form></BODY></HTML>');
    function WinShow() {
    msg=open("","DisplayWindow","toolbar=no,directories=no,menubar=no, scrollbars=yes");
    msg.document.write("<HTML><HEAD><TITLE>Great!</TITLE></HEAD>");
    msg.document.write("<CENTER><h1><B>Display of second page text elements!</B></h1></CENTER>");
    msg.document.write('<BODY><form name="form3">');
    for(var j =0; j < document.form1.cap.value; j++)
    msg.document.write(document.form2.tbAlphaNumeric[j].value);
    msg.document.write("<br>");
    msg.document.write('</form></BODY></HTML>');
    </script>
    </head>
    <body>
    <form name="form1">
    <INPUT type= "text" name=cap>
    <input type="button" name="Button1" value="Push me" onClick="WinOpen()">
    </form>
    </body>
    </html>

  • Opening a new Broswer Window using Java code inside JSP

    Dear Fellow Java Developers:
    I have written a JSP that presents information about a particular item. I want to give an option to the customer to click on the picture of the item to get a larger view. However, I don't want the browser window that opens to have the usual buttons and menubar at the top like a typical browser window, I just want it to be a window with a large image of the item. A good example of this is on the following website:
    http://www.eddiebauer.com/eb/product.asp?product_id=24701&nv=2|21472|9|32&lview=&cm_cg=&tid=&c=&sc=&lp=w1i005
    Click on the picture of the shirt on this page and you'll see what I am talking about. How is this accomplished using a Java scriplet? I have checked the source code for the above site, as well as others, and they all achieve this using JavaScript. Is there a way of accomplishing this using pure Java and/or HTML?
    Just wondering.
    Thanks in advance to everyone that replies.
    Sincerely;
    Fayyaz

    you seem to miss the client/server side setup. Your java is executing on the SERVER and it processes a request which in turn sends pure HTML and javascript to the client. What you want to do has to be done on the CLIENT, so JavaScript is the only option.

  • Help needed for Time Calc Java Script

    Hi,
    I am trying to create a timesheet in PDF and have hit a speed bump. Is there anyone there who could provide me with a script that calculated the difference between 2 times? (Field2 time)-(Feild 1 Time) = Duration.I am desperate and have tried everything.
    I proccess the payroll for a company and all of the 500 or so timesheets that I received each fortnight are paper copies and I am pulling my hair out. I need to use Adobe forms (We have Adobe Pro 9 and I am using the XML forms, not live cycle) as the serach engine that we use for emails cannot search on excel documents.
    I have no Java script experience and I am getting completely lost in the subject. Any help would be greatly appreciated.
    Thanks anyone who can help at all.
    -Sohnia

    hi friend here example for time calulation start and end time example..<br />just copy and paste then run it ur browser.<br /><br /><HTML><br /><script language="JavaScript"><br /><!--<br /><br />var h1 = 1;<br />var h2 = 2;<br />var days = 0;<br />var m1 = 1;<br />var m2 = 2;<br />var am1 = 1;<br />var am2 = 2;<br />function findtime(h1,h2,days,m1,m2,am1,am2)<br />{<br />var answer = "why";<br />var mdiff = 1;<br />var hdiff = 2;<br />pdays = parseInt(days);<br />ph1 = parseInt(h1);<br />ph2 = parseInt(h2);<br />pm1 = parseInt(m1);<br />pm2 = parseInt(m2);<br />if(am1 == 2 & ph1 < 12) ph1 = ph1 + 12;<br />if(am2 == 2 & ph2 < 12) ph2 = ph2 + 12;<br />if(am1 == 1 & ph1 == 12) ph1 = 24;<br />if(am2 == 1 & ph2 == 12) ph2 = 24;<br />if(am1 == 2 & am2 == 1 & ph2 < 24) ph2 = ph2 + 24;<br />if(am1 == am2 & ph1 > ph2) ph2 = ph2 + 24;<br />if(pm2 < pm1){<br />pm2 = pm2 + 60;<br />ph2 = ph2 - 1;<br />}<br />mdiff = pm2 - pm1;<br />hdiff = (ph2 - ph1) + (pdays * 24);<br />if(hdiff == 0) answer = mdiff + ' minutes';<br />else if(hdiff == 1) answer = '1 hour and ' + mdiff + ' minutes'<br />else answer = hdiff + ' hours and ' + mdiff + ' minutes'<br />return answer<br />}<br /><br />//--><br /></script><br /></HEAD><br /><br /><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular"><br /><BODY BGCOLOR=FFFFFF TEXT=000000 LINK=0000FF VLINK=800080><br /><br /><div align="center"><table width="950" border="0" cellpadding="0" bgcolor="#899194" cellspacing="0"><br /><br />  <br /><tr><td valign="middle" width="33%"><br /><br /><center><br /><form><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR=#FFFFFF><br /><!--ROW 1--><br /><TD WIDTH=80%><br /><center><br /><TABLE ALIGN=MIDDLE BORDER=5 CELLPADDING=5><br /><TR BGCOLOR="#B6D4D2"><br /><!--ROW 1--><br /><td colspan=4><br /><center>Time Between Times Calculations - Multiple Days</center><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Required Data Entry<br /></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><br /><td align="center">Start time</td><br /><td align="center"><input type="text" name="hour1" size="5"></td><br /><td align="center"><input type="text" name="minute1" size="5"></td><br /><td align="center"><select name="period1"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><tr><br /><td colspan="3">    Add Complete Interim Days</td><td align="center"><input type="text" name="adays" size="5" value="0"></td><br /></tr><br /><tr><br /><td align="center">Start / End</td><br /><br /><td align="center">Hour</td><br /><td align="center">Minute</td><br /><td align="center">AM / PM</td><br /></tr><br /><td align="center">End time</td><br /><td align="center"><input type="text" name="hour2" size="5"></td><br /><td align="center"><input type="text" name="minute2" size="5"></td><br /><td align="center"><select name="period2"><br /><option value="1">AM<br /><option value="2">PM<br /></select><br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan=4 BGCOLOR="#B6D4D2"><br /><input type="button" value="Calculate" <br />onclick="h1=form.hour1.value;<br />h2=form.hour2.value;<br />m1=form.minute1.value;<br />m2=form.minute2.value;<br />days=form.adays.value;<br />am1=form.period1.options[period1.selectedIndex].value;<br />am2=form.period2.options[period2.selectedIndex].value;<br />if(h1 < 0 | h1 > 12) alert('Your start hour is not valid');<br />else if(h2 < 0 | h2 > 12) alert('Your end hour is not valid');<br />else if(m1 < 0 | m1 > 59) alert('Your start minute is not valid');<br />else if(m2 < 0 | m2 > 59) alert('Your end minute is not valid');<br />else form.answer.value=findtime(h1,h2,days,m1,m2,am1,am2);"><br />   <br /><input type="reset" value="Clear Values"><br /><br /></td><br /></tr><br /><TR BGCOLOR="#B6D4D2"><br /><TD align="center" colspan=4><br />Calculated Results<br /></td><br /></tr><br /><br /><tr><br /><td align="center" colspan="4"><br />Time Difference <input type="text" name="answer" size="40"><br /><tr><td>[email protected]</td></tr><br /></td><br /></tr><br /></table><br /></form><br /></td><br /></tr><br /></table><br /><br /></center><br /></td><br /></tr><br /></table><br /></center><br /><br /></TD><br /></TR><br /></TABLE><br /></BODY> <br /></HTML>

  • Help needed in executing the java/jsp program from UCM .

    Hi ,
    I have a .jsp program running in my Jdeveloper which when executed pops a window to browse and select files and with few custom options .
    But i want to execute that Program from within UCM (create a new jsp page in UCM OR provide link ? i am not sure .... ) , could anyone help on how i can execute/run the program from UCM ?
    thanks in Advance
    Plaxman

    If your jsp makes use of jars you may want to look into using a WAR instead. You can check the WAR into content server and there is even a link on the administration page for JSP Web App Admin. Treating the JSP(s) and jar(s) as an entity may be a more successful path for you.
    You can find some jsp examples and ever a war example in this directory: <install root>\samples\JspServer
    And the briefest of help about that stuff here: [http://localhost/idc/help/wwhelp/wwhimpl/js/html/wwhelp.htm|http://localhost/idc/help/wwhelp/wwhimpl/js/html/wwhelp.htm]

  • Re: Help needed for easy Math & Java problems

    The logic in pseudo code :
    IF length <= 1
    Price = Base price;//Base price = 8 in your case;
    ELSE IF length <= 10
    Price = Base price + (Extra Meter Price * (length - 1));
    ELSE IF length <= 20
    Price = (Base price + (Extra Meter Price * (length - 1))) * Discount1
    ELSE
    Price = (Base price + (Extra Meter Price * (length - 1))) * Discount2
    RETURN Price.
    Code it in Java then.
    Do not use magic numbers.

    The logic in pseudo code :
    IF length <= 1
    Price = Base price;//Base price = 8 in your case;
    ELSE IF length <= 10
    Price = Base price + (Extra Meter Price * (length - 1));
    ELSE IF length <= 20
    Price = (Base price + (Extra Meter Price * (length - 1))) * Discount1
    ELSE
    Price = (Base price + (Extra Meter Price * (length - 1))) * Discount2
    RETURN Price.
    Code it in Java then.
    Do not use magic numbers.

  • Help needed for importing the DC's from NWDI track very urgent

    Hi all,
    I am importing a DC from NWDI tracks.
    I imported DC from NWDI with out any problem but i am unable to create a project
    it shows an error while i am creating the project for DC in inactive DC's.
    error message is :
    Failed to sync DC "**.##/lpt/absencerequest/*.##_LPT_**_OPUS_FRAVAER_WEBDYNPRO_1)" in configuration
    "JC0_DLPT0003_D". File "C:\Documents and                    Settings\****\.dtc\1\DCs\**.##\lpt\absencerequest\_comp\.dcdef" does not exist locally after sync but it exists on the server
    can you plese tell me why its happening as soon as possible
    it is a LEAVE REQUEST application in ESS
    Regards,
    Rajesh

    Hi Rajesh,
    Recently i worked on ESS business package and  faced lot of probelem to bring the track from NWDI into  NWDS. Most of the times the probelms are from importing only. Make sure that whether the DCs which you want to modify is getting imported properly or not. mean the while check the path of the local directory ..  whether it is correct or wrong..
    re import the components once and try to create the porject in local directory.
    to to Work spave  -> local directory -> .dtc -> 0 or 1 ( folder) -> DCS -> bin ->
    if you still facing any  problems pls let me know...
    regards
    Ratnakar reddy

  • OIC: Need to find the Source Code for the YTDSummary.java file

    Hi All,
    We have 11.5.10 implemention and we are using the OIC(Incentive Compensation) Application. In the Report Module for the Year-To-Date Summary we need look for the Java Source Code.The cnytdsum.jsp file call the YTDSummary.java file. We have teh following question
    1. How we can get the Java Source Code and where and which directory we need to look into?
    2. Let say if we need to customize the java file how we can do that?
    3. where and which directory we have to complie the java file?
    Highly appreciate for any pointers
    Thanks,
    Johnson.

    But those must be platform dependant, not really that
    interesting to look at. I have never felt any need to
    look at those at least.Wake up and smell the coffee, abbie! I read the source code all the time and constantly tell my students to do that, too.
    1. Java source code is not platform dependent. The original poster wanted to look at linked list code, how could that be platform dependent?
    2. It is the implementation of the SDK APIs, so by definition it is implementation dependent code, liable to change in a later version. So don't assume anything beyond what is claimed in the API documentation. However, sometimes the documentation is incomplete or ambiguous to you, and reading the source can provide some insight, however implementation dependent. (Light a candle or curse the darkness.)
    3. Why read source code? It's a good way to learn how to program. You see something in the API and ask: how'd they do that? Or you realize you want to do something broadly similar, but you can't reuse the source code.
    For example, Images are not Serializable, but suppose you want a small image that is part of an object to be serialized with the rest of the object without too much fuss (ie, without using javax.imageio). You notice ImageIcon is serializable, so you use it. (An ImageIcon has-an Image.) Then you wonder: how'd they do that? You read the source and then you know.
    You live, you learn,
    Nax

  • 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.*"/>

  • Help needed in understanding the code.

    Hi All,
    I am just trying to understand the Java code in one Self Serice page. However, I am having tough in understanding the CO code. In the prosessRequest class, I have the below code.
    oapagecontext.putTransactionValue("AddAssignmentInsertRowFlag", "N");
    oaapplicationmodule.getTransaction().commit();
    As soon as, oaapplicationmodule.getTransaction().commit();
    gets executed, its calling some other class. Not sure what is being called, but i can see the log messages that its executing some other class which actually does the calls to DB APIs and inserting data into main tables.
    Can you please explain me what is being called to make DB API calls. I would greatly appreciate your help.
    Thanks in Advance!
    - Rani
    ****************************Here is the full code of class for your reference****************************
    public void processFormRequest(OAPageContext oapagecontext, OAWebBean oawebbean)
    if("SelectedResourceLink".equals(oapagecontext.getParameter("event")))
    Debug.log(oapagecontext, this, "SelectedResourceLink has been pressed", 3);
    oapagecontext.redirectImmediately("OA.jsp?akRegionCode=PA_SELECTED_RESOURCES_LAYOUT&akRegionApplicationId=275", true, "RP");
    String s = (String)oapagecontext.getTransactionValue("AssignmentType");
    super.processFormRequest(oapagecontext, oawebbean);
    Debug.log(oapagecontext, this, "in processFormRequest()", 3);
    OAApplicationModule oaapplicationmodule = oapagecontext.getRootApplicationModule();
    if(!"Y".equals(oapagecontext.getParameter("paMass")))
    String s1 = oapagecontext.getParameter("event");
    if("lovUpdate".equals(s1))
    Debug.log(oapagecontext, this, "*** User Selected a value from LOV ***", 3);
    String s3 = oapagecontext.getParameter("source");
    Debug.log(oapagecontext, this, "*** lovInputSourceId = " + s3 + " ***", 3);
    if("ProjectNumber".equals(s3) && "Project".equals(s))
    Hashtable hashtable = oapagecontext.getLovResultsFromSession(s3);
    String s10 = (String)hashtable.get("ProjectId");
    Debug.log(oapagecontext, this, "*** ProjectId ***" + s10, 3);
    oapagecontext.putTransactionValue("paProjectId", s10);
    if("Project".equals(s))
    Debug.log(oapagecontext, this, "*** Setting default value for Delivery assignment ***", 3);
    oaapplicationmodule.invokeMethod("defaultProjectAttrs");
    if("RoleName".equals(s3))
    Hashtable hashtable1 = oapagecontext.getLovResultsFromSession(s3);
    Debug.log(oapagecontext, this, "*** RoleName Hashtable Contents ***" + hashtable1.toString(), 3);
    String s11 = (String)hashtable1.get("RoleId");
    Debug.log(oapagecontext, this, "*** RoleId ***" + s11, 3);
    Debug.log(oapagecontext, this, "*** AssignmentType = " + s + "***", 3);
    if("Open".equals(s))
    Debug.log(oapagecontext, this, "*** Calling defaultJobAttrs for Open Assignment***", 3);
    Serializable aserializable[] = {
    s11
    oaapplicationmodule.invokeMethod("defaultJobAttrs", aserializable);
    if("Template".equals(s) || "Open".equals(s))
    Debug.log(oapagecontext, this, "*** Defaulting Competencies ***" + s11, 3);
    OAViewObject oaviewobject = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("RoleCompetenciesVO");
    oaviewobject.setMaxFetchSize(-1);
    oaviewobject.setWhereClauseParam(0, s11);
    oaviewobject.executeQuery();
    Debug.log(oapagecontext, this, "*** End LOV event ***", 3);
    String s4 = "";
    String s8 = "";
    OASubTabLayoutBean oasubtablayoutbean1 = (OASubTabLayoutBean)oawebbean.findIndexedChildRecursive("AddAssignmentSubTabLayout");
    if("Project".equals(s) && !oasubtablayoutbean1.isSubTabClicked(oapagecontext))
    OAViewObject oaviewobject1 = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("AddNewAssignmentVO");
    s4 = (String)oaviewobject1.first().getAttribute("ProjectId");
    s8 = (String)oaviewobject1.first().getAttribute("ProjectNumber");
    Debug.log(oapagecontext, this, "*** lProjectId = " + s4, 3);
    Debug.log(oapagecontext, this, "*** lProjectNumber = " + s8, 3);
    if("Project".equals(s) && !oasubtablayoutbean1.isSubTabClicked(oapagecontext) && !StringUtils.isNullOrEmpty(s8))
    Debug.log(oapagecontext, this, "Delivery Assignment, Project Number is there but no Project Id", 3);
    if(s4 == null || s4.equals(""))
    ViewObject viewobject = oapagecontext.getApplicationModule(oawebbean).findViewObject("ObtainProjectId");
    if(viewobject == null)
    String s14 = "SELECT project_id FROM PA_PROJECTS_ALL WHERE segment1 =:1";
    viewobject = oaapplicationmodule.createViewObjectFromQueryStmt("ObtainProjectId", s14);
    viewobject.setWhereClauseParam(0, s8);
    viewobject.executeQuery();
    int j = viewobject.getRowCount();
    if(j != 1)
    Debug.log(oapagecontext, this, "Error : Project Number is Invalid or not unique", 3);
    OAException oaexception4 = null;
    oaexception4 = new OAException("PA", "PA_PROJECT_NUMBER_INVALID");
    oaexception4.setApplicationModule(oaapplicationmodule);
    throw oaexception4;
    oracle.jbo.Row row = viewobject.last();
    if(row != null)
    Object obj2 = row.getAttribute(0);
    if(obj2 != null)
    s4 = obj2.toString();
    if(s4 != null)
    oapagecontext.putTransactionValue("paProjectId", s4);
    if(oaapplicationmodule.findViewObject("AddNewAssignmentsVO") != null)
    oaapplicationmodule.findViewObject("AddNewAssignmentVO").first().setAttribute("ProjectId", s4);
    } else
    Debug.log(oapagecontext, this, "Error : No rows returned in Project Number query", 3);
    OAException oaexception5 = null;
    oaexception5 = new OAException("PA", "PA_PROJECT_NUMBER_INVALID");
    oaexception5.setApplicationModule(oaapplicationmodule);
    throw oaexception5;
    String s12 = "F";
    if(s4 != null && !s4.equals(""))
    String s13 = Security.checkUserPrivilege("PA_ASN_CR_AND_DL", "PA_PROJECTS", s4, oapagecontext, false);
    if("F".equals(s13))
    OAException oaexception3 = null;
    oaexception3 = new OAException("PA", "PA_ADD_DELIVERY_ASMT_SECURITY");
    oaexception3.setApplicationModule(oaapplicationmodule);
    Debug.log(oapagecontext, this, "ERROR:" + oaexception3.getMessage(), 3);
    throw oaexception3;
    OAViewObject oaviewobject2 = (OAViewObject)oapagecontext.getApplicationModule(oawebbean).findViewObject("AddNewAssignmentVO");
    Object obj = oaviewobject2.first().getAttribute("BillRateOverride");
    Object obj1 = oaviewobject2.first().getAttribute("BillRateCurrOverride");
    Object obj3 = oaviewobject2.first().getAttribute("MarkupPercentOverride");
    Object obj4 = oaviewobject2.first().getAttribute("DiscountPercentOverride");
    Object obj5 = oaviewobject2.first().getAttribute("TpRateOverride");
    Object obj6 = oaviewobject2.first().getAttribute("TpCurrencyOverride");
    Object obj7 = oaviewobject2.first().getAttribute("TpCalcBaseCodeOverride");
    Object obj8 = oaviewobject2.first().getAttribute("TpPercentAppliedOverride");
    Object obj9 = null;
    Object obj10 = null;
    Debug.log(oapagecontext, this, "in AddAssignmentsTopCO processFcstInfoRg(): getting the implementation options", 3);
    Object obj11 = oaviewobject2.first().getAttribute("BrRateDiscReasonCode");
    Object obj12 = oapagecontext.getTransactionValue("rateDiscReasonFlag");
    Object obj13 = oapagecontext.getTransactionValue("brOverrideFlag");
    Object obj14 = oapagecontext.getTransactionValue("brDiscountOverrideFlag");
    String s22 = oapagecontext.getParameter("BillRateRadioGroup");
    if("BRCurrencyRadioButton".equals(s22))
    Debug.log(oapagecontext, this, "BRCurrencyRadioButton chosen", 3);
    if(obj == null || obj1 == null)
    Debug.log(oapagecontext, this, "error", 3);
    OAException oaexception6 = new OAException("PA", "PA_CURR_BILL_RATE_REQUIRED");
    oaexception6.setApplicationModule(oaapplicationmodule);
    throw oaexception6;
    } else
    if("BRMarkupRadioButton".equals(s22))
    Debug.log(oapagecontext, this, "BRMarkup%RadioButton chosen", 3);
    if(obj3 == null)
    Debug.log(oapagecontext, this, "error", 3);
    OAException oaexception7 = new OAException("PA", "PA_MARKUP_PERCENT_REQUIRED");
    oaexception7.setApplicationModule(oaapplicationmodule);
    throw oaexception7;
    } else
    if("BRDiscountRadioButton".equals(s22))
    Debug.log(oapagecontext, this, "BRDiscount%RadioButton chosen", 3);
    if(obj4 == null)
    Debug.log(oapagecontext, this, "error", 3);
    OAException oaexception8 = new OAException(oapagecontext.getMessage("PA", "PA_DISCOUNT_PERCENT_REQUIRED", null));
    oaexception8.setApplicationModule(oaapplicationmodule);
    throw oaexception8;
    if("Y".equals(oapagecontext.getTransactionValue("paMass")) || "Admin".equals(s) || "Template".equals(s))
    Debug.log(oapagecontext, this, "Need not have this check for team templates ", 3);
    } else
    if(obj13 != null && obj13.equals("Y") && obj12 != null && obj12.equals("Y") && "BRCurrencyRadioButton".equals(s22) && StringUtils.isNullOrEmpty((String)obj11))
    Debug.log(oapagecontext, this, "error 1", 3);
    OAException oaexception9 = new OAException("PA", "PA_RATE_DISC_REASON_REQUIRED");
    oaexception9.setApplicationModule(oaapplicationmodule);
    throw oaexception9;
    if(obj14 != null && obj14.equals("Y") && obj12 != null && obj12.equals("Y") && "BRDiscountRadioButton".equals(s22) && StringUtils.isNullOrEmpty((String)obj11))
    Debug.log(oapagecontext, this, "error 2", 3);
    OAException oaexception10 = new OAException("PA", "PA_RATE_DISC_REASON_REQUIRED");
    oaexception10.setApplicationModule(oaapplicationmodule);
    throw oaexception10;
    Debug.log(oapagecontext, this, "*** Selected transfer price radio shr = " + s22, 3);
    oapagecontext.putTransactionValue("BROGroupSelected", s22);
    Debug.log(oapagecontext, this, "*** 1 :Selected bill rate radio = " + s22, 3);
    if(s22 != null)
    oapagecontext.putSessionValue("BROGroupSelected", s22);
    s22 = oapagecontext.getParameter("TransferPriceRadioGroup");
    Debug.log(oapagecontext, this, "*** Selected transfer price radio = " + s22, 3);
    if("TPCurrencyRadioButton".equals(s22))
    Debug.log(oapagecontext, this, "***TPCurrencyRadioButton chosen", 3);
    if(obj5 == null || obj6 == null)
    Debug.log(oapagecontext, this, "error", 3);
    OAException oaexception11 = new OAException("PA", "PA_CURR_RATE_REQUIRED");
    oaexception11.setApplicationModule(oaapplicationmodule);
    throw oaexception11;
    } else
    if("TPBasisRadioButton".equals(s22))
    Debug.log(oapagecontext, this, "***TPBasisRadioButton chosen", 3);
    if(obj7 == null || obj8 == null)
    Debug.log(oapagecontext, this, "error", 3);
    OAException oaexception12 = new OAException("PA", "PA_BASIS_APPLY_PERCENT_REQD");
    oaexception12.setApplicationModule(oaapplicationmodule);
    throw oaexception12;
    oapagecontext.putTransactionValue("TPORadioGroupSelected", s22);
    if(oaapplicationmodule.findViewObject("AddNewAssignmentVO").first().getAttribute("RoleId") != null)
    Debug.log(oapagecontext, this, "*** Role Id is + " + oaapplicationmodule.findViewObject("AddNewAssignmentVO").first().getAttribute("RoleId"), 3);
    if(oapagecontext.getParameter("SearchCompetencies") != null)
    String s2 = "OA.jsp?akRegionCode=PA_COMP_SEARCH_LAYOUT&akRegionApplicationId=275&paCallingPage=AddAssignment";
    oapagecontext.redirectImmediately(s2, true, "RP");
    OASubTabLayoutBean oasubtablayoutbean = (OASubTabLayoutBean)oawebbean.findIndexedChildRecursive("AddAssignmentSubTabLayout");
    if(s.equals("Project") && oasubtablayoutbean.isSubTabClicked(oapagecontext) && !StringUtils.isNullOrEmpty((String)oapagecontext.getTransactionValue("paProjectId")))
    String s5 = "PA_ASN_FCST_INFO_ED";
    String s9 = "F";
    s9 = Security.checkUserPrivilege(s5, "PA_PROJECTS", (String)oapagecontext.getTransactionValue("paProjectId"), oapagecontext, false);
    if(s9.equals("F"))
    Debug.log(oapagecontext, this, "Error : PA_ASN_FCST_INFO_ED previelge not found", 3);
    OAException oaexception2 = null;
    oaexception2 = new OAException("PA", "PA_NO_SEC_FIN_INFO");
    oaexception2.setApplicationModule(oaapplicationmodule);
    throw oaexception2;
    if(oapagecontext.getParameter("GoBtn") != null)
    if("Y".equals(oapagecontext.getTransactionValue("paMass")) && "0".equals(oapagecontext.getTransactionValue("paNumSelectedResources")))
    OAException oaexception = new OAException("PA", "PA_NO_RESOURCE_SELECTED");
    oaexception.setApplicationModule(oapagecontext.getRootApplicationModule());
    Debug.log(oapagecontext, this, "ERROR:" + oaexception.getMessage(), 3);
    throw oaexception;
    String s6 = "T";
    if(s.equals("Admin") && "Y".equals(oapagecontext.getTransactionValue("paMass")) && "1".equals(oapagecontext.getTransactionValue("paNumSelectedResources")))
    Debug.log(oapagecontext, this, "resource id[19] is " + (String)oapagecontext.getTransactionValue("paResourceId"), 3);
    if(oapagecontext.getTransactionValue("AdminSecurityChecked") == null)
    String s7 = Security.checkPrivilegeOnResource("-999", (String)oapagecontext.getTransactionValue("paResourceId"), SessionUtils.getResourceName((String)oapagecontext.getTransactionValue("paResourceId"), oapagecontext), "PA_ADM_ASN_CR_AND_DL", null, oapagecontext, false);
    if("F".equals(s7))
    OAException oaexception1 = new OAException("PA", "PA_ADD_ADMIN_ASMT_SECURITY");
    oaexception1.setApplicationModule(oapagecontext.getRootApplicationModule());
    Debug.log(oapagecontext, this, "ERROR:" + oaexception1.getMessage(), 3);
    throw oaexception1;
    if("SUBMIT_APPRVL".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    oapagecontext.putTransactionValue("Save", "N");
    else
    oapagecontext.putTransactionValue("Save", "Y");
    String as[] = oaapplicationmodule.getApplicationModuleNames();
    String as1[] = oaapplicationmodule.getViewObjectNames();
    Debug.log(oapagecontext, this, "no of app module: " + as.length, 3);
    Debug.log(oapagecontext, this, "no of view: " + as1.length, 3);
    for(int i = 0; i < as.length; i++)
    Debug.log(oapagecontext, this, "app module: " + as, 3);
    for(int k = 0; k < as1.length; k++)
    Debug.log(oapagecontext, this, "app module: " + as1[k], 3);
    Debug.log(oapagecontext, this, "*** assignmentType = " + s, 3);
    Debug.log(oapagecontext, this, "*** projectId = " + oapagecontext.getTransactionValue("paProjectId"), 3);
    if("Project".equals(s) && !StringUtils.isNullOrEmpty((String)oapagecontext.getTransactionValue("paProjectId")) && !"Y".equals(oapagecontext.getParameter("paMass")))
    Debug.log(oapagecontext, this, "*** Setting default staffing owner for add delivery assignment -- projectId = " + oapagecontext.getTransactionValue("paProjectId"), 3);
    oaapplicationmodule.invokeMethod("setDefaultStaffingOwner");
    OAViewObject oaviewobject3 = (OAViewObject)oaapplicationmodule.findViewObject("RoleCompetenciesVO");
    oaviewobject3.setMaxFetchSize(0);
    oaviewobject3.setRangeSize(-1);
    oracle.jbo.Row arow[] = oaviewobject3.getAllRowsInRange();
    for(int l = 0; l < arow.length; l++)
    RoleCompetenciesVORowImpl rolecompetenciesvorowimpl = (RoleCompetenciesVORowImpl)oaviewobject3.getRowAtRangeIndex(l);
    Debug.log(oapagecontext, this, "roleCompetenciesVORowImpl" + rolecompetenciesvorowimpl, 3);
    rolecompetenciesvorowimpl.setPlsqlState((byte)0);
    oapagecontext.putTransactionValue("AddAssignmentInsertRowFlag", "N");
    oaapplicationmodule.getTransaction().commit();
    if("Y".equals(oapagecontext.getTransactionValue("paMass")) && !"1".equals(oapagecontext.getTransactionValue("paNumSelectedResources")))
    if(!"SUBMIT_APPRVL".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    Debug.log(oapagecontext, this, "Save, Mass, NumSelectedResources>1", 3);
    Debug.log(oapagecontext, this, "work flow has been launched", 3);
    OADialogPage oadialogpage = new OADialogPage((byte)3, new OAException("PA", "PA_MASS_ASSIGNMENT_CONFIRM"), null, "OA.jsp?akRegionCode=PA_RESOURCE_LIST_LAYOUT&akRegionApplicationId=275&addBreadCrumb=N", null);
    oadialogpage.setRetainAMValue(false);
    oapagecontext.redirectToDialogPage(oadialogpage);
    return;
    Debug.log(oapagecontext, this, "SaveAndSubmit, Mass, NumSelectedResources>1", 3);
    putParametersOnSession(oapagecontext);
    int i1 = 0;
    int j1 = 0;
    String s21 = "SelectedResourceId";
    int l1 = Integer.parseInt(oapagecontext.getTransactionValue("paNumSelectedResources").toString());
    Debug.log(oapagecontext, this, "size of resourceArray = " + l1, 3);
    String as2[] = new String[l1];
    for(; !"END".equals(oapagecontext.getTransactionValue(s21.concat(Integer.toString(i1)))); i1++)
    if(oapagecontext.getTransactionValue(s21.concat(Integer.toString(i1))) != null)
    Debug.log(oapagecontext, this, "resource id = " + oapagecontext.getTransactionValue(s21.concat(Integer.toString(i1))).toString(), 3);
    as2[j1] = oapagecontext.getTransactionValue(s21.concat(Integer.toString(i1))).toString();
    j1++;
    SessionUtils.putMultipleParameters("paResourceId", as2, oapagecontext);
    Debug.log(oapagecontext, this, "redirect to Mass Submit for Approval page", 3);
    oapagecontext.redirectImmediately("OA.jsp?akRegionCode=PA_MASS_SUBMIT_LAYOUT&akRegionApplicationId=275&paCallingPage=MassAdd&paProjectId=" + oapagecontext.getTransactionValue("p_project_id"), false, "RP");
    return;
    if("RETURN_TO".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    Debug.log(oapagecontext, this, "Return to Option Selected ", 3);
    String s15 = (String)oapagecontext.getTransactionValue("PrevPageUrl");
    int k1 = s15.indexOf("OA.jsp?");
    s15 = s15.substring(k1);
    Debug.write(oapagecontext, this, "*** RETURN_TO URL: " + s15, 3);
    oapagecontext.redirectImmediately(s15);
    } else
    if("ADD_ANOTHER".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    Debug.log(oapagecontext, this, "Add Another Option Selected", 3);
    oaapplicationmodule.invokeMethod("resetAddNewAssignment");
    if(oaapplicationmodule.findViewObject("RoleCompetenciesVO") != null)
    oaapplicationmodule.findViewObject("RoleCompetenciesVO").clearCache();
    String s16;
    if(!s.equals("Project") && !s.equals("Admin"))
    s16 = "OA.jsp?akRegionCode=PA_ADD_ASSIGNMENTS_PAGE_LAYOUT&akRegionApplicationId=275&paProjectId=" + oapagecontext.getTransactionValue("paProjectId") + "&paAssignmentType=" + s + "&OA_SubTabIdx=0";
    else
    s16 = "OA.jsp?akRegionCode=PA_ADD_ASSIGNMENTS_PAGE_LAYOUT&akRegionApplicationId=275&paResourceId=" + oapagecontext.getTransactionValue("paResourceId") + "&paAssignmentType=" + s + "&OA_SubTabIdx=0";
    Debug.log(oapagecontext, this, "nextUrl " + s16, 3);
    if("Template".equals(s))
    oapagecontext.redirectImmediately(s16, true, "S");
    else
    oapagecontext.redirectImmediately(s16, false, "S");
    } else
    if("UPDATE_DETAILS".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    Debug.log(oapagecontext, this, "Update Details Selected ", 3);
    String s17 = "";
    if("Staffed".equals(s))
    s17 = "ProjStaffedAsmt";
    else
    if("Admin".equals(s))
    s17 = "AdminAsmt";
    else
    if("Project".equals(s))
    s17 = "PersonStaffedAsmt";
    else
    if("Open".equals(s))
    s17 = "OpenAsmt";
    else
    if("Template".equals(s))
    s17 = "TemplateAsmt";
    String s19 = "OA.jsp?akRegionCode=PA_ASMT_LAYOUT&akRegionApplicationId=275&paProjectId=" + oapagecontext.getTransactionValue("paProjectId") + "&paAssignmentId=" + oapagecontext.getTransactionValue("wfOutAssignmentId") + "&paCalledPage=" + s17 + "&addBreadCrumb=RP";
    Debug.log(oapagecontext, this, "UPDATE_DETAILS: URL: " + s19, 3);
    oapagecontext.redirectImmediately(s19, false, "RP");
    if(s.equals("Staffed") || s.equals("Admin") || s.equals("Project"))
    String s18 = (String)oapagecontext.getTransactionValue("wfOutResourceId");
    String s20 = (String)oapagecontext.getTransactionValue("wfOutAssignmentId");
    Debug.log(oapagecontext, this, "outResourceId " + s18, 3);
    Debug.log(oapagecontext, this, "outAssignmentId " + s20, 3);
    if("SUBMIT_APPRVL".equals(oapagecontext.getParameter("AddAsgmtApplyAction")))
    if(s.equals("Staffed"))
    oapagecontext.redirectImmediately("OA.jsp?akRegionCode=PA_SUBMIT_ASMT_APR_LAYOUT&akRegionApplicationId=275&paAsgmtId=" + s20 + "&paResourceId=" + s18 + "&paProjectId=" + oapagecontext.getTransactionValue("paProjectId") + "&paAsgmtAprStatus=ASGMT_APPRVL_WORKING&paAssignmentType=" + s + "&paCallingPage=AddAssignment", false, "RP");
    return;
    oapagecontext.redirectImmediately("OA.jsp?akRegionCode=PA_SUBMIT_ASMT_APR_LAYOUT&akRegionApplicationId=275&paAsgmtId=" + s20 + "&paResourceId=" + s18 + "&paAsgmtAprStatus=ASGMT_APPRVL_WORKING&paAssignmentType=" + s + "&paCallingPage=AddAssignment", false, "RP");

    Hi Rani,
    As soon as the transaction is commited the methods in the VORowImpl Class are called.
    You can check in the VORowImpl class and search for the log messages.
    Thanks,
    Gaurav

  • I need to trigger my java code automatically daily once ... help me

    hi
    i am working with a java program which updates database(mySql) daily once
    i need to make my java code run daily once automatically
    how can i make it to do that
    please someone help me
    thanks in advance

    U can use, autoexec.bat file for executing u'r
    code , but problem is that it will run every time
    system will start,
    so their is a another option for scheduling, try
    at/? in command prompt it will give u enough
    detail to use it for scheduling."Scheduled Tasks" is a UI for the "at" command, and it might be a bit easier for the OP to use that.
    /Kaj

  • Need help in writing a small java code

    Hi,
    I have a small requirement where I need write a small java code. I am thinking of using array. Please suggest if you know the solution:
    1. Need to compare user logon id is preset in the lookup table or not.
    2. If user id present in the lookup then send type "A" mail
    3. If user id in not present in the lookup then send type "B" email.
    Please suggest.
    Thanks,
    Kalpana.

    use this code . you have to pass userlogin and lookup name
    Public String GetEmail(String UserLogin,String lookupcode)
    String email;
    try{
    tcLookupOperationIntf lookupIntf = Platform.getService(tcLookupOperationIntf.class);
    HashMap<String, String> lookupValues = getLookupHashMap(lookupIntf, lookupCode);
    String found = lookupValues.get(UserLogin);
    if (found!=null) email= "EMAIL A";
    else
    email= "EMAIL B";
    }catch(Exception e){}
    return email;
    private HashMap<String, String> getLookupHashMap(tcLookupOperationsIntf lookupOperationsIntf, String lookupCode)throws tcAPIException,tcInvalidLookupException,tcColumnNotFoundException {
    HashMap<String, String> lookupMap = new HashMap<String, String>();
              tcResultSet resultLookupHashMap = lookupOperationsIntf
                        .getLookupValues(lookupCode);
              int countResultLookupHashMap = resultLookupHashMap.getRowCount();
    if (countResultLookupHashMap > 0) {
                   for (int i = 0; i < countResultLookupHashMap; i++) {
                        resultLookupHashMap.goToRow(i);
                        lookupMap.put(resultLookupHashMap..getStringValue("Lookup Definition.Lookup Code Information.Code Key"),
    resultLookupHashMap.getStringValue("Lookup Definition.Lookup Code Information.Decode"));
    return lookupMap;
    }

Maybe you are looking for

  • Placing SVG in InDesign CS3

    Is it true that it is no longer possible to place SVG as an image in InDesign CS3 ? When I try to place several SVG files these are interpreted (and placed) as text files, not graphics ! Is there an update or special filter installer to do this as be

  • Macbook Pro 13" Screen scratch?

    Well, I purchased my 13" Macbook Pro earlier this year, roughly march time, and since, have been very careful with it, with the intent of keeping it for a long time inn pristine condition. A little bit of OCD I guess. Well, what I've noticed is a scr

  • Can I install a new internal HDD and reboot from time machine?

    I'm away from home at the moment and my internal HDD has failed and I am putting in a new HDD I have the time machine backup on a external HDD but no OSX disks with me can I re boot OS from my time machine backup?

  • Drop Zones  in FCPX used to be videos, now show icons

    I made a long video using motion transitions and build-ins with drop zones. When originally applied, you dropped them onto the timeline above the vide you wanted them to work with, and the video would play behind it with it showing through the drop z

  • Archiving Original Media Files

    This question crops up occasionally. The usual suggestion with tapes is to keep them. This is fine except for one potential problem ....... you need the camera to play them! If you only have one camera, it is reasonable to suppose it will eventually