File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to use tag?" title="Easter" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to use "property" attribute in <jsp:getProperty ....   /> tag?" Watch "how to use "property" attribute in <jsp:getProperty ....   /> tag?" New topic
Author

how to use "property" attribute in <jsp:getProperty .... /> tag?

shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 194

what should be the value of property in getProperties tag in this Work.java file
that is
<jsp:getProperty name="Work" property="====" />

package com.example.web;

public class Work{
private String wrk;
public void setjob(String wrk1){
this.wrk=wrk1;
}
public String getjob(){
return wrk;
}
}


on what basis value of property tag is decided??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

==== is not a valid property name.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
shivam singhal
Ranch Hand

Joined: Jul 15, 2012
Posts: 194

offcourse === is not a property name...

m just asking about what should be written in the property attribute of getProperty tag??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60059
    
  65

First, you need to fix the bean. setjob() and get job() are not correct; should be setJob() and getJob(). In that case, the proeprty name is job. Case is very important when dealing with beans.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to use "property" attribute in <jsp:getProperty .... /> tag?
 
Similar Threads
How do I see my classpath?
Question on how to fix error on inputHidden field
HFSJ Question in JSTL
set Object direct or indirect?
StringTokenizer class parsing \r\n string