Wednesday, April 7, 2010

Spring MVC Attachment Upload/Download Handler





I implemented an attachment upload/download handler using Spring MVC. Uploading was just a piece of cake because all I had to was wiring the multipart resolver into the configuration and have a bean injected to it. Spring documentation was all I needed.

However, downloading was more tricky. I have to get response's output stream, set mime type and write the byte arrays to it. I found out this great mime type list for 2007 office. Even after I set the mime types for the response, .docx was saying that the file was corrupt. Once I click "Yes" on the recovery, it comes back fine but I am not sure why it is getting corrupted as all the other attachments come back just perfect. If anyone has any insights on this issue, please let me know.

Office 2007 Mime Types
.docm, application/vnd.ms-word.document.macroEnabled.12
.docx, application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotm, application/vnd.ms-word.template.macroEnabled.12
.dotx, application/vnd.openxmlformats-officedocument.wordprocessingml.template
.potm, application/vnd.ms-powerpoint.template.macroEnabled.12
.potx, application/vnd.openxmlformats-officedocument.presentationml.template
.ppam, application/vnd.ms-powerpoint.addin.macroEnabled.12
.ppsm, application/vnd.ms-powerpoint.slideshow.macroEnabled.12
.ppsx, application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptm, application/vnd.ms-powerpoint.presentation.macroEnabled.12
.pptx, application/vnd.openxmlformats-officedocument.presentationml.presentation
.xlam, application/vnd.ms-excel.addin.macroEnabled.12
.xlsb, application/vnd.ms-excel.sheet.binary.macroEnabled.12
.xlsm, application/vnd.ms-excel.sheet.macroEnabled.12
.xlsx, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltm, application/vnd.ms-excel.template.macroEnabled.12
.xltx, application/vnd.openxmlformats-officedocument.spreadsheetml.template


Wednesday, January 27, 2010

DisplayTag feature to expose row numbers

I was working on Spring MVC and DisplayTag to structure the table. I had a list of objects and needed to refer the index of an item because I had to use <spring:bind>

I discovered a cool DisplayTag feature that exposes the row number of an item. Here is an example:

<display:table name="ticketList" id="ticket"> 
<display:column title="Row Number">
${ticket_rowNum}
</display:column>
</display:table>



You are basically appending "_rowNum" to the variable to get the row number.

Monday, March 30, 2009

Life Goes On: LuxuryMagic #14 - Sun Certified Java Programmer 6.0!




I dedicated a past few weeks to study for the exam. I finally received the certification today! Next is Sun Certified Web Component Developer (SCWCD). In the meantime, I submitted my resumes after receiving the certification. I don't know my decision of pursing this certification rather than finding job earlier would turn out. Hopefully, I get to hear some good news but the current economy is fairly tough especially for junior level developer like me.

Wednesday, December 17, 2008

Life Goes On: LuxuryMagic #13 - Business Card



This business card is designed by my roommate who owns design company called Broad Sighted. I initially provided him ideas for designing LuxuryMaster.net because I wasn't very proficient on CSS during that time. I received basic lesson from him so I am a bit better now but he is really good.

He provided me excellent quality of work designing 5 different front end main pages with various color schemas depicting various mood with amazing amount of details in all places.

I will now be independently working on back-end infrastructure and I am currently planning on the whole infrastructure although I have my idea fairly solid. I remember spending a whole semester designing the architecture in school when I was working on my senior project.

Although the group of 4 spent whole semester of designing basic architecture, we ran into various issues when writing codes for the actual product. I was the team leader of the group and it was very stressful to change the implementation all the time. I learned my lesson from that and I don't plan on quick rushing on this project =)

Anyways, due to his successful performance on my LuxuryMaster.net's front end UI work, I asked him to design the business card and look how it came! I can't upload the actual version of the card because it contains personal information but if you look at it carefully, you will be able to see transparent color scheme applied in different vertical layers and it is simply amazing!

If any of you are interested getting web hosting and design services for your business, I suggest you to contact him. You may visit his website Broad Sighted for more details.



Friday, December 12, 2008

Life Goes On: LuxuryMagic #12 - It's my turn to protect








I have decided to stop playing online poker for a while as I have found more joyful and meaningful things to do in my life. I haven't decided how I will spend the money I get from the withdrawal but I am sure I will figure something out =)

I purchased a book called "Real Estate Millionaire: Secret Strategies To Lifetime Wealth Today" by Dean Graziosi. I haven't had a chance to read much about the book it seemed interesting because it seems like anyone can possibly work on trading real estate properties because you don't have to have credit, or investment, or anything.

I also plan to work on my LuxuryMaster.net in the meantime and stay tuned for the updates on the site!

Thursday, December 4, 2008

Thursday, November 20, 2008

Life Goes On: LuxuryMagic #10 - Key to My Heart



My roommates designed above picture in the frame and gave it to me for my 24th birthday present. In the picture frame, it says 'carpe shipem'. It is a phrase from Latin meaning "seize the day" and living the moment in your life. I perceived the meaning of the word right when I heard from my roomate. However, I found myself not applying this beautiful message to my life until today.

Looking back and thinking about it, I don't think I have ever slept ever since I got into the college. Yesterday, I had a such a long sleep, when I woke up, my body felt extremely tired and everything seemed empty.



I have recently experienced overwhelming attention in my life that I have never desired for. I was extremely overwhelmed that I had a moment to give up everything in my life. However, I believe Jesus saved my life at my last moment because there are so many options available to you if you have made a decision to fold over yourself.

I have wondered why I have been chosen to go through this hard moment in my life and prayed to Jesus various times why I am going through this challenging flop on my life.






Today, I was working at my job as usual. Recently, I had overwhelming amount of work at my job all the sudden. Ironically, I got my daily tasks done a little early. I went to eat lunch, get some massage on my body, relaxed myself a bit, watched children playing around in the mall, watched beautiful sky, took a deep breath, and came back to work and thought about why I am working in the office at this moment. Everything I was responsible for was finished so why should I be in the office? Why can't I just go outside and whatever the hell I want?

I thought about myself and trying to figure out what I can do to enjoy in the meantime. I first figured out how I can possibly contribute my developers in the team by working extra amount of time which I got done fairly quickly. I honestly felt really good because I feel like I was finally be able to contribute something extra to the development team rather than working 8 hours straight, being lazy about myself, and just get things done like a machine.

I then forgot about work as I have no obligation or given tasks to continue. I then wondered what would be the first step to benefit more people other than people working in the office. Looking back and thinking about it, I had suffered so much in the past living on my own, working towards my future that I had always dreamed - best car, best job, beautiful girl friend, and etc. Those were so important to me and I had amazing amount of passion on various different things I enjoy in my life and I honestly felt it's reaching and I can accomplish that faster than other people. However, I decided to set all these aside and have a moment to think about what would be really is important in my life if I can only live a day.

I finally decided to accept myself that I desire a lot of different things in my life, instead of turning myself in a miserable mode and thinking about future life, I have decided to not to be sad about my life, worrying about tomorrow, or what the hell would happen if I do something. I simply decided to accept everything happening in my life and cope thorough with it regardless of the outcome.

I instantly felt extreme amount of stress going off of my brain and became happy. I am not sure if I will feel happy or sad tomorrow but since I am not a machine, I decided to forgive myself being sad, happy, or whatever but just stay positive on myself and use self discipline and patience not to lose self control.

I believe we all facet different types of challenging moments in our life and the question is how we perceive these different challenging moments in our life. I have decided to use my intuition to figure out what exactly is going on and deal positively instead of being negative and doubtful about myself, other people, or getting frustrated about the situation.



Just being careless about the current circumstance with controlled mind set was a simple key to my happiness. I strongly believe this is the soul that Jesus has given me while coping through my hard time and I will use my best judgment to protect this great freedom in my life so that I can truly 'carpe shipem' in my life with the people I love regardless of the law, money, perception of other people, and future life.

Saturday, November 1, 2008

Life Goes On: LuxuryMagic #9 - Pursuit of Self Tranquility





I have been having this awesome art that I bought from the University of Colorado when I visited there for lunch. I hung it on the wall for a while but never paid attention to the message in the art. It says:

"The poor long for riches. The rich long for heaven but the wise desires tranquility"




Wednesday, October 29, 2008

Life Goes On: LuxuryMagic #8 - CU KSA Soccer and DMV Gorilla


I think everyone played great and I feel sorry that Jungbin got injured while playing. I promised to buy you guys dinner if you guys win the first game. The game got tied therefore no dinner out of pocket as I promised on our temporary Cyworld website! ㅋㅋㅋ

However, I promised Sung bin that I will treat you guys a dinner for sure if you win the entire tournament so you guys better keep up the good work ^^!

Now, the pictures I promised to post for Korean Students Association in the University of Colorado at Boulder:


- S. Korea vs. Indonesia


- 준모형 - KSA 회장님


- 3명의 유령 - 누가 누군지도 잘 모르겟다는.. -_-;


- 한솔 and ...죄송 이름이(?)알려주시면 고쳐드릴꼐요


- 인경 and 정빈


- 건영 and 성빈 (He went to Google with me!)

Let's have another blast on our upcoming NBA event in Denver Stadium!

I went to DMV in Denver and won this huge gorilla for a bit over 9,000 in a couple of hours of playing. I played the game where you can move the cursor vertically and horizontally and drop the grabber to catch the bottle, If you successfully do so, you get bunch of tickets printed out and I won it when I went there with my friends from the Korean Central Presbyterian Church. Fairly impressively big one with only about 2 hours of playing.


Life Goes On: LuxuryMagic #7 - LuxuryMaster's Life BluePrint: Long Term Positive Effects








I have been living my life like a mayfly ever since I came to this country. I have recently learned that what pulled my life together to make become what I am today is not because I am born with brain that surpasses others.

I have surely worked harder than other teenagers and went through challenging moments when I was young but I do not think that is exactly the cause of what makes LuxuryMaster today. As cocky as it seems, I feel extremely proud of myself.

I have had a lot of miracle experiences ever since I came to this country on 2000. I have always wondered what actually made LuxuryMaster so lucky in critical stages of my life.

I first thought it was because of people who have been supporting me but after opening my eyes on a lot of things on different things on positive way, I have learned that there is something non-existent entity that has been assisting me - Jesus.

Because of so many miracle happenings in critical stages when I was young, I feel like everyday I live on the continent is blessing to me. I now have no fear of losing anything in my life except people around me.

When I like to make friends or start relationships, I like to view attitude of person's friends to determine if I like to be friend with him/her. I believe it is a lot easier to tell someone's true heart as people can always can fake their true intention. However, looking at his/her friends will tell you a lot of his/her past experience and future life. I can't express how happy I feel once I have no expectation but just do what I love to do.

However, if I lose something in unrighteously, I like to use best of my abilities to fight. This is why I sometimes had to tell my good friends that I can either become your worst enemy or best friend.

I have finally figured out what exactly is "Meaning of Life" is on my heart. I have decided to devote my future brainstorming an idea and turn that into a technology that can potentially benefit millions of lives using technologies just like Google. I have decided to walk through my future career with Translations.com to accomplish this goal.

I think the reason why I applied to Google is because I had gained that envision on my heart by going through certain experiences and perceptions recently. I still feel we shared somewhat vision and I still love Google although they might not like me:)

I perceive my life is simple as this: accomplish something that can positively influence other people while doing something meaningful, technical, and beneficial to others while having fun doing it. This has became very clear to me recently. No anticipation of tomorrow or expectation of result, just live a day like a mayfly while having fun doing it - This is what I call Jesus's blessing and I feel like I have earned it.

I view myself as a mayfly that currently flies in low altitude but I believe some mayfly envisions to fly high altitude with strong determination and positive heart although it is currently flying low. Carpe diem - "seize the day"