Jesus Mireles

Ranch Hand
+ Follow
since Mar 10, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jesus Mireles

You have the map in the wrong action class. From what you have posted it looks like this is the action that the user invokes when the form is submitted.

You need to put your map and getter in setter in the action that is invoked to load this jsp.
13 years ago
Harsha is correct to look for namespace. From the packages you posted it is very likely that the developer created packages which contain common actions. So somewhere there is probably a package with the namespace you seek which then extends the userPackage or adminPackage etc ...

13 years ago
well it looks right to me. You should be hitting:

http://localhost:8080/chapterTwo/Name

Then that form hits:

/chapterTwo/HelloWorld

All your getters and setters are public and named correctly. So I don't see anything wrong here ... I would recommend to turn on trace, it seems your struts jars may not all be deployed correctly or you are missing something. Your packages extend struts-default but I have a feeling that something is from the struts2 jars is missing.

13 years ago
What happens if you were to change:



to:

13 years ago
Looks like you may not be using default-stack for your interceptors. Post your whole struts.xml
13 years ago
Why not use s:a? Might make this easier to read?



Also you can probably remove the " that Paul pointed out and I'm not sure about using the single quote in your action='xxxx' but then you start using " for namespace.

-JM
13 years ago
Your problem is how you defined your form.

Instead of using action="/General/LoginManagementAction"

Set two attributes

action="LoginManagementAction"
namespace="/General"

13 years ago
Sounds like you need to persist somewhere. So you either persist to your database or to session.. You can probably add some JavaScript that forces a window refresh so that he parent can go and re-retrieve any persisted data.

It may be better to use modals than opening a new window and then you can probably just use JavaScript.
13 years ago
Same or different action? Use session ...
13 years ago
It is probably a cleaner solution if you did this in a servlet filter
13 years ago
I've never needed to do this but I remember when I was learning about SessionAware I think I recall you can do:

ServletActionContext.getRequest().getSession()

Which will get you an HttpSession
13 years ago
Actually your namespace is defined as /flow in the struts ... so thats what you should use for namespace instead of just flow without the /

-Jesus
13 years ago
I've never really needed to use my own validator.xml ... but your not using anything that couldnt be used with an annotation tag on the setters:




13 years ago
First of all the reason your image isnt showing is because of the way you built the src tag for the image. You should think about using <s:url to build it. So instead of what you did you should do:



Have you tried defining your namespace in the form? Its only going to redirect on a SUCCESS response from your execute method but that may perhaps be your issue ...

So ...

13 years ago
I don't know spring as well as I know struts.

What I can tell you is that stuts 2 does not behave this way out of the box. I would probably imagine that your spring configuration might be the culprit.

JM
13 years ago