Plot with servlets

Hi, I have a servlet, and after some input, it gives me a vector of numbers. How can I plot this vector in the web page? What alternatives do I have?

Check out JFreeChart at http://www.jfree.org/jfreechart/. It's super easy to use, although you may want to check the license to avoid conflicts.
Joe

Similar Messages

  • How to plot with multi colors in a single XY graph?

    Hi,
      I'm making hesteresis measurements. In this case, I collect data while sweeping voltage first from 0 to 2V, and then back from 2V to 0V, and the data are plotted in a single XY graph. In the XY graph, I want forward sweep plot of one color while the reverse sweep with another color so I can easily make comparisons. And I want to see the data real time. I tried to wire "plot color" in "property node", but this will change the color globally and can not be applied to a section of data. Can anyone advise me how to do this? Thanks!
    Guanglei 
    Solved!
    Go to Solution.

    Hi Graham,
      Thank you very much for the reply, I really appreciate it.
      However I don't quite understand your descripton. Yes I do spit my data in two arrays, one for forward sweep, and the other for reverse sweep. I can plot with different colors in XY graph by appending several XY graphs into one, but by doing this I can not see the data real time. I quickly made a vi to demonstrate my problem,  hope this will give you a better understanding. Thanks. 
    Guanglei
    Attachments:
    demo_GL.vi ‏108 KB

  • Communicate with servlet after using Java Web Start?

    Is it possible to communicate with servlet to get data back and forth
    after using Web Start to download the client application?
    The demos come with Java Web Start are applications which are
    standalone, don't need communicate with the servlet on Web server
    after being launched. I am wondering if it is possible, and how (HTTP
    & JAX-RPC)?
    Thanx in advance.

    I've done this using HTTP. I get the server and port from the codebase:
    BasicService bs = null;
    try {
    bs = (BasicService)ServiceManager.lookup("javax.jnlp.BasicService");
    String codeBase = bs.getCodeBase().toString();
    and use the java.net.HttpURLConnection and java.net.URL classes to send HTTP parameter values to the servlet and to receive results from the HttpURLConnection's input stream.

  • Displaying *.pdf file on browser with servlet

    hi all
    this RAMESH,struggling to display a pdf file on browser from a remote mechine
    earlier i tried with servlet
    response.setContentenType("application/pdf")
    out.println();
    by this i am getting only some data as below
    endobj
    4 0 obj
    <<
    /ProcSet [ /PDF /Text /ImageB ]
    /Font << /Fo0 21 0 R /Fo12 24 0 R /Fo13 27 0 R /Fo16 30 0 R /Fo18 33 0 R /Fo19 36 0 R >>
    >>
    endobj
    For this purpose i have gone thru www.lowagie.com
    and gone thru all examples but i am not getting how to display on browser or at least awt frame
    please requesting all for suggest me some way
    tanks all
    -Ramesh

    are you trying to
    a) create a PDF dynamically
    b) send an existing PDF

  • How to use JNI with Servlets

    Hi
    i was trying to do some example with JNI. I can use JNI with standalone Java application but I just cannot figure out how I can use JNI with Servlet.
    Can some one show me a sample code using JNI with Servlets.
    thanks very much

    hi,
    I am also facing the same problem,
    when I am using JNI with stand alone application it works fine but when i tried to use it with a servlet It gives unsatisfied linker error
    stack: java.lang.UnsatisfiedLinkError: createSocket
         at RelayConnector.createSocket(Native Method)
         at RelayServlet.doGet(RelayServlet.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:891)
         at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:458)
    It seems i have to do some path settings in my iplenet web server.
    If some one have faced the problem i would be glad to know the solution for this, i am literally bugged up,....

  • Problem with Servlets

    Hi,
    I am Tejas , a newbie with servlets. Now, I have a servlet which contains a Javascript method. On clicking a link , the Javascript method is called.
    But however, I find that there is some trouble. I created a class called MainFrames.java, the object of which I am instantiating in the Javascript method.
    But this code doesnt work properly. I have given the snippet below
    out.println("<script type='text/javascript'>");
    out.println("function threader()");
    out.println("{");
    out.println("alert('Inside Threader');");
    out.println("<%@ page import=\"XcForm.MainFrames\"%>"); //I have a hunch that this statement is the problem
    out.println("<%");
    out.println("MainFrames mainframes = new MainFrames();"); //without the import statement above, the MainFrames.java class is not being recognised
    out.println("%>");
    out.println("}");
    out.println("</script>");
    Thanks in advance,
    Tejas

    Do not put presentation code in servlets. Put them in JSPs. And mixing serverside code (scriptlets) and clientside code (javascript) this way is indeed not going to work. That code will certainly not be executed in the order as you write. Serverside code is executed at the server and is finished when the response is completed. So any serverside code inside clientside code is alreay executed. Clientside code is executed at the client and will only execute when the response is completed (onload, etc) or when the client invokes it (onclick, onsubmit, etc). Further on, do not put business code in presentation code. Put them in servlets.

  • JSF 1.2 with SERVLET 2.3

    Hi, i've download the latest JSF 1.2 RI but i can't see any page as i get the following error:
    ava.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getContentType()Ljava/lang/String;
    at com.sun.faces.context.ExternalContextImpl.getResponseContentType(ExternalContextImpl.java:277)
    at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:167)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:131)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:118)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
    The getContentType method that the exception describes is only available in servlet 2.4 but i'm using a servlet 2.3 only container. Can i use JSF 1.2 with servlet 2.3 ?
    Thanks

    I'm 90% sure that you cannot. JSF 1.2 is intended to be part of Java EE 5.0. Since Servlets 2.3 are part of J2EE 1.3, I don't think that it will work.
    Adam

  • Some problems with servlet.jar and tomcat 4.1.27

    Hello everybody,
    I used to work with tomcat 3.3.1 and i've decided to use tomcat 4.1.27 now. The manual explains that we have to change de version of servlet.jar, it's done with servlet-2.3.jar but on tomcat starting i have this message:
    jar not loaded. See servlet spec [...]. Offending class: javax/servlet/Servlet.class
    what can i do, i've red all de documentation and i think all versions a OK??
    thanks per advance
    antoine

    I am running Tomcat 4.1.18, so your configuration may be slightly different. I found the Servlet.class file you are missing residing in the Tomcat/common/lib directory in the Servlet.jar file. Check your path and also make sure your Servlet.jar file contains the missing class.

  • Polar plot with legend points

    I can put one Polar Plot with legend in points?
    Case:
    I have magnitude and phase arrays for build polar plot and i want put rotation legend in each point of measurement. Then we have 3 arrays (magnitude, phase and rotation), but rotation need stay like legend for each point.
    Somebody already do it?
    thx for tip.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science

    Unclebump,
     i do one simple modification to be possible add rotation value to image, isn't better solution but i think that i'm near to solution way. Look these VIs, Re-link is necessary.
    Leonardo de S. Cavadas
    Maintenance Engineer and Inspection - Bureau Veritas do Brasil
    Engineer Metallurgist with emphasis in Advanced Materials
    Technologist in Computer Science
    Attachments:
    Plot Polar Data with Legend.vi ‏74 KB
    OtherPolarPlot.vi ‏67 KB
    Polar Plot with Legend.vi ‏75 KB

  • Communicating with Servlets....

    hi!
    Wat are all the different ways in which the JSP used to communicate with Servlet?
    Thanx,
    Rgds,
    Sasi

    Jsp page communication with Servlets....
    web.xml -- Servlets loaded during application startup
    struts config -- Servlet mapping (w.r.t struts).
    and u can import servlets in jsp and can use it... there are so many possible ways of using servlets coz jsp pages inturn convert into servlets and got executed.....

  • Forward with servlets

    Im using tomcat 4.06 and i have some problems with servlets and forwarding:
    This is my servlet:
    import java.io.PrintWriter;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletContext;
    public class NTenant extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    String email = request.getParameter("tenant");
    //insert new tenant into database.
    System.out.println("Redirigiendo");
    ServletContext sc = getServletConfig().getServletContext();
    RequestDispatcher rdNext = sc.getRequestDispatcher("/tenantForm.html");
    rdNext.forward(request, response);
    System.out.println("Redirigido");
    I get this error:
    type Status report
    message Servlet invoker is currently unavailable
    description The requested service (Servlet invoker is currently unavailable) is not currently available.
    This is my dir structure:
    webapps\form\NewTenant.html
    webapps\form\tenantForm.html
    webapps\form\WEB-INF\web.xml
    webapps\form\WEB-INF\classes\NTenant.class
    webapps\form\WEB-INF\classes\TenantServlet.class
    The problem is that i cannot find my html, what must i write here? sc.getRequestDispatcher("/tenantForm.html"); <-----
    Thank you very much

    I heve tried with "../tenantForm.html"
    java.lang.IllegalArgumentException: Path ../tenantForm.html does not start with a "/" character
         at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:572)
         at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:174)
         at NTenant.doPost(NTenant.java:19)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    Now Im trying with:
    RequestDispatcher rdNext = sc.getRequestDispatcher "/../tenantForm.html");
    And I got:
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    java.lang.NullPointerException
         at NTenant.doPost(NTenant.java:20)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:465)
         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:216)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:536)
    Any other idea?

  • Dialogs with servlets

    Hi
    Does anyone know how to use dialogs with servlets? I'd like to show a confirm dialog on the client machine. My first idea was to use JOptionPane.showConfirmDialog as such in the servlet, but then of course de dialog pops-up on the server side, and not on client side.
    Many thanks for the help,
    Nic

    You need to use javascript to confirm, ask questions, etc...
    You can see :
    http://www.webreference.com/programming/javascript/confirm/
    Or
    http://www.bodo.com/javacool.htm
    Fred

  • Swings with servlets

    Hi,
    how we can use swings with servlets or jsps.
    or
    how we can display the browser in the swings.
    please give me a valid answer with examples.

    Hi,
    Your question is not clear... are you trying to display HTML using swing components or are you trying to use swing in a server-side application?
    Some Swing components (e.g. JLabel) natively support simple html, so:
    JLabel lbl = new JLabel("<html>hello <b>world</b></html>");would result in a JLabel that looks with the word "world" in bold. If you need also frames, css and javascript support - you'll need to reach for a 3^rd^ party library, I'm afraid.
    As for using swing in servers, look at this article:
    http://today.java.net/pub/a/today/2006/04/20/bringing-swing-to-the-web.html
    If you meant neither, please explain more.
    Hope this helps, though.
    Michael Bar-Sinai

  • [Help] To prevent timeout error of browser in clinet with servlet in server

    Hi all,
    If a browser (for example, Internet Explorer) do not get any response from a server for more than sometime (in case of IE, default is 5 min), it will stop waiting and return some timeout error message.
    But I have a servlet, which has a really long-time(at least 10 min) job to do before it could send a response to the browser. So, before the browser in client can get the result, it stops waiting.
    I know I can change the time-out setting of browser in client machines, but there are hundred of thousands.
    So, what I am asking is if it is possible to do it with servlet in server, and how?
    (for example, send something to the client every few minutes, but I do not know how to do it .)
    thanks a lot!

    What you would have to do is set up some sort of 'Buffer' servlet.
    It starts the job in the background, and then returns a page saying job started - client does not time out.
    You would have to start it in a seperate process - probably a new Thread.
    The client would then have to send back requests asking - is it finished yet?
    While the job is not finished the buffer servlet returns a "not yet" message.
    On completion, the job can be sent back to the client.
    Couple of pointers:
    It may be easier to have the background process generate the result to file - then your buffer servlet can just pick up the file when it is completed.
    To get your page to refresh multiple times, you can use javascript: window.setTimeout("[reload page]");
    Good luck,
    evnafets

  • Help with servlet

    I have a project with servlets in the 2 following folders
    myprojects and myclasses
    In my projects I have the helloProject and inside it I have the helloHtml folder and the helloPackage.
    So in the helloHtml folder I have the hello.html file and in the helloPackage I have the Hello.java (which is the servlet)
    when I compile this .java file the class file is inserted in the file myclasses\helloProject\helloPackage
    First in the file hello.html I have the code
    action="http://localhost:8080/servlet/helloPackage.Hello
    and so the servlet is executed fine.
    The problem is that I need to put a button in the code of Hello.java
    so that I can have reloaded the first page which is the hello.html
    But I am confused if I write onclick=history.go(-1) I have what I want but this page is not reloaded so I have some parameters there that I do not want
    Can I write sth like onclick=location.href=http://locahost:8080/.....??
    Could you please give me an advice considering the above description of my files??
    Thank tou very much....

    use sendRedircet(String AbsoluteURL) to send the Browser a redirect header so the browser send a new (fresh) request to the serlvet (with any parameter you specified).

Maybe you are looking for

  • Having trouble connecting Macbook to wireless FIOS

    I tried looking online and can't seem to find an answer that will fit my situation.  I don't have a Pro.  We recently got FIOS installed and have the Actiontech router.  I am able to connect other devices and computers to the wireless signal, but can

  • CS5.5 AS3 FLVPlayback issue adding to stage or library

    I am unable to add the Action Script 3 FLVPlayback component to my stage or library in Flash CS5.5 when working with an action script 3 document. Under components in the video folder i click and drag anyone of the FLVPlayback components (FLVPlayback,

  • How to remove area code bracket in contacts on iPad?

    In contacts how do I remove the area code bracket? I don't live in the states so the braket just messes up my contact number. Thanks!!!

  • SCSM Migration and Upgrade

    We are currently planning to upgrade to SCSM 2012 R2, from SCSM 2010.  We would like to use all new servers and accounts in the new environment but still want to retain the old data.  I have not found good documentation on how to accomplish this.  Th

  • How to create new cost element catagory

    Hi, Can any one let me know How to create New cost element catagory other than standard cost element catagory. Thanks & Regds, Sany.....