JSP: Login Authentication
Hi All,
I am trying with my below JSP code to validate the username and password which enter from my page by verifying with the username and password in Microsoft Access database.
I never get any error alert with that code, but i also get blank on my page instead.
The code are below:
<html>
<head>
<title>Welcome to the online Auction...</title></head>
<body>
<%@ page language ="java" import = "java.io.*" import = "java.lang.*" import = "java.sql.*" %>
<% try
String strUsername = request.getParameter("username");
String strPassword = request.getParameter("password");
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
Statement myStatement = myConn.createStatement ();
String strSQL = "SELECT [UserName], [Password] FROM tblUserDetails";
ResultSet myResult = myStatement.executeQuery(strSQL);
String strUser = myResult.getString("UserName");
String strPass = myResult.getString("Password");
while(myResult.next())
if(strUsername.equals(strUser) && strPassword.equals(strPass))
out.println("Login Successful!");
else
out.println("Login Fail!");
myConn.close();
catch(Exception e){}
%>
</body>
</html>Could you please advise what is the problems?
Kimsan
Also make sure that your database actually contains any users. Otherwise your little "while(result.next())" loop will never run.
In fact, the way you have written the code is not too smart. Your SQL selects all users and iterates them. As the number of users grow, the time to iterate all the users increase. Instead your SQL should just see if there is a record with the given user name and password. The code would be better like this:
<% try
String strUsername = request.getParameter("username");
String strPassword = request.getParameter("password");
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
String strSQL = "SELECT [UserName], [Password] FROM
tblUserDetails where [UserName] = ? and [Password] = ?";
PreparedStatement statment = myConn.prepareStatement(strSQL);
statement.setString(1, strUserName);
statement.setString(2, strPassword);
ResultSet myResult = statementexecuteQuery(strSQL);
if(myResult.next()){
out.println("Login Succesful! A record with the given user name and password exists");
} else {
out.println("Login Failed. No records exists with the given user name and password");
result.close();
statement.close();
myConn.close();
} catch(Exception e){
out.println(e);
%>
Similar Messages
-
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 soonThanx 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(); -
How to set up local server to use a remote server for login authentication?
Thank you in advance for any help you can offer.
We are trying to set up a "sub-network" (dont' know if this is the right terminology) using a 10.4 Server OS, to manage a set of clients... the trick is that the client login/home directory information is on a different remote server, and shall remain there, for the most part.
To make it easy to understand here's the environment:
*Local Server:* 10.4 G4 Server Quicksilver 1G dual--we have total control of this one
*Main/remote server:* 10.5 Xserve.. don't know which vintage--we have very very very little input on this machine.. effectively at the mercy of the sysadmin of this system who is very conservative in changing anything (hence the need for a separate server to install applications and client machine-specific profiles, etc since the Xserve admin refuses do it). This serves MacBooks/MacBookPros and few iMacs. (no Windows PC.. as that group of comptuers have their own server)
client: ~20 eMacs/iBooks all running 10.4.
use environment: elementary school-->very low network demand (no e-mail, just running local apps linking to server(s) for licensing and login, and some file saving small files on remote server, user preferences, etc).
The remote server (the Xserve) has all the login authentication, as well as the home directories. every school year, the directories get updated as new students enroll and old students graduate. Currently all the clients are directly linked to the Xserve via LDAP while we bring the local server on-line.
the local sever (our G4 Quicksilver) will have few network applications that will support the client machines. We also will be setting up computer accounts and groups for our clients so that we can properly set their environments (the Xserve admin will not do this on the Xserve, so currently all the clients are connecting to the server as a "guest computer" from what little I understand watching what was done)
now, what is the best way to approach this type of set up with minimal "inconvenience" of the Xserve admin?
I am pretty experienced with standalone UNIX and macOS X administration, but a novice to this whole Server and network setup thing. Any suggestions, instructions, pointers to URLs with how-tos is much appreciated. I am not afraid to use Terminal (grew up on UNIX before GUI), etc., and willing to try safe but unconventional setups if that is what's needed...
thanks for any help!Oh never mind.... I figured it out myself helps to read up on the manuals. d'oh. sorry for the bandwidth waste...
-
My current softward is: Mac OS X Lion 10.7.5 (11G63)
When I attempt to use the Filezilla connection wizard I get the following message:
Connecting to probe.filezilla-project.org
Response: 220 FZ router and firewall tester ready
USER FileZilla
Response: 331 Give any password.
PASS 3.7.1.1
Response: 230 logged on.
Checking for correct external IP address
Retrieving external IP address from http://ip.filezilla-project.org/ip.php
Checking for correct external IP address
IP 27.0.19.56 ch-a-bj-fg
Response: 200 OK
PREP 52470
Response: 200 Using port 52470, data token 1871898076
PORT 27,0,19,56,204,246
Response: 200 PORT command successful
LIST
Response: 150 opening data connection
Response: 503 Failure of data connection.
Server sent unexpected reply.
Connection closed
When I attempt to login Host/Username/Password myself I get the following message:
Status: Resolving address of amyhoney.com
Status: Connecting to 184.168.54.1:21...
Status: Connection established, waiting for welcome message...
Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Response: 220-You are user number 12 of 500 allowed.
Response: 220-Local time is now 04:05. Server port: 21.
Response: 220-This is a private system - No anonymous login
Response: 220 You will be disconnected after 3 minutes of inactivity.
Command: USER 5475****
Response: 331 User 5475**** OK. Password required
Command: PASS ********************
Response: 530 Login authentication failed
Error: Critical error
Error: Could not connect to server
Now before anyone points out the obvious: my username and password are correct. I've already gone through changing them so I know they are.
Additionally, I've pretty much tried EVERYTHING I've read online, from messing with "terminal" (and subsequently the FTP and STFP options) to changing the sharing options and turning on file sharing/remote management as well as just turning off my Firewall completely.
Now I've used Filezilla before when I first published my site and everything worked fine. My site is published through Wordpress so most of my editing was done through simply logging into my "wp-login." I recently changed the theme and in order to change the header image in that theme I have to do it through my "wp-content" folder, which means I need to use Filezilla. I feel like a complete moron right now considering I've had my site for about a year and can't even doing something this simple.
I've read that the newer version of Lion/Mountain Lion don't support automatice FTP anymore, which (as I mentioned prior) I attempted to fix through Terminal. However, nothing I do seem to do works.
Can someone walk me through fixing this? And I do mean 'walk me through'. I'm not a tech-savvy nerd who knows all the lingo, I just know the basics so sorry if my ignorance offends you.
HELP!!First be sure login and password are OK. Sometimes the address starts wit "http://..." and sometime starts with "ftp://...". Try both normal FTP access and Scure FTP access (SFTP). At the end, contact the site's provider.
-
How can I set up SSL login authentication on one domain for multiple domains
Our site currently runs in 22 countries with 22 different
country domains:
www.mysite.com
www.mysite.co.uk
www.mysite.fr
etc
We want to use SSL on our login pages but realise that the
cost of certification for every domain is expensive. One solution
would be to channel all login activity to a single domain, eg:
www.mysite.com/login.cfm?site=fr which would then redirect to
www.mysite.fr – this is how Google do it
But, currently we are using encrypted cookies for login
authentication so we would have the problem of having to transfer
the cookie info across domains securely. Is there any way of going
about this?
Any other suggestions would be great, too. We do plan to move
to session management for logins but this is a longer term project
so we are hoping to sort out the SSL prior to that.Can you not pass the values you need as URL parameters?
Encrypt them befor you send them and then decrypt them on the new
domain. Then add them to whatever place you need (cookie, session,
etc.)? -
Server does not support PLAIN or LOGIN authentication
I try to send mail via XI Mail adapter. My settings are below
Transport protocol : SMTP
Message protocol : XIPAYLOAD
url : smtp://10.44...
Authentication Method : Plain
User : ...
Password...
From :
To : ....
But i give this error "server does not support PLAIN or LOGIN authentication"..
I think I use SSL or something else, but I dont know how to do by using Mail adapter..
Or Why do i get this error ?
ThanksHello Tuncer,
In your case, you need to first enable SSL on your PI server, which requires some effort. Here are the links for SSL configuration for AS ABAP and AS Java:
http://help.sap.com/saphelp_nw70/helpdata/en/0d/a22640632cec01e10000000a155106/content.htm
http://help.sap.com/saphelp_nw70/helpdata/en/56/a12640632cec01e10000000a155106/content.htm
After that, you need to exchange client certificates between your PI and mail server so that the two systems will accept each other's logon tickets. Only after that you can use your mail adapter with SSL. All adapters that run on the adapter engine use Java AS's authentication mechanisms, so SSL should be enabled for your AS Java, you cannot enable it only for the mail adapter.
I recommend trying this scenario with another mail server that doesn't require SSL first with plain authentication. Then you can go for SSL, but you will probably need an experienced basis guy to help you for the configuration.
Hope this helps,
Regards / selamlar
Gökhan -
I have been updating my site over the last week, using Iweb SEO TOOL, but suddenly 2 days ago I can no longer update when i go to publish it says "invalid password "on Iweb Test. and on SEO Tool, Login Failed Login Authentication Failed, the password and all settings are correct.
I am 100% sure the all the setting are correct, as it has been working for the last 7 months and I have just been updating it, then suddenly it stopped, I have all the FTP settings wrote down, and even changed the passwords twice hoping that may work to no avail.Try the following:
delete the iWeb preference files, com.apple.iWeb.plist and com.apple.iWeb.plist.lockfile, that resides in your Home() /Library/Preferences folder.
go to your Home()/Library/Caches/com.apple.iWeb folder and delete its contents.
Click to view full size
launch iWeb and try again.
If that doesn't help continue with:
move the domain file from your Home/Library/Application Support/iWeb folder to the Desktop.
launch iWeb, create a new test site, save the new domain file and close iWeb.
go to the your Home/Library/Application Support/iWeb folder and delete the new domain file.
move your original domain file from the Desktop to the iWeb folder.
launch iWeb and try again. -
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" %> -
AAA TACACS for CM GUI login authentication?
Has anyone successfully implemented TACACS authentication TO the CM GUI? I have the CM configured for TACACS authentication to the WAE devices GUI and CLI - that works fine with the admin role assigned. It does not work for authentication to the CM GUI though. I can login to the CM GUI, but no data is displayed and the configuration pages are not available - (Your account does not have privileges to access any of the Central Manager pages.).
So, I've created a new role with all the services enabled and applied that instead of the admin role. The effect is the same. It works fine for the WAE devices GUI and the CLI but not for the CM GUI.
What am I missing? How can I get authentication login to work on the CM GUI AND the data displayed and configuration pages available?Hi David,
I have tried to understand your problem, but it's a bit confusing.
You have defined:
line con 0
login authentication cisco #cisco is list-name
According to command reference for 15.3: http://www.cisco.com/en/US/partner/docs/ios-xml/ios/security/d1/sec-cr-k1.html#GUID-297BDF33-4841-441C-83F3-4DA51C3C7284
"cisco" was the list name. What is the configuration of that list-name ?
(you put only default list-name from your configuration).
If you want to use line defined password you could do:
aaa authentication login line-list line
line con 0
password cisco
login authentication line-list
Regarding question about locally defined password. If you use list which uses "local" method and there is no specific local user - then your access will be always denied.
If you use list with "tacacs" and then "local" methods - then only when tacacs server is not responsive local username will be queried. But if tacacs server return "authentication failure/bad password" your access will be denied and "local" username will not be checked. This is a bit different then in linux/juniper configuration which will query next authentication method in case of password failure of previous method.
Please also remember that default AAA list is always overriden by specific list configured under line con 0.
Michal -
Popup Portal Login / Authentication
I am having problems finding good examples of how to enable a portal login authentication portlet in a popup window. The scenario, is that I will programatically change a web service to require portal role base security. When this occurs the next time this web service is accessed, it should reject that access or block and pop up the portal login window. When I sucessfully log on, then it should return the results and I can close that login window at my leisure. I do not want to keep the login portlet displayed in the main page of the portlet, it should not appear until it is needed. This is a really urgent request if anyone can help me with this. I really appreciate the help!
Anyone that is still looking at this, I have figured out how to do the popup in the pageflow. I have collected a username and password and placed it in my formbean. Now I need to get that username and password into the header of a web service using the OASIS ws-security standard spec. There is an example of placing the username and password token into the SOAP header in the weblogic examples, but it uses a java proxy class to call the web service itself. I am currently using a java control to call the web service. I would like to adapt the code in the example called WebServiceBClient.java under the /workshop/samplesApp/proxyClient/WSSE/token directory to be able to perform this action but call the web service from a control.
-
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] -
AAA login authentication methods
Hello guys,
I've noticed a strange behaviour with AAA authentication login.
My AAA configuration for login authentication is: aaa authentication login default group tacacs+ local
No tacacs server exists, but username and password in local database does. Indeed everything works fine when I log in: aaa authentication login default group tacacs+ local line none
The problem comes up when I add to the method list line and none authentication methods.
In this case, when I log into the switch (via console for example), and I'm asked for username, there is no validation of the username, I mean to say, I can put whatever username and been granted access.
Conclusion: According to my aaa authentication list, method line or none should not be used unless tacacs and local are not available. In this case, local method is available and should fail so login should be rejected, but it jumps to the next method, finally giving access.
Is this a bug in AAA? or am I misunderstanding something.
Thanks a lot.Only exec-timeout command, so it applies the default list defined by aaa.
When I remove the none, authentication fails. I've debugged AAA authentication and shows:
User Access Verification
Username:
Jul 5 18:16:48.329 METDST: AAA/BIND(00000035): Bind i/f
Jul 5 18:16:49.493 METDST: AAA/AUTHEN/LOGIN (00000035): Pick method list 'default' adsf
Jul 5 18:16:56.382 METDST: AAA/AUTHEN/LINE(00000035): FAIL - Line password not found
% Authentication failed
Username:
Local authentication method is being bypassed.
If I configure a password under line con 0, I've access regardless of the username, so no local authentication is being enforced as well.
Thanks. -
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 -
Login authentication using jbuilder 7 personal
can anyone show a sample application of login authentication using jdbc and interface jbuilder 7 personal.A program which authenticates data against entry in database and corresponding error/success messages.
Thanks.Hi: just to add on....
I'm using j_security_check to authenticate my system login and I'm facing a problem with the redirection after verifying the user credentials.
When the user enters a valid userid and correct password, the system hangs at j_security_check. The displayed URL is something like "/cst/LoginMainServlet/j_security_check". It fails to authenticate and re-direct to the AuthError.html page as defined as error page in the web.xml
May I know where the problem does lays and how I can resolve this? -
What is the difference between Login authentication using AAA and Login Local
Hello,
I am currently studying my CCNA and I am curious as to what is the difference between configuring the below 2 options, which seem to achieve the same outcome to me.
1).
Router(config)#username user1 password pass1
Router(config)#line vty 0 15
Router(config-line)login local
Or
2).
Router(config)#username user1 password pass1
Router(config)#aaa new-model
Router(config)#aaa authentication login LOCAL_AUTH local
Router(config)#line vty 0 15
Router(config-line)#login authentication LOCAL_AUTH
Thanks for your repliesWhen only looking at the authentication as you have configured it, you are right. Both do the same thing. But when you activate aaa new-model, you have plenty more options to control how your complete AAA is working. Most important, you can send the authentication to an external Authentication-server with RADIUS or TACACS+ or you can do Authorization where the external server controls what you are allowed to do after you have authenticated.
Don't stop after you've improved your network! Improve the world by lending money to the working poor:
http://www.kiva.org/invitedby/karsteni
Maybe you are looking for
-
Desktop manager problem with upgrade software
Hi There, When i connect to the desktop manager it says that my device should be updated with the new software but then it runs through the program then says that it does not need to. I have the Pearl 8120 and its running on version 4.5.0.174. is thi
-
Approval Management/ Workflow in Appraisals
Hi All I am implementing Approval Management in Appraisals functionality. Workflow process name is HR_APPRAISAL_DETAILS_JSP_PRC. Issue I am facing is in this workflow process it does not passivate any value. If I want to manipulate some field in it l
-
Creative cloud License problem / Camera raw problem / Linked ?
I have bought a CC 1 year licence. Quite every time I start Photoshop CS 6 it says that the CC trial period has expired (I installed CS6 premium from trial a few days before CC was activated) It ask to connect oline to activate - then it activate pr
-
Why since upgrading to ios7 does my iPhone 5 not allow me to play iTunes from the lock screen? It has the option to press play but nothing happens I have to access the iTunes app on my phone!
-
Assigning Cost Centers to Automatic postings
Hi, We have a situation where we want to make the 'cost center' field a required field, for all GL postings. However, If I just change the the config setting in the field status code, there are automatic postings from SD, MM etc. that may be blocked