Sagewire Logo

Between C++ and web server

10 Message(s) by 5 Author(s) originally posted in java programming


From: Carey Carlan Date:   Tuesday, February 20, 2007
Can the bright minds here point me to the JAVA tools best suited to
int erfacing a C++ library with the widest range of web server s?

Fundamental question from a JAVA newbie. I'm about to start a web app with
the business logic contained in a C++ DLL (could be a COM object if
necessary). It must be compiled to protect the intellectual property
within. My research to date indicates that JAVA is both portable and
powerful enough to manage my library if I can talk to enough servers.

I will need to host this C++ code on the client's web server, be that Apache ,
IIS , or the next new flavor of the month. I'm hoping for many clients with
many different web servers.

Do web servers have a common, standard JAVA interface? Do all web servers
except IE share an interface?

Is JAVA the best interface for this application?

Book and web page references are welcome.


From: IchBin Date:   Tuesday, February 20, 2007
wrote in message :
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?
Fundamental question from a JAVA newbie. I'm about to start a web app with
the business logic contained in a C++ DLL (could be a COM object if
necessary). It must be compiled to protect the intellectual property
within. My research to date indicates that JAVA is both portable and
powerful enough to manage my library if I can talk to enough servers.
I will need to host this C++ code on the client's web server, be that Apache,
IIS, or the next new flavor of the month. I'm hoping for many clients with
many different web servers.
Do web servers have a common, standard JAVA interface? Do all web servers
except IE share an interface?
Is JAVA the best interface for this application?
Book and web page references are welcome.


You want to search for JNI , "JAVA Native Interface".

A simple Google for say "JAVA JNI Tutorials"'d return a lot of
references. Like:

http://JAVA.sun.com/developer/onlineTraining/Programming/JDCBook/jni.html

--
Thanks in Advance... http://weconsultants.prophp.org
IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)


From: Carey Carlan Date:   Tuesday, February 20, 2007
wrote in message in


wrote in message:
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?

Fundamental question from a JAVA newbie. I'm about to start a web
app with the business logic contained in a C++ DLL (could be a COM
object if necessary). It must be compiled to protect the
intellectual property within. My research to date indicates that
JAVA is both portable and powerful enough to manage my library if I
can talk to enough servers.

I will need to host this C++ code on the client's web server, be that
Apache, IIS, or the next new flavor of the month. I'm hoping for
many clients with many different web servers.

Do web servers have a common, standard JAVA interface? Do all web
servers except IE share an interface?

Is JAVA the best interface for this application?

Book and web page references are welcome.
You want to search for JNI, "JAVA Native Interface".
A simple Google for say "JAVA JNI Tutorials"'d return a lot of
references. Like:
http://JAVA.sun.com/developer/onlineTraining/Programming/JDCBook/jni.ht
ml



Thank you, that is very helpful in connecting the C++ library to JAVA.
I have marked it and will use that information. Knowing what to look for
is half the battle.

However, the question is: Is there a common interface between JAVA and
the web servers of the world? If I create an HTTP request to a JAVA
class from my browser via IIS or Apache, is the JAVA side of that call
identical in both cases? How does the server invoke JAVA? Are the
parameters identical?

Is there another acronym I can research for the server -> JAVA interface?


From: IchBin Date:   Tuesday, February 20, 2007
wrote in message:
wrote in message in

wrote in message:
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?
Fundamental question from a JAVA newbie. I'm about to start a web
app with the business logic contained in a C++ DLL (could be a COM
object if necessary). It must be compiled to protect the
intellectual property within. My research to date indicates that
JAVA is both portable and powerful enough to manage my library if I
can talk to enough servers.
I will need to host this C++ code on the client's web server, be that
Apache, IIS, or the next new flavor of the month. I'm hoping for
many clients with many different web servers.
Do web servers have a common, standard JAVA interface? Do all web
servers except IE share an interface?
Is JAVA the best interface for this application?
Book and web page references are welcome.
You want to search for JNI, "JAVA Native Interface".

A simple Google for say "JAVA JNI Tutorials"'d return a lot of
references. Like:

http://JAVA.sun.com/developer/onlineTraining/Programming/JDCBook/jni.ht
ml
Thank you, that is very helpful in connecting the C++ library to JAVA.
I have marked it and will use that information. Knowing what to look for
is half the battle.
However, the question is: Is there a common interface between JAVA and
the web servers of the world? If I create an HTTP request to a JAVA
class from my browser via IIS or Apache, is the JAVA side of that call
identical in both cases? How does the server invoke JAVA? Are the
parameters identical?
Is there another acronym I can research for the server -> JAVA interface?
JSP and Servlets



--
Thanks in Advance... http://weconsultants.prophp.org
IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)


From: IchBin Date:   Tuesday, February 20, 2007
wrote in message:
wrote in message in

wrote in message:
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?
Fundamental question from a JAVA newbie. I'm about to start a web
app with the business logic contained in a C++ DLL (could be a COM
object if necessary). It must be compiled to protect the
intellectual property within. My research to date indicates that
JAVA is both portable and powerful enough to manage my library if I
can talk to enough servers.
I will need to host this C++ code on the client's web server, be that
Apache, IIS, or the next new flavor of the month. I'm hoping for
many clients with many different web servers.
Do web servers have a common, standard JAVA interface? Do all web
servers except IE share an interface?
Is JAVA the best interface for this application?
Book and web page references are welcome.
You want to search for JNI, "JAVA Native Interface".

A simple Google for say "JAVA JNI Tutorials"'d return a lot of
references. Like:

http://JAVA.sun.com/developer/onlineTraining/Programming/JDCBook/jni.ht
ml
Thank you, that is very helpful in connecting the C++ library to JAVA.
I have marked it and will use that information. Knowing what to look for
is half the battle.
However, the question is: Is there a common interface between JAVA and
the web servers of the world? If I create an HTTP request to a JAVA
class from my browser via IIS or Apache, is the JAVA side of that call
identical in both cases? How does the server invoke JAVA? Are the
parameters identical?
Is there another acronym I can research for the server -> JAVA interface?



Sorry... Look at JSP, Servlets and maybe Tomcat. Not sure if you already
have a server. A lot of other people use apache in front of Tomcat
which run JSP and Servlets for security and performance.

A lot of people may watch this newsgroup but it maybe better if you post
to either:

comp.lang.JAVA.help
comp.lang.JAVA.programmer

You may bet more specific responses than mine, sorry.

--
Thanks in Advance... http://weconsultants.prophp.org
IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)


From: dagon Date:   Tuesday, February 20, 2007
wrote in message:
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?



A whole lot depends on exactly what you're doing. If you have got a bunch of
C++ code that works, there may be no reason to bring JAVA into it at all -
just use the code you've.

Fundamental question from a JAVA newbie. I'm about to start a web app with
the business logic contained in a C++ DLL (could be a COM object if
necessary). It must be compiled to protect the intellectual property
within.



You're aware that this isn't actual security, right? JAVA's a bit easier to
decompile than C++, but both are possible.

Do web servers have a common, standard JAVA interface? Do all web servers
except IE share an interface?



No. Every web server has a different interface. One common way to handle
this is to run the JAVA servlets in Tomcat, and use the Jakarta Connector to
interface that with the frontend webserver (there are a number of different
support ed ones). See http://tomcat.apache.org/connectors-doc/

Is JAVA the best interface for this application?



Probably not. If you're doing all the work in C++, I'd recommend writing the
adaptors to each webserver you want to support in C++. IMO, obfuscation is a
poor reason to prefer a language, but once you have chosen, dance with who brung
ya. Supporting pieces in two languages is going to be harder, and you should
only do it if there are strong reasons. Such reasons exist, but you have not
mentioned any of them so they may not apply to you.
--
Mark Rafn dagon@xxxxxxxxxxx <http://www.dagon.net/>


From: Carey Carlan Date:   Tuesday, February 20, 2007
wrote in message in

However, the question is: Is there a common interface between JAVA
and the web servers of the world? If I create an HTTP request to a
JAVA class from my browser via IIS or Apache, is the JAVA side of
that call identical in both cases? How does the server invoke JAVA?
Are the parameters identical?

Is there another acronym I can research for the server -> JAVA
interface?
Sorry... Look at JSP, Servlets and maybe Tomcat. Not sure if you
already have a server. A lot of other people use apache in front of
Tomcat which run JSP and Servlets for security and performance.
A lot of people may watch this newsgroup but it maybe better if you
post to either:
comp.lang.JAVA.help
comp.lang.JAVA.programmer
You may bet more specific responses than mine, sorry.



Please do not apologize. The information you are supplying is what I need.
I'm moving into new turf here. A few directions go a long way.


From: Carey Carlan Date:   Tuesday, February 20, 2007
wrote in message in


wrote in message:
Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?
A whole lot depends on exactly what you're doing. If you have got a
bunch of C++ code that works, there may be no reason to bring JAVA
into it at all - just use the code you've.



What I'm doing is porting a desktop application to the web. Many of our
customers already have websites and working this application into their
existing web server is important. Others currently run offline and for
those I will build a simple localhost interface to link their web browser
almost directly to the back end.

Fundamental question from a JAVA newbie. I'm about to start a web app
with the business logic contained in a C++ DLL (could be a COM object
if necessary). It must be compiled to protect the intellectual
property within.
You're aware that this isn't actual security, right? JAVA's a bit
easier to decompile than C++, but both are possible.



It keeps the honest people out. More importantly, I'm more familiar with
C and C++ and can write faster using those tools.

Do web servers have a common, standard JAVA interface? Do all web
servers except IE share an interface?
No. Every web server has a different interface. One common way to
handle this is to run the JAVA servlets in Tomcat, and use the Jakarta
Connector to interface that with the frontend webserver (there are a
number of different supported ones). See
http://tomcat.apache.org/connectors-doc/



That's good information, thank you.

Is JAVA the best interface for this application?
Probably not. If you're doing all the work in C++, I'd recommend
writing the adaptors to each webserver you want to support in C++.
IMO, obfuscation is a poor reason to prefer a language, but once
you have chosen, dance with who brung ya. Supporting pieces in two
languages is going to be harder, and you should only do it if there
are strong reasons. Such reasons exist, but you have not mentioned any
of them so they may not apply to you. --
Mark Rafn dagon@xxxxxxxxxxx <http://www.dagon.net/>



I hoped to separate the business logic from the web server interface. I
was under the impression that web servers "like" JAVA better than generic
compiled libraries. If the interface is that variant then perhaps I
could just build the various interfaces into my web service.


From: Lew Date:   Tuesday, February 20, 2007
wrote in message:
I hoped to separate the business logic from the web server interface. I
was under the impression that web servers "like" JAVA better than generic
compiled libraries. If the interface is that variant then perhaps I
could just build the various interfaces into my web service.



Web servers /per se/ don't like JAVA. Certain application servers such as
Apache Tomcat or JBoss are written specifically to support JAVA, especially
JAVA Web technologies like JEE (JSP, servlets, EJB and other acronyms).
Others, like IIS and Apache Web Server, have no built-in mechanisms for
working with JAVA code.

One can protect JAVA code behind the server just as readily (or unreadily) as
C++ code.

Consider also portals, that is, web adapters that interact with legacy systems
and make a web interface for them.

- Lew


From: mlw Date:   Monday, March 26, 2007
wrote in message:

Can the bright minds here point me to the JAVA tools best suited to
interfacing a C++ library with the widest range of web servers?



If you've the C++ library, I'm sure you've C binding functions, if not,
something like this:

extern "C" myfunction(...)
{
cppobj->method();
}

In JAVA, use the native interface decl

class myclass
{
native int foo();
}

To interface between JAVA and C bindings, you need JAVAh, use it like this:

JAVAh -jni myclass

And it'll produce a header file, from which you can probably hack a C
interface.

Have fun, the rest is up to you.

Fundamental question from a JAVA newbie. I'm about to start a web app
with the business logic contained in a C++ DLL (could be a COM object if
necessary). It must be compiled to protect the intellectual property
within. My research to date indicates that JAVA is both portable and
powerful enough to manage my library if I can talk to enough servers.



Once you've a JAVA interface, you could use JAVA's remote interfacing and
make it distributed. Just know, once you use JNI, you've to compile and
test for every supported platform and JAVA VM.

I'll need to host this C++ code on the client's web server, be that
Apache,
IIS, or the next new flavor of the month. I'm hoping for many clients
with many different web servers.



Well, it should be possible. If your C++ library compiles and works on a
various assortment of operating systems and environments aleady, chances
are you've the expertise to do the same with the JNI interface.
Do web servers have a common, standard JAVA interface? Do all web servers
except IE share an interface?
Is JAVA the best interface for this application?
Book and web page references are welcome.







Next Message: Which group(s)?


Blogs related to Between C++ and web server

Java, ActiveX, Anything - UDP across domains
If I could place the applet in that images directory on the game server, would I be able to load the applet with an HTML page from the web server & be able to connect back to the game server, or would a difference in ports between what ...

What the Web’s most popular sites are running on
It’s by far the most deployed web server on the Internet with a 58.7% market share (Netcraft), so it’s only natural that it would also be used by a majority of the sites in the survey. However, even though it’s the behemoth in the web ...

Failure to Deploy - Java's Desktop Deployment Deficiencies are a ...
This is especially disconcerting when one considers the confusion that would ensue if the application server were inaccessible. This deficiency bleeds over into the Java Web Start deployment solution. Even if the Java Web Start client ...

Rich Internet Applications: State of the Union
RIAs run in a virtual machine (ie, Adobe Flash Player or Java VM) and have the potential of becoming a full-featured desktop application soon. As opposed to just simply displaying Web pages delivered from some server machine, ...

Q&A on OCS & Sync Services for ADO.NET
You can use just the client components and use Java and Oracle on the server, or you can use just the server components and other technologies on the client. If your data is locked up in Oracle, you can still use Sync Services to ...

Differences between Web server and Application server
Differences between Web server and Application server: We use Tomcat web server or sun Application server to deploy web applications . What is.


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional