`
遠大前程
  • 浏览: 7111 次
  • 性别: Icon_minigender_1
  • 来自: 广州
最近访客 更多访客>>
社区版块
存档分类
最新评论

what if I want to know whether the session already existed or was just created?

阅读更多
Put the following code into you java code :

HttpSession session = request.getSession();/*getSession()returns a session no matter what...but you can't tell if it is a new session unless you ask the sesssion.*/

if(session.isNew()){  /*isNew()returns true if the client has not yet responded with this session ID*/
//put your java code here
}else{
//put your java code here
}
分享到:
评论

相关推荐

    Learning_The_UNIX_Operating_System

    Learning the Unix Operating System is a handy book for someone just starting with Unix or Linux, and it's an ideal primer for Mac and PC users of the Internet who need to know a little about Unix on ...

    曲线拟合工具CurveExpert 1.0

    ct. 18, 1995 v. 1.00 =========================================================================== + First release of ... + The user was still asked whether to save a file or not upon exiting, even if ...

    Recover4all Professional

    If You are a company or other form of organization, and You wish to authorize the Registered Software to be used in a local area network or other network, You must purchase a license for each ...

    odoo themes

    When we created our Website Builder, we decided to start from scratch instead of relying on what already existed. This approach gave us the freedom to focus on the things that are really important ...

    Pro_C_2008_and_the_NET_3_5_Platform_Fourth_Edition.part1.rar

    This book has existed (in one form or another) since the first edition of C# and the .NET Platform was published in conjunction with the release of .NET 1.0 Beta 2, circa the summer of 2001. Since ...

    RabbitMQ-in-Action-Distributed-Messaging-for-Everyone.pdf

    when each of us discovered RabbitMQ, we didn’t even know what “messaging” was or that it was the solution to the problems we were having. My (Jason’s) situation was that my company needed a way to...

    Apress.Pro.C.Sharp.2008.and.the.dot.NET.3.5.Platform.4th.Edition.Nov.2007.part2

    This book has existed (in one form or another) since the first edition of C# and the .NET Platform was published in conjunction with the release of .NET 1.0 Beta 2, circa the summer of 2001....

    Pro C# 2010 and the .NET 4 Platform Fifth Edition

    This book has existed, in one form or another, since the first release of C# and the .NET Platform was published in step with Microsoft’s release of .NET 1.0 Beta 2 (circa the summer of 2001). Since...

    Pro C Sharp 2010 and the .NET 4 Platform - 5th Edition

    This book has existed, in one form or another, since the first release of C# and the .NET Platform was published in step with Microsoft’s release of .NET 1.0 Beta 2 (circa the summer of 2001). Since ...

    CSharp.2010.and.the.dotNET.4.Platform.5th.Edition

    This book has existed, in one form or another, since the first release of C# and the .NET Platform was published in step with Microsoft’s release of .NET 1.0 Beta 2 (circa the summer of 2001). Since ...

    CRC Press - Investigating Computer-Related Crime.7z

    created some concerns for security that are just now being realized. The dramatic increase in computing speeds has added to the dilemma because such speeds aid hackers in breaking into systems. The ...

    Java Message Service Version 2.0

    JMS was initially developed to provide a standard Java API for the established messaging products that already existed. Since then many more messaging products have been developed. JMS provides a ...

    Spark_The Definitive Guide-O'Reilly(2018).epub

    Although the project has existed for multiple years—first as a research project started at UC Berkeley in 2009, then at the Apache Software Foundation since 2013—the open source community is ...

    maa-wp-11g-platformmigrationtts-129269 (1).pdf

    The supported way to accomplish this in prior releases of the Oracle database was to export the data from the database on the old platform, create a new database on the new platform, and import the ...

    英语谜语.doc

    4. What is that which you have never seen, heard or felt, which never existed and still has a name? 答案是 "Future"(未来),因为它还未发生,但已经被我们讨论和想象。 5. What changes a pear into a ...

Global site tag (gtag.js) - Google Analytics