Is there a easy way to disable all the session of jsp/servlet?

L

lightning

To get that,I write session="false" in every jsp
page,which sucks.

It is easy not to use request.getSession(true),
but it is not easy to remember to put session="false" in every new
jsp page.

Is there?
 
L

Lew

lightning said:
To get that,I write session="false" in every jsp
page,which sucks.

It is easy not to use request.getSession(true),
but it is not easy to remember to put session="false" in every new
jsp [sic] page.

Nor (usually) necessary. But if that's a requirement for you generally, you
can set up templates in your favorite IDE, most likely, to generate JSPs with
that attribute set the way you need it. You certainly can in Eclipse and
NetBeans.

NetBeans: Tools / Tamplates => Template Manager
Select "Web / JSP"
Click "Duplicate"
"Rename" the copy, say, to "JSP_no_session"
with the renamed copy, "Open in Editor"
Add the new <%@page%> directive

Now you can select "Web Pages", context menu "New", "Web", "JSP_no_session", etc.
Is there?

Sorry?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top