There are two designation named admin and student. I just need to work in coding to open specific page by email of person like done in facebook or any other mail account.
well one thing I have done is that I have matched email,password and type(designation) in my servlet page to database and the program run and also open the page.If email,pass,type matched witn admin than admin.jsp opens up else student.jsp.But but I wants to open the specific pafe by email that shows the profile of logged in user like in facebook it opens.
I want to send user back to the Login page after idle time of 10 secs. If user clicks again on screen before 10 secs are over, time will automatically reset to new 10 sec and so on...
I want to implement a 'Keep me signed in' option in the login page of an application. I have noticed this option is present in the form of a checkbox on the login page of many websites but i don't know how it can be coded . When selected, a user is no longer asked for his username and password on subsequent sessions but he is automatically given access.
Today downloaded eclipse and for the database i installed MSSQL 2008 R2. I want to make a webpage where i started with the login credentials, how to make a webpage for the login credentials?
I need two boxes
ID: Password: [Submit Button]
how to make a webpage and how can i run locally should i install IIS?
I have created a jsp page named Login.jsp, here's the followings code:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <link type="text/css" rel="stylesheet" href="inc/style.css" >
[Code] ....
Is that the structure of my page is correct? I create a new folder below WebContent in my project, named "authentication" and i placed below home.jsp. This page will display, if the login and password is correct.
I have write a SSO class for Single Sign on But i am getting one issue i am using JSF2 for my web application...here is my SSO class :
public class ApplicationSSO implements SSO { public String authenticateUser(RequestContext request) { UmUsersList user = (UmUsersList) request.getSessionContext().getAttribute("USER"); return user.getUmulEmailId(); }
[Code] .....
As you can see i have write below line
JSFUtils.redirectPage("../login/Login.xhtml");
It mean if User null it will redirect to Login page but it is not working. How to solve the issue i am end up with
An error has occurred.
For detailed error information, please see the HTML source code, and contact the forum Administrator.
Error while executing SSO actions: java.lang.NullPointerException
Below is my java coding that i have done, but how to save the password after key in the user id and the password. And I also need the system able to unsave the password if the user choose to unsave it .
import java.util.Scanner; public class Home { private static Scanner sc; public Scanner readPass; static String savedName=""; static String savedPass=""; public static void main (String []args)
I am trying to have a program go on one of the stock trading websites and read the number a stock or currency is at and display or save it. I have it reading and displaying the binary code but I don't see how to have it find the numbers I would like to get.
On the site you would have to go on the page and click some tabs to trade and maybe the stock you would like, it doesn't really matter what one it returns as this is more just an idea. Although I would like to have it search out a selected stock eventually to take it to the net level. I think my biggest problem is I can't see how to access the stock numbers in the code. I looked for different click events but don't see how to have a program do this.
I do not intend to have it display all the code like it is now. I just did it like that to see what I was getting. I will just have a small toolbar with options and a display.
import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; public class StockTracker { public static void main(String[] args) {
I have a secured Struts application in WebSphere that uses FORM j_security_check for authentication.There is also a Post Logon "filter" defined which runs some code after a login is processed.The extract from web.xml showing the login configuration and filter is as follows:
If a user isn't logged into the application and they try to access one of the secured servlets, for example quotes.do, they are directed to the login page to enter their information.If they login successfully, they are then directed to quotes.do, rather than the default "welcome" page. Is there a setting in the web.xml or the post logon filter where I can force j_security_check to ALWAYS go to the default welcome page after a successful login?
i am beginner in java and i am making an application in which i want to display menu for 3 different types of users. like when we login i want to check which type of user is this and which menu to show them. for ex. if there is a employee the menu bar has a dropdown which shows activities like fill nomination, see details etc. if it privileged user he is shown a diff menu and if its the admin the dropdown shows some different activities. i want to make it through simple jsp and servlet. i have a table in data base which has types of user predefined with an id how to display that menu according to a specific user.
I am currently working on a project where I have a dataTable, containing some of the information for a specific database table, with commandLinks at the side which I need to bring me to a new page(another jsf file that I have to display the relevant information there) and display only the row of data selected. I've been racking my brain about this and have been unable to figure out a way to do it.
After confirmation to the login details I added new cookie having logging information and then dispatched this request to controller servlet where this cookie is checked if it is present then user is forwarded to a particular page. Otherwise is redirected to the sign in page. Now the problem is when we add cookies then it is added into "response" object and when we get cookies we get them from "request" object. So for the first time redirection to controller servlet "response" object would not have this cookie as it is not available in "request" object. But will be available for later requests.
My question is what is the way to get this cookie in the first request. Or is there any way to send refresh like response to the browser so that this cookie is added??
I'm trying to design a website that will require users to register and login before they use it. In order to keep things separate, I was thinking it might be useful to create a single web archive that just handles the user signup and login. That way I could work on my other web archive apps independently and have them just check to see if the user has logged in and posted a token somewhere, and if not redirect to the login webpage.
i have a problem with navigating from a link in a primefaces tree menu to a specific page. The explanation is the following: I have a template with the following code :
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
[code]....
i had to put a "*" in the from-view-id tag to be able to navigate to the pages specified with the navigation cases. If i put /templates/leftMenu.xhtml insted of * then the navigation doesn't work and i get the error "WARNING: JSF1064: Unable to find or serve resource, /deleteDepartment-page.xhtml."
In My application I want to implement functionality to let user login from only one system at a time. I am searching for something that can Identify the system uniquely (Like IP address or Mac address ). I am using servlet and I don't know how to access Mac in servelt
I'm trying to learn java by making a login page using java, servlet, javascript, html and mysql. I can login with username and password, I can get all the information from database in the edit page. However, when I edit and click on "Submit" in EditPage.jsp, it gives HTTP Status 404. Same screen appears when I click on "Sign Up" from first page (NewFile.jsp) and click on "Submit" button after filling up user information.
I am posting all my code here but probably important ones are:
EditPage.jsp, Edit.java, EditDetails.java, UpdateUser.java and for Sign Up SignUpPage.jsp and Registration.java.
Firstly here are my error message and ss from my project explorer:
I'm a new Java user and I'm trying to code a simple login page. In first page (NewFile.jsp) users should enter their username and password and should click on "login", or click on "sign up".
1.) If user enters his username and password correctly, a login page (LoginPage.jsp) appears and says "welcome null" but it should show the name of that user instead of null.
2.) In that login page there is an edit button to edit profile information. When I clicked on it, every information is "null" and when I edit them and click on "Submit" button;
HTTP Status 404 - type Status report message description The requested resource () is not available. GlassFish Server Open Source Edition 3.1.2
that message appears.
3.) If I click on "Sign Up" button at the beginning, a registration jsp (SignUpPage.jsp) appears. After filling up text boxes and clicking on "Submit", same Status 404 screen appears.
I created a mysql database called "loginpage" using xampp. In that database there is a table called "users" and it has un, pass, name, surname, email and degree attributes.
I have configured form based JAAS in my app. Basically, in web.xml I have declared security constraints on certain jsp page, declared specific roles, login and error pages. So, my login form is: