How to call a repeater within a jsp file in web portal

Hello, I wrote a Timer javascript to create a Timer thread that keep running and repeating for every 5 seconds. Basically, this javascript includes a StartTimer(), StopTimer() and UpdateTimer(), I also have a repeater to retrieve data from Oracle Dataabse and diplay them on the screen. Here are the codes
=======================================================
<table border="1">
<netui-data:repeater dataSource="{pageFlow.trackData}" >
<netui-data:repeaterHeader>
<tr>
<!-- create row header for each column -->
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">TrackNumber</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Latitude</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Longitude</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Altitude</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Course</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Speed</td>
<td style="font-family:times new roman;font-size:14pt;color:#0000ff;">Time</td>
</tr>
</netui-data:repeaterHeader>
<tr>
<netui-data:repeaterItem>
<!-- these will make the repeater insert data in table rows -->
<td><netui:label value="{container.item}" defaultValue=" "></netui:label></td>
<% j = j + 1; %>
<% if (j > 6) { %>
</tr>
<% j = 0; %>
<tr>
<% } %>
</netui-data:repeaterItem>
</tr>
</netui-data:repeater>
</table>
====================================================
I also wrote another Timer running in the server side. here are the codes
======================================================
<%!
public void startTimer(HttpServletRequest request)
Timer timer = new Timer();
TimerTask monitorTimerTask = new Monitor();
timer.schedule(monitorTimerTask, 5000, 5000);
request.getSession().setAttribute("My Timer", monitorTimerTask);
System.out.println("Timer starts");
%>
<%!
public class Monitor extends TimerTask
public void run()
%>
<%!
public void stopTimer(HttpServletRequest request)
TimerTask monitor = (TimerTask) request.getSession().getAttribute("My Timer");
if (monitor != null)
System.out.println("Timer stops");
monitor.cancel();
%>
<% if (request.getParameter("start") != null)
startTimer(request);
%>
<% if (request.getParameter("stop") != null)
stopTimer(request);
%>
<input type="button" value="Start the Timer" onclick="document.location='index.jsp?start=true'">
<input type="button" value="Stop the Time" onclick="document.location='index.jsp?stop=true'">
======================================================
My question is how do (can I) call those codes repeater above within the StartTimer() in Javascript or the funtion run() in the class Monitor, which will will be called continuously every 5 seconds, whenever I click on the button Start. Right now, it seems to me that whenever the portal starts, then those repeater codes are executed just once and are not executed when I click on the start button to call the start() in javascripts/run() in the class Monitor.
PS. I include the codes for two different Timers but in my portal there is only one Timer and I can pick one of those, whichever works better. Please help
Thank you
TL

It might compile perfectly well, but the message suggests that you didn't deploy it properly. The class loader can't find it.
That .class file should appear with its package directory structure under the WEB-INF/classes directory or in a JAR in your WEB-INF/lib directory in some WAR file. Does it?

Similar Messages

  • How to call java script function from JSP ?

    how to call java script function from JSP ?

    i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks

  • How to call stored function in my jsp

    how to call stored function in my jsp?
    please give me a example.

    Hi,
    think we need mor einformation, like JDeveloper release and the how you do access the database (JDBC, BC4J, EJB,ADF...)
    Frank

  • How to Call Custom BPEL Process using JSP

    Hi All,
    I m not able to find out the way " How to deploy Custom BPEL process using JSP." Suppose I m Designing my custom BPEL process , and I want to call process through JSP.
    In order to call the BPEL process using JSP I may get the Reference from Oracle guide, But it is for Existing Example like Hello world, Order Booking.
    But I am facing the problem in order to call the Custom BPEL process.
    In case of Oracle Example it looks Simple but How to call Custom BPEL process using JSP.
    Please help me.
    Thanks&Regards
    Devesh Mishra

    hi
    The BPEL Developer guide give the way to Locate the service.can you please specify where you are getting the problem.
    Thanks,
    Sivakumar

  • Use of jsp-file in web.xml

    hello
    can anybody explain about , when we need <jsp-file> in web.xml
    and why we use this tag in place of <url-pattern>?

    If you want to declare a JSP in your web.xml file you use the jsp-file tag instead of the servlet-class tag. Normally there is no need to declare a JSP in the web.xml file unless you want to use init-params.
    Usually people can access a JSP directly wether it is declared in the web.xml or not. So it is not that the jsp-file tag replaces the url-pattern tag so much as the url-pattern tag is not needed for a JSP. However notthing prevents you from declaring the JSP in the web.xml and then mapping the JSP to a different url that doesn't end in '.jsp'.

  • How to setup the access privilege of flash file in Web Intelligence?

    How to setup the access privilege of flash file in Web Intelligence?   WEBI can set access privilege for single WEBI report file, but it seem cano not set access privilege for one flash file.

    Thank you Maksim,
    I did set the "selectionMode" to "Auto". I don't understand where In supply function I have to set lead selection of nested node to first element. Please elaborate on this. Are you talking about the context attribute bound to the second table? OR do I have to change the Importing parameters "Node" and "Parent_Element" of my supply function?
    Thanks for your time.

  • Which folder i have to put my .jsp file for web report?

    for web report(not the paper report) i put my .jsp files in the
    \reports\j2ee\reports_ids\web
    folder
    this is for the DS(Developer Suite)
    i'm trying to move this file to different machine where AS(Application Server)
    is installed.
    but couldn't find above path. where do i have to put .jsp file for
    web report?
    or do i have to modify in the registry? if so, where?
    Thanks

    Hello,
    Take a look to the thread :
    where to add new jsp reports directory location in path
    "...You have to keep jsp files under document root that is OH/j2ee/OC4J_BI_Forms/applications/reports/web directory. You can create sufbolders under this directory and keep jsp files. ..."
    Regards

  • How do i call a function within the jsp?

    Hi,
    What i am doing is now allow a user to type in comment and when the user click on "Add" button, it will call my function and write to a txt file.How can i call a custom jsp function within my jsp page or what is the correct way to do this?
    [My current codes]
    <form name="SubmitEvent" method="post" action="addComment()">
    </form>
    function addComment()
    System.out.println("Entered Add Comment function");
    Thanks for your help!

    You can define a Java Bean (I presume you know the rules to write a Java Bean) and send the read value as parameter to the Bean and then call a function in the Bean from the JSP.
    Contact me if you need more help!

  • How to call methods from within run()

    Seems like this must be a common question, but I cannot for the life of me, find the appropriate topic. So apologies ahead of time if this is a repeat.
    I have code like the following:
    public class MainClass implements Runnable {
    public static void main(String args[]) {
    Thread t = new Thread(new MainClass());
    t.start();
    public void run() {
    if (condition)
    doSomethingIntensive();
    else
    doSomethingElseIntensive();
    System.out.println("I want this to print ONLY AFTER the method call finishes, but I'm printed before either 'Intensive' method call completes.");
    private void doSomethingIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    private void doSomethingElseIntensive() {
    System.out.println("I'm never printed because run() ends before execution gets here.");
    return;
    }Question: how do you call methods from within run() and still have it be sequential execution? It seems that a method call within run() creates a new thread just for the method. BUT, this isn't true, because the Thread.currentThread().getName() names are the same instead run() and the "intensive" methods. So, it's not like I can pause one until the method completes because they're the same thread! (I've tried this.)
    So, moral of the story, is there no breaking down a thread's execution into methods? Does all your thread code have to be within the run() method, even if it's 1000 lines? Seems like this wouldn't be the case, but can't get it to work otherwise.
    Thanks all!!!

    I (think I) understand the basics.. what I'm confused
    about is whether the methods are synced on the class
    type or a class instance?The short answer is; the instance for non-static methods, and the class for static methods, although it would be more accurate to say against the instance of the Class for static methods.
    The locking associated with the "sychronized" keyword is all based around an entity called a "monitor". Whenever a thread wants to enter a synchronized method or block, if it doesn't already "own" the monitor, it will try to take it. If the monitor is owned by another thread, then the current thread will block until the other thread releases the monitor. Once the synchronized block is complete, the monitor is released by the thread that owns it.
    So your question boils down to; where does this monitor come from? Every instance of every Object has a monitor associated with it, and any synchronized method or synchonized block is going to take the monitor associated with the instance. The following:
      synchronized void myMethod() {...is equivalent to:
      void myMethod() {
        synchronized(this) {
      ...Keep in mind, though, that every Class has an instance too. You can call "this.getClass()" to get that instance, or you can get the instance for a specific class, say String, with "String.class". Whenever you declare a static method as synchronized, or put a synchronized block inside a static method, the monitor taken will be the one associated with the instance of the class in which the method was declared. In other words this:
      public class Foo {
        synchronized static void myMethod() {...is equivalent to:
      public class Foo{
        static void myMethod() {
          synchronized(Foo.class) {...The problem here is that the instance of the Foo class is being locked. If we declare a subclass of Foo, and then declare a synchronized static method in the subclass, it will lock on the subclass and not on Foo. This is OK, but you have to be aware of it. If you try to declare a static resource of some sort inside Foo, it's best to make it private instead of protected, because subclasses can't really lock on the parent class (well, at least, not without doing something ugly like "synchronized(Foo.class)", which isn't terribly maintainable).
    Doing something like "synchronized(this.getClass())" is a really bad idea. Each subclass is going to take a different monitor, so you can have as many threads in your synchronized block as you have subclasses, and I can't think of a time I'd want that.
    There's also another, equivalent aproach you can take, if this makes more sense to you:
      static final Object lock = new Object();
      void myMethod() {
        synchronized(lock) {
          // Stuff in here is synchronized against the lock's monitor
      }This will take the monitor of the instance referenced by "lock". Since lock is a static variable, only one thread at a time will be able to get into myMethod(), even if the threads are calling into different instances.

  • How to call a method in one JSP from another JSP?

    say that I have 2 JSPs.
    JSP one has a button.
    JSP two has some method that, say, find the square root of the number passed from JPS one.
    How to - when click - the button on page one call the method on page two?
    Please note that I can not use object binding, but I want passing the actual parameter and call the method on page two.
    Please note that this is an update of a previous post on the same topic called "Object scope".
    Thank you all very much.

    No, i dont know how to call other than main methods from other classes
    And one more doubt i have i.e. Like in C can we see the execution of the program like how the code is being compiled step by step and how the value of the variable changes from step to step like(Add Watch).........

  • How to call webservice server application in jsp

    Hi Friends
    I followed this link http://www.eclipse.org/webtools/community/tutorials/BottomUpAxis2WebService/bu_tutorial.html and run the server and client web service application successfully. How to call the Webservice server application in JSP instead of using client (java main method) java appliaction. Is there any tutorial or code for accessing the webservice server application in jsp.
    Thanks and Regards
    Sherin Pooja

    797526 wrote:
    Hi
    I feel that JSP is just a view page.Not a feeling, it actually is :)
    So it is not good practise to write the scriplet code in JSP page. Absolutely right.
    Is there any other way to call the webservice server application in my client(JSP) page?
    What is it that you want to do? If despite all you have said, you still wish to call the webservice from a jsp, read my response above.
    You would do well to rephrase your question if there's something else that you are asking.
    ram.
    Edited by: ramp on Dec 27, 2010 12:35 PM

  • Problem calling servlet from within a jsp

    I have a servlet which obtains images for a page
    http://bychance.ca/servlet/ImageServlet?PhotoId=AJ-LA-4008
    I use the servlet from within a jsp
    <img src="servlet/ImageServlet?PhotoId=<%=rs.getObject("ID")%>" border="0">
    for some reason it does not work, the images are never called. I have another servlet which is called the same way and it works fine
    <img src="servlet/ImageServletLarge?PhotoId=<%=strPhotoId%>" border="0">
    Thank you all for your time

    this is my servlet code. Like I said it works fine in another servlet
    rs.next();
    byte[] bytearray = new byte[rs.getInt(1)];
    int size=0;
    InputStream sImage;
    sImage = rs.getBinaryStream(2);
    response.reset();
    response.setContentType("image/jpeg");
    while((size=sImage.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size);
    response.flushBuffer();
    sImage.close();

  • Help!Could someone kown how to call ArcGIS application within Labview?

    For my desigh, ArcGIS must be as a application within Labview.Since I haven't found any information in this field. Could some help?
    Now I have finished the two individual parts of Labview and GIS module, but the main problem is how to call for GIS module in Labview. Maybe some one can give me some suggestion.
    Thank all!

    Hello �
    If you created a DLL out of your GIS application you could then call it from LabVIEW using a Call Library Function Node.
    The best place to start understanding Call Library Function Nodes is the LabVIEW Help.
    Also, you might want to take a look at this link.
    Hope this helps!
    S Vences
    National Instruments

  • How to call the crystal report in jsp page

    dear friends
    i want to run or call the crystal report in jsp page.
    if u know that can u send sample code for that to my id
    [email protected]

    Hi Sudhakar,
    Could you please be more speicific about the task you want to accomplish?
    Cheers
    Giri :-)

  • How to call Generic Page flow from jsp

    Hi All,
    I have some links in my home page(jsp file).Based on user's selection, i need to show another JSP page using pageflow(JPF).
    thanks in advance
    vandana

    i have function created by java script lets say x and i want to call this function from jsp scriplet tag which is at the same page ..thanks

Maybe you are looking for