473,386 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Between C++ and web server

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'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.

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.
Feb 20 '07 #1
9 3512
Carey Carlan wrote:
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'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.

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" would return a lot of
references. Like:

http://java.sun.com/developer/online...CBook/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-)
Feb 20 '07 #2
IchBin <we******@ptd.netwrote in
news:Gp******************************@ptd.net:
Carey Carlan wrote:
>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'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.

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" would return a lot of
references. Like:

http://java.sun.com/developer/online...JDCBook/jni.ht
ml
Thank you, that is very helpful in connecting the C++ library to java.
I've 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?
Feb 20 '07 #3
Carey Carlan wrote:
IchBin <we******@ptd.netwrote in
news:Gp******************************@ptd.net:
>Carey Carlan wrote:
>>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'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.

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" would return a lot of
references. Like:

http://java.sun.com/developer/online...JDCBook/jni.ht
ml

Thank you, that is very helpful in connecting the C++ library to java.
I've 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-)
Feb 20 '07 #4
Carey Carlan wrote:
IchBin <we******@ptd.netwrote in
news:Gp******************************@ptd.net:
>Carey Carlan wrote:
>>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'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.

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" would return a lot of
references. Like:

http://java.sun.com/developer/online...JDCBook/jni.ht
ml

Thank you, that is very helpful in connecting the C++ library to java.
I've 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-)
Feb 20 '07 #5
Carey Carlan <gu*****@hotmail.comwrote:
>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've 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 have.
>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 is not 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
supported 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've 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 haven't
mentioned any of them so they may not apply to you.
--
Mark Rafn da***@dagon.net <http://www.dagon.net/>
Feb 20 '07 #6
IchBin <we******@ptd.netwrote in news:LN********************@ptd.net:
>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 don't apologize. The information you are supplying is what I need.
I'm moving into new turf here. A few directions go a long way.

Feb 20 '07 #7
da***@dagon.net (Mark Rafn) wrote in
news:2u************@hydra.dagon.net:
Carey Carlan <gu*****@hotmail.comwrote:
>>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've 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 have.
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'll 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 is not 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've 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 haven't mentioned any
of them so they may not apply to you. --
Mark Rafn da***@dagon.net <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.
Feb 20 '07 #8
Lew
Carey Carlan wrote:
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/ do not 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
Feb 21 '07 #9
mlw
Carey Carlan wrote:
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 have the C++ library, I'm sure you have 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 will 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 have a Java interface, you could use Java's remote interfacing and
make it distributed. Just know, once you use JNI, you have 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 have 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.
Mar 27 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: ^CeFoS^ | last post by:
Hi to everybody, due to I want to use the serial port of a server machine through an applet allocated in html document. > Then one application will run in the server machine and using > the serial...
1
by: KWilliams | last post by:
Hello, We are trying to set up replication between different versions of SQL Server (7 & 2000). This is how the 2 servers are now setup: DB1 - External web-server w/SQL Server 7 DB2 -...
6
by: Martin Meyer im Hagen | last post by:
Hello, I've got installed Win 2003 SBS Premium with the SQL Server 2000 on a server machine. It works almost fine, except the application which uses the SQL Server. The main part of the...
7
by: Ravi J | last post by:
What is the best way to transfer files between two .NET executables? I have a service, and a client program. Client asks service for data. The service creates one, and passes it back to client....
7
by: Jim Bayers | last post by:
We have a read only connection to the remote campus sql server. For security reasons, my network nazi won't let me have a web server on our local server that has this connection. Fine. He want's...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
19
by: VB Programmer | last post by:
If I have a VB6 and a VB.NET application, or 2 VB.NET applications what is the best way to "talk" between them? They both run on the same PC. Right now I'm just using text files to share...
7
by: Kenny M. | last post by:
Hi I want to write de content of a variable from my asp net code into the Title Bar of the Browser each time I need to switch between those world (HTML-ASPNET) I suffer cause I don’t have...
9
by: =?Utf-8?B?SG93YXJkIFNtaXRo?= | last post by:
I am using VC++ 6.0 (with SP5 installed). When using WinXP this is with SP2 installed. I am developing an instrumentation system comprising a set of networked PCs connected using TCP/IP TCP links....
1
by: bharathreddy | last post by:
This Article gives an introduction to VSTS Team Foundation & fundamental difference between Visual Source Safe (VSS) and VSTS Team Foundation. Team Foundation is a set of tools and technologies...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.