Running a Servlet as .exe or .dll

I noticed a feature in Visual Age that allows the compilation of platform independant bytecode code into platform specific code.
Is it possible to do this with servlets? So my servlet and associated beans run as .exe or .dll?
How would i go about fitting the resulting *.exe into my App Server?
thanks
Blair
blairdyeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

techtimeCommented:
As far as I remember this technology they use in VA emerged from HPJC (High Performance Java Compiler) that originally was designed exactly for that purpose you talk about.
So you write in java compile it into platform specific code and get a common CGI like application. And you treaty it just like CGI...
0
heyhey_Commented:
> Is it possible to do this with servlets?

you can.
but you'd better not. after all servlets are designed to be web server extensions.
0
blairdyeAuthor Commented:
>So you write in java compile it into platform >specific code and get a common CGI like >application. And you treaty it just like CGI...

so i compile a servlet and its related beans into a .exe... and then? How do I run it like a CGI?
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

heyhey_Commented:
> ... and then?

and then - nothing
you have to WRITE a CGI (CGI is common gateway interface) - servlets ARE NOT CGI SCRIPTS - they are CGI replacement.
0
techtimeCommented:
Well, first heyhey is definately right saying that "servlets" are not CGI scripts. They implement a Servlet interface and server uses its methods to get and post data to servlet. When you speak about compiled (.exe) code you can call it from your html as usual but it is not going to be a servlet anymore in a sense that the server won't use those sevlet methods to communicate with your code. I beleive standard input/output streams will be used.
So to summarize: 1) You _cannot_ make you _servlet_ as an .exe file
2) You still _can_ use VA java to make CGI scripts.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rainmalCommented:
no need to go over all that has been already said here but think about it this way.

Currently your Web Server calls the doGet and doPost methods that you have over ridden in your servlet in response to a HTTP GET and POST request,
The server also provides the Request and Response context objects that you use to respond to the client.

Suppose you do create an exe from a servlet....how then do you expect to
handle all this??

BOTTOM LINE....refer to techtime's comment!!.

0
heyhey_Commented:
>> 2) You still _can_ use VA java to make CGI scripts.

as I already said :)
'you can.
but you'd better not.'

btw. it won't be easy, because CGI scripts rely on environment variables and
(class System) public static String getenv(String name) is deprecated in Java 1.1 (and it does NOT work)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.