How to create poll functionality using java(struts)

Hiii,
How to create the poll functionality to place into the site. I am using struts and XML file to store the data. We should able to view the result of the poll in horizontal bar graph.
Please give me an idea how to implement it or provide a link which has the implementation.
Thanks

Whatever happened to good, old-fashioned thinking? All we see here now is "how to write <common application> with minimal input from myself?"-type questions. It's only a matter of time until we get people coming here asking "how to write <massively-scoped enterprise app>? What class I need for that?". Oh, wait. We already do get that

Similar Messages

  • How to run .jar on linux & how to create .jar file using java?

    hi, may i know how to run .jar on linux & how to create .jar file using java? Can u provide the steps on doing it.
    thanks in advance.

    Look at the manual page for jar:
    # man jar
    Also you can run them by doing:
    # java -jar Prog.jar

  • How to create sub domain using java ?

    how to create sub domain using java ?
    for example:
    name1.domainname.com
    name2.domainname.com
    is it possibe ?

    You don't do that using Java.
    Consult the documentation of the application server in question how to configure it. If you're using for example Tomcat 6.0, then you should be consulting this document: [http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html].

  • Create RFC Function using Java Program

    hi
    I am trying to create a small utility in java that extracts data from SAP system and loads it to local Db
    For extracting data from SAP we have a custom ABAP function (RFC) running on SAP server that is called from Java using JCO3 APIs
    Installation of this utility on client side involves -
    1.     Installing RFC on Clientu2019s SAP instance
    2.     Installing / Configuring Java code on Clientu2019s machine
    Is there a way to install / create a RFC function using java -JCO APIs so that Step-1 can be omitted?
    I had browsed through a sample provided in examples installed with JCO3 but its very trivial example can someone point to a exhaustive link or explain how this can be achieved using Java program
    Thanks

    Hi Amit
    I am not sure I understand the question. You want to create an RFC in Java? If this is correct why not create a Remote Method in java for example as EJB or Web Service which is more standard than creating an RFC.
    On the other hand if you want to create a RFC client in Java (a Program which calls a RFC in SAP ABAP system) you can use JCo APIs (which can be either standalone or on the NW Java server) or JRA (from NW 7.1 onwards).
    Regards
    Partha

  • How to create PBR functionality using WDS deployment

    Dear sir/madam,
    We are a Dutch OEM currently working on deployment and DIS. I have a question about deployment I’m hoping you can help us with.
    We were tought to deploy images via USB using the following script:
    dism /Apply-Image /ImageFile:%1 /Index:1 /ApplyDir:W:\
    md T:\Recovery\WindowsRE
    attrib -h -a -s W:\windows\system32\recovery\winre.wim
    copy W:\windows\system32\recovery\winre.wim T:\Recovery\WindowsRE\winre.wim
    W:\Windows\System32\bcdboot W:\Windows /s S:
    W:\Windows\System32\reagentc /setreimage /path T:\Recovery\WindowsRE /target W:\Windows
    Mkdir R:\RecoveryImage
    Copy %2 R:\RecoveryImage\
    W:\Windows\System32\reagentc /setosimage /path R:\RecoveryImage /target W:\Windows /index 1
    This works perfectly for single systems. However, since we’re planning on building a lot of units we want to automate installation over network. We’re building a solution to deploy custom images on tablets, laptops and desktops based on
    WDS. We currently have a working MS Server 2012 WDS server and several working custom images. The question we have is regarding the system recovery functions (PBR). I’ve managed to automate login to WDS, language choice and disk partitioning using WDSunattend
    (see below). WinRE and Recovery Image partitions are created. We can manually select the image we want to deploy and it will successfully install to the Windows partition.
    <?xml version="1.0" ?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
    <component name="Microsoft-Windows-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
    <WindowsDeploymentServices>
    <Login>
    <WillShowUI>OnError</WillShowUI>
    <Credentials>
    <Username>Administrator</Username>
    <Domain>WDS.assemblage.com</Domain>
    <Password>xxx</Password>
    </Credentials>
    </Login>
    <ImageSelection>
    <WillShowUI>OnError</WillShowUI>
    <InstallTo>
    <DiskID>0</DiskID>
    <PartitionID>4</PartitionID>
    </InstallTo>
    </ImageSelection>
    </WindowsDeploymentServices>          
    <DiskConfiguration>
    <Disk>
    <DiskID>0</DiskID>
    <WillWipeDisk>false</WillWipeDisk>
    <CreatePartitions>
    <CreatePartition>
    <Order>1</Order>
    <Size>540</Size>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>2</Order>
    <Size>260</Size>
    <Type>EFI</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>3</Order>
    <Size>128</Size>
    <Type>MSR</Type>
    </CreatePartition>
    <CreatePartition>
     <Order>4</Order>
    <Size>20000</Size>
    <Type>Primary</Type>
    </CreatePartition>
    <CreatePartition>
    <Order>5</Order>
    <Extend>true</Extend>
    <Type>Primary</Type>
    </CreatePartition>
    </CreatePartitions>
    <ModifyPartitions>
    <ModifyPartition>
    <Order>1</Order>
    <Format>NTFS</Format>
    <Label>WinRE</Label>
    <PartitionID>1</PartitionID>
    <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
    </ModifyPartition>
    <ModifyPartition>
    <Order>2</Order>
    <PartitionID>2</PartitionID>
    <Label>System</Label>
    <Format>FAT32</Format>
    </ModifyPartition>
    <ModifyPartition>
    <Order>3</Order>
    <PartitionID>3</PartitionID>
    </ModifyPartition>
    <ModifyPartition>
    <Order>4</Order>
    <PartitionID>4</PartitionID>
    <Letter>C</Letter>
    <Label>Windows</Label>
     <Format>NTFS</Format>
    </ModifyPartition>
    <ModifyPartition>
    <Order>5</Order>
    <PartitionID>5</PartitionID>
    <Label>Recovery</Label>
    <Format>NTFS</Format>
    <TypeID>de94bba4-06d1-4d40-a16a-bfd50179d6ac</TypeID>
    </ModifyPartition>
    </ModifyPartitions>
    </Disk>
    </DiskConfiguration>
    </component>
    <component name="Microsoft-Windows-International-Core-WinPE" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="x86">
    <SetupUILanguage>
    <WillShowUI>OnError</WillShowUI>
    <UILanguage>en-GB</UILanguage>
    </SetupUILanguage>
    <UILanguage>en-GB</UILanguage>
    </component>
    </settings>
    </unattend>
    Here’s the problem: I can’t find any information on creating PBR functionality using unattend anywhere. Is this possible? If it is, can you help us find a solution?
    Since I can’t find any info on creating PBR using unattend I’m assuming that we have to add PBR functionality using scripts after Windows setup is completed. How do we get this done using WDS?
    With kind regards,
    Frank Wessels.

    Hi,
    We could use deploymenr scripts to configure the recovery partitions:
    Samples: Applying Windows, System, and Recovery Partitions by using a Deployment Script
    More information regarding Capture and Apply Windows, System, and Recovery Partitions, please check:
    http://technet.microsoft.com/en-us/library/hh825041.aspx
    Hope this may help
    Best regards
    Michael Shao
    TechNet Community Support

  • How to create a TOOLBOX using Java  - a real CHALLENGE for U

    Hello,
    I want to create a Toolbox using Java which will contain different components of my interest.I should be able to select one component and paste it in a frame also be able set the property of individual component after placing in the frame,just like VB toolbox.
    Can anybody suggest with code samples??
    Regards,
    Suraj.

    You are essentially asking how to write an IDE (Integrated Development Environment). This is a big question. You might start by looking at existing IDE's (JBuilder, Forte...) and see how they do it. If you want source, there is probably an open source IDE you can lift most of your code from.

  • How to create sql database using java frame or appelet?

    hi ! i am working on database project i want to create a database using java frame or applet where it asks user to select the location for database to be created , after user have specified the path then the programs creates the database, again i want that database to be read and write by another frame or applet but as user select the path how do i make the connectivity. i just have basic knowledge on java. please give me idea how can i process further.
    thanks a lot

    While duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
    See http://hsqldb.org/
    I've not used it yet (but soon though), and I can't really advise anyone about it.
    However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing.

  • How to create a Folder using java.

    Hi All,
    I have a doubt. I want to create a folder using java.
    Inputs are the destination where the folder should be created and the name of the folder. Plz help me in this regard.
    thanks and regards,
    Vincent .R.

    check out javadoc for java.io
    File reldir=new File("NewDir");//relatively where your program runs
    reldir.mkdir();
    File absdir=new File("C:/NewDir");//absolute path
    reldir.mkdir();
    File newdir=new File(absdir,"SubDir");//defines another dir under absdir
    newdir.mkdir();
    Gil

  • How to create a class using java script..

    Hi all,
    Iam new to java script and I tried out the following program but its not working..I basically created a class just like a java prog' but Iam not getting any output or error.Iam attaching the code below.
    If I created one function inside the script and create one object its working fine but what should I do when I have a lot of function??so I created a class and put all the function and created an object but its not working..
    Do let me know what changes should I do..Iam attaching the code which I had written. or give me an example of how to create a class with couple of functions using JAVASCRIPT
    Thanks
    Avis_su
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <SCRIPT language = "JavaScript">
    <!--
    //Created classes
    class book
    var title: String;
    var author:String;
    function author()
    doucument.write("Author is " +this.author);
    function tile()
    doucument.write("Title is " +this.title);
    function printall()
    var counter = 0;
    function author();
    function title();
    var chapters = Array[String];
    for(chapter in this chapters)
    counter++;
    document.write("Chapter" counter" :"+this.chapters[chapter]+"<br>");
    var thisbook = new book()
    thisbook.author = "Sivagami";
    thisbook.title = "MS in CS giude";
    thisbook.chapters = new Array[10];
    thisbook[0] = "Prepare to Excell in all ";
    thisbook[1] = "Learn to be happy";
    thisbook[2] = "Learn to be healthy mentally emotionally physically";
    thisbook[3] = "Siva and Subbu along with kidssssss will be successful in future";
    thisbook.printall();
    //-->
    </script>
    </body>
    </html>

    Run this program to get your answer:
    public class AnswerToYourPost {
    public static void main(String args[]) {
    System.out.println("TRUE/FALSE: This question
    ion belongs on a Java forum.\n"
    + "ANSWER: " + ("Javascript" == "Java"));
    }Since when do we compare objects for equality using operator == ?

  • How to create a database using Java?

    Hi there..
    I'm a student who is currently studying IT and was asked to do a project based on database but create using Java.. since i'm a beginner..i was wondering whether is it possible to do that?
    and if it is possible.. can you kindly show me a sample of code on how to start the project...
    thank you
    yours sincerely,
    Shafini

    While duffymo is correct in regard to most major database products, it's my understanding (warning! wild-ass guess coming) that the Hypersonic DB is more "application-centric" and the dynamic creation of databases is part of its design. It's pure Java database software, and therefore is not appropriate for all database projects, in particular those that require extremely high-performance.
    See http://hsqldb.org/
    I've not used it yet (but soon though), and I can't really advise anyone about it.
    However, I'm wondering if you phrased you question in a way that is confusing us. To most of us in casual conversation, a "database" is both (1) a large organized collection of data and (2) the software that is used to organize and access it. However, the phrase "create a database" usually means creating a (1) database (a collection of data) using an already created (2) database software, such as Oracle, MySQL, DB2, HSQDB, etc., etc. If you'r question is, how do a create some new database software using Java, the answer is that this is a very very big and hard thing to do for the general case and probably not something you want to be doing.

  • How to create a LAN using java

    i want to create a LAN like environment using java [ maximum 4 clients] - how do i do this using socket programming .

    Create 4 independent network clients and this will work like four clients on different machines.

  • How to create the chart using java

    Hi Friends,
    I have one urgent requirement.I need to create the chart by using the table value.The value is stored in database like as follow..
    Attribute     IG
    Home     0.05
    Married     0.72
    Gender     0.05
    Employed     0.05
    Rate      0.05
    I need to get the highest value and create the parent node and lowest value is child node llike that i need create ...
    plz any body help me....

    You don't do that using Java.
    Consult the documentation of the application server in question how to configure it. If you're using for example Tomcat 6.0, then you should be consulting this document: [http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html].

  • How to create tagged PDF using java iText

    Hi
    I want to create PDF for accessibility purpose using java and iText
    Please help.
    Thanks in advance

    i did this some yrs ago ..scratched and found some code for you. Have a look
    package com.oq.utility;
    import com.lowagie.text.Cell;
    import com.lowagie.text.Document;
    import com.lowagie.text.Element;
    import com.lowagie.text.Font;
    import com.lowagie.text.HeaderFooter;
    import com.lowagie.text.Image;
    import com.lowagie.text.PageSize;
    import com.lowagie.text.Phrase;
    import com.lowagie.text.Rectangle;
    import com.lowagie.text.Table;
    import com.lowagie.text.pdf.BaseFont;
    import com.lowagie.text.pdf.PdfWriter;
    import com.oq.model.Sale;
    import java.io.FileOutputStream;
    import java.util.ArrayList;
    import java.util.List;
    public class iTextExample
        public static void main (String[] args)
            iTextExample eg = new iTextExample();
            Sale sale = new Sale();
            sale.setOdrNumber("1");
            sale.setOdrDate("12-12-12");
            sale.setOdrCatCode("Örder");
            sale.setTotalInvValue("1234");
            sale.setRefNumber("in the line of fire");
            Sale sale1 = new Sale();
            sale1.setOdrNumber("1");
            sale1.setOdrDate("12-12-12");
            sale1.setOdrCatCode("Örder");
            sale1.setTotalInvValue("1234");
            sale1.setRefNumber("fire line");
            Sale sale2 = new Sale();
            sale2.setOdrNumber("1");
            sale2.setOdrDate("12-12-12");
            sale2.setOdrCatCode("Örder");
            sale2.setTotalInvValue("1234");
            sale2.setRefNumber("in the line of firel");
            List<Sale> list = new ArrayList<Sale>();
            list.add(sale);
            list.add(sale1);
            list.add(sale2);
            eg.printPDF(list);
        public void printPDF(List list) {
            Document document = new Document(PageSize.A4, 50, 50, 50, 50);
            try
                // creation of the different writers
                PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("iTextExample.pdf"));
                // various fonts
                BaseFont bf_helv = BaseFont.createFont(BaseFont.HELVETICA, "Cp1252", false);
                BaseFont bf_times = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
                BaseFont bf_courier = BaseFont.createFont(BaseFont.COURIER, "Cp1252", false);
                BaseFont bf_symbol = BaseFont.createFont(BaseFont.TIMES_ROMAN, "Cp1252", false);
                // headers and footers must be added before the document is opened
                HeaderFooter footer = new HeaderFooter(
                            new Phrase("This is page: ", new Font(bf_courier)), true);
                footer.setBorder(Rectangle.NO_BORDER);
                footer.setAlignment(Element.ALIGN_CENTER);
                document.setFooter(footer);
                HeaderFooter header = new HeaderFooter(
                            new Phrase("This is a header without a page number", new Font(bf_symbol)), false);
                header.setAlignment(Element.ALIGN_CENTER);
                document.setHeader(header);
                document.open();
                Image img = Image.getInstance("arrow-ff.gif");
                img.setAlignment(Image.RIGHT | Image.TEXTWRAP);
                Table goodTable = new Table(2);     
                      Cell cell1 = new Cell(img);
                goodTable.addCell(cell1);
                document.add(goodTable);
                Cell c = new Cell("Header");
                c.setHeader(true);
                goodTable.addCell(c);
                Cell c1 = new Cell("Header1");
                c1.setHeader(true);
                goodTable.addCell(c1);
                Cell c2 = new Cell("Header2");
                c2.setHeader(true);
                goodTable.addCell(c2);
                goodTable.endHeaders();
                int j=0;
                          while (j< list.size())
                              Sale sale = (Sale)list.get(j);
                              c = new Cell(sale.getOdrDate());
                              goodTable.addCell(c);
                              goodTable.addCell(sale.getRefNumber());
                             j++;
                document.add(goodTable);
                // add text at an absolute position
                document.close();
            } catch (Exception ex) {
                System.err.println(ex.getMessage());
        }

  • How to create mysql backup using java

    please i am trying to create a backup of my database using mysqldump with the runtime class. But it is not working out. Please can anyone give me a code that creates mysql backup in java?. I will be grateful.

    It might help to know what
    ushahemba wrote:
    it is not working outmeans.
    Please can anyone give me a code that creates mysql backup in java?.Now, I'm sorry, but why should anyone do your work for you?
    Read this thoroughly and conpletely, and implement the recommendations there.

  • How to create a Directory using Java

    Hi friends,
    I want to create a file in side a directry. File should be place inside that directry. If directry is not exist then a new directory should be created.
    Eg., c:\upload\source\log.txt
    If the folder source is present inside the upload then there is no probs. If it does not exist then this foldder structure is needed to be created
    Thanks in advance,
    Balamurali

    Try reading the API documentation for the java.io.File class:
    http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html
    Many questions like yours can be answered simply by reading the API.

Maybe you are looking for