• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts-tags.tld

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
http://struts.apache.org/2.1.8/docs/bootstrap.html
 
Rajesh Challa
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks David.
 
reply
    Bookmark Topic Watch Topic
  • New Topic