This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts-tags.tld

 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I am working on struts2 application, in the below jsp the highlighted part of the code is not executing i am just getting static content


the corresponding action class is below and i have bean Employee bean with property's and getter and setters.

My question is do i need to place the struts-tags.tld file in lib director or will it come with struts2-core-2.1.8.1.jar file.
can any one suggest me to resolve this issue.

Thanks
Rajesh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it was an issue with the TLD the JSP wouldn't compile. It's more likely you don't have a valid employee... and shouldn't a method named "get by ID" take an ID as an argument?!
 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

Why do i need getByID method, i am not using any id property in my application. in the DAO i am just hard coding the values to Employee.

how can i make valid employee, and how to use it in JSP.


Thanks
Rajesh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh Challa wrote:Why do i need getByID method, i am not using any id property in my application.

Then why do you have a method called getEmployeeById()? If you're not getting an employee by ID, it's a *very* misleading method name.
how can i make valid employee, and how to use it in JSP.

Fill its values? I don't know--I don't know what your definition of employee validity is.
 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
sorry for naming conventions.
let me explain you completely.

I already posted action class and Jsp, i have another two classes Employee think this one as VO contains getter and setters, one more class is EmployeeDao in this class, i am just creating Employee object and setting the values.
please find the code below.




I want display the values in the JSP , assigned to Employee in the EmployeeDao class.

Thanks
Rajesh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No reason this wouldn't work; have you verified that your action is being executed before hitting the JSP?
 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

Can you give me URL for struts2, Step by Step flow or which i can write simple program.

thanks
Rajesh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic