Juan Matias Lopez

Greenhorn
+ Follow
since Jul 31, 2011
Merit badge: grant badges
For More
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Juan Matias Lopez

On a second thought, im running out of ideas XD
I tried your suggestion, same result.







However, im not sure if the syntax is right.
Anyway, this is not working either. You said something about making addicional Action classes, what for? Anyway, thanks for the help! (again)
12 years ago
The second option didnt work. The first one... Im not really sure who to call that renamed method. Anyway, I dont really think thats the good way to go XD Thanks for the ideas.
12 years ago

Shankar Tanikella wrote:Interesting, Could you share the latest code snippets for
1. the method in action class
2. the form bean (if it is changed to the earlier)
3. the JSP code used to display
There is some small and silly thing that we are missing, we shall dig it this time



linkListAction:


linkListForm:


listalink.jsp:


Testing some things, we noticed that in a similar jsp/form/action (the one used to simulate a login) the execute() method is accesed after posting a <html:submit>. So, we are looking for a way to do this automatically, I think.

12 years ago

Shankar Tanikella wrote:Are you sure that execute method is not being called? anyways, try this piece of code in your action just to very what is happeningAnd to see the list size in your JSP add some text within the iterate tag and see if it is entering the loop(just in case)



Just tested it, the list is still "size=0".
12 years ago

Shankar Tanikella wrote:Ha, firstly use html:form in your JSP and try whatever you tried before using request, it would be similar to below code
Actually, you need not set the form in the request while using html:form



Thanks a lot! I finally could resolve that problem. Now, at least the page loads fine. But, as it seems to happen, new problems arised.

As I said, im trying to manipulate a collection of links. When I load that jsp, the collection apparently initiates empty. But I modified the listLinkAction and the container class (listaLinks) to add an element (for testing purposes). But the list always shows empty. I made several debbuging, and found out that the reset method of the form is used, but the execute() dont. I would be really glad if you could help me again XD

linklist.jsp


linkListAction(with several comments of the things I tried)


listaLink.java (again, a lot of comments, also, im not sure of the path for the file, that is, to keep and load the links)


Thanks a lot!
12 years ago
Thanks for the answers.

Shankar Tanikella wrote:Hi Jaun, since you are setting the list in session as below
mention scope="session" in all the places in JSP where ever it is being used. For example,
Anyways, why would you need overload your session with a list? why wont don't you use use request instead?
However, the above should work for you



I tried this, but it results in the same error:

type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "linkListForm" in scope: "session"
root cause
javax.servlet.jsp.JspException: Cannot find bean: "linkListForm" in scope: "session"

Could you give me an example using request? As I said, im not very familiar with this XD

Rajagopal Mani wrote:Hi Jaun, Please note the logical form-bean name & session attribute name are same which may lead fail. Remove the line where the collection links set in session scope & try.



Im not sure if I get this right, but I removed the line:
session.setAttribute("linkList", linklistform.getLinks());
and the error is the same.
12 years ago
Hi, everyone. Im banging my head against the wall here. Im using Netbeans 7.0 to implement with the native Struts support an application to display a series of links in a page. Im getting the error:

HTTP Status 500 -
type Exception report
message
descriptionThe server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "linkListForm" in any scope
root cause
javax.servlet.jsp.JspException: Cannot find bean: "linkListForm" in any scope

(using Glassfish Server 3.1, also native).

Ive checked a lot of sites and forums, and nothing seems to fix this.

My struts-config:



linkListAction:



LinkListForm:


and the jps that is giving the error:


I really dont know what to do. Im a newbie in Struts. If it helps, when I press "ctrol+click" on name="linkListForm" Netbeans says The file linkListForm was not found.

Thanks in advance!
12 years ago