Jsp login forum help

Hi everyone, i have the bean class User.java below and i want to create the basic authentication login , when the user login successful the welcome page will be display depend on the type of user. For example, if the user type is teacher so he/she can create the new student username and password. Could anyone help me to do that. Please explain more detail since i am a newbie for jsp.
Thank you.
public class User {
public User() { }
public String getUserName() { return name;}
public String getPassword() {return password;}
public String userType () {return type;}
public void setUserName(String name ) { this.name = name;}
public void setPassword (String password) {this.password = password;}
public void setType (String type) {this.type = type;}
private String name;
private String password;
private String type;
}

The thing is i haven't using database before and i didn't have any database in the server, assume that i using hashtable to store the users detail. Could you please give me the example code.
Here is my login.jsp
<p>
<form name="loginForm" method="post" action="process.jsp">
<p align="center"><strong><font size="4">LOGIN</font></strong> </p>
<table width="24%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFCC"><div align="right">User name</div></td>
<td bgcolor="#FFFFCC"><div align="center">
<input name="username" type="text" id="username">
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFCC">
<div align="right">Password</div></td>
<td bgcolor="#FFFFCC"> <div align="center">
<input name="password" type="password" id="password">
</div></td>
</tr>
<tr>
<td bgcolor="#FFFFCC">
<div align="right">
<input name="usertype" type="checkbox" id="usertype" value="checkbox">
Staff </div></td>
<td bgcolor="#FFFFCC">
<div align="center">
<input type="submit" name="login" value="Login">
<input type="reset" name="clear" value="Clear">
</div></td>
</tr>
</table>
<p align="center">Staff's ID: teacher<br>
Staff's password: pass<br>
You must check the staff checkbox to login as clerk.</p>
</form>
</p>
So what i need is when the user input staff id, password and the check box, the page will check the correct authentication and the process to the new page, for example the teacher page that have another form to create the student authentication. When the student user created the student can login using the same form as the teacher's login form but this time will forward to the student's page. Also how can i use session to keep track of the user logged in, for example when the student logged successful, he/she can view her mark or do some task and can logout (which is clear the session).
Thank you so much.

Similar Messages

  • How to make a Website in Muse with a Login Forum

    I need to build a website for a client in Muse which has access to a Login Forum, so that users can login to a secure site and upload messages and images/video. I have never done this before, but I'm quite experienced in other aspects of Web Design and in Adobe Muse. I'm guessing I will have to use Business Catalyst to do this and intend to host the site on BC. I need to know if this can be done using just Web Basics, or if I have to upgrade to Web Basics+, or higher? Does anyone know of any tutorials, or other help on this subject?
    This is not going to be an eCommerce site, I just really need to have the function of a secure web forum with a few other standard pages, HOME, ABOUT etc
    Many thanks in advance.

    Hi Shaun,
    Yes, you are right. You can achieve this if you host your site on Business Catalyst. This feature is not included in webBasics+ plan. You need at least webmarketing plan to use the Forums feature. Please refer to this link for info on how to add forums in BC : http://helpx.adobe.com/business-catalyst/partner/add-forum.html
    Hope this answers your question.
    Cheers!
    Aish

  • JSP Login

    Hi ....
    I am working on JSP for oracle applications. In the login page, when the username and password is entered and 'Submit' button is pressed, the page is validated.
    However after typing username and password and 'Enter" button in keyboard is hit, no action takes place. How can I modify to have page processed for 'Enter" key.
    This is urgent.

    Hi ,
    I have attched the code. Also the link for the page is:
    http://angelic.itconvergence.net:8001/OA_HTML/ibeCAcdLogin.jsp?a=b
    This page is developed by Oracle and I am working on customizations.
    Thannks for your help in advance.
    <%@ include file="jtfincl.jsp" %>
    <!-- $Header: ibeCAcdLogin.jsp 115.31.11590.4 2003/06/10 21:46:16 sfung ship $ -->
    <!-- $Header: ibeCAcdLogin.jsp 115.31.11590.4 2003/06/10 21:46:16 sfung ship $ -->
    <%--=========================================================================
    |      Copyright (c)2000 Oracle Corporation, Redwood Shores, CA
    |                         All rights reserved.
    +===========================================================================
    |
    | FILE
    |   ibeCAcdLogin.jsp - User Login Page
    |
    | DESCRIPTION
    |   Sign On Page
    |
    | HISTORY
    |   11/11/2002  madesai IBE.O UI changes
    |   12/13/2002  madesai error msg appears after the title, prompts added with colon
    |   12/27/2002  adwu    Removed Javascript event for 2726995
    +=======================================================================--%>
    <%
    final String J = "ibeCAcdLogin.jsp";
    pageContext.setAttribute("_signInPage", "true", PageContext.REQUEST_SCOPE);  %>
    <%@ include file="ibeCZzpHeader.jsp" %>
    <%
    String username = IBEUtil.nonNull(request.getParameter("username"));
    if (username.equals("") && RequestCtx.userIsLoggedIn())
      username = RequestCtx.getUserName();
    //madesai - added errorMessage pageContext for IBE.O
    //Share Cart feature
    String errorMessage = null;
    errorMessage = IBEUtil.nonNull((String)pageContext.getAttribute("errorMessage",PageContext.REQUEST_SCOPE));
    if (errorMessage.equals(null)|| (errorMessage.equals("")))
    if (pageContext.getAttribute("invalid", pc) != null) {
      IBEUtil.log("ibeCAcdLogin.jsp", "Login fails");
      errorMessage = mm.getMessage("IBE_PRMT_INVALID_PASSWORD_G");
    String ref = IBEUtil.nonNull(request.getParameter("ref"));
    pageContext.setAttribute("_pageTitle", mm.getMessage("IBE_PRMT_SIGN_IN_G"), pc);
    pageContext.setAttribute("selectedTab", "signin", pc);
                                                                                 %>
    <%@ include file="ibeCZzdTop.jsp" %>
    <%@ include file="ibeCZzdMenu.jsp" %>
    <SCRIPT LANGUAGE="JavaScript" SRC="ibeCButton.js"></script>
    <TABLE  border="0" cellspacing="0" cellpadding="0" width="100%">
    <TR>
    <TD valign="top" width="15%"><BR clear="all">
    </TD>
    <TD valign="top" width="70%">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
      <td class=pageTitle ><%= mm.getMessage("IBE_PRMT_SIGN_IN_G") %></td>
      </tr>
       <tr>
      <td class=OraBGAccentDark><img src="/OA_MEDIA/jtfutrpx.gif" height="1" width="1"></td>
      </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
      <tr>
    <% if (errorMessage != null) { %>
          <span class="errorMessage" colspan="2"><%= errorMessage %></span>
          <% } %>
        </tr>
    </table>
    <BR>
    <table width="100%" border="0" cellspacing="0" cellpadding="2">
    <FORM name = "mainForm" method="post" action="<%= DisplayManager.getTemplate("STORE_CUST_ACC_LOGIN_AUTH").getFileName() %>">
    <input type ="hidden" name="event" value="">
      <tr>
      <td colspan="2">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td class="sectionHeader1"><%= mm.getMessage("IBE_PRMT_RET_USER_G") %>
        </td>
        </tr>
        <tr>
        <td class=OraBGAccentDark><img src="/OA_MEDIA/jtfutrpx.gif" height="1" width="1"></td>
        </tr>
      </table>
      </td>
      </tr>
      <tr>
      <td nowrap  ><img src=../OA_MEDIA/jtfutrpx.gif height="5" width="1"></td>
      <td nowrap class="sectionHeaderBlack"><img src="/OA_MEDIA/jtfutrpx.gif" height="5" width="1"></td>
      </tr>
      <tr>
      <td nowrap class="requiredFieldPrompt" align="right" width="30%"><%= mm.getMessage("IBE_PRMT_USERNAME_COL") %></td>
      <td nowrap width="70%">
        <input type="text" name="username" size="20" VALUE="<%=username%>">
      </td>
      </tr>
      <tr>
      <td nowrap class="requiredFieldPrompt" align="right"><%= mm.getMessage("IBE_PRMT_PWD_COL") %></td>
      <td nowrap >
      <input type="password" name="password" size="20">
      </td>
      </tr>
      <%
        out.println(RequestCtx.getSessionInfoAsHiddenParam());
        if (! "".equals(ref))
           out.println("<INPUT TYPE=HIDDEN NAME=ref VALUE=\"" + ref + "\">");
        %>
      <tr>
      <td align="right"> </td>
      <td nowrap >
                  <script language="JavaScript">
                  buttonGen("<%=mm.getMessage("IBE","IBE_PRMT_SIGN_IN_G" )%>", "javascript:submitForm('', 'mainForm')");
          </script>
          </td>
      </tr>
    </FORM>
    <tr><td></td><td class=footnote>
      <%
       if (request.getParameter("reauth") != null)
         out.println(mm.getMessage("IBE_PRMT_REAUTH"));
       else {
        try
          String custMsgKey = "IBE_PRMT_LOGIN_CSTM_MSG1";
          String custMsg    = DisplayManager.getTextMedia(custMsgKey);
          out.println(custMsg);
        }//end try
        catch (MediaException e)
         //do nothing
        }//end else
      %>
      </td></tr>
       <%
        boolean isMaintenanceMode = IBEUtil.isMaintenanceMode();
        if (! isMaintenanceMode) {
          String htmlPage = RequestCtx.getURL(
            DisplayManager.getTemplate("STORE_CUST_ACC_PWD_RESET").getFileName());
      %>
      <tr>
      <td   align="right">  </td>
      <td class="promptSmall"> <a href="<%= htmlPage %>"><%= mm.getMessage("IBE_PWD_FORGET") %>
            </a> </td>
      </tr>
      <%
      %>
              <!--<tr>
                <td align="right" nowrap class="sectionHeader1"> New user, please
                  register</td>
                <td >
                  <hr>
                </td>
              </tr>-->
      <!-- registration links start ------------------------------------------------>
       <%
        if (! isMaintenanceMode) {
       %>
      <tr>
      <td colspan="2">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td class="sectionHeader1"><%= mm.getMessage("IBE_PRMT_NEW_USER_G") %></td>
        </tr>
        <tr>
        <td class=OraBGAccentDark><img src=../OA_MEDIA/jtfutrpx.gif height="1" width="1"></td>
        </tr>
      </table>  </td>
      </tr>
      <%
      if (IBEUtil.useFeature("IBE_USE_B2B_FEATURES")) {
        String url = null;
        if ("".equals(ref))
          url = DisplayManager.getURL("STORE_CUST_BUSINESS_REGISTRATION");
        else
          url = DisplayManager.getURL("STORE_CUST_BUSINESS_REGISTRATION",
                                    "ref=" +
                                    oracle.apps.jtf.util.Utils.encode(ref));
      %>
      <tr>
      <td nowrap > </td>
      <td nowrap class="sectionHeaderBlack"><a href="<%=url%>"><b><%= mm.getMessage("IBE_PRMT_BIZ_ORG") %></a></td>
      </tr>
      <tr>
      <td nowrap > </td>
      <td nowrap class="prompt"><%= mm.getMessage("IBE_PRMT_BIZ_REG_MSG") %></td>
      </tr>
      <tr>
      <td nowrap  ><img src=../OA_MEDIA/jtfutrpx.gif height="5" width="1"></td>
      <td nowrap class="sectionHeaderBlack"><img src="/OA_MEDIA/jtfutrpx.gif" height="5" width="1"></td>
      </tr>
      <%
      if (IBEUtil.useFeature("IBE_USE_B2C_FEATURES")) {
        String url = null;
        if ("".equals(ref))
          url = DisplayManager.getURL("STORE_CUST_SIGNIN");
        else
          url = DisplayManager.getURL("STORE_CUST_SIGNIN",
                                    "ref=" +
                                    oracle.apps.jtf.util.Utils.encode(ref));
      %>
      <tr>
      <td nowrap  > </td>
      <td nowrap class="sectionHeaderBlack"><a href="<%=url%>"><b><%= mm.getMessage("IBE_PRMT_IND_CON") %>
                  </a></td>
      </tr>
      <tr>
      <td nowrap class="prompt" > </td>
      <td nowrap class="prompt"><%= mm.getMessage("IBE_PRMT_IND_REG_MSG") %></td>
      </tr>
    <%
      } // isMaintenanceMode
      %>
    </table>
    <table align="center" cellspacing=0 cellpadding=0 width="100%" border=0>
      <tr>
      <td><img height=14 src="../OA_MEDIA/jtfutrpx.gif" width=1></td>
      <td rowspan=2><img height=15 src="/OA_MEDIA/jtfuski.gif" width=12
          align=bottom></td>
      </tr>
      <tr>
      <td class=OraBGAccentDark width="100%"><img height=1
          src="/OA_MEDIA/jtfutrpx.gif" width=1></td>
      </tr>
      </table>
        </TD>
        <TD valign="top" width="15%"> <BR>
        </TD>
    </TR>
    </TABLE>
    <!-- registration links end -------------------------------------------------->
    <%@include file="ibeCZzdBottom.jsp" %>

  • I need to get into contact with Adobe support on renewal of my CC subscription which does not work but I cannot find any PHONE number just the referral to this forum - help, what should I do?? Thanks!!

    I need to get into contact with Adobe support on renewal of my CC subscription which does not work but I cannot find any PHONE number just the referral to this forum - help, what should I do?? Thanks!!

    Use the web chat:
    Contact Customer Care
    Mylenium

  • Link to Bug Report Forum on Forum help page is dangling...

    The link Bug Reporting Forum (http://social.answers.microsoft.com/forums/en-us/reportabug/threads/) on page
    Answers >
    Forums Home
    > Help (http://social.answers.microsoft.com/Forums/en-US/help) is dangling. Makes it a bit more complicated than necessary to find this forum...
    Cheers, Michael

    Hello Brent,
    unluckily I think you misunderstood Michael original point.
    Because some time passed, I too would like to report same issue again but let me explain and guide you (or others) how I too reached same sentence.
    As of now even from your own 'Forums preferences' profile page you should be able to find on right side a
    'Help' URL that leading to an intermediate page stating :
    "The Frequently Asked Questions has Moved
    The Forums help file has been moved to the
    Community Wiki. Please update any bookmarks you may have."
    Now a part from correcting that 'Help' URL once you or anyone reach 'Forums
    Help (FAQ) - TechNet Articles - United States (English) - TechNet Wiki' you can find 'How
    do I report issues with the Forums?' question, and then there's this other sentence :
    "How do I report issues with the Forums?
    You can report bugs, suggestions, and other issues for Forums, by performing one of the following actions:
    Bug: If the issue seems like a bug in the forums code, go to the Bug Reporting Forum and report the bug
    by using the template provided in the top forum thread.
    But once anyone reach that Forum, now called 'Forums Issues (not product support)' there's no real forum bug reporting template in the top forum threads (as of now I only found 'Verify Your Account 15' and 'How to report
    spam') and also to find this post thread I really had to search for "report a bug".
    Regards
    Rob

  • JSP and Servlet - help please

    Hello,
    I am making this feedback for fun and a bit of learning too. I have an INDEX.JSP page, where the user selects the very first option. Depending upon the selected option he is moved another page PRODUCTFEEDBACK.JSP (so far I have completed this). Here as usual there are many fields to be filled in. As a spams protection i have done this;
    I have a AdditionClass, which is a seperate class where two number are generated at random. This numbers are called by PRODUCTFEEDBACK.JSP. The user is then asked to perform the addition. The completed form is then sent to ProductFeedback servlet.
    When I compile my PRODUCTFEEDBACK.JSP I get this error. Can you please tell whats wrong?
    PRODUCTFEEDBACK.JSP
          *<td>Please help us to prevent Spams by performing this simple mathematical Calculation. We appreciate your effort </td>*
        *</tr>*
      *</table>*
      *<jsp:useBean id = "AddTest" class = "go.AdditionClass" />*
      *<table width="53%"  border="0" align="center">*
        *<tr>*
          *<td><div align="center">*
      *<input name="textfield8" type="text" size="3" value ="<jsp:getProperty name="AddTest" property = "randNum1" />">*
    *  + * 
      *<input name="textfield9" type="text" size="3" value="<jsp:getProperty name="AddTest" property = "randNum2" />">*
    *  = *
    *<input name="_total" type="text" size="5">*
          </div></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
      </table>
      <br>
      <table width="37%" height="23"  border="0" align="center">
        <tr>
          <td width="33%"> </td>
          <td width="67%"><input type="submit" name="Submit" value="Click here to send us this form"></td>
    AdditionalClass.java
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package go;
    import java.util.Random;
    * @author MAC
    public class AdditionClass {
        Random generator = new Random();
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void SetNum1(){
            randNum1 = generator.nextInt(10); // Generate First Random Number
        public int getNum1(){
            return randNum1; //Return First Random Number
        public void SetNum2(){
            randNum2 = generator.nextInt(10); // Generate Second Random Number
        public int getNum2(){
            return randNum2; // Return Second Random Number
        // send the Random Numbers to ProductFeedback class
        public void productFeedbackRandNum1(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(randNum1);
        public void productFeedbackRandomNum2(){
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(randNum1);
    }Erros that I am getting:
    org.apache.jasper.JasperException: Cannot find any information on property 'randNum1' in a bean of type 'go.AdditionClass'
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:462: The following error occurred while executing this line:
    C:\Documents and Settings\MAC\My Documents\NetBeansProjects\FeedBack\nbproject\build-impl.xml:440: Java returned: 1
    BUILD FAILED (total time: 1 second)

    Thank you for replying. I modified my Bean class then what is posted above, so thought to repost the code again and seek help. There seems to be no error now but it just dont generate any random numbers, All i get very time is 0. I am wondering, is my code generating 0 as random number, every time :-)
    package go;
    import java.util.Random;
    public class AdditionBean {
        int randNum1; // First Random Number
        int randNum2; // Second Random Number
        public void generateRandomNum1(){
            Random generator = new Random();
            int num1 = generator.nextInt(10);
            SetRandNum1(num1);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber1(num1);
        } // End of generaeRandomNum1
        public void generateRandomNum2(){
            Random generator = new Random();
            generator = new Random();
            int num2 = generator.nextInt(10);
            SetRandNum2(num2);
            // Send num1 value to ProductFeedback.java
            ProductFeedback productfeedback = new ProductFeedback();
            productfeedback.randomNumber2(num2);
        } // End of generateRandomNum2
        public void SetRandNum1(int num1){
            randNum1 = num1;
        public int getRandNum1(){
            return randNum1; //Return First Random Number
        public void SetRandNum2(int num2){
            randNum2 = num2;
        public int getRandNum2(){
            return randNum2; // Return Second Random Number
    }// End of classThank you,

  • Servlet Jsp Login Problen

    Consider 4 pages
    default.jsp          -          Default page     -     Provides link to update.jsp
    Update.jsp          -          Update Page          -     User came through default page
    login.jsp          -          Displays html      -     Two Input tags user & pass
    check Servlet     -          Authentication     -     Validates userid & pwd from database
    what I want to do ?
    1     User clicks on update link on default page
    2     update checks for session as
              String user = (String) session.getAttribute("user");
              if( user == null )                    
                   response.sendRedirect("/login.jsp");
    3     Now login.jsp displays the HTML form with action = /servlet/check          
    4     check servlet revceives values user & pass from HTML response & validates through
         database
    5     Now if validation succedes it must redirect to the actual page that user had
         requested for ultimately i.e update.jsp
    6 HOW MANY WAYS I CAN DO THIS
    7      Problem becomes more serious when along with login & check other intermediate
         servlets are also there.
    8     The final problem is
         1     Update.jsp receives request data from some HTML form but checks for user
              from session object.
         2     If found null redirect to login page
         3     The above prob. now repeats but the point is after authentication
              the check servlet not only redirects to the actual requested page but
              also supplies the data that update.jsp has received
    Please reply soon

    Thanx Sir!
    But i want to have a more generic solution
    like using <jsp:fordward> & <jsp:param> etc
    but i want it so generic that it can be done in ASP/ JSP
    preferably without using queryString
    And the main point is this problen
    request.setAttribute() is not working
    I am uploading the code
    CODE:
    default.jsp     Update
    update.jsp     String user = (String) session.getAttribute("user");
              if( user == null )     {
                   String look_for = request.getRequestURI();
                   request.setAttribute("look_for",look_for);
                   response.sendRedirect("/login.jsp");
    login.jsp     String req = null;
              req = (String)request.getAttribute("req");
              //out.print(req); --> Error Printing null
              request.setAttribute("req", req);
              <form----
              >
              response.sendRidirect("/servlet/check");
    check     
         String user = null;
    String look_for = (String)request.getAttribute("req");
    if(look_for == null)     {
              request.setAttribute("req", look_for);
         response.sendRedirect(request.getHeader("HTTP_REFERER"));
    if(user != "Hemant") {
    request.setAttribute("req",look_for);
    response.sendRedirect("/login.jsp");
    HttpSession session = request.getSession();
    session.setAttribute("user","Hemant");
    response.sendRedirect(look_for);
    out.close();     

  • Jsp Login Form

    Hi All,
    I am new to JSP. Please send me a JSP Login Form Validatio with DB.
    Regards,
    Gokul.

    Validation.jsp whats the error in that
    <%@ page language="java" import="java.sql.*,java.io.*,java.lang.*,java.util.*,com.login.users.*" %>
    <jsp:useBean id="user" class="com.login.users.Users" />
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html>
    <head>
    <% Connection cc = user.connect();
    String username = request.getParameter("j_username");
    String password = request.getParameter("j_password");
    ResultSet rs = user.validateUser(cc);
    %>
    </head>
    <body>
    <%
    while(rs.next()){
    String u1 = rs.getString("name");
    String p1 = rs.getString("Password");
    if (u1.equals(username) && (p1.equals(password))){
    break;
    %>
    <jsp:forward page="err.html" />
    <%}
    out.println("You Are a Valid User");
    user.disconnect();
    %>
    </body>
    </html>
    my mail id is [email protected]

  • JSP Login Page is slow in 11.5.10.2

    Hi,
    JSP Login Page is slow in 11.5.10.2 . But If we login through form login (dev60cgi/f60cgi).
    Forms are working fine, No issue from the DB Side.
    We have bounce the Apache and clear the cache as well , but no luck.
    Pls give us some pointer on this.
    Regards,

    Hi,
    It is a clone Instance..Did you review the log files?
    I have one doubt.. If we have lacs record in WF_NOTIFICATION..will the performace get impact bcz of this.It may have an impact on the performance, but I believe it should not affect the main login page.
    Regards,
    Hussein

  • Precompiled JSP. Need HELP

    I need to know how to pecompile jsp, and where to put the result?
    Do I need any jsp blank plug?
    Where to put classes generated from jsp?
    Could you point me to some simple tutorial about it

    hi all
    im new to java technlogy ,i retrived data from
    oracle database inside a html table ,but i want this
    data to be as links to another pages .for example .
    i have
    a
    b
    c
    rived from database in a table .now i want this as
    links ,which on click should navigate to another
    page.
    how should i do with jsp/java please help me
    with sample code
    hank uInstead of making the HTML look like:
        <td>a</td>
        <td>b</td>
        <td>c</td>Make it look like
        <td><a href="linkfora">a</a></td>
        <td><a href="linkforb">b</a></td>
        <td><a href="linkforc">c</a></td>

  • My computer was trying to connect to my Bluetooth mouse but I accidentally hit cancel so now my computer won't connect to my mouse. I turned my computer off. When I turned it back on it still won't connect and I can't login! Help!

    NEED URGENT HELP!
    My computer was trying to connect to my Bluetooth mouse but I accidentally hit cancel so now my computer won't connect to my mouse. I turned my computer off. When I turned it back on it still won't connect and I can't login! Help!

    Reset the SMC.
    Barry

  • Customized JSP Login

    I am trying to write a customized JSP login portlet. Where do I
    get site2pstoretoken and subscribername values from? I have
    looked at some examples, but they were all PL/SQL, and both
    site2pstoretoken and subscribername were input args to the
    procedure.
    Thanks,
    Gary

    Hi
    I need to have Customized login page
    Can you please tell me d path i.e where should i copy d Customized login page(JSP)
    Please its urgent.................

  • NEWBIE - creating a simple JSP login page

    Hi guys,
    I am really really stuck, and I would be so grateful if you guys could help me in any way. I am creating a simple application, but as part of the application i have to create a login / logout sub-application. It needs to verify the username and password by looking up a database in mySQL. I've had a look around on the internet to see if there is any simple way of doing it, but i can't understand most of it. I'm really new to JSP and only know how to do simple statement like <c:choose> and stuff like that. If anyone can help me in any way to create as simple a login / logout application that verifies the username and password from a database, I would be ever so grateful, thank you!
    Just to let you know, the security-roles and all that stuff together with the <tomcat-users> stuff has already been set up.
    I found this code by the author brain.compression, which seems to very useful, I've not tried it out yet, but was wondering, if somebody could help me split the code up into the separate JSP pages i will need, as I am not too sure which bits of the code need to go on what pages.
    Thank you to anyone that can help me out and thanks for brain.compression for providing this code. I'm sorry for posting this in a forum not related to JSP, its just that I am a complete newbie to JSP and nobody in that forum is helping me.
    brain.compression's code starts here...
    First for the page you are requesting you would need a verify if the user is logged in or not:
    <c:if test="${existingUser==null}">
    <jsp:forward page="login.jsp">
    <jsp:param name="origURL" value="${pageContext.request.requestURL}"/>
    <jsp:param name="errorMsg" value="Please log in first" />
    </jsp:forward>
    </c:if>
    This will redirect you to the login page:
    <font color="red">
    ${fn:escapeXml(param.errorMsg)}
    </p>
    </font>
    <form method="post" action="authenticate.jsp">
    <table>
    <tr>
    <td>Please Enter the following information to log in:</td>
    </tr>
    </table>
    <table>
    <tr>
    <td>User ID:</td>
    <td><input name="userid" value="${fn:escapeXml(cookie.userid.value)}"></td>
    </tr>
    <tr>
    <td>Password:</td>
    <td><input type="password" name="password" value="${fn:escapeXml(cookie.password.value)}"></td>
    </tr>
    </table>
    After that you have to verify with your DB if the login info provided is correct:
    %-- Removing any scoped variables --%>
    <c:remove var="existingUser" />
    <c:if test ="${empty param.userid || empty param.password}" >
    <c:redirect url="login.jsp">
    <c:param name="errorMsg" value="Please enter a User Id and Password." />
    </c:redirect>
    </c:if>
    <%-- Checking if User Id and Password are valid --%>
    <sql:query var="anyvariable" dataSource="${data}">
    SELECT * FROM table WHERE user_id = ? AND pass = ?
    <sql:param value="${param.userid}"/>
    <sql:param value="${param.password}"/>
    </sql:query>
    <c:if test="${anyvariable.rowCount == 0}">
    <c:redirect url="login.jsp">
    <c:param name="errorMsg" value="Invalid User Id or Password"/>
    </c:redirect>
    </c:if>
    Also can somebody tell me if i am right. Do I need to create a page called login.jsp to put the actual form on, and a page called authenticate.jsp to verify the username and password are correct? Finally i see that brain.compression has used a variable called existingUser but has he actually declared it anywhere. Thanks again for anybody that can help me out!

    i am still a jsp noobie but i have done some applications using html javascript php asp and other languages. What you want to do is take the data from the login form then compare that to the db see if it actually exist and has the correct info. From there you want to write a cookie to the users computer to hold the username and password, which will be checked for at the begining of every page verifying it in the database. This is how i have done password verification in the past and it works fairly well and unless your server gets hacked your pages should be secure.

  • Unexpected Error on login, PLEASE HELP!

    PLEASE HELP!!
    Everytime I try to login to Muse since Beta 7 I get this screen:
    I have already submitted a report and emailed support but I have gotten no answer.
    How can I fix this? I have allowed Muse through my firewall but that doesnt make any difference.

    Pleae try disabling your firewall as suggested here: http://forums.adobe.com/thread/987242

  • Windows 8.1 crashing before login. Help needed.

    I just installed Boot Camp from a Windows 8.1 .iso on a USB drive. I ran all Windows updates, installed AVG free and Google Chrome. Nothing else. Everything was running smoothly during all the restarts and updates. Now, when I reboot from OS X and hold option, I select Windows. The Windows spinning dots start happening, and then it crashes, restarting the machine. Sometimes, it will get all the way to the login screen. If, however, I'm in OS X and shut down the computer, wait a few seconds, hold option, and select Windows, Windows boots up fine. It's a workaround, but before I install everything else (Steam library, Minecraft files, etc.) and use Winclone to back it up, I want rather have it working as it should. 
    Things I've tried:
    1) Starting from scratch: removing the Boot Camp partition and doing a fresh install of everything.
    2) Running CHKDSK from within Windows; everything seems okay.
    3) Reinstalling Boot Camp Utility from within Windows. No change. 
    4) Frowning, grunting, and swearing. 
    It's a mid-2014 MBPr, 2.8 Ghz Intel Core i7 with 16 GB of Ram, a 1 TB hd, and the NVIDIA GeForce GT 750M (2 GB of video RAM), if that helps. 
    I've read more forums and articles than I can count, and the only thing I found was the suggestion to shut it down and reboot that way. Any ideas from folks who know more than I do? Thanks in advance!

    We do need the actual DMP file as it contains the only record of the sequence of events leading up to the crash, what drivers were loaded, and what was responsible.  
    We prefer at least 2 DMP files to spot trends and confirm the cause.
    Please follow our instructions for finding and uploading the files we need to help you fix your computer. They can be found here
    If you have any questions about the procedure please ask
    Wanikiya and Dyami--Team Zigzag

Maybe you are looking for

  • How can I set a default for webpages to expand to full screen?

    How can I set a default for webpages to expand to full screen? Every webpage I go to does not expand to a full screen which causes me to have to ctrl+++ each time. How can I set my preference to expand to full screen automatically? Thanks.

  • How do i run a java program an another directory?

    How do I run a java program that's in a different directory? I have been doing this in the command line: java "C:\Document and Settings\freeOn\Desktop\Java\Test\test" and I get Exception in thread "main" java.lang.NoClassDefFoundError: C:\Document an

  • IE6 and HttpSession

    My JSP's/Servlets use simple HttpSession objects that expire when the browser is closed. It is my understanding that if a browser has cookies disabled that URL rewriting is used. I've been testing in IE6 and when cookies are restricted all my session

  • Why can't I transfer music from my iphone to itunes on a new computer

    I just installed itunes on a new computer but it will not let me transfer the songs on my iphone. I have already authorized the computer but it keeps asking me to do so. Thanks

  • Download request results with message to get netframework plug in

    I've been unsuccessful in finding a correct net framework from windows so I can download files again...this all started after my computer crashed and someone had to wipe it clean