Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

thor aniket

Ranch Hand
+ Follow
since Jan 21, 2012
thor likes ...
Hibernate jQuery
San Diego, CA
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by thor aniket

You want it on input JSP or output? if in input JSP page, give just name of the field same as your action property(int param1) or for at output page to display that value us tag to display it.
9 years ago
Thank you for the reply Junilu. You're so true, so as Bear. I had never looked JSP from your point of view, now I got it right. It was so straightforward. Now I have to rethink my strategy. I was about to treat JSP just like HTML page in case of managing their elements, I was too wrong to think like that. Yes. I'll read more about JSPs to be more careful.

9 years ago
ok. I have been using it in XHTML page in Javascript to access that elements value. But how do I do the same thing in JSP page using javascript.? I tried document.getElementById way to refer the element. But it didn't work.
Is JQuery plugin.jar for struts2 will come in the view? or its just same as we use Jquery to refer elements in XHTML?
9 years ago
configure a JSP for result SUCCESS in struts.xml and in that JSP, use tag to print the values you have defined in action class. Make sure that you write simple getter and setter method in action class for that property.
9 years ago
Please include that code in proper tags so that it'll be more readable and will likely to get an suggestions.
Make sure that your struts.xml contains proper mapping and action class implements required interfaces you've implemented and all..
9 years ago
would you paste execute method of you action class? and make sure that you've returned SUCCESS in execute method. Also try removing / in result page in struts.xml. like just
9 years ago
By the way, I'm using DOM in Javascirpt to access HTML element values and manipulating them.(like, document.getElementById("username").value), Similar to that if I want to access values of JSP elements like, <s:textfield> or in general any JSP elements with struts2 tag lib, how it could be done Javascript?
9 years ago
Thank you Bear for reply..!! I'm reading that page right now..!!
9 years ago
I can do like this, the elements that I want to create on-fly, I will be using HTML tags instead. and I want struts2 validations in my same JSP page. So for validations of elements, I will use struts2 tags instead, cause its much simpler than to use javascript for the validation of HTML elements. Is it feasible, though?
9 years ago
Hey Joe, Thank you for the reply. Yes, and think I read somewhere that struts tags are executed first unlike the html tags, before a page is displayed, so that we can't create them dynamically, how much is that true.?
9 years ago
I want to manage struts2 tags through my Javascript. That means I want to create them on-fly, change their properties, assign classes and id's, change their display style etc. etc.
how did you do that? Please help.
9 years ago
Hey Thanks Mohana. I got exactly what I wanted.
9 years ago
I'm using action class to make file upload. And then return to same page. Would you please help me to display a message on JSP that file is successfully uploaded...?
9 years ago
I want to make the JSP page to print a error when username/password are wrong. I have been checking username and password in action class.
9 years ago