Problem setting an action command

If I create a JButton with an icon and no text, how do I set an action command for that button?

well i created the button and added the action
listener inside the constructor
JButton bOne = new JButton();
          bOne.setIcon(back);
          bOne.setActionCommand("one");
          bOne.addActionListener(this);
          add(bOne);
then inside the actionPerformed method I have:
String actionCommand = e.getActionCommand();
if(actionCommand.equals("one")){
               bOne.setIcon("c1.gif");
and it's giving me the compiler error:
cannot find symbol
symbol : variable bOne
location: class Concentration
               bOne.setIcon("c1.gif");bOne isn't in scope. It looks to me like it's local
to some other methodI declared it inside the constructor

Similar Messages

  • Problem in setting up Actionable Emails

    Hi
    Hope you are doing fine
    I'm finding problems in setting up Actionable emails in Human Tasks.
    The mails are coming fine, with approve/reject buttons, but when I click on either of those buttons and send the email, nothing is hapenning. The same, when done using workspace is working fine.
    So I think this is something to do with the configuration.
    Before setting up the configuration, I have the foll details
    OutgoingMailServer, port
    IncomingMailServer, port, userName(say ActionableAccnt), pwd (which I'm using for actionable email)
    Here is my setup:
    In email driver notification under UMS
    Sender Address : [email protected]
    Default Sender Address : [email protected]
    provided outgoingMailServer, port, incomingMailServer, port, username, pwd
    And setting in Workflow Notification Properties
    From Address : [email protected]
    Actionable Address : [email protected]
    ReplyTo Address : [email protected] (this is a dummy address)
    Please note that in every emailId entry except the replyToAddress, I've used the same valid emailId [email protected]
    Is this ok? I'm ok even if the replyTo and actionable addresses are same.
    I've restarted the server. But its not working.
    Did I miss something here?
    I've gone through the documentation, some blogs, but could not find any.
    Would you please help me in this regard.
    Thanks in Advance
    Regards
    RaviKiran

    Hello there.
    Here's the ServiceLocator and delegates I am using....
    // LoginDelegate.as
    package com.myproj.products.business {
         import com.myproj.products.vo.LoginVO;
         import mx.rpc.IResponder;
         import com.adobe.cairngorm.business.ServiceLocator;
         public class LoginDelegate {
              // anything that implements the IResponder interface can act as a responder
              private var responder:IResponder;
              private var service:Object;
              public function LoginDelegate(responder:IResponder) {
                   this.responder = responder;
                   this.service = ServiceLocator.getInstance().getRemoteObject("loginService");
              public function login(loginAttempt:LoginVO):void {
                   // Call the method of service that resides on server
                   var call:Object = service.login(loginAttempt);
                   // Send the response to responder
                   call.addResponder(responder);
    // com/myproj/products/business/Services.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <cairngorm:ServiceLocator
         xmlns:mx="http://www.adobe.com/2006/mxml"
            xmlns:cairngorm="com.adobe.cairngorm.business.*">
         <!-- Login Service -->
         <mx:RemoteObject
              id="loginService"
              destination="zend"
              source="LoginService"
              showBusyCursor="true">
              <mx:method name="doLogin" />
         </mx:RemoteObject>
    </cairngorm:ServiceLocator>
    With kind regards
    ShiVik

  • Problem with security with action commands to Servlet...

    Hi.
    I have a webapplication that under its context has two diffenent
    maps, one is admin and the other one is user.
    I use an ActionRouter and has actions like list-clients.do.
    The admin map is restricted area described in web.xml.
    You have to be in AdminRole to get access.
    My problem is that if I log in as user, I can "shoot" actions commands
    like list-clients.do from the user area and Servlet maps to the proper
    jsp that is in the admin map. When I then try isUserInRole and so on
    there is only a quetstionmark. If I run from admin area the isUserInRole
    knows who is logged in.
    I put in the list-clients.do in the url like: http://myplace.com/users/list-clients.do and servlet reply with jsp from
    admin area.
    Anybody know why not the restricted area declared in the web.xml file
    works during that condition, and how to solve this?
    Heres my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <filter>
    <filter-name>loginfilter</filter-name>
    <filter-class>argus.web.util.LoginFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>loginfilter</filter-name>
    <url-pattern>/admin/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>loginfilter</filter-name>
    <url-pattern>/user/*</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>argus.web.servlet.ActionServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>setup</servlet-name>
    <servlet-class>argus.web.servlet.SetupServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>0</session-timeout>
    </session-config>
    <security-constraint>
    <display-name>ArgusAdmin</display-name>
    <web-resource-collection>
    <web-resource-name>AdminAdaptor</web-resource-name>
    <url-pattern>/admin/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>ArgusAdmin</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <display-name>ArgusUser</display-name>
    <web-resource-collection>
    <web-resource-name>UserAdaptor</web-resource-name>
    <url-pattern>/user/*</url-pattern>
    <url-pattern>/index.htm</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>ArgusAdmin</role-name>
    <role-name>ArgusUser</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.htm</form-login-page>
    <form-error-page>/loginError.htm</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>ArgusAdmin</role-name>
    </security-role>
    <security-role>
    <role-name>ArgusUser</role-name>
    </security-role>
    </web-app>
    Many Thanks
    Ben

    The code you've shown us looks fine. The problem isn't in the form code you've listed. Is the form being included inside another form on index.jsp? Does index.jsp have any forms of it's own? Perhaps you aren't submitting the form you think you are submitting. Or, are you redirecting in your serlvet somewhere? Or are you forwarding the request somehow?
    I agree with the previous post - we need to see the HTML output that index.jsp results in.
    Michael

  • Issue with setting an Action Listener for a Command Button

    Hi all,
    I'm trying to set an action listener for a CoreCommanButton in a backing bean. Here's my code:
         CoreCommandButton editBtn = new CoreCommandButton();
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",null);
              editBtn.setActionListener(mb);
    //Action listener method
         public void doButtonAct(ActionEvent actionEvent)
    I keep getting a javax.faces.el.MethodNotFoundException error. However when I remove the ActionEvent parameter in doButtonAct(), I get a wrong number of arguments error.
    So i'm guessing there is something wrong with the parameters i accept in my action listener method. what can be causing this issue?
    Cheers.

    I figured this out.
    Since doButtonAct() requires an ActionEvent object as a parameter, i needed to define the parameter type when I create the method binding.
    Solution:
         Class argsString[] = new Class[] { ActionEvent.class };
              MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{backBean.doButtonAct}",argsString);

  • Problems Setting up NFS

    Hi.
    I've been having problems setting up NFS on a LAN at home.  I've read through all the Arch NFS-related threads and looked at (and tried some of) the suggestions, but without success.
    What I'm trying to do is set up an NFS share on a wireless laptop to copy one user's files from the laptop to a wired workstation.  The laptop is running Libranet 2.8.1. The workstation is running Arch Linux with the most up-to-date (as of today) software, including NFS.
    I have the portmap, nfslock, and nfsd daemons running via rc.conf, set to run in that order.
    I've re-installed nfs-utils and set up hosts.deny as follows:
    # /etc/hosts.deny
    ALL: ALL
    # End of file
    and hosts.allow as follows:
    # /etc/hosts.allow
    ALL: 192.168.0.0/255.255.255.0
    ALL: LOCAL
    # End of file
    In other words, I want to allow access on the machine to anything running locally or on the LAN.
    I have the shared directories successfully exported from the laptop (192.168.0.3), but I have not been able to mount the exported directories on the workstation (192.168.0.2).
    The mount command I'm using at the workstation:
    mount -t nfs -o rsize=8192,wsize=8192 192.168.0.3:/exports /exports
    There is an /exports directory on both machines at root with root permissions. There is an /etc/exports file on the NFS server machine that gives asynchronous read/write permissions to 192.168.0.2 for the /exports directory.
    I receive the following message:
    mount: RPC: Program not registered
    This appears to be a hosts.allow/hosts.deny type problem, but I can't figure out what I need to do to make RPC work properly.
    Some additional information, just in case it's helpful:
    This is the result if running rpcinfo:
       program vers proto   port
        100000    2   tcp    111  portmapper
        100000    2   udp    111  portmapper
        100024    1   udp  32790  status
        100024    1   tcp  32835  status
        100003    2   udp   2049  nfs
        100003    3   udp   2049  nfs
        100003    4   udp   2049  nfs
        100003    2   tcp   2049  nfs
        100003    3   tcp   2049  nfs
        100003    4   tcp   2049  nfs
        100021    1   udp  32801  nlockmgr
        100021    3   udp  32801  nlockmgr
        100021    4   udp  32801  nlockmgr
        100021    1   tcp  32849  nlockmgr
        100021    3   tcp  32849  nlockmgr
        100021    4   tcp  32849  nlockmgr
        100005    3   udp    623  mountd
        100005    3   tcp    626  mountd
    Running ps shows that the following processes are running:
    portmap
    rpc.statd
    nfsd
    lockd
    rpciod
    rpc.mountd
    Thanks for any help here!
    Regards,
    Win

    Hi ravster.
    Thanks for the suggestions. I had read the Arch NFS HowTo and did as you suggested get rcpinfo for the server machine. The Libranet NFS server is configured rather different since the NFS daemons are built into the default kernel.
    Since I needed to complete the transfer immediately, I gave up for now trying to set up NFS and used netcat (!) instead to transfer the files from the Libranet laptop to the Arch workstation. The laptop will be converted to Arch Linux soon so I think I'll be able to clear things up soon.  I haven't had any problems setting up NFS with homogeneous (i.e., all Arch or all Libranet) computer combinations.
    Thanks again.
    Win

  • Problems setting up MPLS

    A Chairde,
    Am having problems setting up MPLS between a AS5350 and 7609 , I have used commands stated in this link, enable MPLS incrementally on a network.
    http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/switch_c/xcprt4/xcdtagc.pdf
    The commands below are added to each router, and some troubleshooting.
    7609
    ip cef distributed
    interface Loopback0
    ip address 192.168.254.1 255.255.255.255
    tag-switching advertise-tags
    interface GigabitEthernet3/12
    ip address 192.168.230.162 255.255.255.248
    mpls label protocol tdp
    tag-switching ip
    AS5350
    ip cef
    mpls label protocol tdp
    tag-switching advertise-tags
    interface Loopback0
    ip address 192.168.254.2 255.255.255.255
    interface FastEthernet0/0
    ip address 192.168.230.161 255.255.255.248
    duplex auto
    speed auto
    mpls ip
    h323-gateway voip interface
    h323-gateway voip id cnibhco111 ipaddr 192.168.230.129 1719
    h323-gateway voip h323-id cnibhco112
    h323-gateway voip tech-prefix 71401
    h323-gateway voip tech-prefix 0030
    h323-gateway voip bind srcaddr 192.168.230.161
    ip rsvp bandwidth 64 64
    cnibhco112#sh tag-switching tdp neighbor
    Peer TDP Ident: 192.168.254.1:0; Local TDP Ident 192.168.230.161:0
    TCP connection: 192.168.254.1.49842 - 192.168.230.161.711
    State: Oper; PIEs sent/rcvd: 18/23; Downstream
    Up time: 00:12:54
    TDP discovery sources:
    FastEthernet0/0, Src IP addr: 192.168.230.162
    Addresses bound to peer TDP Ident:
    192.168.100.17 192.168.100.25 159.107.212.49 172.16.8.81
    192.168.230.130 192.168.230.77 192.168.230.81 192.168.254.1
    192.168.210.6 192.168.127.6 192.168.210.106 192.168.127.66
    192.168.127.138 192.168.210.146 192.168.210.142 192.168.210.122
    192.168.210.17 192.168.230.140 192.168.230.26 192.168.230.74
    192.168.230.10 192.168.230.14 192.168.127.130 192.168.127.142
    192.168.230.6 192.168.230.70 192.168.230.34 192.168.210.178
    192.168.200.25 192.168.210.126 192.168.232.1 192.168.231.1
    192.168.200.17 192.168.210.102 190.168.200.245 190.168.200.225
    190.168.201.241 192.168.230.98 192.168.210.14 190.168.201.201
    190.168.201.209 192.168.210.162 192.168.210.210 190.168.201.205
    192.168.230.38 190.168.200.249 190.168.200.217 190.168.200.253
    192.168.230.162
    cnibhco112#
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    cnibhco112#traceroute 192.168.254.1
    Type escape sequence to abort.
    Tracing the route to 192.168.254.1
    1 192.168.230.162 0 msec 0 msec *
    cnibhco112#traceroute 192.168.230.162
    Type escape sequence to abort.
    Tracing the route to 192.168.230.162
    1 192.168.230.162 0 msec 0 msec *
    cnibhco112#

    Ro,
    Thanks for the respone, have been playin, with MPLS for last few hours.
    The routing between the loopbacks is now working, can PING 7609 Loopback from AS5350 ,and vice versa. (used static routes).
    Having problem with TDP / LDP on routers,
    mpls label protocol ldp / tdp command works correctly on both routers, but the
    tag-switching tdp router-id Loopback0 force
    command works on the 7609, but when I add it onto the AS5350 , the command "mpls ldp router-id Loopback0 force" appears on the startup script.
    The opposite is true for the 7609 , you add MPLS LDP command, and TAG-SWITCHING command appears instead.
    Any Ideas, as different configs of this leave me with forwarding table with both tags added, but not been able to ping the loopbacks !!!
    When I can ping bot loopbacks, the OUTGOING TAG , disapears.....
    Problem is LOOPBACK Commands on bot routers default to LDP (AS5350) , or TDP (7609). Any Ideas ...
    mpls label protocol tdp
    tag-switching tdp router-id Loopback0 force
    mpls label protocol tdp
    mpls ldp router-id Loopback0 force
    cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Ho
    tag tag or VC or Tunnel Id switched interface
    18 17 192.168.254.0/24 0 Gi3/12 192.168.2
    MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
    00097CA3293000127FCDBA808847 00011000
    No output feature configured
    Per-packet load-sharing
    cnibhco100#traceroute 192.168.254.2
    Type escape sequence to abort.
    Tracing the route to 192.168.254.2
    1 192.168.230.161 [MPLS: Label 17 Exp 0] 0 msec 0 msec 0 msec
    2 192.168.230.162 0 msec 0 msec 0 msec
    But no PINGING 192.168.254.2
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    17 18 192.168.254.0/24 1915668 Fa0/0 192.168.230.162
    MAC/Encaps=14/18, MRU=1500, Tag Stack{18}
    00127FCDBA8000097CA329308847 00012000
    No output feature configured
    Per-packet load-sharing
    cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Ho
    tag tag or VC or Tunnel Id switched interface
    18 17 192.168.254.0/24 752551 Gi3/12 192.168.2
    MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
    00097CA3293000127FCDBA808847 00011000
    No output feature configured
    Per-packet load-sharing
    WHEN BOTH LOCAL AND OUTGOING TAG, CANNOT PING EITHER WAY !!!
    HAVE LABEL PROTOCOL AND LOOPBACK FORCE on AS5350
    HAVE LABEL PROTOCOL ON 7609
    WHEN ADD LOOPBACK FORCE on 7609 , CAN PING BOTH LOOPBACKS,
    BUT OUTGOING TAG DISAPEARS
    cnibhco112#PING 192.168.254.2
    Type escape sequence to abort.
    Sending 5, 100-byte ICMP Echos to 192.168.254.2, timeout is 2 seconds:
    Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
    cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
    Local Outgoing Prefix Bytes tag Outgoing Next Hop
    tag tag or VC or Tunnel Id switched interface
    17 Untagged 192.168.254.0/24 598678 Fa0/0 192.168.230.162
    MAC/Encaps=0/0, MRU=1504, Tag Stack{}
    No output feature configured
    Per-packet load-sharing
    cnibhco112#
    mpls label protocol tdp
    tag-switching tdp router-id Loopback0 force

  • Problems with the vba command sendkeys in Access 2013.

    Hi, I have problems with the vba command sendkeys in Access 2013.
    I use a text field (no control) in a form. By means of the VBA command SendKeys "+ {DELETE}", 1  I get the text in memory from the text field, then place (paste) the text in a Word document. The command line sendkeys
    is followed by moving the focus to a particular control. In Access 2003, which went smoothly. Now the sendkeys command is executed only in Access 2013 in the control that then receives focus. If the procedure ends with the sendkeys command then it works well.
    The procedure with the sendkeys command is activated by a button on a form.
    Who can help me?
    private user

    Hi H.Plmp,
    Based on the description, you want to call the sendkeys from a button.
    >> use a text field (no control) in a form. By means of the VBA command SendKeys "+ {DELETE}", 1  I get the text in memory from the text field<<
    What did you mean that you no control? And how did you get the text in memory from the text field? Also I am not able to understand the exact reason that the command doesn't works in Access 2013.
    And based on the test, sendkeys "+ {Delete}" works well for me when I set a focus for the textbox control. Here is th test code:
    Me.Controls("txtField1").SetFocus
    SendKeys "+ {DELETE}", 1
    If I misunderstood, please feel free to let me know.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to set SAXParser at command-line interface to create a large XML file

    Hi,
    I am trying to create a large XML file (more than 50 MB) by selecting from Oracle database but failed because of "out of memory" error. According to "Oracle XML Developer Guide", we should use SAXParser to parsing a large XML file. But there is no example to show how to set SAXParser at command-line
    Following is what I use to get xml files. It works only when the file is small.
    java OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    When I set SAXParser at the way below,
    java oracle.xml.parser.v2.SAXParser OracleXML getXML -DateFormat -withDTD -rowsetTag PO_HDR -conn
    "jdbc:oracle:oci8:@server_name" -user "ID/password" "select * from table_name"
    it failed with the error message: "In class oracle.xml.parser.v2.SAXParser: void main(String argv[]) is not defined"
    Does anyone know how to solve the problem? I'll be appreciated very much for your help.
    Yi

    here are my ideas.
    register the xml schema.
    using xmldom, generate the desired xml output and return as xmltype.
    then you can use something like this to check.
    declare
    xmldoc xmltype ;
    begin
       -- populate xmldoc from you xmldom function
       -- validate against XML schema
       xmldoc.isSchemaValid(schema_url, root_element);
       if xmldoc.isSchemaValid = 1 then
            --valid schema
       else
            --invalid
       end if;
    end

  • Problem with seting action method to a Hyperlink object

    Hi there,
    as the subject says, I have a problem wih setting the action method of a Hyperlink object. Here is how the program is organized:
    I have an external bean which generates an ArrayList of Hyperlink objects. In the backing bean of my web page I call a method from the above mentioned external bean to generate the list of hyperlink objects. After that in the page bean I insert the hyperlink objects in GridPanel component. So far everything works fine, but the action method of the Hyperlink objects is not called and I can't understant why.
    Here is how I add the objects to the GridPanel component:
    private void populateGridPanel()
            Hyperlink hyper;
            for(int i=0; i< checkboxList.size(); i++)
                    hyper = (Hyperlink) hyperlinkList.get(i);
                    vehicleGridPanel.getChildren().add(hyper);
        }All properties of the Hyperlink objects are set in the external bean not in the page bean, here is how:
    //action method executed when the hyperlink is clicked
    MethodBinding mb = (MethodBinding) FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{Page1.hyperlink_action}", null);
    veHyperlink.setAction(mb);The populateGridPanel() method is called in the init() method of the page bean, after the initialization of all other components.
    An interesting fact is that if I manually drag-n-drop a hyperlink object to my page and programatically set its action method with the code above everything works fine. But using the same code for the dynamically generated hyperlink objects inserted in the grid panel doesn't work.
    Any kind of help is highly appreciated.
    Thanks!
    Message was edited by:
    panayot

    I got this use case to work as follows:
    1. Drag a Grid Panel and set its columns property to 1.
    2. Drag a Message Group.
    3. Use the following code in Page1:
    public void prerender() {
    populateGridPanel();
    private void populateGridPanel() {
    if (gridPanel1.getChildren().size() > 0) {return;}
    for (int i = 0; i < 3; i++) {
    Hyperlink veHyperlink = new Hyperlink();
    //action method executed when the hyperlink is clicked
    MethodBinding mb = (MethodBinding) FacesContext.getCurrentInstance().getApplication().createMethodBinding("#{Page1.hyperlink_action}", null);
    veHyperlink.setAction(mb);
    veHyperlink.setText("dynamic hyperlink " + i);
    veHyperlink.setId("dynamicHyperlink" + i);
    gridPanel1.getChildren().add(veHyperlink);
    public void hyperlink_action() {
    info("Yup it worked at: " + new java.util.Date());
    4. Fix imports, Run, and then click on the hyperlinks.

  • Problem with Put Key Command

    Hi everyone
    I'm woking on Gem Xpresso card which support scp 02.
    I can Authenticate successfully and Install and load my applet on it. but I have problem in put key command.
    my first key set is:
    47454d5850524553534f53414d504c45
    and this is the key that I want to set as my new key:
    404142434445464748494a4b4c4d4e4f
    with the algorithm that I use the encrypt value of this key will be :
    33173C8ECDA55BDF7E50625531BE4FC5
    and its check value will be :
    8BAF47
    so this is the APDU that I send for Put Key command:
    80D800814301811033173C8ECDA55BDF7E50625531BE4FC5038BAF47811033173C8ECDA55BDF7E50625531BE4FC5038BAF47811033173C8ECDA55BDF7E50625531BE4FC5038BAF47
    but I recieve error 94 85 (invalid check value)
    do I calculate my check value wrong?
    does different versions of jcdk or different versions of globalplatform hav different ways for calculating check value and keys encrypted values?
    I'll appreciate any help
    Best Regards,
    Shilan

    Try visit Gemplus forum or mailing-list.

  • Security issues with action commands....

    Hi
    I have a webapplication that under its context has two diffenent
    maps, one is admin and the other one is user.
    I use an ActionRouter and has actions like list-clients.do.
    The admin map is restricted area described in web.xml.
    You have to be in AdminRole to get access.
    My problem is that if I log in as user, I can "shoot" actions commands
    like list-clients.do from the user area and Servlet maps to the proper
    jsp that is in the admin map. When I then try isUserInRole and so on
    there is only a quetstionmark. If I run from admin area the isUserInRole
    knows who is logged in.
    I put in the list-clients.do in the url like: http://myplace.com/users/list-clients.do and servlet reply with jsp from
    admin area.
    Anybody know why not the restricted area declared in the web.xml file
    works during that condition, and how to solve this?
    Im working with Tomcat 4.1 and use SingleSignOn.
    Heres my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <filter>
    <filter-name>loginfilter</filter-name>
    <filter-class>argus.web.util.LoginFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>loginfilter</filter-name>
    <url-pattern>/admin/*</url-pattern>
    </filter-mapping>
    <filter-mapping>
    <filter-name>loginfilter</filter-name>
    <url-pattern>/user/*</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>argus.web.servlet.ActionServlet</servlet-class>
    </servlet>
    <servlet>
    <servlet-name>setup</servlet-name>
    <servlet-class>argus.web.servlet.SetupServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>0</session-timeout>
    </session-config>
    <security-constraint>
    <display-name>ArgusAdmin</display-name>
    <web-resource-collection>
    <web-resource-name>AdminAdaptor</web-resource-name>
    <url-pattern>/admin/*</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>ArgusAdmin</role-name>
    </auth-constraint>
    </security-constraint>
    <security-constraint>
    <display-name>ArgusUser</display-name>
    <web-resource-collection>
    <web-resource-name>UserAdaptor</web-resource-name>
    <url-pattern>/user/*</url-pattern>
    <url-pattern>/index.htm</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>ArgusAdmin</role-name>
    <role-name>ArgusUser</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
    <form-login-page>/login.htm</form-login-page>
    <form-error-page>/loginError.htm</form-error-page>
    </form-login-config>
    </login-config>
    <security-role>
    <role-name>ArgusAdmin</role-name>
    </security-role>
    <security-role>
    <role-name>ArgusUser</role-name>
    </security-role>
    </web-app>
    Many Thanks
    Ben

    I found them in my firewall list on my Windows 8.1 Pro installation and posted a question on a forum as well, though I don't think it was here.  I don't believe anyone ever answered.
    It looks as though these are parts of the bundled virtual private networking clients.
    Note, for example, the "distributed by Microsoft as part of Windows 8.1" wording on this page:
    http://www.sonicwall.com/app/projects/file_downloader/document_lib.php?t=PG&id=605
    -Noel
    Detailed how-to in my eBooks:  
    Configure The Windows 7 "To Work" Options
    Configure The Windows 8 "To Work" Options

  • I want to set an Action on a JMenu (not JMenuItem) but...

    ...it doesn't seem to work. I can set actions on JMenuItems no problem. But actions and actionlistening doesn't seem to work on JMenus. I can add MouseListener to a JMenu, but I REALLY want an action.
    can anyone help?
    Olly

    JMenu.addActionListener(yourListener) ?

  • Using a Variable in SSIS - Error - "Command text was not set for the command object.".

    Hi All,
    I am using a OLE DB Source in my dataflow component and want to select SQL Query from the master table  I have created variables v_Archivequery
    String packageLevel (to store the query).
    <Variable Name="V_Archivequery" DataType="String">
         SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
         FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
         ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
         Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
        </Variable>
    I am assigning this query to the v_Archivequery variable, "SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
    FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
     ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
    Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)"
    Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, v_Archivequery .
    But when I am generating the package and when running I am getting bewlo errror
     Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.".
    Can Someone guide me whr am going wrong?
    Please let me know where am going wrong?
    Thanks in advance.
    Thankx & regards, Vipin jha MCP

    What happens if you hit Preview button in OLE DB Source Editor? Also you can use the same query by selecting SQL Command option and test.
    Could you try set the Delay Validation = True at Package and re-run ?
    If set the query in variable expression (not in value), then Set Evaluate As Expression = True.
    -Vaibhav Chaudhari

  • Problems setting up username & password for SQL

    Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
    This leads me to request help with my next biggest problem:
    Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
    I am a simple bloke, with simple thought processes, so please, go easy on me...
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery1 {
         String username = "" , password = "";
         public static void main(String[] arguments) {
              PassDB UPass = new PassDB();
              String data = "jdbc:odbc:JavaTestDataBase";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
                   Statement st = conn.createStatement();
                   ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
              catch (SQLException s) {
                   System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
              catch (Exception e) {
                   System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         String username = "", password = "";
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              setVisible(true);
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              username = uname.getText();
              password = pword.getText();
    This code generates two errors, stating:
    C:\Java_progs>javac DBQuery1.java
    DBQuery1.java:14: non-static variable username cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
    ^
    DBQuery1.java:14: non-static variable password cannot be referenced from a static context
    Connection conn = DriverManager.getConnection(data, "" +
    username, "" + password);
                    ^
    2 errors*****************************
    The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
    I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
    I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
    If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
    When I try & search 2 different tables, as in:
    ResultSet rec = st.executeQuery(
                        "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
                        + "WHERE (Title='Mr') ORDER BY ContactID");
                   ResultSet rec2 = st.executeQuery(
                        "SELECT Subject, ContactID FROM Calls "
                        + "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
    As always, I am extremely appreciative of any assistance you are able to offer.
    Kind regards
    duBedat
    [email protected]

    This is where I'm at now:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.sql.*;
    public class DBQuery {
         static String username = "" ;
         static String password = "" ;
         public static void main(String[] arguments) {
         PassDB UPass = new PassDB();
         String data = "jdbc:odbc:JavaTestDataBase";
         try {
              Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
              Statement st = conn.createStatement();
              ResultSet rec = st.executeQuery(
              "SELECT Title, ContactID, First, Last, Dear FROM Contacts "
              + "WHERE (Title='Mr') ORDER BY ContactID");
              /*     ResultSet rec2 = st.executeQuery(
                   "SELECT Subject, ContactID FROM Calls "
                   + "WHERE (Subject Is Not Null) ORDER BY ContactID");
              System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
              while(rec.next()) {
                   System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
              st.close();
         catch (SQLException s) {
              System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
         catch (Exception e) {
              System.out.println("Error: " + e.toString() + e.getMessage());
    class PassDB extends javax.swing.JFrame implements ActionListener {
         static boolean getOut = false;
         JTextField uname = new JTextField(10);
         JTextField pword = new JTextField(10);
         // JPasswordField pword = new JTextField(10);
         public PassDB() {
              super("duBe's database logon");
              setSize(220, 160);
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              JPanel pane = new JPanel();          
              JLabel unameLabel = new JLabel ("Username: ");
              JLabel pwordLabel = new JLabel ("Password: ");
              JButton submit = new JButton("OK");
              submit.addActionListener(this);
              pane.add(unameLabel);
              pane.add(uname);
              pane.add(pwordLabel);
              pane.add(pword);
              pane.add(submit);
              setContentPane(pane);
              while(getOut == false)
                   setVisible(true);                         
         public void actionPerformed(ActionEvent evt) {
              PassDB clicked = (PassDB)evt.getSource();
              DBQuery.username = uname.getText();
              DBQuery.password = pword.getText();
              getOut = true;               
    }          Any advice is greatly appreciated
    duBe

  • Problems setting up an NFS server

    Hi everybody,
    I just completed my first arch install. :-)
    I have a desktop and a laptop, and I installed Arch on the desktop (the laptop runs Ubuntu 9.10). I had a few difficulties here and there, but I now have the system up and running, and I'm very happy.
    I have a problem setting up an NFS server. With Ubuntu everything was working, so I'm assuming that the Ubuntu machine (client) is set-up correctly. I'm trying to troubleshoot the arch box (server) now.
    I followed this wiki article: http://wiki.archlinux.org/index.php/Nfs
    Now, I have these problems:
    - when I start the daemons, I get:
    [root@myhost ~]# /etc/rc.d/rpcbind start
    :: Starting rpcbind [FAIL]
    [root@myhost ~]# /etc/rc.d/nfs-common start
    :: Starting rpc.statd daemon [FAIL]
    [root@myhost ~]# /etc/rc.d/nfs-server start
    :: Mounting nfsd filesystem [DONE]
    :: Exporting all directories [BUSY] exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.1/24:/home".
    Assuming default behaviour ('no_subtree_check').
    NOTE: this default has changed since nfs-utils version 1.0.x
    [DONE]
    :: Starting rpc.nfsd daemon [FAIL]
    - If I mount the share on the client with "sudo mount 192.168.1.20:/home /media/desktop", IT IS mounted but I can't browse it because I have no privileges to access the home directory for the user.
    my /etc/exports looks like this:
    # /etc/exports: the access control list for filesystems which may be exported
    # to NFS clients. See exports(5).
    /home 192.168.1.1/24(rw,sync,all_squash,anonuid=99,anongid=99))
    /etc/conf.d/nfs-common.conf:
    # Parameters to be passed to nfs-common (nfs clients & server) init script.
    # If you do not set values for the NEED_ options, they will be attempted
    # autodetected; this should be sufficient for most people. Valid alternatives
    # for the NEED_ options are "yes" and "no".
    # Do you want to start the statd daemon? It is not needed for NFSv4.
    NEED_STATD=
    # Options to pass to rpc.statd.
    # See rpc.statd(8) for more details.
    # N.B. statd normally runs on both client and server, and run-time
    # options should be specified accordingly. Specifically, the Arch
    # NFS init scripts require the --no-notify flag on the server,
    # but not on the client e.g.
    # STATD_OPTS="--no-notify -p 32765 -o 32766" -> server
    # STATD_OPTS="-p 32765 -o 32766" -> client
    STATD_OPTS="--no-notify"
    # Options to pass to sm-notify
    # e.g. SMNOTIFY_OPTS="-p 32764"
    SMNOTIFY_OPTS=""
    # Do you want to start the idmapd daemon? It is only needed for NFSv4.
    NEED_IDMAPD=
    # Options to pass to rpc.idmapd.
    # See rpc.idmapd(8) for more details.
    IDMAPD_OPTS=
    # Do you want to start the gssd daemon? It is required for Kerberos mounts.
    NEED_GSSD=
    # Options to pass to rpc.gssd.
    # See rpc.gssd(8) for more details.
    GSSD_OPTS=
    # Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
    PIPEFS_MOUNTPOINT=
    # Options used to mount rpc_pipefs filesystem; the default is "defaults".
    PIPEFS_MOUNTOPTS=
    /etc/hosts.allow:
    nfsd: 192.168.1.0/255.255.255.0
    rpcbind: 192.168.1.0/255.255.255.0
    mountd: 192.168.1.0/255.255.255.0
    Any help would be very appreciated!

    Thanks, I finally got it working.
    I realized that even though both machines had the same group, my Ubuntu machine (client) group has GID 1000, while the Arch one has GID 1001. I created a group that has GID 1001 on the client, and now everything is working.
    I'm wondering why my Arch username and group both have 1001 rather than 1000 (which I suppose would be the default number for the first user created).
    Anyway, thanks again for your inputs.

Maybe you are looking for

  • Can I recover lost app data after restore?

    Hi everyone and thank you in advance to anyone who can offer some help! Apple recently told me some issues I was having with my phone were software based and they refused to issue me a replacement phone until I attempted to setup the phone as a new p

  • UTF-16 to UTF-8

    Does anyone know of a easy way to go from UTF-16 National character set to UTF-8 ?? I don't have the time to rebuild RAC databases sitting on raw devices. Any help would be appreciated. Thanks

  • 9.0.3 "Bug" report regarding paths, compiling, and running

    I don't know if this is a bug or some kind of strange feature but it caused me to lose about an hour and a half of work before I figured out what was going on. BACKGROUND: I have a project UVDebug.jpr. It's full pathname is : C:\My Documents\OracleJD

  • Jndi.properties location in EAR

    Hello, in a environment of Tomcat+APACHE as webserver and OC4J as a backend server, putting jndi.properties in WEB-INF/classes will do the job, BUT if we use the OHS as the webserver, I am not succeeding to let the webapp view the sessions even after

  • Wifi dies from standby

    Just got a new laptop -- an HP Pavilion dv6. The hardware setup went extremely smoothly, but I'm having some trouble keeping the wifi up. Whenever you take the laptop out of standby, it will not reconnect to the network -- I can't figure out anything