File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts-tags.tld Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-tags.tld " Watch "Struts-tags.tld " New topic
Author

Struts-tags.tld

Rajesh Challa
Greenhorn

Joined: Mar 07, 2007
Posts: 9
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Mar 07, 2007
Posts: 9
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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Mar 07, 2007
Posts: 9
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

Joined: Sep 29, 2008
Posts: 12617

No reason this wouldn't work; have you verified that your action is being executed before hitting the JSP?
Rajesh Challa
Greenhorn

Joined: Mar 07, 2007
Posts: 9
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

Joined: Sep 29, 2008
Posts: 12617

http://struts.apache.org/2.1.8/docs/bootstrap.html
Rajesh Challa
Greenhorn

Joined: Mar 07, 2007
Posts: 9
Thanks David.
 
 
subject: Struts-tags.tld