JSP runs twice for 1 request.

Can anyone explain why after a single request to this page there is two hashes on the commandline? This is running on Java 1.5 with Tomcat 5 and using Apache xerces and xalan.
<%@ page
    language="Java"
    import="java.io.*, java.util.*, javax.xml.transform.*,
javax.xml.transform.stream.*"
%>
<%
   File xml = new File(this.getServletContext().getRealPath(""), "menu.xml");
   File xsl = new File(this.getServletContext().getRealPath(""), "menu.xsl");
   TransformerFactory factory = TransformerFactory.newInstance();
    StreamSource stylesheet = new StreamSource(xsl.toString());
    Transformer transformer = factory.newTransformer(stylesheet);
    StreamSource source = new StreamSource(xml.toString());
    StreamResult result =
        new StreamResult(out);
    transformer.transform(source, result);
    System.out.println("#");
%>

Simple browser call to the jsp page using Mozilla Firefox. I haven't actually tried Internet Explorer or another browser yet.
I have tried writing the xml output to a StringWriter instead of the JSPWriter named out and this seems to make the page run only 1, but as soon as I write out the HTML rendered from the XML it runs twice.
This is very perplexing...

Similar Messages

  • Urgent-Calc needs to run twice for correct result.

    Hi There,
    I have a hierarchy in account like this
    Account
    Account1 dynamic calc
         Account11 never share
              Account13 never share
    Account2     dynamic calc
    Account21 never share
    Balance
    In another hierarchy inside account I have following member
    Total
    And I am using following calculation
    Fix(dim1,dim2,dim3)
    Balance= total-@sum(@sibling(balance));
    @idescendants(“entity1”)
    Endfix
    The aggregation is not happening for the first time and but it is happened the next time I am running the calculation .Can you make out whatever I am missing in this calc so that it needs to run twice for aggregation to happen?
    Thanks

    Hi rodrigo
    I have tried using the calculation in two different fix but still it is taking two runs to give the correct result .
    I found the problem is with one account it is not correctly generated after i run the rule once account1=account2-@Sum(@sibling(account1));
    after second the run the value is coming correct .I am not able to figure out.what is ahppening.
    any idea??
    Thanks

  • Must run twice for daq to work

    I have an application I am working on that is giving some minor problems.  When I first boot up the computer, it doesn't seem the DAQ is working at initial startup.  I am using a Daqpad 6016 (I think that is the model, it is the USB daq) and have some digital outs that should turn on some units under test whent he program first runs.  It doesn't turn them on.  If I stop the program, and restart it, it works fine, it just doesn't work on the initial startup.  After that, it works again, until I reboot the computer, than I have to go through that again.

    Unfortunately, I don't have the code on this computer, so I can't do that right now, although I'm not sure what screen capture to send, as it is a pretty large project.  Let me try to describe further what my program does.
    When started, it pops up a couple of boxes for user input, basically setting up the test (each box is its own sub vi, and no data aquistion is involved).  From there, it moves on to another sub vi which powers up my units that will be tested with the software.  That vi (at least to this point) only contains a DAQmx write to a digital channel (setting to true) which turns on a relay supplying power to my UUTs.  At that point, none of the UUTs turn on (and the digital line never goes high either).  If I stop the program, and restart it from there, it works fine.
    All that said, when you talk about initializing the DAQ, I wasn't aware there was anything to initialize.  All I am doing is using a DAQmx write with a task created in the Measurement Explorer (or whatever its called).

  • Portlet controller beeing run twice

    Hello,
    I noticed a small issue regarding some of my portlets, their controller are run twice for some reason. What can I do to prevent this?
    Running SpringFramework on Bea Weblogic portal 8.1

    Hi Tmukunne,
    I'm confused why you ran the cmdlet "Install-ADDSForest" twice, after you install ADDS role and configure DC with the cmdlet "Install-ADDSForest", you can reboot the server and Domain Controller should work now:
    Install-WindowsFeature -Name AD-Domain-Services
    $Password = ConvertTo-SecureString -AsPlainText -String Password0! -Force
    Install-ADDSForest -DomainName Corp.contoso.com -SafeModeAdministratorPassword $Password `
    -DomainNetbiosName contoso -DomainMode Win2012R2 -ForestMode Win2012R2 -DatabasePath "%SYSTEMROOT%\NTDS" `
    -LogPath "%SYSTEMROOT%\NTDS" -SysvolPath "%SYSTEMROOT%\SYSVOL" -NoRebootOnCompletion -InstallDns -Force
    Restart-Computer -Force
    And you can also run the cmd "dcdiag" to analyze the state of the domain controller, and check if there is any error or failure.
    If there is anything else regarding this issue, please feel free to post back.
    If you have any feedback on our support, please click here.
    Best Regards,                                 
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • SSRS 2012 subscription running twice

    Hi,
    We have a data driven subscription that creates and xml file for export to a third party for processing. This has been working fine for several months but now it is running twice for a single schedule.
    I found a thread (https://social.msdn.microsoft.com/forums/sqlserver/en-US/55a8410f-e29e-4918-9cce-3de525755236/sql-server-2008-r2-subscription-running-twice) which has a similar story but for me the SSRS log doesn't help. All this shows is that the job
    ran successfully twice.
    We are using SQL Server 2012 Enterprise.
    Any suggestions would be appreciated?
    JST

    Hi John,
    Per my understanding that your data driven subscription one day suddenly send the same subscription twice one day which work fine before, right?
    Does the problem occurred only once or many times? The issue can be caused by many factors:
    When a scheduled operation is defined, the report server creates a corresponding job in SQL Server Agent and runs the job on the date and time specified in the schedule. If somebody run the subscription manually after the job executed, the users can got
    two emails, so please make sure the subscription isn’t run manually during the time by someone.
    The SQL Server Agent service calculates an incorrect NEXT_RUN_TIME value for the job. Therefore, the job does not always run at the correct times. This issue occurs because an error causes a date value to be changed unexpectedly, the date value is used
    to calculate the NEXT_RUN_TIME value. If you got the subscription execute twice many times. please edit reset the subscription.
    Did it sent twice with the same time, if you have one subscription failed to send at the proper time and it have delayed, it may be send at the next time.
    Gererally, use SQL Server Agent Service to fire an event. This event will add a record to a table in ReportServer database. SQL Server Reporting Services windows services monitor the table, if the table has data, a subscription will be delivered, and
    the record will be deleted.
    In this case, the issue seems to be caused by the record is not deleted correctly. It should happen because the record is locked when there has many subscriptions at the same time.
    To fix the issue, please make sure we don't have multiple subscriptions which are run at the same time.
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • CRS 2008 Scheduled Report Runs Twice

    All,
    I have been using CRS 2008 for about 6 months now and have had scheduled reports running since the beginning. Last month I created new schedules for each report and deleted the old schedule. However, although the old schedule no longer shows in the History tab, it appears to still be running. As of right now, I have only one schedule per report, however, each report gets processed and saved out twice. This did not start happening until I created new schedules and deleted the old ones.
    Is there something else I have to do (or can do) in order to completely remove the old schedules or fix the new ones if that happens to be the issue?
    Thanks,
    Tom

    Fritz,
    Each report (of which there are 9 at this point), is set up in the following manner:
    1. Scheduled to run once a day (times staggered by 5 minutes for each starting at 12:15am)
    2. 6 are delivered to a folder on the network, 3 are delivered via email
    3. All have the same naming structure: InstanceTitle_DateTime.FileExt
    4. Each are formated as PDF
    Originally, the six that are delievered to a network folder were also delivered via email as well. This issue only started happening after I deleted those email deliveries. Also, the 3 that are still delivered via email and have never been modified after first being set up are now being run twice as well.
    After looking in the network folder this morning, it appears that only four of the six were run twice last night, while all six were run twice for the two nights before that.
    This is very frustrating since I have already deleted and started from scratch and still have this issue. Any help would be greatly appreciated. Thanks.

  • How to schedule a job to run twice within a request set?

    How to schedule a job to run twice within a request set?

    Create one more stage for the same concurrent program.
    Thanks
    Nagamohan

  • Struts tag for request.setAttribute() in a jsp page

    Hello All
    Does anyone know struts tag that can be used for request.setAttribute() in a jsp page?
    Thanx in advance.

    Well
    <bean:define id="foo" name="newsIdAttribute" scope="request" type="java.lang.String" />is equivalent to
    <%
    (java.lang.String) foo = (java.lang.String)request.getAttribute("newsIdAttribute");
    %for setting bean properties you might have to use
    <jsp:setProperty/> or <c:set/> tags in JSP / JSTL respectively.
    Hope this might answer your question :)
    REGARDS,
    RaHuL

  • Getting a 502 Bad Gateway when trying to run a POST request for application on Lync UCWA on VPN

    I am getting a 502 Bad Gateway when trying to run a POST request for application info on Lync UCWA ("Policy prevents request from being proxied."). When I do a request without SSL, I get a 403 - Forbidden: Access is denied. 
    Is this becouse I am on VPN and not on the internal network? There are some policy on VPN or the IIS internal that denies me access?
    I have not tried it internal yet. Anyone else with this experience?

    Did you figure out your issue? I'm having a similar issue. Even thought I'm able to successfully sign-in to the Lync Server and obtain a Bearer token, I'm not getting any response from the server when sending a POST request to the application URI (https://<pool_fqdn>/ucwa/oauth/v1/applications).
    Wondering if it's a policy issue and if so, why user policy affects this access?
    thanks.

  • The agent service is running, but the request failed for ...

    Hi!
    ZCM 10.3.3 on SLES 11. HP notebook, Windows 7 Pro SP1.
    When WiFi is also switched on I got yellow diamond in ZCC and error "The agent service is running, but the request failed for one or more known addresses.". What this does mean? WiFi off -- green again! =)
    More thanks, Alar.

    Does the address it's getting via Wireless have a path back to the ZCM server? That was my point. If your wireless is vlan'd away from the wired network, ZCM won't be able to contact it through THAT particular address and will show the yellow diamond as a result even though it communicates fine through the wired address.

  • Billed twice for movie rental and requesting credit?

    Billed twice for a movie rental and requesting credit.  How do I request credit please?

    Click here and ask the iTunes Store staff for a refund.
    (113499)

  • "CREATE_ENQUEUE_FAILED"  Import for request NGDK900094 already running.

    Hi guys,
    While i was trying to import some requests into my quality system, i chose the requests five each and continued with the import. on refreshing the truck sign for these requests do not turn to yellow. Now i want to import all my requests in sequence and when i get to the running requests it gives the error:   CREATE_ENQUEUE_FAILED "Import for request NGDK900094 already running". When i refresh the requests wont turn yellow and i need to import again.
    Any ideas on how i can resolve this?.
    Basisman.
    Edited by: Basisman on Mar 23, 2010 10:22 AM

    Hi,
    Check at OS level if tp and R3trans processes are still active and running ? I guess they are running.
    KIll these active processes and make sure no old tp and R3trans remains active. Then click refresh again and wait for the truck to terminate. once they terminate retry the import.
    By chance if the running status doesnot terminated, go to import monitor, there you can see the running imports. right click on the running imports one by one and then delete status.
    In both the cases make sure no tp and R3trans should remain active from old processes.
    Best Regards
    Niraj

  • Work around for request scope for Listitems-working

    Hi finally I got some work around solution for Listitems working with request scope, if any suggesion welcome, below is the small code of jsp and bean.
    <h:selectOneMenu id="ownerListMenu" value="#{pc_trackingSearchPage.trackingSearchPageBean.selectedOwner}">
                                            <f:selectItems value="#{pc_trackingSearchPage.trackingSearchPageBean.ownerList}" />
                                       </h:selectOneMenu>
    I used onPageLoadBegin() and onPagePost(),
    first on PageLoad - I am loading the List from DB, its displaying perfect.,
    than on pagePost -> I am setting the value ->ownerList.add(new SelectItem(getOwnerListMenu().getSubmittedValue().toString(),getOwnerListMenu().getSubmittedValue().toString()));
    ------->here is the getOwnerListMenu method.
         public HtmlSelectOneMenu getOwnerListMenu() {
              if (ownerListMenu == null) {
                   ownerListMenu =
                        (HtmlSelectOneMenu) findComponentInRoot("ownerListMenu");
              return ownerListMenu;
    so this way the List will not be empty what ever the user selectes it will be their, as i am setting key and values as same, so in submit method,
    i am getting the selected keys and going back to backend getting results displaying on other page,
    --->this will work only if they don't need the list , if they want to display the list again, they have to load freshelly.
    I hope it will give some solution for request scope, if the data is huge and not to save on the session for navigation purpose.
    suggestions welcome.
    Thanks
    srikanth
    Message was edited by:
    srikanthg

    Apperently iTunes 11 is not affected (Apple stil makes iTunes11 for the 14 yr old Microsoft XP OS, but not for anything PPCs can run. Go figure)
    "Next door" to Steve was metaphoric, he lived in Los Altos, about 15 miles away, but he cast a big shadow!
    On 9.2.1/10.4.11 differences, some time in the past someone selected 'save file' and checked the box 'don't ask again' on your computers dialog box. That's why you're not given a choice wih the file downloads. I would think that selection should be able to be reversed.
    iTunes 9.2.1/OS10.4.11 puts those downloaded URLs into the Music Libary of iTunes, no matter if it's opened directly, or you click on the file on your desktop. You can create a new playlist, highlight the selection in the Music Libary, and drag it to your new playlist to keep alll the steaming URLs together. NOTE, this only creates an alias, the URL copied by iTunes must remain in the Music Libary. You can then delete the the files on the desktop, if you want. I did multiple stations this way in 9.2.1, they all show in either the new playlist created, or in the Music Libary, and remain after the desktop files are deleted and trash emptied.
    You can switch sations by double clicking them. Another note, all the URLs were all from vtune.
    I hope this helps.
    PS, I forgot how clunky Tiger is compared to Leopard...

  • Getting a JFrame to display  from a JSP, remaining JSP code waits for frame

    Hello,
    I'm new to Java and just started using JSPs. My objective is to call a display window (from a JSP) that shows the user a list of project selections. Once the user has made their selections and clicked a Submit button, the display class captures the selected projects to the request object as an attribute and then closes the window. The next command in the jsp then forwards the request attribute to a controller. I'm having trouble getting the display window to show-the JSP seems to hang and then timeout. Is there code I'm missing to get the JSP to stop processing while it waits for the choices to be made in the JFrame?
    Below is the JSP code and the class I'm calling. I'm seeing all my debug System.out statements but no JFrame pops up. In the JFrame class, the line f.addWindowListener(... does the capture of user selections to the request attribute.
    Any help will be greatly appreciated!!
    JSP:
    <%@ page language="java" contentType="text/html;charset=UTF-8" import="com.plumtree.remote.portlet.*,edu.app.projects.*" %>
    <%
        request.setAttribute("action", "prefDisplay");
        request.setAttribute("orderby", "title");
        ServletContext jc = getServletContext();
        DualListBox dual = new DualListBox(request,(String)jc.getAttribute("db.driver"), (String)jc.getAttribute("db.connectionstring"),"title");
         JFrame f = dual.getFrame();
         f.setVisible(true);//expect code to stop here and display frame, waiting for the user to finish.
            //Debug code that tests if frame is visible at this point -came true though did not see Jframe displayed
         if(f.isShowing()){
         System.out.println("Jframe visible");}
           //Send to ProjectsController
          request.getRequestDispatcher("pc").forward(request, response);%>               ---------------------------------------------------------------------------------------------
    JFrame Class (below)
    -Sets up Frame and corresponding Dialog box
    -Populates Dialog box with options from a database call (for user selection)
    -Should wait for user input - Window close or Submit! to capture selection and dispose of Jframe
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.EventQueue;
    import java.awt.Frame;
    import java.awt.GridBagConstraints;
    import java.awt.GridBagLayout;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowEvent;
    import java.lang.reflect.InvocationTargetException;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.ArrayList;
    import java.util.Arrays;
    import java.util.Collection;
    import java.util.Iterator;
    import java.util.SortedSet;
    import java.util.TreeSet;
    import javax.servlet.http.HttpServletRequest;
    import javax.swing.AbstractListModel;
    import javax.swing.BorderFactory;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.ListCellRenderer;
    import javax.swing.ListModel;
    public class DualListBox extends JPanel {
      private static final long serialVersionUID = 1L;
      private static final Insets EMPTY_INSETS = new Insets(0, 0, 0, 0);
      private static final String ADD_BUTTON_LABEL = "Add >>";
      private static final String REMOVE_BUTTON_LABEL = "<< Remove";
      private static final String DONE_BUTTON_LABEL = "Submit!";
      private static final String DEFAULT_SOURCE_CHOICE_LABEL = "Available Projects";
      private static final String DEFAULT_DEST_CHOICE_LABEL = "Your Selections";
      private String orderby, mydriver, connectionString;
      private JLabel sourceLabel;
      private JList sourceList;
      private SortedListModel sourceListModel;
      private JList destList;
      private String chosenprojects;
      private SortedListModel destListModel;
      private JLabel destLabel;
      private JButton addButton;
      private JButton removeButton;
      private JButton doneButton;
      private DatabaseHelper dh;
      protected HttpServletRequest request;
      protected JFrame f;
      protected JDialog jd;
      public DualListBox(HttpServletRequest req, String driver, String connection, String ordering) {
         System.out.println("In DualList Setup");
        request =req;
         orderby =ordering;
         connectionString = connection;
         mydriver = driver;
         f = new JFrame("Projects List Selector");     
         jd =new JDialog(f,true);
         jd.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
         System.out.println("B4 initscreen");
        initScreen();
        System.out.println("After initscreen");
        String[] DBprojects = this.dbCall();
        System.out.println("After DB Call");
        this.addSourceElements( DBprojects );   
        System.out.println("Filled screen");
        jd.getContentPane().add(this, BorderLayout.CENTER);
        //f.getContentPane().add(jd, BorderLayout.CENTER);
        jd.setSize(800, 600);
        System.out.println("OK2");
        jd.setVisible(true);
        System.out.println("OK3");
        Runnable runner = new FrameShower(jd);
        EventQueue.invokeLater(runner);
      public String getSourceChoicesTitle() {
        return sourceLabel.getText();
      public String chosenprojects() {
             return chosenprojects;
      public JFrame getFrame() {
             return f;
      public void setSourceChoicesTitle(String newValue) {
        sourceLabel.setText(newValue);
      public String getDestinationChoicesTitle() {
        return destLabel.getText();
      public void setDestinationChoicesTitle(String newValue) {
        destLabel.setText(newValue);
      public void clearSourceListModel() {
        sourceListModel.clear();
      public void clearDestinationListModel() {
        destListModel.clear();
      public void addSourceElements(ListModel newValue) {
        fillListModel(sourceListModel, newValue);
      public void setSourceElements(ListModel newValue) {
        clearSourceListModel();
        addSourceElements(newValue);
      public void addDestinationElements(ListModel newValue) {
        fillListModel(destListModel, newValue);
      private String[] dbCall(){
             if(dh==null)
                  dh = new DatabaseHelper(mydriver, connectionString);
              PreparedStatement ps = null;
              ResultSet rs = null;
              ArrayList<String>children = new ArrayList<String>();
              ArrayList<String[]>tree =new ArrayList<String[]>();
              if(orderby==null || orderby.equals("")){
                   orderby ="region";
              String query = "select title,id from projects";// order by " + orderby;
              System.out.println(query);
              try {
                   Connection conn =dh.getConnection();
                   ps = conn.prepareStatement(query);
                   rs = ps.executeQuery();
                   while (rs.next()) {
                        children.add(new String(rs.getString(1)));
                        System.out.println(rs.getString(1));
                        tree.add(new String[]{rs.getString(1),rs.getString(2)});
                   request.setAttribute("ResultTree",tree);
                   return (String[])children.toArray(new String[children.size()]);
              } catch (SQLException e) {
                   throw new RuntimeException(e);
              } finally {
                   try {
                        if (null != rs) rs.close();
                   } catch (SQLException e) {
                   try {
                        if (null != ps) ps.close();
                   } catch (SQLException e) {
      private void fillListModel(SortedListModel model, ListModel newValues) {
        int size = newValues.getSize();
        for (int i = 0; i < size; i++) {
          model.add(newValues.getElementAt(i));
      public void addSourceElements(Object newValue[]) {
        fillListModel(sourceListModel, newValue);
      public void setSourceElements(Object newValue[]) {
        clearSourceListModel();
        addSourceElements(newValue);
      public void addDestinationElements(Object newValue[]) {
        fillListModel(destListModel, newValue);
      private void fillListModel(SortedListModel model, Object newValues[]) {
        model.addAll(newValues);
      public Iterator sourceIterator() {
        return sourceListModel.iterator();
      public Iterator destinationIterator() {
        return destListModel.iterator();
      public void setSourceCellRenderer(ListCellRenderer newValue) {
        sourceList.setCellRenderer(newValue);
      public ListCellRenderer getSourceCellRenderer() {
        return sourceList.getCellRenderer();
      public void setDestinationCellRenderer(ListCellRenderer newValue) {
        destList.setCellRenderer(newValue);
      public ListCellRenderer getDestinationCellRenderer() {
        return destList.getCellRenderer();
      public void setVisibleRowCount(int newValue) {
        sourceList.setVisibleRowCount(newValue);
        destList.setVisibleRowCount(newValue);
      public int getVisibleRowCount() {
        return sourceList.getVisibleRowCount();
      public void setSelectionBackground(Color newValue) {
        sourceList.setSelectionBackground(newValue);
        destList.setSelectionBackground(newValue);
      public Color getSelectionBackground() {
        return sourceList.getSelectionBackground();
      public void setSelectionForeground(Color newValue) {
        sourceList.setSelectionForeground(newValue);
        destList.setSelectionForeground(newValue);
      public Color getSelectionForeground() {
        return sourceList.getSelectionForeground();
      public String getProjects(){
           return chosenprojects;
      private void clearSourceSelected() {
        Object selected[] = sourceList.getSelectedValues();
        for (int i = selected.length - 1; i >= 0; --i) {
          sourceListModel.removeElement(selected);
    sourceList.getSelectionModel().clearSelection();
    private void clearDestinationSelected() {
    Object selected[] = destList.getSelectedValues();
    for (int i = selected.length - 1; i >= 0; --i) {
    destListModel.removeElement(selected[i]);
    destList.getSelectionModel().clearSelection();
    private void initScreen() {
    setBorder(BorderFactory.createEtchedBorder());
    setLayout(new GridBagLayout());
    sourceLabel = new JLabel(DEFAULT_SOURCE_CHOICE_LABEL);
    sourceListModel = new SortedListModel();
    sourceList = new JList(sourceListModel);
    add(sourceLabel, new GridBagConstraints(0, 0, 1, 1, 0, 0,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    add(new JScrollPane(sourceList), new GridBagConstraints(0, 1, 1, 5, .5,
    1, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
    EMPTY_INSETS, 0, 0));
    addButton = new JButton(ADD_BUTTON_LABEL);
    add(addButton, new GridBagConstraints(1, 2, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    addButton.addActionListener(new AddListener());
    removeButton = new JButton(REMOVE_BUTTON_LABEL);
    add(removeButton, new GridBagConstraints(1, 4, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
    0, 5, 0, 5), 0, 0));
    removeButton.addActionListener(new RemoveListener());
    doneButton = new JButton(DONE_BUTTON_LABEL);
    add(doneButton, new GridBagConstraints(1, 6, 1, 2, 0, .25,
    GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(
    0, 10, 0, 10), 0, 0));
    doneButton.addActionListener(new DoneListener());
    f.addWindowListener(new java.awt.event.WindowAdapter() {
         public void windowClosing(WindowEvent winEvt) {
              //could set to null here to force use of Done button only
         chosenprojects = destList.getSelectedValues().toString();
              request.setAttribute("ProjectIDs", destList.getSelectedValues().toString());
              System.exit(0);
    destLabel = new JLabel(DEFAULT_DEST_CHOICE_LABEL);
    destListModel = new SortedListModel();
    destList = new JList(destListModel);
    add(destLabel, new GridBagConstraints(2, 0, 1, 1, 0, 0,
    GridBagConstraints.CENTER, GridBagConstraints.NONE,
    EMPTY_INSETS, 0, 0));
    add(new JScrollPane(destList), new GridBagConstraints(2, 1, 1, 5, .5,
    1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH,
    EMPTY_INSETS, 0, 0));
    private class AddListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
    Object selected[] = sourceList.getSelectedValues();
    addDestinationElements(selected);
    clearSourceSelected();
    private class RemoveListener implements ActionListener {
    public void actionPerformed(ActionEvent e) {
    Object selected[] = destList.getSelectedValues();
    addSourceElements(selected);
    clearDestinationSelected();
    private class DoneListener implements ActionListener {
         public void actionPerformed(ActionEvent e) {
         chosenprojects = destList.getSelectedValues().toString();
         request.setAttribute("ProjectIDs", destList.getSelectedValues().toString());
         System.exit(0);      
    class FrameShower implements Runnable {
         final JDialog frame;
         public FrameShower(JDialog frame) {
              this.frame = frame;
         public void run() {
              System.out.println("B4 make visible");
              frame.setVisible(true);          
         System.out.println("Made screen visible");
    class SortedListModel extends AbstractListModel {
    private static final long serialVersionUID = 8777627817685130496L;
    SortedSet model;
    public SortedListModel() {
    model = new TreeSet();
    public int getSize() {
    return model.size();
    public Object getElementAt(int index) {
    return model.toArray()[index];
    public void add(Object element) {
    if (model.add(element)) {
    fireContentsChanged(this, 0, getSize());
    public void addAll(Object elements[]) {
    Collection c = Arrays.asList(elements);
    model.addAll(c);
    fireContentsChanged(this, 0, getSize());
    public void clear() {
    model.clear();
    fireContentsChanged(this, 0, getSize());
    public boolean contains(Object element) {
    return model.contains(element);
    public Object firstElement() {
    return model.first();
    public Iterator iterator() {
    return model.iterator();
    public Object lastElement() {
    return model.last();
    public boolean removeElement(Object element) {
    boolean removed = model.remove(element);
    if (removed) {
    fireContentsChanged(this, 0, getSize());
    return removed;
    }{code}
    Edited by: redm14A on Oct 10, 2007 11:34 AM
    Edited by: redm14A on Oct 10, 2007 11:37 AM
    Edited by: redm14A on Oct 10, 2007 11:40 AM
    Edited by: redm14A on Oct 10, 2007 11:45 AM
    Edited by: redm14A on Oct 10, 2007 11:47 AM

    redm14A wrote:
    Hmm, I was trying to avoid writing an applet. Seems my only other option then is to write a JSP that returns a javascript menu populated by options from a database call. Then I'd have the user click submit to send the options to another JSP that simply sets the request attribute and forwards to the controller. Will this be a sound alternative?
    Edited by: redm14A on Oct 10, 2007 12:29 PMSounds good to me.

  • Client cert password asked twice when requested in ie 6.X, 7

    Hi all,
    I have a ssl web server instance (Sun Java Web Server 6.1SP8) configured to ask for a client cert when a certain resource is requested. Accepted client certs are contained in a client smart card, password protected. When using internet explorer as browser, the password window to access the certificate is asked twice when requesting for the protected resource.
    When using firefox the password is only asked once.
    To configure the web server I've modified obj.conf file adding
    <Client uri="/myuri/*">
    PathCheck fn="get-client-cert" dorequest="1" require="0"
    </Client>and magnus.conf adding
    KeepAliveTimeout 0Has this something to do with the web server or is an internet explorer problem?
    Thanks in advance.

    Have you added any redirects in your obj.conf ?
    Do you see any thing in error logs when you run server in <log-level>finest</log-level> mode and compare the difference between IE and firefox.
    Some reference about get-client-cert :
    http://docs.sun.com/app/docs/doc/820-2203/abujm?l=en&a=view
    +"The get-client-cert function gets the authenticated client certificate from the SSL3 session. If the certificate is present or obtained from the SSL3 session, the function returns REQ_NOACTION and allows the request to proceed. Otherwise, it returns REQ_ABORTED and sets the protocol status to 403 forbidden, causing the request to fail."+
    In Web Server 7.0 try and add the following in server.xml also and see if it helps :
    In <ssl> element add
    <client-auth>required</client-auth>or
    <client-auth>optional</client-auth>Note that this setting will work for all URIs not just /myuri
    For more details on client-auth : http://docs.sun.com/app/docs/doc/820-2203/gaifo?l=en&a=view
    Element         client-auth
    Description       Client certificate authentication method
    Value             required, optional, or falseIn WS 6.x , it was called clientauth and it could be specified as an attribute in SSLPARAMS
    <!ELEMENT LS (DESCRIPTION?,SSLPARAMS?)>
    <!ATTLIST SSLPARAMS
    ...          clientauth %boolean; "false"
    ...>

Maybe you are looking for

  • Return to Widget Browser for editing a customized Menu Bar?

    How to edit a Spry Menu 2.0 _after_ customizing with the Adobe Widget Browser and inserting the menu and further structural customizing via DW CS5? Yes, the new Browser and the new Menu 2.0 are a large step forward - thanks! But no resources (searche

  • Custom list in Sharepoint 2013 for training booking purpose

    Kindly note that I am trying to  do custom list in Sharepoint 2013 for training booking purpose As below : The user should enter the user name  - it works fine The user should select the data from the choice list The requirement is , I need to limit

  • PLz help! loosing internet connection reapeatedly, I have a msi GT683 DXR

    Hi everyone! Having som problems with my new computer GT683 DXR. I can surf and download things in highspeed (like 50+ Mbit) but i am repeatedly loosing connection to the internet. Doesnt matter if Im close to the router or far from it. have problems

  • Control instantiation

    Hi! I have a question about process instantiation: We are going to run some performance tests comparing our current workflow engine with WLI. Since we're going to test asynchronous processes we're going to log the performance on the server side using

  • Safari to remember passwords?

    New with Tiger. How do you get Safari to remember your passwords to my bank account, etc? I don't get the checkmark for remembering passwords, and I have to enter my password every time. running a new intel power mac