servlets -> native code

Posted on 2001-08-08
Medium Priority
Last Modified: 2013-11-24

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.

Question by:raghurani
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 92

Accepted Solution

objects earned 800 total points
ID: 6367001
> 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.


Expert Comment

ID: 6367954
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.


Author Comment

ID: 6368111
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 :)

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more


Author Comment

ID: 6368117
'objects' I am working on your inputs.. thanks buddy :)
LVL 92

Expert Comment

ID: 6370365
no worries.
Let me know if u have any questions.

Expert Comment

ID: 6905635
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

Author Comment

ID: 6909814

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

LVL 92

Expert Comment

ID: 6911222
No worries :-)

Brainbench MVP for Java 1

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses
Course of the Month11 days, 15 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question