the other day a frnd of mine has asked me:
"Could you comment on Why MVC Architecture like Struts,
Spring are better than simple JSP-Servlet applications? Since
JSP-Servlet is bit easy, faster, user friendly etc."

though we've been know'g the answer since ages but still I felt that there is more to it:
why to opt for MVC than plain jsp-servlet based is what I felt the question should be framed to (plz don't consider struts/ spring i'll come to that later **)
--> centralised control or gateway(Servlet Centric vs Page Centric)
--> modularisation
--> layered architecture, hence no dependcencies(eg: in a team where
they've specialised web designers/ develoopers java developers are
still independent to code the controlers & write the business logic)
--> for bigger n complex application archtecture, maintenance is a
pain

now coming back to struts / spring...
ther are not MVC but implementing MVC architecture, which aint
mandatory
u might even use incorporate jsp/ servlet into MVC arch to create ur
own customised arch along with javabeans/ TO/ VO or diff design
patterns

but then why do frmwrks alike struts n spring do survive...
--> easy to configure(xml based single point entry)
--> easily wired with dao/ business tier
--> integration to hibernate, toplink, ejb, or differnt components are
made easy
--> spring has got internal components for entire N tier arch.. :)

 
I would like to share my experience, I had been look’g out for a website & not a blog bcoz of some of the opbvious reasons
-navigation
-grouping the topics based on the themes(separated to new pages)
-template based easy sites

& I happen to find a couple:

my recommendations:
  1. weebly
  2. wix

which one to opt for:
  1. opt for weebly if u got a huge project & if u already own a domain name weebly can help u colaborate to it ALL FREE
  2. opt for wix if ur project is of small scale & u need flash based attractive ui

why to opt for:
  1. all free
  2. easy to build
  3. customise according to ur need
  4. upgradable to registered
  5. if u already own a domain name weebly can help u colaborate to it ALL FREE
 
"Exception in thread "main" java.lang.OutOfMemoryError: Java heap space"

- Why does this occur?
- practical scenarios seen.
- Can this be handled programatically?
- Should this be handled programatically?

Why does this Occur?
  1. jvm memory leak, ill heap management.
  2. unavailability of sufficient memory for application to load.
  3. unintentional memory retention.

Practical Scenarios:
  1. build failed due to out of memory
  2. unable to load the application
  3. taking huge turn around time by application


Solution:
  1. set ANT_OPTS environment variable.
  2. set new initial size onSun JVM use the -XX:PermSize=64m option when starting the virtual machine and set the maximum permanent generation size use -XX:MaxPermSize=128m option.
  3. increase the RAM of the system.
  4. using caching techniques.
  5. releasing the resources(db or other instance variables) in finally block.

Should this be handled programatically?
- this is where most people would not stand together as heap management is done internally @ JVM level.

Can this be handled programatically? 

- During one of the business requirement, where I was expected to catch OOME & help the application not terminate abruptly.
java.lang.Object  
      |  
     +----java.lang.Throwable  
                  |  
                 +----java.lang.Error  
                             |  
                            +----java.lang.VirtualMachineError  
                                         |  
                                        +----java.lang.OutOfMemoryError


java.lang.Object  
      |  
     +----java.lang.Throwable  
                  |  
                 +----java.lang.Error  
                             |  
                            +----java.lang.ThreadDeath

ThreadDeath is not caught, as catching it means that threads never exit properly.
catch (Throwable ex){
if (!(ex instanceof ThreadDeath))
{ex.printStackTrace(System.err);
}}

read more on: 
  1. ThreadDeath
  2. Java Performance Tuning
  3. Javaspecialists.eu
  4. stackflowover
  5. freshblurbs

 
aarang@card.ly
Aarang@Card.ly
Last nite I happen to find a online business card site!
Its restric to none but a must 've for techies, proffesionals, students(final yr!!!) who want a to share their business card & enhance their social network as well.

key features:
- one may add n no. of social network links(linkedin, facebook, stumbleupon, technorati, blogger,  wordpress & likes)
- contact details
- blogs/ rss links
- instant messenger ids
- 38 skins for business card.
- self info(which cld b descriptive)

** above all its free!!!!

 
I’ve just happened to find ZOHO: http://www.zoho.com/
i agree compete’g with google wd b too early to say…..
but this one provides n number of gadgets n tool to deal with personal & professional data

Zoho Show : Zoho Show Online presentation tool
Zoho Invoice : Zoho Invoice Online Invoicing. Quick and Easy
Zoho Writer : Zoho Writer Online word processor
Zoho Reports : Zoho Reports Online Database & Reporting
Zoho CRM : Zoho CRM On-demand Customer Relationship Management solution
Zoho Creator : Zoho Creator Online web applications creator
Zoho Planner : Zoho Planner Online organizing tool
Zoho Docs : Zoho Docs Online Document Management
Zoho Sheet : Zoho Sheet Online spreadsheet service
Zoho Meeting : Zoho Meeting Web Conferencing
Zoho Share : Zoho Share Centralized Public Repository
Zoho Notebook : Zoho Notebook Online Note Taker
Zoho Projects : Zoho Projects Project Management
Zoho Wiki : Zoho Wiki Online Wiki with public, private & group permissions
Zoho Chat : Zoho Chat Instant messaging and group chat tool
 
Google Wave is a new online communication and collaboration tool.

As per my understanding Wave wd be a common networking platform along with better UI & sophisticated gadgets, that u may even get by configuring ur gmail settings. There are so many gadgets available through Labs(google) also some uri based online gadgets can be configured. Even u may ur facebook & myspace!
Wave is more of a fun material for students! as almost all google stuffs available all together. But no doubt about the developing team, HATS OFF to them for what they’ve achieved.

Luved te Real-time concept(Wave/ Wavelet & Blips)

Google Wave: http://wave.google.com/help/wave/about.html
 
I’ve been using this phone since 5 mnths now!
I’ve never been a nokia guy specifically a symbian.
I’ve prefered the piece bcoz of the touch concept @ such a low price!

Cons:
- Camera: in low light/ indoor is the biggest disappointment tht I’ve come across!(but works gr8 in day light...shdn’t expect a cybershot effect)
- symbian os problems persists(occasional hang-out)
- no direct key even though its a music phone.
Pros:
- Bigger Touch screen compared to rivals(most),
- Accelorometer is gud.
- Nokia Maps 2.0
- TV Out

- 3.5 mm jack for music.
- affctive gps,
- gud gprs speed - web rendering
- High-Speed usb
- a virtual alphanumeric keypad, a virtual computer-style QWERTY keyboard

# personal suggestion don’t expect the Jesus Phone (iphone) flavor in it!

some of key features added or resolved after an update to v21.0.025.
- search : along with web now a local system search(within ur phone)--grt feature
- dictionary: suports 3 languages @ a time
- camera: sequence mode.
- smoother touch response.
go 4 it if u r a symbian! or a college guy/ gal....not heavy to pocket..specifically now!
don’t opt for it u r looking for Camera phone!

reference:
specification
download-application
 

Apart from the basic file upload coding two more jar files are reqd:
 - commons-fileupload-1.2.1.jar
 - commons-io-1.3.2.jar
 i hope version is something not to worry much but better to have latest jar files.
 
 Runtime exceptions occurs in the absence: - HTTP Status 500 -
 1] BOTH jars are unavailable: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
 2] commons-fileupload-1.2.1.jar unavailable: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location]
 3] commons-io-1.3.2.jar unavailable: java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
 
Apart from these jar files another important key is Interceptor:
Absence of <interceptor-ref name="fileUpload"/> [used in struts.xml]

 By default file-upload functionality works for 2mb now the interceptor plays a vital role while uploading any doc size > 2mb!
 
server message:
SEVERE: org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (3539791) exceeds the configured maximum (2097152)
Jun 10, 2009 2:40:18 PM org.apache.struts2.interceptor.FileUploadInterceptor intercept
SEVERE: the request was rejected because its size (3539791) exceeds the configured maximum (2097152)
Jun 10, 2009 2:40:18 PM org.apache.struts2.dispatcher.Dispatcher serviceAction

browser message:
Struts Problem Report

Struts has detected an unhandled exception:
# Messages:     No result defined for action ui.FileUploadAction and result input
File:     file:/D:/nb/cms/build/web/WEB-INF/classes/struts.xml
Line number:     27
Column number:     73
        <action name="FileUpload" class="ui.FileUploadAction" method="upload">
            <result>/ui/ContentWorkspace.jsp</result>
        </action>

Stacktraces
No result defined for action ui.FileUploadAction and result input - action - file:/D:/nb/cms/build/web/WEB-INF/classes/struts.xml:27:73

Reference: http://www.roseindia.net/struts/struts2/struts-2-file-upload.shtml

 

Struts 2.0 is one of the great revolutions!

the ppt attached discusses:
- how to configure the plugins for struts2 in netbeans IDE.
- basic features of struts2.0.
- basic flow of struts2.0.
- architecture of struts2.0.
- some basic components in brief.

plugins for netbeans:
org-netbeans-modules-web-frameworks-struts2.nbm
org-netbeans-modules-web-frameworks-struts2lib20011.nbm

reference:
- roseindia.com
- Starting Struts2 by Ian Roughley [free ebook]
- Struts 2 Design and Programming: A Tutorial by Budi Kurniawan

struts2.0basic.ppt
File Size: 514 kb
File Type: ppt
Download File

org-netbeans-modules-web-frameworks-struts2.nbm
File Size: 134 kb
File Type: nbm
Download File

org-netbeans-modules-web-frameworks-struts2lib20011.nbm
File Size: 3411 kb
File Type: nbm
Download File

 

Change the properties of the gtalk.
An additional parameter "/nomutex" will do the job for U!

    Categories

    All
    5800
    Business Card
    Cardly
    Collaboration Tool
    Fileupload
    Google Wave
    Gtalk
    Java
    Mvc
    Nokia
    Oome
    Servletcentric
    Shortcut
    Struts2
    System
    Website
    Windows
    Zoho

    Archives

    December 2009
    November 2009
    September 2009
    August 2009
    June 2009
    May 2009
    February 2009
    November 2008
    October 2008