File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying Database Items in Index page Using Struts Hibernate

 
Shajid Johnny
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Dear members,
I have been trying to build an application using Struts2 and Hibernate3 for Data Access layer. I have successfully done the modules for Add/Edit/Delete of Category and SubCategory with proper HQL, Taglibs, JSTL etc.

Now I want to show all my added Categories and SubCategories on the index.jsp when the project runs. But I can't use struts actions, can't invoke the DAO methods through which I properly displayed them previously.

So, for the index.jsp i used core Servlet & JDBC to display them.

My question is- does the frameworks have some limitations like this? or its really doable and its me who doesn't know??
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts isn't magic. It is built out of core Java and Servlets, so theoretically, anything that is possible with a Servlet is possible with Struts.
Is the problem that you can't have the Struts action as the welcome page? I solved that by making an index.html redirect immediately to a Struts action.
 
Shajid Johnny
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:Struts isn't magic. It is built out of core Java and Servlets, so theoretically, anything that is possible with a Servlet is possible with Struts.
Is the problem that you can't have the Struts action as the welcome page? I solved that by making an index.html redirect immediately to a Struts action.


Thanks Joe. But could you please show me how could i do this? it would be better if you write some code snippet here for me
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure it's easy for you if I do your work. We ask that you ShowSomeEffort. How about doing a search and let us know what you find.
 
Shajid Johnny
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mr Joe for your guidance! yes I shall keep that in mind :-)
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic