This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Spring and the fly likes JSP Spring Newbie Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "JSP Spring Newbie" Watch "JSP Spring Newbie" New topic
Author

JSP Spring Newbie

Sasha Choi
Greenhorn

Joined: Sep 03, 2013
Posts: 3
Hi guys, I'm new to JSP and Spring and Oracle DB and MyBatis sql mapper. I do know java, I just never used spring.
I did learned basics of JSP, as learning exercise I did a forum. Part of the forum was done with <%%> tags and part was with servlets.
So now I'm trying to do a forum, but this time I want to use spring, oracle db and mybatis. Please correct if i'm wrong, but I've done a basic hello world with spring and it feels a lot like making a servlet, where I would map servlet in xml and calculation would be done inside of java class ( I do realize that spring is much more than that, but that is my first taste of it). I have no idea what myBatis does.

I'm one of those who learn when they see, so if you know any basic tutorials please drop a link.
You are well by far more experienced guys, so please tell me what is the best way to transition from 'no framework' to 'spring'.
Thank you for your time.
P.S. so far my progress in using spring is a simple page that prints HelloSpring.
Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
MyBatis is an ORM (Object-Relational Mapping) framework that maps Java objects to relational databases thereby making it easy to deal with database operations.

Google search on 'mybatis tutorial' should help.
Sasha Choi
Greenhorn

Joined: Sep 03, 2013
Posts: 3
Thank you for your reply. After a few days of studying Spring + MyBatis. I've decided that I should learn one first and then move to another. So I'm learning Spring for now. I find the setting part very complicated at the moment. At this point I'm trying to do a simple "select * from table" query, but sadly nothing is showing up, and there are no errors. If you have time please look at this 2 classes:


and ListRowMapper:


In my jsp file in place of only shows up. I'm using oracle db, I could be able to work with it if I'd had errors thrown, but the console is "clean". Any ideas what maybe causing the issue?
Thanks for reading.

Surendra Kumar
Ranch Hand

Joined: Jul 04, 2006
Posts: 235
Did you debug and see if you can get inside of the loop while(rs.next()) ?

Also see this post helps.
Sasha Choi
Greenhorn

Joined: Sep 03, 2013
Posts: 3
Thanks Kumar. the post helped. And I've also changed from using to JSTL's , which is much more convenient and simpler to read from my perspective. I've also found out that you need to commit changes that you make to db(like when you delete a row). Those things are simple, but if you never worked with oracle db it can be confusing.
So far I've managed to make a simple forum. registration, topics, reply/comments. Next step is learn AOP module of Spring.
Thanks again Kumar.
 
jQuery in Action, 2nd edition
 
subject: JSP Spring Newbie