15,884,298 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by mali_angel (Top 51 by date)
mali_angel
12-Sep-13 22:48pm
View
i m using java..can u tell me this in java?
mali_angel
11-Sep-13 3:28am
View
Thanx everybody it works!
mali_angel
4-Sep-13 7:12am
View
Deleted
Thank you..It works..! i update my question
mali_angel
2-Sep-13 0:08am
View
This is i get when i run this files with a true value.
Inside book dopost
Inside searchBook
b001
Inside bs.searchbook
Inside book search
Welcome
Connected
b001
true
true
Java Beginners
**true
mali_angel
29-Aug-13 23:44pm
View
I put That code into jsp page but did not work. the value of book name did not pass to the jsp. it always null. Theres a problem of passing b_title value fron DAO to service/business layer.. Can u tell where i went wrong?
mali_angel
9-Aug-13 5:19am
View
I have read these before.these are not meet with my requirements..i need to compare two tables data (both are dates). then need to create a graph according to after , within, before period. please help me to create this graph. anyway thank u for your help :)
mali_angel
5-Aug-13 23:23pm
View
can anyone tell me the java code for above scenario?
mali_angel
18-Jul-13 23:18pm
View
thank u all answers :)
mali_angel
18-Jul-13 23:18pm
View
thank you :)
mali_angel
18-Jul-13 5:37am
View
now i delete all builders. from the begining please guide me (if u can)
mali_angel
18-Jul-13 5:34am
View
Can you tell me step by step to set the variable and its values? i do not know the value but i set select Build Path -> Configure Build Path process.
mali_angel
18-Jul-13 3:35am
View
This error occurred after fix what u said before.
Errors occurred during the build.
Errors running builder 'Integrated External Tool Builder' on project 'BankDemo'.
The file does not exist for the external tool named Builder.
The file does not exist for the external tool named Builder.
mali_angel
18-Jul-13 3:30am
View
this links says "http://www.mulesoft.com/tomcat-60" "Windows users can either download the 32 or 64-bit binary distribution and install Tomcat manually..." but u said it can only for unix/linux..
mali_angel
18-Jul-13 3:25am
View
didn't work for me :(
mali_angel
18-Jul-13 1:35am
View
Do we need all three two develop and run a program?
mali_angel
18-Jul-13 0:59am
View
if u knew the answer you should post it. this will help to other members.
mali_angel
17-Jul-13 5:17am
View
Thank u guyz. :)
mali_angel
15-Jul-13 1:53am
View
Can You explain this.I'm new to ant and java...
mali_angel
14-Jul-13 9:07am
View
set the path except build.xml file.. how to run the project with xml file?
mali_angel
14-Jul-13 9:05am
View
I set the path JAVA_HOME n ANT_HOME. but I have to build build.xml file. you know how to use it for run this project(web java project)?
mali_angel
12-Jul-13 21:58pm
View
Deleted
set the path except build.xml file.. how to run the project with xml file?
mali_angel
11-Jul-13 5:36am
View
thank u :)
mali_angel
11-Jul-13 1:45am
View
In here I wanted to show index page and after that all requests should filter and process.
mali_angel
9-Jul-13 10:44am
View
thank u :)
mali_angel
9-Jul-13 10:43am
View
thank u all ...:)
mali_angel
9-Jul-13 4:12am
View
please give Your example.
mali_angel
9-Jul-13 3:06am
View
login2.jsp
<%@page import="com.mobitel.bankdemo.web.UserControllerServlet"%>
<%@ 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">
<title>Insert title here</title>
</head>
<body>
<form name="input" action="login" method="post">
Login
<br>
UserName: <input type="text" name="txtUname"><br>
Password: <input type="password" name="txtPwrd"><br>
<input type="submit" value="Login" önclick=
>
<input type="hidden" name="operation" value="login">
<p><%=request.getAttribute("loginMsg") %></p>
Register
</form>
</body>
</html>
mali_angel
9-Jul-13 2:37am
View
this is correct. but problem is there are different messages in different servlets which should display in the login.jsp page. for this scenario how to do that?
mali_angel
9-Jul-13 2:35am
View
this is too complex for a beginner like me :(
mali_angel
9-Jul-13 2:34am
View
Your both answers did not work for me. both displays 'null' before login. once user logged it displays correct message. i want to stop displaying 'null' word before display correct message.
mali_angel
9-Jul-13 2:00am
View
why URLEncoder.encode(message)); line's encode word cut by a line?
mali_angel
9-Jul-13 1:46am
View
message srings are in servlets.I want to do those messages show in jsp. in here out.println(""); these lines should not empty right? this line "<p><%=request.getAttribute("loginMsg") %></p>" is public for every servlet message.
mali_angel
9-Jul-13 0:44am
View
thank u all answers :)
mali_angel
9-Jul-13 0:43am
View
thank u :)
mali_angel
8-Jul-13 23:01pm
View
Can you explain step by step?
mali_angel
8-Jul-13 7:31am
View
Can u explain what you want to do..this is just the code.cannot understand to give an answer without your question/explanation..
mali_angel
8-Jul-13 6:45am
View
learn by yourself ...! :/
mali_angel
8-Jul-13 4:33am
View
How to read values from session?
mali_angel
8-Jul-13 3:34am
View
thank u..!
mali_angel
7-Jul-13 9:55am
View
thank u :)
mali_angel
7-Jul-13 0:42am
View
I have an another issue..in my project Login.jsp page login button connects to UserServlet.java file.but I took another file to keep session codes. I want to connect Login.jsp to Usersevlet.java file loginDetail method. Inside that method I need to Call Session file loginSession method. my question is how to do that?
mali_angel
5-Jul-13 7:27am
View
Do i have to do both operations? or only one?
mali_angel
5-Jul-13 3:10am
View
I Created This method to check login status. is this right? are there any mistakes? how do we check this code with different users?please tell me whether its correct or not. Thank you in advance
private void loginSession(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
HttpSession session = request.getSession(false);
try {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.println("<html><body>");
// If user is not in a session then he is not logged in
if (session == null) {
session = request.getSession();
String message = "You are not logged in!";
response.setContentType("text/html");
request.setAttribute("loginMsg", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Login.jsp");
rd.forward(request, response);
//current user
}else if(session.isNew()==true){
response.sendRedirect(response.encodeRedirectURL("Login.jsp"));
}
else if (!session.isNew()){
String message = "Thank you, you are already logged in...Here is the data in your session";
request.setAttribute("message", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Menu.jsp");
rd.forward(request, response);
//new user
}else if((String)session.getAttribute("username")==null){
String message = "Time out please login!";
request.setAttribute("loginMsg", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Login.jsp");
rd.forward(request, response);
}
} catch (Exception e) {
e.printStackTrace();
}
}
mali_angel
4-Jul-13 23:12pm
View
how to do flag? is this a flag?
session.setAttribute("username", Uname);
mali_angel
4-Jul-13 7:21am
View
thanx JasminHan309. im also a java learner. defenitly i ll share if i know anythng about this :)
mali_angel
4-Jul-13 5:18am
View
I cannot understand how to check this code. how do I know whether it is correct or not.
next time I don't want to login again to access the functionalities? So, I need to put a flag indicating the login status in the session object which span the life cycle of a specific time, e.g, 30 minutes. And the put a filter to query the flag every time a request comes to determine if the client has logged.
How am I going to do above things? here my another file of this project..
package com.mobitel.bankdemo.web;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Enumeration;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
* Servlet implementation class GetSession
*/
@WebServlet("/GetSession")
public class GetSession extends HttpServlet {
private static final long serialVersionUID = 1L;
public GetSession() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
HttpSession session = request.getSession(false);
try {
response.setContentType("text/html");
PrintWriter writer = response.getWriter();
writer.println("<html><body>");
// If user is not in a session then he is not logged in
if (session == null) {
String message = "You are not logged in!";
request.setAttribute("loginMsg", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Login.jsp");
rd.forward(request, response);
//current user
} else if (!session.isNew()){
String message = "Thank you, you are already logged in...Here is the data in your session";
request.setAttribute("message", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Menu.jsp");
rd.forward(request, response);
//new user
} else if((String)session.getAttribute("username")==null){
String message = "Time out please login!";
request.setAttribute("loginMsg", message);
RequestDispatcher rd = getServletContext().getRequestDispatcher("/Login.jsp");
rd.forward(request, response);
}
} catch (Exception e) {
e.printStackTrace();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}</body></html>
Is this correct or not? what are my mistakes here
Thank you in advanced
mali_angel
4-Jul-13 3:13am
View
if(us.Userlogin(u.getUname(),u.getPwrd()))
check inside this
mali_angel
4-Jul-13 3:12am
View
actually i do not knw how to put sessions in that login. i just put some lines but do not knw do rest of the process.please tell me from the begining.
mali_angel
19-Oct-12 5:08am
View
http://www.yourhtmlsource.com/starthere/historyofhtml.html
mali_angel
19-Oct-12 5:00am
View
Deleted
no thankx!
mali_angel
17-Oct-12 3:33am
View
it the oldest version of html (html1.0)
Show More