Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

David Newton

Author
Rancher
+ Follow
since Sep 29, 2008
David likes ...
IntelliJ IDE Ruby
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
28
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by David Newton

Why would you not want to create a session? In general it's not the presence/lack of session that indicates login, but rather a valid user/etc. object in the session.

To answer your specific question, prevent session creation in the JSP with:
In general, you don't want to access a JSP page directly in an MVC app, rather go through an action. IIRC the default request processor will create a session for you, providing another reason to re-think your approach.
5 years ago
It is most likely the action name is referring to a Spring bean, meaning the Spring plugin is being used.
5 years ago

i think createAction is the Action class where show is the method which returns the logic


Correct. In this case, it's likely the action is being defined as a Spring bean in a Spring configuration file.

That's a guess; I'm guessing that because the class name, createAction, does not follow any Java naming conventions (classes belong in a package, and class names should start with an uppercase letter). It is, however, a typical Spring bean name.

[...] the result type is tiles what does it mean?


It means the tiles plugin is being used. (Most likely. It could mean the developer has implemented their own "tiles" result type, but that would be a little unusual.

box.location.start is the name of the tile definition that will be rendered.

when result name="verificationRequired" "/" is the result and what does it mean?


This means when the action method returns the string verificationRequired the result rendered will be a redirect to the root of the application.

5 years ago
Can you see your own posts? Are you aware you can edit them?
5 years ago
Isn't that what I said?
7 years ago
Your usage of Hungarian notation makes me insane.

Isn't its functioness implied by calling it as a function?!
7 years ago
JSP
You're explicitly telling it not to create a session if there isn't one--what else would you expect?
7 years ago
(One reason testing for session nullity isn't a great idea is that a JSP page will automagically create a session, unless you explicitly configure it not to. It's simply too easy to forget to do that, and not worth the effort. Checking for a session attribute is much simpler, and less error-prone.)
7 years ago
What are all those $ etc.? That just looks horrible :(
7 years ago
Agreed--I see a lot of people attempting to encrypt things. Most people can't, and it's wasted effort since there are several well-known ways to get *good* encryption in Java.

(Not that the above code does or doesn't work--I haven't looked at it--just echoing Bear's point.)
7 years ago
http://struts.apache.org/2.x/docs/autocompleter.html

The "list" attribute...

Useless if you have 10k entries, though.

I'm not really sure what you're comparing its complexity to: an autocompleter is an autocompleter; they all work pretty much the same way.
7 years ago
What happens when "age" is an Integer (not int) field?
7 years ago