Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Development-process social networking community system

Have Programming Question? Ask it here!
 
 
 


kiran eemuru
social networking community system
0 Answer(s)      a year and 4 months ago
Posted in : Development process


In the above mentioned title login page not working properly.

**1.login.jsp**
<%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,com.minglespot.MyFunctions"%>
<%! String ErrCode="0",LoginCode="A";%>

 <HTML>
    <HEAD>
    <script LANGUAGE="Javascript" SRC="Images/validate.js"></script>
    <LINK href="styles.css" type="text/css" rel="stylesheet">
    <script LANGUAGE="Javascript" SRC="Images/calender.js"></script>
    <script LANGUAGE="Javascript" >
        function ChkMandatoryField(F,T){
            var val= F.value;
            if(val==""){alert(T+" is mandatory");return false;}
        }
        function ChkNumField(F,T){
            var val = F.value;
            if(isNaN(val)==true||val==""){alert("Please enter numbers for "+T);return false;}
        }
        function ChkAlphaNumericField(F,T){
            var val = F.value;
            var pattern = /^([a-zA-Z0-9]{1,250})$/;
            if(!(pattern.test(val)==true)){alert("Please enter alphabets or numbers for "+T);return false;}
        }
        function ChkAlphaField(F,T){
            var val = F.value;
            var pattern = /^([a-zA-Z ]{1,250})$/;
            if(!(pattern.test(val)==true)){alert("Please enter text for "+T);return false;}
        }
        function ChkEmailField(F,T){
            var val = F.value;
            var pattern = /^([a-zA-Z0-9\_\.]{4,25})$/;
            if(!(pattern.test(val)==true)){alert("Please enter valid email for "+T);return false;}
        }
        function ChkDateField(F,T)
        {
            var val = F.value;
            var pattern = /^[0-9]{4}-[0-9]{2}-[0-9]{2}$/;
            if(!(pattern.test(val)==true)){alert("Please enter valid date format (yyyy-mm-dd) for "+T);return false;}
        }
        function validate()
        {
            var frm = document.forms(0);
            if(ChkMandatoryField(frm.UserID,'UserID')==false) return false;
            if(ChkAlphaField(frm.UserID,'UserID')==false) return false;
            if(ChkMandatoryField(frm.uPassword,'Password')==false) return false;
            if(ChkAlphaNumericField(frm.uPassword,'Password')==false) return false;

        }
        function fnValidate(s){
        var frm = document.forms(0);
        var UserID=frm.UserID.value;
        //if(UserID==""){alert("User ID is mandatory");return false;}
        var uPassword=frm.uPassword.value;
        //if(uPassword==""){alert("Password is mandatory");return false;}
        s.href = "Validate.jsp?UserID="+UserID+"&Password="+uPassword;
        s.target="HomeFrame";
        }

    </script>
    </HEAD>
    <Body Class='Grad'>
    <FORM name="Login">
    <%
        ErrCode = request.getParameter("ErrCode");
        LoginCode = request.getParameter("LoginCode");  
        if(ErrCode!=null){
            if(ErrCode.equals("1")){
              %><script>alert("Login failed..please try again");</script><%
            }
        }
    %>
    <fieldset style="padding: 3;">
 <legend><FONT COLOR="" Face='verdana' size='2'><B>Login</B></FONT></Legend>

    <TABLE align=center width="60%" class="notepad">
        <TR class="row_title">
          <TH align="center" colspan=3><FONT SIZE="4" COLOR="#AA2504" face='monotype corsiva'>Login</FONT></TH>
        </TR>
        <tr>
          <TD align="left"><FONT SIZE="2" COLOR="#AA2504" face='monotype corsiva'>User ID</FONT><FONT COLOR="red">*</FONT></TD>
          <TD><Input type=text name='UserID' value=''  size=8></TD></tr>
          <tr><TD align="left"><FONT SIZE="2" COLOR="#AA2504" face='monotype corsiva'>Password<FONT COLOR="red">*</FONT></TD>
          <TD><Input type=password name='uPassword' value='' size=8></TD>
          <TD><a href="" onclick="fnValidate(this)"><img border="0" name="Go" src="Images/Go0.jpg" onmouseover="document['Go'].src='Images/Go1.jpg'" onmouseout="document['Go'].src='Images/Go0.jpg'" ></a></tr>

    </TABLE>
     </fieldset>
 <BR><BR>
 <fieldset style="padding: 3;">
 <legend><FONT COLOR="" Face='verdana' size='2'><B>Register</B></FONT></Legend>
        <P align=center><FONT SIZE="4" COLOR="#AA2504" face='monotype corsiva'>If you are not a registered user <Font COLOR="#AE0000"><B>Register Now</B></Font> its free</FONT></P>
    <table align=center>

        <tr align=center><TD><A HREF="Register0.jsp" target="HomeFrame"><img border="0" name="Register" src="Images/Register0.jpg" onmouseover="document['Register'].src='Images/Register1.jpg'" onmouseout="document['Register'].src='Images/Register0.jpg'" ></A></TD>
        </tr>

    </Table>

 </fieldset>
    </FORM>
    </BODY>



**2.validate.jsp**

<%@ page language="java" %>
<%@ page session="true" %>
<%@ page import="java.sql.*,java.io.*,java.util.Random"%>

<HEAD>


    <script LANGUAGE="Javascript" SRC="Images/validate.js"></script>
    <LINK href="styles.css" type="text/css" rel="stylesheet">

</HEAD>
<BODY class="Sess">
<%

    Connection con=null;
    ResultSet rs=null,rs1=null;
    Statement stmt=null,stmt1=null;
    String UserID = request.getParameter("UserID"); 
    String Password = request.getParameter("Password");
    session.setAttribute("UserID",UserID);
    int flag=0;
    try{

            con = com.minglespot.ConnectionPool.getConnection();
            stmt =  con.createStatement();
            stmt1 =  con.createStatement();
            String Query = "select * from login where UserID = '"+UserID+"' and Password='"+Password+"'";
            System.out.println(Query);
            rs = stmt.executeQuery(Query);
            System.out.println(rs);
            if(rs!=null){
            String Query1="Select * from basicdetails where UserID='"+UserID+"' and Password='"+Password+"'";
            System.out.println(Query1);
            rs1=stmt1.executeQuery(Query1);
            System.out.println(rs1);
             if(rs1!=null)
            {
            while(rs1.next()){
            String PhotoPath=rs1.getString(4);
            System.out.println("-------------------"+PhotoPath);
            session.setAttribute("PhotoPath",PhotoPath);
            }
            }
            }
            if(rs.next())   
            {
            String Auth=rs.getString(3);
            session.setAttribute("Auth",new Integer(Auth));
                 flag=1;


             if(Auth.equals("0")){

                //Show Admin Menu
                %>
                  <jsp:forward page="AdminMenu.jsp"/>
                <%
             }else if(Auth.equals("1")){
                //Show user Menu
                %>
                  <jsp:forward page="UserHome.jsp"/>

                <%
             }
            }
            else
            {
             flag=0;

             %>
                  <jsp:forward page="Login.jsp"/>

             <%
            }
            stmt.close();
            con.close();
        }catch(Exception e){
            stmt.close();
            con.close();
            %><%=e%><%
        }

%>
</BODY>

Advertisement
View Answers

Related Tutorials/Questions & Answers:
social networking community system
social networking community system  In the above mentioned title login page not working properly. **1.login.jsp** <%@ page language="java" %> <%@ page session="true" %> <%@ page import="java.sql.*,java.io.
Top 10 Emerging Social Networking Sites
Top 10 Emerging Social Networking Sites It is no longer a literary expression... penetration and proliferation of social networking sites encompassing almost every walk..., a great array of emerging social networking sites are fast coming up to fill up
Advertisements
Facebook Social Media Marketing
in the field of social networking. Small and big businesses have made their way into social networking through Facebook, giving notion to the term Social Media...Facebook Social Media Marketing Facebook has been nothing short
networking
networking  how can i configure my xp computer as a ftp server and assign a name to it to access on the name rather than on its ip. just i need steps. AND WHY YOU INCLUDE NETWORKING ON THE ABOVE SELECT CATEGORY ? JUST
networking
networking  how can i configure my xp computer as a ftp server and assign a name to it to access on the name rather than on its ip. just i need steps. AND WHY YOU INCLUDE NETWORKING ON THE ABOVE SELECT CATEGORY ? JUST
networking
networking  how can i configure my xp computer as a ftp server and assign a name to it to access on the name rather than on its ip. just i need steps. AND WHY YOU INCLUDE NETWORKING ON THE ABOVE SELECT CATEGORY ? JUST
What is Niche Social Network?
the way we interact with people in the recent time, definitely social networking... social networking tends to go deeper. If you have not dwelt in a jungle cave far... in chatting, looking at the new posts, etc. You know social networking
Tools of Social Media Marketing
in advertising and marketing where companies do business by using social networking... the harbinger of social networking as these were in existence even before the arrival of social networking sites. Forums offer space to share views and opinions
Twitter Social Media Marketing
Twitter Social Media Marketing Twitter is a social networking website used for sending and receiving messages. These messages are called tweets. Well... kind of social networking is that it not only enables you to keep track of what
Social media marketing - how a profile can help you
Social media marketing - how a profile can help you Social networking... on a social networking site you can still present information about your business... social networking sites allow for the creating of groups. Advertising can
Open Source Community
Open Source Community Open Source Research Community... a community in which information will be freely exchanged, so that we may... that our community can become steadily larger and more comprehensive.  Authors
Computer Networking
Computer Networking       Here we are going to unfold the concepts of networking in day to day scenarios. Let us consider that you started
Social Media Marketing
popularity of social networking sites. In a nutshell, social media is any online portal... their presence felt across the social networking sites, as these are easy ways...Social Media Marketing Do you know that your postings on the Facebook
Networking in Java
Networking in Java     ... provides the support for networking in java with a generic style. All the java...;  Now lets quickly move on to the networking part of java and take a look
Networking with OSI model
Networking with OSI model  What is networking and it's how to work with OSI model?   Please visit the following links: http://www.roseindia.net/java/network/index.shtml http://www.roseindia.net/technology/networking
E-Mail Marketing and Social Media
to use the Social networking websites, they can make their own friend lists and share messages, images etc.. There days Social Networking websites... such information easily from a Social Networking websites. So, business are considering
Social Media Marketing for Small Business
Social media presence on various Social Networking, Image and video sharing...Social Media Marketing for Small Business We are providing Social Media... Social Media Marketing services for Small Business are well designed and gives
Social Media Marketing
websites. There are so many Social Networking and other websites where you can...Social Media Marketing In this section we will learn about social media marketing. These days Social Media Marketing is one of the most used method
System
System  What is System in System.out.println() method? Is it a Class or a Package
What is Social Media?
and groups. Major social networking websites like Facebook, twitter and Okut.... Facebook, Orkut and Twitter can be termed as social networking websites...What is Social Media? The working definition of social media could
Tutorial - Sun Java System Application Server Platform Edition
Sun Java System Application Server Platform Edition  ... System Application Server Platform version 9 for the deployment and testing of our... provided by it. The Sun Java System Application Server Platform Edition 9
Release of Jitterbit 2.0 Enterprise and Community
Release of Jitterbit 2.0 Enterprise and Community (18 Aug 2008) The Jitterbit... the Jitterbit 2.0 Enterprise and Community Edition. It includes integration server... Community: With the announcement of this new product release, Jitterbit is focussing
Social Media Marketing for Business
numerous social and professional networking sites including Facebook, MySpace, Hi5, Orkut, iBiBo, Linkedin etc. These social networking sites have become hot... and corporate images among the social networking sites users. The users
What is Social Media Marketing?
are easily seen over the course of the week with the help of these social networking... and would take a lot more time if it wasn't for the Social networking site. Social... Marketing, it feel right at home. Also, because most social networking sites are based
Java Networking - JSP-Servlet
Java Networking  I want to get all systems' (computer,printer,laptop) IP address on LAN using java code. I tried a lot but find only my system's IP. I want java code for dat
Rimzu
Rimzu       Rimzu is a free, non-commercial, social networking site that focuses on accurate sociometric analysis. The backend runs on GlassFish and provides full API to the system via
Computer Networking
Computer Networking       Here we are going to unfold the concepts of networking in day to day scenarios. Let us consider that you started a commercial
Overview of Networking through JAVA
Overview of Networking through JAVA  ... on network. Java, mainly focuses on the networking relating the description of the networking capabilities of the Java platform and second one is describes a brief
How does Social Media Marketing Work
How does Social Media Marketing Work In this section we will understand the working of Social Media Marketing and see "How Social Media Marketing actually Works"? As you all know Internet users visits the Social Networking
Benefits of Social Media Optimization
to their businesses. The social networking websites eye more focused and interactive customers that visit these social networking sites. Social media optimization increases...p>Benefits of Social Media Optimization While discussing benefits
Influence of Social Media on Society
. With arrival of social networking sites these discussions have become important... and opinions on different things. In addition, these social networking... of these social networking sites is that it may expand network of the people
Apple's Ipad? How It Can Enhance Your Social Networking Experience?
Apple’s Ipad – How It Can Enhance Your Social Networking... everybody from business professionals to gaming enthusiasts. Social networking... to enhance your social networking experience. Connectivity The most important
Social Media Marketing Company
. The professionals of the marketing companies must be the tool player of social networking sites, professional networking site, social bookmarking sites, content sharing... Social media marketing is a powerful means of publicity, as its reach is very
Social Media Marketing for Beginners
Social Media Marketing for Beginners Most of you may be familiar with social networking sites like facebook and twitter but do you know these social... but don’t spam. You can use social networking websites like Myspace, YouTube
VoIP Data Networking
VoIP Data Networking          VoIP Data Networking with Networking Telecommunication... networking lines. It's adapted to a packet-switched network just like your
SOCKET PROGRAMING IN THE JAVA FOR NETWORKING CONCEPT
SOCKET PROGRAMING IN THE JAVA FOR NETWORKING CONCEPT  I WANT TO KNOW ABOUT THE JAVA SOCKET PROGRAMING FROM BASIC LEVEL AND HOW CAN I WORK ON IT I KNOW THE JAVA PROGRAMING.SO PLEASE HELP ME HOW CAN I DO SOCKET PROGRAMING
Social Media Marketing Degrees
Social Media Marketing Degrees In this section we will see the course contents included in Social Media Marketing Degrees course conducted by various institutes. Due to heavy demand of Social Media Marketing professionals many
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... on network. Java, mainly focuses on the networking relating the description of the networking capabilities of the Java platform and second one is describes
Overview of Networking through JAVA
Overview of Networking through JAVA The Java platform is extremely preferable... on network. Java, mainly focuses on the networking relating the description of the networking capabilities of the Java platform and second one is describes
E-Mail Marketing Social Media
subscribes to share it with social networking websites This is one of the best way...E-Mail Marketing Social Media E-Mail Marketing is also considered as part of Social Media marketing. For example you can make your email campaign social
Networking in Java
Networking in Java     ... provides the support for networking in java with a generic style. All the java...;  Now lets quickly move on to the networking part of java and take a look
Aspects of Social Media Marketing
Aspects of Social Media Marketing to Consider There are hundreds and possibly thousands of social media networks available to use and it is important... choosing the social media networks to use for social media marketing
about networking program - Java Beginners
about networking program  Dear Sir, i'm programing client side application where i've to convert data in to hex and then in to ascii format after that those data have to be transmitted to udp server in this case what kinda
Benefits of Social Media Marketing
Benefits of Social Media Marketing In this section we will understand the benefits of Benefits of Social Media Marketing. There are lots of benefits of using Social Media Marketing for promoting your business. You can promote your
Best Social Media Tools
. There are many types of Social Media tools: Social/Professional Networking Sites: Social/Professional Networking websites are the networking websites.... The most popular Social media tools and Profession networking websites
Public Relations and Social Media
number of people on the social networking sites like facebook and twitter... audience. With social networking sites offering a good platform to express.... These social networking sites have become an effective tool for PR strategies
Overview of Networking through JAVA
system. For do for the same we have to call InetAddress class then we need to create..., In which the host name of the local system is Comp20 and the IP address
Social Media Marketing Services
Social Media Marketing Services We are providing Social Media Marketing... their presence in Social Media such as Twitter, Facebook, Linkedin, YouTube and many other Social Media Marketing portals. Our Social Media Marketing Services includes
Needs and Expectations from social Media
overlook the importance of these social networking sites, which have become the integral part of our day-to-day life. Social networking sites like.... Being different from the conventional advertising, these social networking
Advertisements
 

 

 

DMCA.com