tags:

views:

916

answers:

2

Hello can anybody solve this please

m creating the object in the action class

public CgUsers getUserdetail(){
  CgUsers user = userManager.getUser(id);
  return user;
  }

And m trying using that object in the jsp page

c:forEach items="${Userdetail}" var="user">

               <ul>
       <li><c:out value="${user.getLastName()}"/> </li>

            </c:forEach>

If i try to get the output in the execute method of the action class m getting it rignt.. but m not getting it in the jsp page..

And its giving the error on the browser like

/WEB-INF/pages/search/profile.jsp(15,8) PWC6296: The function getLastName must be used with a prefix when a default namespace is not specified

can anybody sugest any solution thatĺl b greatful..

+1  A: 

Vinayak !

You have asked 8 questions on SO and not given a single point to any of the answers, neither have you accepted any of the answers.

I think most of us think it ok to answer your questions here on SO, but the reason we do so is because we expect you to give us credit back.

Please go to the questions you have asked via http://stackoverflow.com/users/28557/vinayakb and give points/credit where you find the answer to be appropriate.

You can also look at the faq, linked from the top banner on the page.

I will answer your question when I see you have done this.

krosenvold
Please can u tell how to do that is there any option or.. m just clicking on the up and down arrow and i tried to click on the right mark its saying u need 100 reputations..Thank You
Vinayak.B
You also gain reputation by accepting answers. Soon you'll be able to use the up arrow.
krosenvold
Yea I´ll do that Thank you Krosenvold
Vinayak.B
I tried that too its giving the same error..
Vinayak.B
I dint get u..Yea i have created the action class n i hav injected it in the struts.xml n the applicationContext-struts.xml n the object is coming frm the service layer n m collectin it in my action class there m doing some searching stuff by injectin the id to that object and passin it to jsp page.
Vinayak.B
Yea finally i got it..I removed the local object from the action class and used getter and setter method for it and got it now its working fine..
Vinayak.B
A: 

Use "${userdetail}" instead of "${Userdetail}".

Dev er dev
Hi Marko..I tried it but its giving the same error on the browser that is /WEB-INF/pages/search/profile.jsp(15,8) PWC6296: The function getLastName must be used with a prefix when a default namespace is not specified
Vinayak.B
Just use user.lastName instead of user.getLastName
krosenvold