HOw to implement POI -HSSF in JSP

Hello Everybody,
requirement: I have to generate reports of the output from a jsp into excel spreadsheet.
what i did: Changed the Content type to
response.setContentType("application/vnd.ms-excel");
I am getting the output in Excel. But, it is taking long time to display.
I have searched in the net. I got the information that, i can use POI-hssf to generate Excel report.
Can any one who have experience on this POI-hssf implementation, could guide me?I couldn't understand details as to what other factors i need to look upon to start using this api in my project. ?!
Regards.
AShvini

NO, Pgeuens !
What i mean is :
I have droped idea of using HSSF in my code. I am NOT
going to use it.
I can't do it, because, for each user, their
requirement will be different and input will be
different for the report. I can't assume all the
possible inputs and prepare the report in advance !This doesn't seem to be a good reason to drop the idea. Why don't you design a generic interface +class which will allow the report generation as per a set of defined rules?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • ** Any one know How to Implement POI of Google map ***

    **Hi Friends,
    if any one knows about implementation.just share with me.
    [email protected]

    HI Friends,
    How to implement Point Of Interest from google map.
    Is it possible, i checked in google static map api ..it provides markers and path and also some features
    other than POI.
    May i know how to implement POI,
    what api i have to use..i checked google ajax api. im not able to get that one.
    So,give me ur suggestions.
    what i have to do .
    [email protected]

  • How to implement this function in JSP/Servlet env?

    Hi all,
    I working on a project, it provides functionality to upload file using JSP/Servlet. In the first JSP page, there is file location and submit button. After user select a file to upload and click submit button, a message, like "sending file to XXXX", will be shown on the screen. Once uploading and validation are done on the server-side, a successful/error msg will be shown to user.
    Here I have a question for the "sending..." msg and the successful/error msg. They should be put in one jsp page or in two separate page? how to implement them?
    Thanks for any help!
    Tranquil

    For the sending message... Well, the thing is, when you click submit, it's sending the file to the server and the server is processing it, and this is all done before the "complete" page is sent to the server. So one would need to use some Javascript on the page before the actual submit happens to show some message. This is done on Ebay when you put something for sale, you can upload an image, and there is a little popup message telling you that it's uploading, and it is removed when the process is done. Now, I'm not sure the exact details of how this works, but my educated guess is this:
    1) The onsubmit function of the form checks that the file upload fields have a value (no need to popup a message if no file upload, since that's what usually takes the time, although it could just be assumed there is a file). If a file is to be uploaded, or just want to show the message anyway, a new popup window is opened with the window.open method and the "sending" message is shown (either written via Javascript or just load a small web page to the window).
    2) The popup window, since you can't transfer the window object from the form page to the next page, has to check window.opener for some value that the success/error page would have to set. The success/error page could use it's body onload function to set a variable in it's own window object to denote that the page is loaded. The popup window can use a looping check using setTimeout or setInterval in Javascript to check for window.opener.isLoadedVariable to be present, and if so, close itself.
    I've never done that, but I see no reason why it wouldn't work.

  • How to implement content caching for jsp page ?

    Hello everyone,
    I am reading an article <Servlets and Jsp Best Practice>,at
    http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying :
    "Cache content: You should never dynamically regenerate content that doesn't
    change between requests. You can cache content on the client-side, proxy-
    side,or server-side. "
    Now I am working on a project. For every user, some of the content servlet generated will be the same for at least a week . I am thinking if I implement caching for these jsp pages, that would increase performace a lot.
    But I have no idea how to implement it either client-side or server-side, can someone give me a hint ?
    Thanks,
    Rachel

    You mean actually you are caching the response stream
    and the key to distinguish between different response
    streams are made of user's different request
    parameters. And the filter's function is to intercept
    the request to see if this request parameter's
    combination already exists in the Hashmap,then either
    use the cached response or forward to
    servlet.....really interesting...Do I get it right ?Yes that's it in a nutshell.
    >
    Then how do you build those response streams in
    advance ? You did it manually or have some mechanism
    to build it automatically ?
    The data gets cached the first time somebody visits the page.
    Find some examples on Filters, and take a look at the HttpServletResponseWrapper class. You need to cache response headers as well as the body. Another pitfall that you might run into is handling an If-modified-since header on the request. Don't cache the results of those requests.
    -Jonathan
    >
    Thanks again !
    Rachel

  • How to implement Electronic Signatures in JSP pages

    Hi,
    Any one know how we can implement the Electronic Digital Signature for Ready Credit & Finance forms in sites? Please help on this topic.
    Regards
    -Soma Sekhar

    DecimalFormat result  = new DecimalFormat("0.000");
    String output = result.format(Double.parseDouble(zonReilly));Assuming zonReilly is a String, which contains a double as a string.
    Any way this won't round up the number according to decimal rounding rules.
    Regards
    -John-

  • Excel File Management Apache POI HSSF vs. jxl jar

    I've been reviewing Java technologies for managing Excel files, and I'm a little confused about the differences between Apache's POI HSSF implementation and JExcelApi, and utimately what technology it makes sense to use.
    They are both open source, although POI is backed by Apache, where JExcelApi seems to be open source developed by Andy Khan. It seem Apache has a little more weight, therefore may be a better option.
    Can someone who has exposure to these technologies please provide me with some insight.
    Thanks.

    Hi
    Thanks for your reply,
    Now I hav used an alternate approach of using Apache POI.
    But.......
    I have created simple table in jsp and set content type to
    <%@ page contentType="application/vnd.ms-excel" %>
    when i navigate to this jsp it is getting displayed in excel format.
    I wish if user clicks on to navigate for this jsp, he must get an option to either open, save or cancel the jsp.
    Then on selecting save a dialogue gets appeared where he can select path and file name.
    Please comment.
    Thanks.

  • How to implement a single sign on  feature using java.

    Hi,
    I have a question like , How to implement **single sign on** feature in java without using any third party framework or tool like LDAP or any other which is available in the market.
    Actually the situation is i have all security information into the table and those information is used for single sign on . If a user logged in from a jsp loging page all the security role should be assigned to that particular user.
    We can do this using LDAP but i am not supposed to use the LDAP or any third party tool . I have to write a java class for that .
    please suggest me the method , how to implement this in a web application.
    Edited by: Rakesh_Singh on Mar 19, 2008 11:55 AM

    you could setup a token that specifies a user is authenticated. other applications that u want SSO can check for existance of this token
    if it is HTTP - you can save the token as a cookie and downstream apps look for this token
    yr code needs to validate that the token/cookie was indeed a valid one and not subject to man-in-the middle attack.

  • How to access java method in JSP

    Hi all,
    I need to access java class (abstract portal component) method doContent() in a JSP which is under PORTAL-INF/jsp folder.
    I did
    <%@ page import = "com.mycompany.Aclass" %>
    <%com.mycompany.Aclass a = new com.mycompany.Aclass (); %>
    Aclass is coming as autofill/prepopulated with cntrl+space
    Till this time, it is working. no errors. But when I do
    a.
    a. (a dot) no methods are populating (autofill..cntrl+space) or If I forcebly add method a.doContent(req,res)... at runtime its giving error.
    It's not only with doContent method... Its with any simple methods in that class or any other class.
    (Other than doContent method in the APC java class are prepopulating/autofilling but giving error in runtime)
    Can anyone help me... how to access java method in JSP.
    I already gone through many SDN forum post... and implemented too---but no use I refered below forum thread
    Retrieve values from Java class to JSP
    URGENT! How to call a java class from JSP.
    Calling a java method from jsp file -
    this thread is same as my issue
    Thanks,
    PradeeP

    1st. The classes must be in packages. 2nd, the package that they are in must be under the WEB-INF/classes directory. 3rd Look on google and/or this site for web application deployment

  • How to implement a logout

    I have a basic jsp application with a form-based authentication[which is working well].
    I would like advice on how to implement a logout mechanism from the application.
    I would also like help on how to retrieve the user ID of the user so that i display it on the screen.
    ochomo

    Call HttpSession#invalidate() to invalidate the session.
    The remote user is available by HttpServletRequest#getRemoteUser() and its principal by HttpServletRequest#getUserPrincipal() by the way.

  • How to implement a chat functionality?

    Hi guys! I was wondering if anyone of you knows how to implement a one-on-one Chat function with servlet/JSP as the GUI and the servlet would do most of the logic processing. This servlet would know to whom the data/message is to be sent and who sent the message. I really need this. I hope someone knows. Thanks! =)

    check out this link for ideas. You may even want to use the technology.
    http://developer.java.sun.com/developer/technicalArticles/Networking/jxta2.0/

  • HOW can I call EJB with JSP?

    Hi, I'm working with JSP and want to include some EJB. I dont know how can I access EJB through JSP. I dont know if I use the right code in JSP for calling EJB. Did someone know how to use that? Can someone tell me if is the right code in JSP in my example?
    Thanks, Kristjan
    THIS IS THE JSP: (useejb.jsp)
    <%@ taglib uri="http://xmlns.oracle.com/j2ee/jsp/tld/ojsp/ejbtaglib.tld" prefix="EJB" %>
    <%@ page import="mypackage1.MySessionEJB" %>
    <%@ page import="mypackage1.MySessionEJBHome" %>
    <%@ page import="mypackage1.impl.MySessionEJBBean" %>
    <HTML>
    <head><TITLE>USEBEAN</TITLE></head>
    <body>
    <EJB:useHome id="mySessionEJBHome" type="mypackage1.MySessionEJBHome" location="java:comp/env/ejb/mySessionEJB" local="false" />
    <EJB:useBean id="mySessionEJBBean" type="mypackage1.impl.MySessionEJBBean" local="false">
    <EJB:createBean instance="<%=mySessionEJBHome.create() %>" />
    </EJB:useBean>
    <%= mySessionEJBBean.calc() %>
    </body>
    </html>
    THIS IS THE EJB CODE:(MySessionEJBBean.java)
    package mypackage1.impl;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.lang.String.*;
    public class MySessionEJBBean implements SessionBean
    public void ejbCreate(){}
    public void ejbActivate(){}
    public void ejbPassivate(){}
    public void ejbRemove(){}
    public void setSessionContext(SessionContext ctx){}
    public String calc(String value)
    return value + value;
    public String zanka(String x)
    return x;
    (MySessionEJB.java)
    package mypackage1;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    public interface MySessionEJB extends EJBObject
    public String calc(String value) throws RemoteException;
    String zanka(String x) throws RemoteException;
    (MySessionEJBHome.java)
    package mypackage1;
    import javax.ejb.EJBHome;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    public interface MySessionEJBHome extends EJBHome
    public MySessionEJB create() throws RemoteException, CreateException;
    }

    You might want to look at using a Java Bean wrapper, this can be done automically using WebSphere. It creates what is called an access bean which the JSP imports.
    HTH,
    J.Clancey

  • How many ways you can invoke JSP from OBPM

    Hi All,
    I just wanted to know how many ways we can invoke JSP Page from BPM.
    1. BPM Interactive component call
    2. ?.
    Thanks
    Sunil.

    When you are using a jsp, its for user interaction only. and in any case, you require interactive component call.
    this is the only way you can use a jsp in OBPM.
    However, in a bpm interactive activity - you can also choose external as implementation type.
    For this, you need to have your jsp source code reference added as an external resource in the project and the external resource is to be specified at configuration while setting implementation type.
    HTH
    Sharma

  • How to implement Type Ahead in Endeca

    Hi
    Can anyone help us as how to implement type ahead search in Endeca ATG.
    Any documents related to it?
    Thanks

    Hi,
    The following links might help you.
    how to implement type-ahead for search
    Implementation of type-ahead functionality in Endeca JSP Ref application
    Re: Problem with endeca typeahead
    (You can even continue the hunt for the answer for this qn that forum as more Endeca experienced persons will be answering there)
    Thanks,
    Gopinath Ramasamy

  • POI-HSSF or Cocoon?

    Hi,
    In our system we have one webb client and one Java application client.
    They both comunicate with the server through 2 difftrent servlets.
    Now I want to implement a method that creates Excel-files on the
    server that both the clients can call.
    I have found information about POI in this forum. When I went to
    http://jakarta.apache.org/poi/hssf/index.html to check it out I read a
    recomendation to use Cocoon instead:
    "If you're modifying spreadsheet data then use the usermodel api. You can also generate spreadsheets this way, but using Cocoon (which will do it this way indirectly) is the best way...we promise."
    So I read about Cocoon too and now I am really confused!!!
    Will they stop developing POI-HSSF?
    Is Cocoon only for webb aplication?
    Can someone please help me?
    :-)Lisa

    I thought Cocoon was a tool for transforming XML into something else. You can probably use Cocoon's ability to transform XML (using POI) into Excel I guess, but Cocoon is not a tool to create Excel spreasheets no.

  • How to implements the single thread modal?

    how to implement the singlethread modal in servler/jsp?

    Do you mean 'model?' and 'servlet?' and are you referring to the interface with that name? which your servlet class just has to declare that it implements?

Maybe you are looking for

  • Reports timeout at 60-seconds in web page

    I have an SSRS 2012 report that takes a couple minutes to run. It runs fine in Visual Studio, and when run directly from the report-server manager (webpage), but when run from an ASP.NET webpage, it "stops running" at 60-seconds. No errors - just the

  • Getting following deployment error from Web Dynpro. Please help.

    Feb 17, 2009 3:13:36 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR: [016]Deployment aborted Settings SDM host : tpepqa SDM port : 50018 URL to deploy : file:/C:/DOCUME1/DIPESH1/LOCALS~

  • 700p (Verizon) and Vista x64

    I just bought me a new laptop that has Vista x64 on it.  I've tried to sync via Bluetooth (which is the only option for Vista x64) and I get the following error message: "Unable to initiate HotSync operation because the port is in use by another appl

  • ITunes U help, please.

    Can primary admins post content? Or can only instructors post content?

  • CS5 animation symbol replacement question....

    Sooo, my company (FB games) has fired everyone who knew what they were doing leaving me, with no knowledge of flash, staring at my to-do list near tears, unable to complete basic tasks. I need to take an existing walk cycle animation and replace the