• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
==== is not a valid property name.
 
shivam singhal
Ranch Hand
Posts: 231
Java Notepad Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64994
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic