Article View: comp.lang.java.programmer
Article #478Re: Converting CGI code to JSP
From: Kevin Hooke
Date: Tue, 28 Jan 2003 21:55
Date: Tue, 28 Jan 2003 21:55
34 lines
3300 bytes
3300 bytes
Depending on what the existing cgi does you might want to consider re-architecting it - it might not be as simple as a 1-to-1 conversion. Again, depending on what the existing cgi does you might want to consider splitting it into JSP for presentation and servlets acting as controllers. You might also want to look at using Jakarta Struts which gives you a good architecture for the model/view/controller pattern for webapps. I think the main benefit/difference between cgi and JSP/Servlets is that Servlets are multithreaded - one servlet instance can service multiple client requests concurrently, whereas cgi is traditionally 1 request = 1 cgi process. Therefore servlets are more memory efficient on the server. A common problem people run into when developing servlets for the first time is they forget the servlet is mulithreaded, and find that data being used by the servlet is being changed/overwritten inexplicably between different client requests. Make sure your jsp pages/servlets are threadsafe. You can read much more about this in the J2EE tutorials on the java.sun.com site. Kevin Hooke Kev's Development Toolbox http://www.kevinhooke.com "Harvinder Singh" <harvinderrikhi@yahoo.co.uk> wrote in message news:fce33b70.0301280918.38c1cb7@posting.google.com... > Hi All, > I am working on a project werein I have to convert an applications > CGI part into JSP. Could anyone let me know..... > > 1. What type of problems I would face. > 2. Can anyone suggest a PPT where I can see the difference among them. > > Thanks > HArvidner Singh
Technical Details
Message-ID:
<B%CZ9.5171$Qo3.1774@newssvr16.news.prodigy.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!ngpeer.news.aol.com!news.cis.ohio-state.edu!news.maxwell.syr.edu!cyclone.bc.net!logbridge.uoregon.edu!nntp.flash.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr16.news.prodigy.com.POSTED!41c9dc55!not-for-mailReferences:
<fce33b70.0301280918.38c1cb7@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10a146,e23f38d1b88e0a97 X-Google-Attributes: gid10a146,public X-Google-Thread: f4be4,e23f38d1b88e0a97 X-Google-Attributes: gidf4be4,public X-Google-Thread: 10026d,e23f38d1b88e0a97 X-Google-Attributes: gid10026d,public X-Google-ArrivalTime: 2003-01-28 13:56:04 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!lnsnews.lns.cornell.edu!newsstand.cit.cornell.edu!ngpeer.news.aol.com!news.cis.ohio-state.edu!news.maxwell.syr.edu!cyclone.bc.net!logbridge.uoregon.edu!nntp.flash.net!prodigy.com!newsmst01.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr16.news.prodigy.com.POSTED!41c9dc55!not-for-mail From: "Kevin Hooke" <kevinNOSPAM@kevinhooke.com> Newsgroups: comp.lang.java.programmer,borland.public.jbuilder.servlets-jsp,weblogic.developer.interest.jsp References: <fce33b70.0301280918.38c1cb7@posting.google.com> Subject: Re: Converting CGI code to JSP Lines: 36 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <B%CZ9.5171$Qo3.1774@newssvr16.news.prodigy.com> NNTP-Posting-Host: 66.127.112.130 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr16.news.prodigy.com 1043790945 ST000 66.127.112.130 (Tue, 28 Jan 2003 16:55:45 EST) NNTP-Posting-Date: Tue, 28 Jan 2003 16:55:45 EST Organization: Prodigy Internet http://www.prodigy.com X-UserInfo1: OP[YBU_DVBTWSRD[N[O@_WH@YR_B@EXLLBWLOOAFMAVNDQUBLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Date: Tue, 28 Jan 2003 21:55:45 GMT