AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Between C++ and web server

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java
View previous topic :: View next topic  
Author Message
Carey Carlan
Guest





PostPosted: Tue Feb 20, 2007 10:29 pm    Post subject: Between C++ and web server Reply with quote



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.
Back to top
IchBin
Guest





PostPosted: Tue Feb 20, 2007 11:50 pm    Post subject: Re: Between C++ and web server Reply with quote



Carey Carlan wrote:
Quote:
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/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-)
Back to top
Carey Carlan
Guest





PostPosted: Wed Feb 21, 2007 12:07 am    Post subject: Re: Between C++ and web server Reply with quote



IchBin <weconsul (AT) ptd (DOT) net> wrote in
news:GpGdnVGiu45QqUbYnZ2dnUVZ_hisnZ2d (AT) ptd (DOT) net:

Quote:
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/onlineTraining/Programming/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?
Back to top
IchBin
Guest





PostPosted: Wed Feb 21, 2007 2:22 am    Post subject: Re: Between C++ and web server Reply with quote

Carey Carlan wrote:
Quote:
IchBin <weconsul (AT) ptd (DOT) net> wrote in
news:GpGdnVGiu45QqUbYnZ2dnUVZ_hisnZ2d (AT) ptd (DOT) 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/onlineTraining/Programming/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-)
Back to top
IchBin
Guest





PostPosted: Wed Feb 21, 2007 2:30 am    Post subject: Re: Between C++ and web server Reply with quote

Carey Carlan wrote:
Quote:
IchBin <weconsul (AT) ptd (DOT) net> wrote in
news:GpGdnVGiu45QqUbYnZ2dnUVZ_hisnZ2d (AT) ptd (DOT) 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/onlineTraining/Programming/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-)
Back to top
Mark Rafn
Guest





PostPosted: Wed Feb 21, 2007 3:14 am    Post subject: Re: Between C++ and web server Reply with quote

Carey Carlan <gulfjoe (AT) hotmail (DOT) com> wrote:
Quote:
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.

Quote:
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.

Quote:
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/

Quote:
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 dagon (AT) dagon (DOT) net <http://www.dagon.net/>
Back to top
Carey Carlan
Guest





PostPosted: Wed Feb 21, 2007 5:19 am    Post subject: Re: Between C++ and web server Reply with quote

IchBin <weconsul (AT) ptd (DOT) net> wrote in news:LNednd1zCs3jx0bYUSdV9g (AT) ptd (DOT) net:

Quote:
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.
Back to top
Carey Carlan
Guest





PostPosted: Wed Feb 21, 2007 5:25 am    Post subject: Re: Between C++ and web server Reply with quote

dagon (AT) dagon (DOT) net (Mark Rafn) wrote in
news:2u4sa4-vm5.ln1 (AT) hydra (DOT) dagon.net:

Quote:
Carey Carlan <gulfjoe (AT) hotmail (DOT) com> 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?

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.

Quote:
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.

Quote:
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.

Quote:
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 dagon (AT) dagon (DOT) 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.
Back to top
Lew
Guest





PostPosted: Wed Feb 21, 2007 6:58 am    Post subject: Re: Between C++ and web server Reply with quote

Carey Carlan wrote:
Quote:
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
Back to top
mlw
Guest





PostPosted: Tue Mar 27, 2007 7:10 am    Post subject: Re: Between C++ and web server Reply with quote

Carey Carlan wrote:

Quote:
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.

Quote:

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.

Quote:

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.
Quote:
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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> comp.lang.java All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.