Gnuplot in JSP ----- URGENT

Hi
I am trying to create a graph using "GNUPLOT". I use the Runtime.exec(cmd) to execute the gnuplot where cmd = gnuplot temp_cmdFile and i am trying to run this through a JSP. The problem i encounter is the temp_cmdfile is created by the JSP but the output file is not created. the gnuplot command has a statement which says set output filename but this filename is not being created.
Appreciate if someone could help me with this

Hi
I am trying to create a graph using "GNUPLOT". I use
the Runtime.exec(cmd) to execute the gnuplot where cmd
= gnuplot temp_cmdFile and i am trying to run this
through a JSP. The problem i encounter is the
temp_cmdfile is created by the JSP but the output file
is not created. the gnuplot command has a statement
which says set output filename but this filename is
not being created.
Appreciate if someone could help me with thisIf your executing in Unix environment
First check whether that folder contains write permission or not.

Similar Messages

  • Mozilla n' Firefox shows HTML source for JSP(URGENT!!)

    Hi all,
    I have made a web application with JSPs. It seems to work fine with IE. However, with Mozilla and Firefox, it displays the HTML source generated by JSP instead of actually showing the HTML page for that source.
    I'm stumped because I haven't found any other msgs on forums with someone experiencing the same problem. Any help would be appreciated. I need to fix this urgently.
    Thanks
    regards
    Duke
    Message was edited by:
    SeanDaDuke

    Hi,
    I am also facing the same problem. Have you identified any solution for this? Please let me also know the solution.
    Thanks in Advance.
    Regards
    Priya

  • Download a text file from JSP (Urgent Please!)

    Hi,
    I have a issue with this JSP, I need to download a txt file from my webserver to the pc client, the page shows the dialg box but appear the filename (list.jsp) of my jsp instead of the txt file.
    If I click the save buton save the list.jsp page; if I click in the open buton, then appear again the dialg box and now appear the url (download.jsp?filename=...) and if I click in the save button now I can save my txt file in the local pc.!!!!
    Any ideas ??
    list.jsp --> is the jsp from the download.jsp is run.
    download.jsp
    <%@ page import="java.io.*,javax.servlet.*,java.util.* "%><% String filename = request.getParameter("filename");
    response.setContentType("application/download");
    String value = "attachment; filename=\"" + filename + "\";" ;
    response.setHeader("Content-Disposition",value);
    int iRead;
    FileInputStream stream = null;
    try {
    File f = new File("C://test//" + filename);
    stream = new FileInputStream(f);
    while ((iRead = stream.read()) != -1) {
    out.write(iRead);
    out.flush();
    finally {
    if (stream != null) {
    stream.close();
    %>

    Maybe try no quotes around the content disposition header?
    Also, I'm not sure that application/download would be the best content type, maybe "application/octet-stream" instead. You should also probably explicitly set the Content-Length header to the file size.

  • Implementing session timeout in JSP - - Urgent help !

    Hi
    I have a requirement where I need to write a session timeout functionality in a JSP such that the page is redirected to a different page if there is no activity for 5 min.
    I tried the following :
    1.On the onload of my JSP, i created a new session from the current request using the following code snippet :
              HttpSession pSession = request.getSession(true);
              pSession.setAttribute("loggedin","true");
              pSession.setMaxInactiveInterval(10);
    2. Then on any action performed on the JSP, i called the collowing JS function before invoking the server side code.
    /** function to check the user session **/
    function fnChkSession()
         alert('Inside check session');
         <%
              try
                   System.out.println("The value of the session var loggedin : "+pSession.getAttribute("loggedin").toString());
                   System.out.println(" getMaxInactiveInterval() value is : "+pSession.getMaxInactiveInterval());
              catch (Exception e)
                   System.out.println("** Inside the fnChkSession exception catch block **");
              if (pSession.getValue("loggedin") == null)
         %>
              alert('Session has expired');
              document.forms[0].submit();
         <% } %>
    But when I execute this code ,even after 10 secs my session seems to be alive.I can retrieve the session attribute after 10s.
    I also tried setting the session-timeout value in the web.xml. It didnt work.
    Can anyone pls help me on how to proceed further on this.
    Thanks
    Arun B

    You are confusing java with javascript.
    These two things are not the same.
    The lifecycle goes something like this
    1 - Request is made to server
    2 - Java/JSP runs java code, produces HTML page
    3 - java stops running
    4 - html is sent to browser, and javascript starts running.
    You cannot call java code from browser events (such as onload, onclick, onchange...) The only way to run java code again is to submit a request (normally by submitting a form, or clicking a link. )
    If you want a javascript solution, in IE, use the window.setTimeout() method to execute some javascript code after a certain period of time.
    A more generic approach would be to use the refresh header. Set the timeout for the refresh header to be 300 seconds. If the user stays on the same page for more than 5 minutes, it will redirect to the new page.
    Hope this helps,
    evnafets

  • Displaying an Image in an Excel Spreadsheet with JSP - URGENT

    Hi Peoples
    I can transfer the table I am using in to excel with JSP by doing:
    <%@ page contentType ="application/vnd.ms-excel" %>
    this works fine, though I have an image that sits within the table that I want to be displayed as well.
    Can this be done?? If so how???
    Thanks

    Try to insert the image into sheet from it's URL not from it's local file path
    Best regards

  • Problem in printing........using JSP URGENT.PLS

    i have to print some content from the browser and i am using JSP for the dynamic content creation to the browser.
    i am using document.print() in javascript.
    then it is giving the empty space also after printing till the end of the page/document.
    i dont want like this.
    i want the page rolling to be stopped when the content is over.

    >
    i have to print some content from the browser and i am
    using JSP for the dynamic content creation to the
    browser.
    i am using document.print() in javascript.
    then it is giving the empty space also after printing
    till the end of the page/document.
    i dont want like this.
    i want the page rolling to be stopped when the content
    is over.try
    window.focus();
    window.print();

  • How to build dynamic menus using JSP==Urgent==Please Help me

    Hello,
    I have exhausted searching on internet to find a book
    which tells how to build Dynmic menus in JSP.I dont want
    to use DHTML as this becomes complex as the menu categories
    are built using data from database.Is there any workaround in
    java to do this without DHTML or atleast sample code.
    can somebody help me in this regard.
    Thanks
    Jack

    Hello a.s.kumar,
    I would be greatful if you could send me the sample code.
    [email protected]
    we can't let MM Flash run away with the show can we. Javascript can do a decent job, but the underlying menu data is static.
    Cheers, Darren

  • I need to make a chat in JSP urgent.

    I�m new in JSP and I need make a chat in JSP to a project,
    but I didn�t find good sources . Could someone help me in this ?
    Tiago
    ticdd

    You know you can decompile some files, then you understand the basic of the code:
    http://members.fortunecity.com/neshkov/dj.html
    Or keep searching, you will find a complete chat, I think.
    Andreas

  • Help in using JSP: Urgent As Project dues soon

    Hello Guys, i am new here. I got some problems using jsp. My main project is about a webpage where there is login and password for users. But, I can GO to a certain JSP page without LOGINING in. For example, i got a jsp page for customer to buy and sell things, the page that process my buy & sell can be viewed without the customer logging in. Anyone can help me? Thanks Alot.

    Hello Guys, i am new here. I got some problems using jsp. My main project is about a webpage where there is login and password for users. But, I can GO to a certain JSP page without LOGINING in. For example, i got a jsp page for customer to buy and sell things, the page that process my buy & sell can be viewed without the customer logging in. Anyone can help me? Thanks Alot.

  • Help! can i get a tree view component used in jsp ,urgent!!

    hello all
    can i get a tree view component can be used in jsp ,it gets children data from database only when user expand one node, and it must be able to add nodes or removes node by user,so i can do some post handler in my database.
    regards!

    Where did you get this tree view component?

  • Help in Jsp- Urgent

    Hi
    From a servlet i am forwarding the request to a Jsp page.
    From that Jsp i want to call another Servlet.Can similar forwarding of Request be done as in case of servlets where we use the Requestdispatcher class.I dont want to perform the action in a Jsp page and go to the servlet.Help in this.
    Thanx
    Swamy.

    Did you try using <jsp:forward> tag . I guess you can forward to a servlet also using this tag.

  • Getting option value in jsp: Urgent help will be appreciated

    Hello All,
    I am working on JSP. I will grade myself as beginner in JSP.
    I am trying to solve since last 2 days, I just want to display the value of option tag, and not able to get it.
    <table>
    <tr>
    <td>
    <html:select name="ActionForm" property="overage">
    <%
    int i;
    int[] arr1=new int[200];
    for (i=0;i<=100;i=i+10)
    arr1=i;
    %>
    <html:option value="/<%=i%>/"><%= arr1%></html:option>
    <%}%>
    </html:select>
    </td>
    </tr>
    </table>
    Please, ignore the syntactical error.
    Now in above code I want to know what is being put up as value of option tag. By value I mean , I want see <html:option ]value="/<%=i%>/> . (Data marked in bold)
    Your help will be appreciated. I tried couple of things such as getParameter(), get Attribute(), getOverage(). Some of it gave me value as "//", it skips the i variable.
    I want to see what is being put up in value for every iteration of loop

    Yeah I know. But thnx for the response.
    I also got that error solved. you know what it was because of those bckslashes. i wrote it,
    <html:option value="<%=i%>"><%=arr%> instead of
    <html:option value="/<%=i%>/"><%=arr[i]%>
    and that worked perfectly. I wish I could have known this before. It would have saved me lot of time.

  • How to generatereport in jsp (urgent)

    i was download the elixir RepertoireSDK-1.0.1 software and tried it work run in tomcat server.. but i dont know how to generatereport in jsp.. pls anyone help me.. give some example
    regards
    ramkumar
    [email protected]

    check out the support matrix for deployment of EJB's to Oracle9iAS containers for J2EE (OC4J) http://otn.oracle.com/products/jdev/htdocs/jdev323oc4j.html
    The matrix also has links to supported HowTo's
    raghu

  • Login page in jsp-urgent

    hello to all,
    i am using tomcat 4.1.24,i have created a login page where i am forwarding the username and password to a jsp file where it process the validation by instantiating the bean and sets the property,but when it (Process.jsp)calls a method in bean validate() the main problem i am facing is whatever userid and password i type it is just taking the success.jsp page which is added in Process.jsp file and displaying the contents and i don't think it matches with the database records by instantiating the bean.could anybody tell me where i have gonw wrong.i have attached code below and i have used Msaccess to retrieve records.please help me.
    Login.jsp
    <html>
    <head>
    <title>Login page</title>
    </head>
    <body>
    <br>
    <p><h3><center>Please enter your name and password</center></h3></p>
    <br>
    <br>
    <form action="Process.jsp" method="post">
    <center>Username</center>
    <center><input type="text" name="username"></center>
    <center>Password</center>
    <center><input type="password" name="password"></center>
    <center><input type="submit" name="submit" value="login">
    </center>
    </form>
    </body>
    </html>
    Process.jsp
    <%@ page import="java.util.*" %>
    <jsp:useBean id="idHandler" class="foo.Login" scope="request">
    <jsp:setProperty name="idHandler" property="*"/>
    </jsp:useBean>
    <%
    if (idHandler.validate()) {
    %>
    <jsp:forward page="success.jsp"/>
    <%
    else {
    %>
    <jsp:forward page="retry.jsp"/>
    <%
    %>
    Login.java
    package foo;
    import java.sql.*;
    public class Login
    private String username="";
    private String password="";
    public Login()
    public void setUsername(String username)
    this.username=username;
    public void setPassword(String password)
    this.password=password;
    public boolean validate()
    String query="select * from USER";
    String Dbusername="";
    String Dbpassword="";
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con=DriverManager.getConnection("jdbc:odbc:Visualcaccess");
    Statement st=con.createStatement();
    ResultSet rs=st.executeQuery(query);
    while(rs.next())
    Dbusername=rs.getString(1);
    Dbpassword=rs.getString(2);
    if((username.equals(Dbusername)) && (password.equals(Dbpassword)))
    break;
    return true;
    }catch(Exception e)
    e.printStackTrace();
    return false;

    The reason your program is always forwarding to success.jsp is because of a logic error in Login.validate();
    After cycling through all the results in the resultset your method returns true regardless of whether the user was found or not.
    Instead try getting a count of the users in the database that have the given user name and password.
    Here's an example: (replace "USERNAME" and "PASSWORD" with the name's of the columns in you database)
    public boolean validate()
    String query="select count(USERNAME) as usercount from USER where USERNAME='"+username+"' and PASSWORD='"+password+"'";
    try
         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection con=DriverManager.getConnection("jdbc:odbc:Visualcaccess");
         Statement st=con.createStatement();
         ResultSet rs=st.executeQuery(query);
         rs.first();
         if (rs.getInt("usercount") > 0)
              //There is an entry in the USER table with the given username and password
              return true;
         else
              //There isn't an entry in the USER table with the given username and password
              return false;
    catch(Exception e)
         e.printStackTrace();
         return false;

  • JSP- Servlet- Same JSP - Urgent HELP!

    I have a scenario as follows:
    The JSP is a Login JSP which forwards the request to the Servlet to validate the Login info from the HTML. This I do by submitting the JSP page to itself & in the beginning checking if the Submit button was clicked, if yes, then I extract all the form elements by request.getPArameter(element name) & set in on the request using request.setAttribute() methods! The servlet uses the values by doing a request.getAttribute() & say, a validate User failure, the servlet ahs tor edirect user to the same Login.jsp page, but the second time, the "Submit" button value is still true, since the servlet forwards the same request, response & this ends in an infinite loop, of JSP calling Servlet, the User validation fails & the Servlets calls the JSp again, and so on.
    How do I reset the HTML form element values in the JSP before forwarding to the Servlet? is there a request.setParameter() method? Or is there a way for the servlet to forward a new request & response to the same JSP?
    Thanks in advance.

    if the user is invalid.. redirect them to the error page and in the error page pu this javascript... It will refresh the page so the loop will not happen.
    <script language="JavaScript">
    var sec2count = "2"
    var redirectpage = "Login.jsp"
    function countdown() {
    if (sec2count == "0") {
    document.location = redirectpage
    else {
    sec2count = sec2count - 1
    document.form1234.counter.value = sec2count
    setTimeout("countdown()", 1000)
    countdown()
    </script>

Maybe you are looking for

  • Why the Slowdown with External Monitor?

    I have a new Retina iMac with a 4 Gig Core i7 processor, 32 Gigs of RAM and 4 Gigs of VRAM and the AMD Radeon R9 M295X chipset.  My 3 TB hard drive is well under half full.  Everything works great . . . until I attach an external monitor. I've attach

  • Flash Volume in Director

    Hi, I have a number of flash files in .swf format that I need to incorporate into a Director Movie. I would like the user to be able to adjust the voume of them through Director but cannot find a way to adjust the volume of flash files through Lingo.

  • IMac login problems on any 10.6 update

    I have a 24" iMac that is 2 years old. After using snow leopard on my husband's new macbook I decided to get it for my imac. The base install of 10.6 works fine but of course it immediately wants to be updated to a new release. If I update it past th

  • Runtimr error OBJECTS_OBJREF_NOT_ASSIGNED when i schedule pgm in back grd

    Hi All when I schedule any BDC pgm in Background by giving job name in SM36 . It is giving an runtimr error OBJECTS_OBJREF_NOT_ASSIGNED and Exception CX_SY_REF_IS_INITIAL . Error analysis An exception occurred that is explained in detail below. The e

  • My itunes recently lost its library for no apparent reason.

    My itunes recently lost its library for no apparent reason. The only library backup is an old one that does not reflect my current iPhone, and I do not want to have to re-input all the lyrics for the music I have imported in that time. Does itunes no