• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

servlets -> native code


We have implemented some servlet-based applications. We wish to convert these servlets into native-code. I ahve two questions:

1. can we convert servlets into native code and then use native code as we use servlets?
2. if so, how to convert servlets into native code (i mean how to compile them into object code for this purpose)?

Following are more details on the specifications:

a. we are hosting these servlets on TomCat. So it is OK if the answers/comments work for Tomcat alone.
b. our servlets interact with native code dll written in C++ (I mean we are using JNI technology).
c. The JNI in turn opens sockets to a server program running. This server program may or may not be running on the same system.
d. these servlets spit client-side programs. Thus these servlets are referred in the application URLs.
e. in one of the applications, we are using JDBC connections. It is OK if the solution works for servlets that do not contact JDBC. I do not know how much this point is of relevance, thought you should be aware.

Please let me know if you need more details.

1 Solution
> 1. can we servlets in native code?

No. Servlets are a Java concept.

> 2. if so, how to convert them?

You don't.

Of course you can convert your servlets to native code, but they will cease to be servlets and you will need to use a different method (eg cgi) to integrate them with your web server.

Sorry to say like this. What makes u think that u can convert Servlets to native code. U can use ASP or any CGI mechanism if u don't want to use java and be deprived of its advantages......

Servlets is very much a java technology and u have to write Servlets in JAVA only.

raghuraniAuthor Commented:
Raghu k n,

good morning, and welcome to the world of experts!

1. you are not supposed to propose any answer.
   this will move the question from 'awaiting answer' cart.
   please go through guidelines on how to use this site.

2. thanks for your suggestion, rather, proposed answer ;)
   I am rejecting it as I do not find any trace of
   answer in your statements. I have been programming in
   web-technologies for almost three years... I know
   what it takes to come up with a product. I have already
   written some applications (started with it a year back)
   and now we are at release 3.0. I selected Java when I
   was a porject leader... We wish to increase performance
   of our products. That is why I asked this question...

Thanks a lot to 'objects' for good comments. Wish I could get more details. Any pointers... any doc... should do.

thanks :)

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

raghuraniAuthor Commented:
'objects' I am working on your inputs.. thanks buddy :)
no worries.
Let me know if u have any questions.
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
Thank you everyone.
Moderator @ Experts Exchange
raghuraniAuthor Commented:

please accept my sincere apologies for keeping this question open. thanks a lot for your answer :-)

No worries :-)

Brainbench MVP for Java 1
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now