Help creating a login applet with JDBC

Hi, I'm trying to create a login applet using a table from a database (created with Microsoft Access). The bottom line is that I have very little knowledge of ActionListeners. I do know some things about JDBC, but most of it is through notes and lots of reading. I was wondering how to go about looking through a table (with two columns, user and password), to see if it matches what is typed into a JTextField and a JPasswordField. Just a sample piece of code would be helpful. Thank you very much in advanced. Also, I have the GUI done for what I need, just no ActionListeners or JDBC functionality implemented. Here it is:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class login extends JFrame /*implements ActionListener*/ {
     private Container container;
     private GridBagLayout layout;
     private GridBagConstraints gbc;
     public login()
          super("Login");
          setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setSize(300,130);
        setLocationRelativeTo(null);
          container = getContentPane();
          layout = new GridBagLayout();
          container.setLayout(layout);
          gbc = new GridBagConstraints();
          labelUser = new JLabel("Username:");
          gbc.insets = new Insets(2,2,2,2);
          container.add(labelUser, gbc);
          textUser = new JTextField(15);
          gbc.gridx = 1;
          gbc.gridwidth = 3;
          container.add(textUser, gbc);
          labelPassword = new JLabel("Password:");
          gbc.gridy = 1;
          gbc.gridx = 0;
          gbc.gridwidth = 1;
          container.add(labelPassword, gbc);
          textPassword = new JPasswordField(15);
          gbc.gridx = 1;
          gbc.gridwidth = 3;
          container.add(textPassword, gbc);
          button1 = new JButton("Login");
          gbc.gridy = 2;
          gbc.gridx = 1;
          gbc.gridwidth = 1;
          container.add(button1, gbc);
          button2 = new JButton("Cancel");
          gbc.gridx = 2;
          container.add(button2, gbc);
     public static void main(String args[]) {
        new login().setVisible(true);
    private JButton button1, button2;
    private JLabel labelUser, labelPassword;
    private JTextField textUser;
    private JPasswordField textPassword;
}Thank you again in advanced.

Sir,
Much of your question makes middling sense to me. You say applet but you have JFrame for example. I would caution you right now an applet with access for a DB is asking for trouble. Never minding the various security issues Access is not really intended for this sort of operation.
Now none of that actually seems to be your question but I just thought I'd address that before you go too far down a road fraught with peril.
As far as what I think you are asking assuming our table looks like this.
tblUser
username VARCHAR (access text field) primary key
password VARCHAR (again known in access as text)then the code would look something like this...
Connection c; //create your connection
PreparedStatement ps = c.prepareStatement("SELECT username FROM tblUser WHERE username=? AND password=?");
ps.setString(1,usernameVariable);
ps.setString(2,passwordVariable);
ResultSet rs = ps.executeQuery();
if(rs.next()){
  // login successful
}else{
  // login failed!
rs.close();
ps.close();
c.close();Also duffymo will be unhappy if I don't mention that you will really want to give second thought to mixing your database code with your GUI code. Please take a gander through http://java.sun.com/blueprints/patterns/MVC.html
Sincerely,
Slappy

Similar Messages

  • Create a login page with NI Security Programmatic Login.vi

    Hi everyone,
    I'm trying to create a login page that inputs username and password of users, then authorize user information with the Domain Account Manager to recognize user identification.
    I google and see the NI Security Programmatic Login.vi can allow me to create a login page and it works. However, I got a problem is to redirect to other pages after authorizing. 
    NI Security Programmatic Login.vi only outputs some string to show the status of the authentication, it doesnt output boolean like true or fall.
    Does anyone has a solution to help me?
    Thank you.
    This is my screen shot:

    Thank you for suggesting me. I've done the checking task but I don't know how to call a subVi.
    As you can see in the images I post below, I have a login page with its diagram, and the main page that I want to show after logging in conrrectly.
    So should the main page is the subVi or the login page? And can you tell me how to show the main page after logging correctly?
    I also don't know how to refresh the page if logging information is incorrect. Do you have any solution?
    Thank you so much.

  • Does anyone here knows how to create a login page thru JDBC?

    Anyone here knows how to create a login page which connect to database thru JDBC but not JDBC-ODBC bridge?

    Hi..pls you'll do people here a great good if you could explain yourself better..!
    Anyway if you are trying to connect to an Oracle Database you dont need the jdbc-odbc bridge as oracle provides a special driver for java applets/applications that is "the thin driver" and the "oci driver"..so if you are connecting to Oracle your connection will look like this:
    Class.forName("oracle.jdbc.driver.OracleDriver"); //not sun.jdbc.odbc.JdbcOdbcDriver
    Connection con = DriverManager.getConnection ("blah blah, blah");
    no need for the jdbc-odbc bridge.
    I hope i've answered your question.
    Thanks.

  • I need Help for Connect To DB2 with JDBC

    I'd like to know why I Have this problem.
    The DB2 v 5.10 is in a IBM OS/390
    I know the IP, PORt, DBNAME and I'd like to connect to DB2 with my windows XP using JDCB from IBM.
    I use JDBC Universal for DB2 type 4.
    Class.forName("com.ibm.db2.jcc.DB2Driver");
    Url = "jdbc:db2://IP:PORT/BDNAME";
    DriverManager.getConnection.... (url, user, pass)..
    If I execute this, I have next problem
    SQL state = null
    Error code = -4499
    There is no available conversion for the source code page, 1208, to the target code page, "". DB2ConnectionCorrelator: null
    Why is this?
    Finally, the web application will running in a AIX IBM with machine, It could be that this machine (aix) can connect with the IBM OS/390 with JDBC for iBM?
    Thankss!!!

    Check how you configured the IP on the laptop and computers, assigned by router with DHCP feature enabled? Or configure manually? If it's assigned by wireless router, then make sure you assign big enough IP range in DHCP setting. Take a look on using ping to troubleshoot network and wireless router configuration articles to help you more..

  • How to run an applet with JDBC connectivity on a web browser

    I've created an Applet in Java with SQL connectivity...i.e. it retrieves certain data from a table in SQL and puts in the TextField.....
    Now, the problem is that this Applet works in NETBEANS....but fails to work when I use a web-browser..or the "appletviewer" command....
    It says that it doesn't have permission to access local files....On Research, i've found that it is somethin' related to the concept of "Signed Applets", "Permissions" & "Security Policies" in java which doesn't allow any applet (without Certificate) to access Local Files.....
    Can Somebody please tell how to overcome this problem.....?

    I'm going to be blunt with you. You are most likely going to have to redesign your application from scratch. And if it turns out you don't have to then you should anyway because it's a bad idea and fraught with peril.
    Anyway here the major touchpoints on this discussion. You can be the judge of how these various points apply to you.
    - Applets are restricted. - Yes Applets have a number of security restrictions on what they can or cannot do. This is designed to protect users from malicious applets. By signing your applet you can request permission from the user to do certain activities that are otherwise restricted. But not all.
    - If you are using the JDBC-ODBC bridge then you need a different driver. If you sign your applet it might work in some limited scenarios but it will be hairy and is discouraged.
    - If you are using Access or another file based database (CSV Excel etc) then you are doomed. You'll have to get yourself a different database. A non file based one. It doesn't matter if you sign your applet or not. You're still doomed.
    - If you are trying to connect to a database server that is not at the same physical address as your web server you are doomed. Signing the applet will not help
    - Connecting directly to a database from an applet is extremely risky business. Starting with now anyone can steal your username and password for your database quite easily.
    What you should do in the redesign is put all the database accessing code in a Servlet. This Servlet does not have to be Java, it could be PHP, Perl, ASP, etc. It doesn't matter. Just put it on the server side. Then have your applet connect to this code via a webservice to do what is required.

  • Applet with JDBC runs very slow

    I have recently created an applet which I am using to interface with a MS SQL Server 2000 database using JDBC. The server is running W2K Server, and a Tomcat web server.
    There are some performance problems with this application. The volume of data being demanded by the database is very low, yet it runs very slow. More specifically, however, the application runs at a very fast pace for several seconds, then "stalls" for 10 -15 seconds.
    The stalling of the application does not take place at the same place in the code all the time; rather it seems to be completely independent of what I am doing. Sometimes a particular operation takes 20 seconds to complete, but the next day the same thing only takes 20msec.
    Any ideas?
    Thanks

    sounds like network usage issues
    hard to tell with no code and no idea how you're configured

  • Help - using custom login module with embedded jdev oc4j to access ejb 3

    Hi All (Frank ??),
    I'm just wondering if anyone has successfully been able to leverage a custom login module in combination
    with a client that connects to a local EJB 3 stateless session bean through Jdeveloper 10.1.3.2's embedded oc4j.
    I have spent 2+ days trying to get this to work - and i think I resound now to the fact im going to
    have to deploy to oc4j standalone instead.
    I got close.. but finally was trumped with the following error from the client trying to access the ejb:-
    javax.naming.NoPermissionException: Not allowed to look up XXXXXX, check the namespace-access tag
    setting in orion-application.xml for details.
    Using the various guides available, I had no problem getting the custom login module working
    with a local servlet running from JDev's embedded oc4j.. however with ejb - no such luck.
    I have a roles table (possible values Member, Admin) - that maps to sr_Member and sr_Admin
    respectively in various config files.
    I'm using EJB 3 annotations for protecting methods .. for example
    @RolesAllowed("sr_Member")
    Steps that I had to do so far :-
    In <jdevhome>\jdev\system\oracle.jwee.10.1.3.40.66\embedded-oc4j\config\system-jazn-data.xml1) Add custom login module
        <application>
          <name>current-workspace-app</name>
          <login-modules>
            <login-module>
              <class>kr.security.KnowRushLoginModule</class>
              <control-flag>required</control-flag>
              <options>
                <option>
                  <name>dataSource</name>
                  <value>jdbc/DB_XE_KNOWRUSHDS</value>
                </option>
                <option>
                  <name>user.table</name>
                  <value>users</value>
                </option>
                <option>
                  <name>user.pk.column</name>
                  <value>id</value>
                </option>
                <option>
                  <name>user.name.column</name>
                  <value>email_address</value>
                </option>
                <option>
                  <name>user.password.column</name>
                  <value>password</value>
                </option>
                <option>
                  <name>role.table</name>
                  <value>roles</value>
                </option>
                <option>
                  <name>role.to.user.fk.column</name>
                  <value>user_id</value>
                </option>
                <option>
                  <name>role.name.column</name>
                  <value>name</value>
                </option>
              </options>
            </login-module>
          </login-modules>
        </application>2) Grant login rmi permission to roles associated with custom login module (also in system-jazn-data.xml)
      <grant>
        <grantee>
          <principals>
            <principal>
              <realm-name>jazn.com</realm-name>
              <type>role</type>
              <class>kr.security.principals.KRRolePrincipal</class>
              <name>Admin</name>
            </principal>
          </principals>
        </grantee>
        <permissions>
          <permission>
            <class>com.evermind.server.rmi.RMIPermission</class>
            <name>login</name>
          </permission>
        </permissions>
      </grant>
      <grant>
        <grantee>
          <principals>
            <principal>
              <realm-name>jazn.com</realm-name>
              <type>role</type>
              <class>kr.security.principals.KRRolePrincipal</class>
              <name>Member</name>
            </principal>
          </principals>
        </grantee>
        <permissions>
          <permission>
            <class>com.evermind.server.rmi.RMIPermission</class>
            <name>login</name>
          </permission>
        </permissions>
      </grant>3) I've tried creating various oracle and j2ee deployment descriptors (even though ejb-jar.xml and orion-ejb-jar.xml get created automatically when running the session bean in jdev).
    My ejb-jar.xml contains :-
    <?xml version="1.0" encoding="utf-8"?>
    <ejb-jar xmlns ....
      <assembly-descriptor>
        <security-role>
          <role-name>sr_Admin</role-name>
        </security-role>
        <security-role>
          <role-name>sr_Member</role-name>
        </security-role>
      </assembly-descriptor>
    </ejb-jar>Note- i'm not specifying the enterprise-beans stuff, as JDev seems to populate this automatically.
    My orion-ejb-jar.xml contains ...
    <?xml version="1.0" encoding="utf-8"?>
    <orion-ejb-jar ...
      <assembly-descriptor>
        <security-role-mapping name="sr_Admin">
          <group name="Admin"></group>
        </security-role-mapping>
        <security-role-mapping name="sr_Member">
          <group name="Member"></group>
        </security-role-mapping>
        <default-method-access>
          <security-role-mapping name="sr_Member" impliesAll="true">
          </security-role-mapping>
        </default-method-access>
      </assembly-descriptor>My orion-application.xml contains ...
    <?xml version="1.0" encoding="utf-8"?>
    <orion-application xmlns ...
      <security-role-mapping name="sr_Admin">
        <group name="Admin"></group>
      </security-role-mapping>
      <security-role-mapping name="sr_Member">
        <group name="Member"></group>
      </security-role-mapping>
      <jazn provider="XML">
        <property name="role.mapping.dynamic" value="true"></property>
        <property name="custom.loginmodule.provider" value="true"></property>
      </jazn>
      <namespace-access>
        <read-access>
          <namespace-resource root="">
            <security-role-mapping name="sr_Admin">
              <group name="Admin"/>
              <group name="Member"/>
            </security-role-mapping>
          </namespace-resource>
        </read-access>
        <write-access>
          <namespace-resource root="">
            <security-role-mapping name="sr_Admin">
              <group name="Admin"/>
              <group name="Member"/>
            </security-role-mapping>
          </namespace-resource>
        </write-access>
      </namespace-access>
    </orion-application>My essentially auto-generated EJB 3 client does the following :-
          Hashtable env = new Hashtable();
          env.put(Context.SECURITY_PRINCIPAL, "matt.shannon");
          env.put(Context.SECURITY_CREDENTIALS, "welcome1");
          final Context context = new InitialContext(env);
          KRFacade kRFacade = (KRFacade)context.lookup("KRFacade");
    ...And throws the error
    20/04/2007 00:55:37 oracle.j2ee.rmi.RMIMessages
    EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER
    WARNING: Exception returned by remote server: {0}
    javax.naming.NoPermissionException: Not allowed to look
    up KRFacade, check the namespace-access tag setting in
    orion-application.xml for details
         at
    com.evermind.server.rmi.RMIClientConnection.handleLookupRe
    sponse(RMIClientConnection.java:819)
         at
    com.evermind.server.rmi.RMIClientConnection.handleOrmiComm
    andResponse(RMIClientConnection.java:283)
    ....I can see from the console that the user was successfully authenticated :-
    20/04/2007 00:55:37 kr.security.KnowRushLoginModule validate
    WARNING: [KnowRushLoginModule] User matt.shannon authenticated
    And that user is granted both the Admin, and Member roles.
    The test servlet using basic authentication correctly detects the user and roles perfectly...
      public void doGet(HttpServletRequest request,
                        HttpServletResponse response)
        throws ServletException, IOException
        LOGGER.log(Level.INFO,LOGPREFIX +"doGet called");
        response.setContentType(CONTENT_TYPE);
        PrintWriter out = response.getWriter();
        out.println("<html>");
        out.println("<head><title>ExampleServlet</title></head>");
        out.println("<body>");
        out.println("<p>The servlet has received a GET. This is the reply.</p>");
        out.println("<br> getRemoteUser = " + request.getRemoteUser());
        out.println("<br> getUserPrincipal = " + request.getUserPrincipal());
        out.println("<br> isUserInRole('sr_Admin') = "+request.isUserInRole("sr_Admin"));
        out.println("<br> isUserInRole('sr_Memeber') = "+request.isUserInRole("sr_Member"));Anyone got any ideas what could be going wrong?
    cheers
    Matt.
    Message was edited by:
    mshannon

    Thanks for the response. I checked out your blog and tried your suggestions. I'm sure it works well in standalone OC4J, but i was still unable to get it to function correctly from JDeveloper embedded.
    Did you ever get the code working directly from JDeveloper?
    Your custom code essentially seems to be the equivalent of a grant within system-jazn-data.xml.
    For example, the following grant to a custom jaas role (JAAS_ADMIN) that gets added by my custom login module gives them rmi login access :-
         <grant>
              <grantee>
                   <principals>
                        <principal>
                             <realm-name>jazn.com</realm-name>
                             <type>role</type>
                             <class>kr.security.principals.KRRolePrincipal</class>
                             <name>JAAS_Admin</name>
                        </principal>
                   </principals>
              </grantee>
              <permissions>
                   <permission>
                        <class>com.evermind.server.rmi.RMIPermission</class>
                        <name>login</name>
                   </permission>
              </permissions>
         </grant>If I add the following to orion-application.xml
      <!-- Granting login permission to users accessing this EJB. -->
      <namespace-access>
        <read-access>
          <namespace-resource root="">
            <security-role-mapping>
              <group name="JAAS_Admin"></group>
            </security-role-mapping>
          </namespace-resource>
        </read-access>Running a standalone client against the embedded jdev oc4j server gives the namespace-access error.
    I tried out your code by essentially creating a static reference to a singleton class that does the role lookup/provisioning with rmi login grant :-
    From custom login module :-
      private static KRSecurityHelper singleton = new KRSecurityHelper();
      protected Principal[] m_Principals;
        Vector v = new Vector();
          v.add(singleton.getCustomRmiConnectRole());
          // set principals in LoginModule
          m_Principals=(Principal[]) v.toArray(new Principal[v.size()]);
    Singleton class :-
    package kr.security;
    import com.evermind.server.rmi.RMIPermission;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    import oracle.security.jazn.JAZNConfig;
    import oracle.security.jazn.policy.Grantee;
    import oracle.security.jazn.realm.Realm;
    import oracle.security.jazn.realm.RealmManager;
    import oracle.security.jazn.realm.RealmRole;
    import oracle.security.jazn.realm.RoleManager;
    import oracle.security.jazn.policy.JAZNPolicy;
    import oracle.security.jazn.JAZNException;
    public class KRSecurityHelper
      private static final Logger LOGGER = Logger.getLogger("kr.security");
      private static final String LOGPREFIX = "[KRSecurityHelper] ";
      public static String CUSTOM_RMI_CONNECT_ROLE = "remote_connect";
      private RealmRole m_Role = null;
      public KRSecurityHelper()
        LOGGER.log(Level.FINEST,LOGPREFIX +"calling JAZNConfig.getJAZNConfig");
        JAZNConfig jc = JAZNConfig.getJAZNConfig();
        LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getRealmManager");
        RealmManager realmMgr = jc.getRealmManager();
        try
          // Get the default realm .. e.g. jazn.com
          LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getGetDefaultRealm");
          Realm r = realmMgr.getRealm(jc.getDefaultRealm());
          LOGGER.log(Level.INFO,LOGPREFIX +"default realm: "+r.getName());
          // Access the role manager for the remote connection role
          LOGGER.log(Level.FINEST,
            LOGPREFIX +"calling default_realm.getRoleManager");
          RoleManager roleMgr = r.getRoleManager();
          LOGGER.log(Level.INFO,LOGPREFIX +"looking up custom role '"
            CUSTOM_RMI_CONNECT_ROLE "'");
          RealmRole rmiConnectRole = roleMgr.getRole(CUSTOM_RMI_CONNECT_ROLE);
          if (rmiConnectRole == null)
            LOGGER.log(Level.INFO,LOGPREFIX +"role does not exist, create it...");
            rmiConnectRole = roleMgr.createRole(CUSTOM_RMI_CONNECT_ROLE);
            LOGGER.log(Level.FINEST,LOGPREFIX +"constructing new grantee");
            Grantee gtee = new Grantee(rmiConnectRole);
            LOGGER.log(Level.FINEST,LOGPREFIX +"constructing login rmi permission");
            RMIPermission login = new RMIPermission("login");
            LOGGER.log(Level.FINEST,
              LOGPREFIX +"constructing subject.propagation rmi permission");
            RMIPermission subjectprop = new RMIPermission("subject.propagation");
            // make policy changes
            LOGGER.log(Level.FINEST,LOGPREFIX +"calling jc.getPolicy");
            JAZNPolicy policy = jc.getPolicy();
            if (policy != null)
              LOGGER.log(Level.INFO, LOGPREFIX
                + "add to policy grant for RMI 'login' permission to "
                + CUSTOM_RMI_CONNECT_ROLE);
              policy.grant(gtee, login);
              LOGGER.log(Level.INFO, LOGPREFIX
                + "add to policy grant for RMI 'subject.propagation' permission to "
                + CUSTOM_RMI_CONNECT_ROLE);
              policy.grant(gtee, subjectprop);
              // m_Role = rmiConnectRole;
              m_Role = roleMgr.getRole(CUSTOM_RMI_CONNECT_ROLE);
              LOGGER.log(Level.INFO, LOGPREFIX
                + m_Role.getName() + ":" + m_Role.getFullName() + ":" + m_Role.getFullName());
            else
              LOGGER.log(Level.WARNING,LOGPREFIX +"Cannot find jazn policy!");
          else
            LOGGER.log(Level.INFO,LOGPREFIX +"custom role already exists");
            m_Role = rmiConnectRole;
        catch (JAZNException e)
          LOGGER.log(Level.WARNING,
            LOGPREFIX +"Cannot configure JAZN for remote connections");
      public RealmRole getCustomRmiConnectRole()
        return m_Role;
    }Using the code approach and switching application.xml across so that namespace access is for the group remote_connect, I get the following error from my bean :-
    INFO: Login permission not granted for current-workspace-app (test.user)
    Thus, the login permission that I'm adding through the custom remote_connect role does not seem to work. Even if it did, i'm pretty sure I would still get that namespace error.
    This has been such a frustrating process. All the custom login module samples using embedded JDeveloper show simple j2ee servlet protection based on settings in web.xml.
    There are no samples showing jdeveloper embedded oc4j using ejb with custom login modules.
    Hopefully the oc4j jdev gurus like Frank can write a paper that demonstrates this.
    Matt.

  • How to create a login funtion with different usernames and password to iweb

    Hi,
    Im looking for hours for a solution to create / add a function to iweb which allows users to login to a member area with their own user names and passwords.
    Is there a simple way to realize this? So far I know there has to be a file with all the user name --> password combinations, can I add such a file to my idisk and then get it working with my iweb site?
    Is such an idea in general possible with iweb?
    Thanks for your help!
    Message was edited by: Macusar08

    One possibility may be to use the free drop.io to privately share links to your iWeb site pages and/or iDisk files. +"Each 'drop' (...) can be password-protected and set to expire after a period of time, so you can share exactly what you want with whom you want for as long as you want."+ (source).
    Note that drop.io doesn't require an email address, name or personal registration to set up a "drop". And you can place data in either one drop or multiple drops. Each drop comes with 100mb of storage for free and you can have as many drops as you want without signing up.

  • How to: create a Login page with data tags

    hi, how could i create a jsp login page using the data tags.. and how to associate it with the other jsp pages that should be displayed in case of the correct insertion of the password .

    http://technet.oracle.com:89/ubb/Forum2/HTML/006025.html

  • How can I create a Login-page with jsp???

    Hello,
    I have to create a page with JSP code on the Netweaver Developer Studio.
    But I do not know how I do it.
    Can anyone tell me what to write in the portalapp.xml?
    An example would be very helpful.
    Thank you
    Greetings

    As you can see in the example:
    The portalapp.xml file (deployment descriptor) provides configuration information for your application, and defines the components and services in your application. For each component and service, you specify the implementing Java class and configuration information.
    For more information on the format of the portalapp.xml, see Deployment Descriptor (portalapp.xml).
    <application>
        <application-config>
            <property name="SharingReference" value="com.sap.portal.navigation.service, com.sap.portal.navigation.api_mimeservice, com.sap.portal.navigation.helperservice"/>
            <property name="Vendor" value="MY_COMPANY"/>
            <property name="SecurityArea" value="PERMISSION"/>
        </application-config>
        <components>
            <component name="SimpleNavigationExample">
                <component-config>
                    <property name="ClassName" value="MY_CLASS"/>
                    <property name="SecurityZone" value="no_safety"/>
                </component-config>
                <component-profile/>
            </component>
        </components>
        <services/>
    </application>
    You can only update in this example, your class name and other details:
    <property name="Vendor" value="sap.com"/>
    <property name="SecurityArea" value="MyCompany"/>
    <property name="ClassName" value="LOGINCLASS"/>
    <property name="SecurityZone" value="no_safety"/>
    Modify this portalapp.xml file as follows:
           1.      NAVIGATION SERVICE, so you must add references to the following portal applications that define these services:
            com.sap.portal.navigation.service
            com.sap.portal.navigation.api_mimeservice
            com.sap.portal.navigation.helperservice
           2.      In the <application-config> section, create the following properties that help to define the security zone for all components and services in this application:
    ○     Vendor: String identifying the company or organization that provided the application, for example, sap.com.
    ○     SecurityArea: String identifying the security area for the application, for example, NetWeaver.portal.
           3.      In the <component-config> section for the mySiteMap component, create the property SecurityZone to define the specific security zone for the component.
    For Permission, check this document:
    http://help.sap.com/saphelp_nw04s/helpdata/en/44/489e2df5ee4e35e10000000a1553f6/frameset.htm

  • [Help Req] Cannot login in with OD credentials

    I am setting up for my first time a full Mac network (i come from MS/AD background).
    I created a test account.. and OD credentials passed fine. Mobile account was created and offline worked as expected.
    I then deleted the test account and created a few of our real accounts in OD... and then tried to login via cleanly built iMacs and MacBooks. however.... I am now no longer able to get any account to login.
    What happens is this... I pass the login in credentials.. then get the beach ball.. then after a minute or two, the login panel will shiver.
    Passing bad credentials will get an automatic denial. So I know the machines are doing something... but I have dug and dug and cannot figure how what has gone wrong.
    Does anyone have any ideas?

    HI,
    can you please provide the logs for the issue?

  • Using Applets with JDBC

    I am developing a Java app that requires access to a RDBMS. I'm having good success connecting to the DB as a Java app but when I try to run it as an applet, I'm getting the following SQLException error:
    "No suitable driver"
    I have created a policy file that grants me the required RuntimePermission and PropertyPermission. Any idea what else I'm missing?
    Thanks,
    PjR

    Cannot get a connection to the database. <-- my code
    No suitable driver <-- SQLException.getMessage()
    Exception occurred during event dispatching: <-- stackTrace
    java.lang.NullPointerException
    at DbaApplet.actionPerformed(DbaApplet.java:76)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
    50)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1504)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:378)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:216)
    at java.awt.Component.processMouseEvent(Component.java:3717)
    at java.awt.Component.processEvent(Component.java:3546)
    at java.awt.Container.processEvent(Container.java:1164)
    at java.awt.Component.dispatchEventImpl(Component.java:2595)
    at java.awt.Container.dispatchEventImpl(Container.java:1213)
    at java.awt.Component.dispatchEvent(Component.java:2499)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
    at java.awt.Container.dispatchEventImpl(Container.java:1200)
    at java.awt.Component.dispatchEvent(Component.java:2499)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:319)
    at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
    3)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)

  • Need help creating a smart playlist with multiple rules

    I'd like to make a smart playlist that:
    has the word 'Anime' in its Name, or Album title
    has the word 'Cover' in its Album title
    does not have the word 'OST' in its Album title
    Thanks in advance!

    Create a new smart playlist, click the + symbol, then the second ellipsis ... then the last + symbol. This will give you the rule structure as shown below, edit the parts accordingly.
    tt2

  • Login Applet

    Hi,
    I m new to Java and was working on creating a login Applet. I have put event handler on submit button . it will check and validate the user name & password with hardcoded one. to login user name is "test' and password is "password".
    if i try with some other user name, it gives message "Wrong user...." as per logic. But when i try to connect with "test" it still gives same error.
    in event handler it is going in else section where i am comapring the user name with "test" however, it should go in true section and validate password.
    given below is my login applet code.. will anybody help me where i am wrong.
    public class login extends java.applet.Applet
         Button submit = new Button("Connect to Server");
         TextField user = new TextField(20);
         TextField pass = new TextField(20);
         Label result_label = new Label("Pls input User Name and Password to Login");
         String user_name = "";
         String pass1 = "";
         public void init()
              user.setEditable(true);
              pass.setEditable(true);
              String result = "";
              GridBagLayout grid = new GridBagLayout();
              GridBagConstraints cons = new GridBagConstraints();
              setLayout(grid);
              setFont(new Font("Times New Roman",Font.PLAIN,12));
              setBackground(Color.orange);
              setForeground(Color.black);
              cons.weightx = 1.0;
              cons.weighty = 0.0;
              cons.anchor = GridBagConstraints.CENTER;
              cons.fill = GridBagConstraints.NONE;
              cons.gridwidth = GridBagConstraints.REMAINDER;
              add(new Label("User Name: "));
              grid.setConstraints(user, cons);
              add(user);
              add(new Label("Password: "));
              grid.setConstraints(pass, cons);
              add(pass);
              result_label.setFont(new Font("Times New Roman", Font.BOLD, 12));
              result_label.setForeground(Color.blue);
              grid.setConstraints(result_label, cons);
              add(result_label);
              grid.setConstraints(submit, cons);
              add(submit);
              cons.weighty = 1.0;
              show();
         public boolean handleEvent(Event evt)
              if (evt.target ==user)
                   char c = (char) evt.key;
                   if (c == '\n')
                        user_name = user.getText();
                        return(true);
                   else
                        return(false);
              if (evt.target == pass )
                   char c = (char) evt.key;
                   if (c == '\n')
                        pass1 = pass.getText();
                        return(true);
                   else
                        return(false);
              if (evt.target == submit)
                   char c = (char) evt.key;
                   if ( c == '\n')
                        double i;
                        i = 1;
                        result_label.setText("Verifing ..............");
                        do { i = i + 0.0001; }while (i <= 8000);
                        user_name = user.getText();
                        if (user_name == "test" )
                             pass1 = pass.getText();
                             if (pass1 == "password")
                                  result_label .setText("Login Sucessfull!!! Connecting to Server...");
                                  return(true);
                             else
                                  result_label .setText("Invalid Password...");
                                  return(false);
                        else
                             String text1 = "Invalid user " + user_name + " Access Not allowed";
                             result_label.setText( text1);
                             return(false);
                   else
                        return(false);
              else
              {     return(false);
         public void destroy()
              try
                   //cons.close();
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println(e.getMessage());
    }

    Use the equals() methods to compare strings.
    if(pass1.equals( "password"))

  • How to establish a trusted connection with JDBC for SQL SERVER 2000

    Hi!I am using jdk 1.4 and eclipse 3.3.
    I create a servlet in eclipse with in-build tomcat.
    When I run it ,it was working perfectlly has it was suppose to work.
    In this servlet I connect to a sql 2000 database using jdbc-odbc bridge driver.
    But when I tried to deploy the servlet on tomcat 5.5 manully on the same machine ,it gave me error saying
    [Microsoft][SQLServer JDBC Driver][SQLServer]Login failed
    for user 'sa'
    I searched around some post and found that ok ,I need trusted connection
    But I have 2 Questions
    1). Why was in eclipse I was able to connect to the SQL server and why not in the servlet which I deployed manully on tomcat.
    2). How do I create a trusted connection with JDBC for SQL server 2000
    Thnaks for your help in advance.

    Hi! duffymo ,QussayNajjar ,dvohra09 .
    Thank for help.
    The ideas are really great.
    I am trying generate reports for my company.
    When I used eclipse the code worked perfectly.
    below is code which I used
    out.println("Calling For Class Name<br>");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    out.println("Calling For Class Name success Now calling database <br>");
    1). jdbcConnection = DriverManager.getConnection("jdbc:odbc:SQLJasper");
    2). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb");
    3). jdbcConnection = DriverManager.getConnection("jdbc:odbc:Driver={SQL Server};Server=ServerName;Database=tempdb","UID=UserName","Password=Password");
    out.println("connecting to database success<br>");
    I had tried to connect the database using this three way.
    In 1st I tried using DSN name .
    Next 2 self explainer for expert like you.
    I used to 2nd variant to connect in eclipse and it worked fine.
    I not an expert in java ,I just doing some research on jasperReport.
    My best guest is that eclipse is using some library files of which I have no clue.
    Thank's for your help,I appretiate it.
    Once again thank a billion.
    Sorry for the messy righting.

Maybe you are looking for

  • FCP 7.0.3 OUT OF MEMORY?!!

    I bought a 12 core mac pro, 16gb ram and when I try to put an HD video clip into my viewer, I immediately get a pop up saying, 'General Error,' followed by 'Out of Memory.' The info on the video clips are as follows: 1920x1080 H.264 Compressor, 23.98

  • Sender RFC Message not seen in sxmb_moni

    Hi, Uptill now i must have created 9 RFC To file scenarios ..all of them are working perfectly. But this tenth one is bugging me up: Problem: 1. I created RFC destination which is working perfectly fine i.e connection test is successful. 2. When i ru

  • Wifi and mac

    I have a problem with my macbook and my wifi.....when my mac is in stand-by, then internet doesn't start working!!I can do??

  • PIN unlock for data access on blackberry

    I have got a blacberry pearl 8100 from TIM,Italy. now I want to use it in India.The phone is unlocked in terms of voice and sms but I cannot use data/internet. My service provider tells me that the PIN is locked with TIM and unless they release this

  • Installing photoshop trial error (49)

    just tried to download photoshop using the creative cloud. Computer: Lenovo Flex i7 laptop system: windows 8 64 bit i got error (49), that looks like this: http://screencast.com/t/GrHStAn3YlI here are my log files: https://drive.google.com/folderview