🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.java.programmer
2 messages
2 total messages Started by Harvinder Singh Tue, 28 Jan 2003 17:18
Converting CGI code to JSP
#477
Author: Harvinder Singh
Date: Tue, 28 Jan 2003 17:18
9 lines
1308 bytes
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
Re: Converting CGI code to JSP
#478
Author: Kevin Hooke
Date: Tue, 28 Jan 2003 21:55
34 lines
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads