-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: from jsp to hibernate
PostPosted: Wed Sep 23, 2009 10:03 am 
Newbie

Joined: Wed Sep 23, 2009 9:55 am
Posts: 1
hello everybody!
i am a new web programer.i have configure all my mapping from hibernate to my database.i want to use jsp as a presentation layer using jakarta tomcat.i have inmported all my external libraries(lib of hibernate)into webinf/lib of jakarata.
i catch the data from a html form and i want to save them into my database using hibernate.how can i integrate hibernate with jakarta and where to put the jsp code to insert data into my database????if i use javabean the problem is if its executed can he import the hibernate configuration.thanks in advance.


Top
 Profile  
 
 Post subject: Re: from jsp to hibernate
PostPosted: Wed Sep 23, 2009 12:37 pm 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Basically, just have the html form invoke a Servlet, and just code your regular Hibernate database code inside the Servlet.

For more complex apps, you can move to JSF or Struts, and even there, you can throw in service layers, but just start off coding it in a servlet.

MVC in Java is typically HTML to a Servlet to a JavaBean (Hibernate Code Here) and then to a JSP for display. Something like that.

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.