comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* HttpSession expired vs. invalidated - 9 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbbb2dba35e4659b
* "static" prefix - to parallel "this" prefix - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157
* file separator - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f
* public folder in Exchange - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/27217e1d575b79bb
* Invalid cursor state - Am I completely stupid? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/780f6a3d7ad2d49a
* Outputing JSP Code from a database - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3656d14aafe6341d
* Unable to establish a socket connection - Got it! - 2 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49
* Auto submit Struts form every 'n seconds - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f1db635d5081dd3
* Tomcat 5, EL Expressions in jsp:inlcude - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4da7307e1d9d37b9
* how to declare constant with JAXB - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97102f429b2d83a2
* ActiveX Container in Java - 3 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/188085b06e48f3d1
* Writing to SYSTEM.IN possible ? (other program should take this output) - 1 
messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3360e5fb92a5b1b2
* Server to use with JMF? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5385de1842e9e5c8

==============================================================================
TOPIC: HttpSession expired vs. invalidated
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dbbb2dba35e4659b
==============================================================================

== 1 of 9 ==
Date: Mon, Dec 6 2004 7:26 am
From: [EMAIL PROTECTED] 

Hi,

I have a session holding user data of an online survey. When the survey
is completed, all data is written to a result file. After that the
session is manually invalidated (servlet calling the invalidate
method).

If the respondent does not complete the interview the session times out
at some point. I would like to flush the data I have in the session so
far to a special result file.

Is there a way of reacting to session expiration (by the server) and
not to invalidation (by the servlet)?

Using HttpSessionListener.sessionDestroyed(HttpSessionEvent se) does
not work, because the data of HttpSessionEvent.getSession() is not
accessible any more when the event is fired. Furthermore the
HttpSessionEvent is fired when the session expires and when the session
is manually invalidated.

Does anyone have advice?

THX,

Chris




== 2 of 9 ==
Date: Mon, Dec 6 2004 4:51 pm
From: Andrea Desole  

I don't think there is a way to make a distinction between invalidate 
and expire. You will have to do that by yourself, keeping track of the 
sessions you invalidate.
For the data, try the session binding listener:

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpSessionBindingListener.html



[EMAIL PROTECTED] wrote:
> Hi,
> 
> I have a session holding user data of an online survey. When the survey
> is completed, all data is written to a result file. After that the
> session is manually invalidated (servlet calling the invalidate
> method).
> 
> If the respondent does not complete the interview the session times out
> at some point. I would like to flush the data I have in the session so
> far to a special result file.
> 
> Is there a way of reacting to session expiration (by the server) and
> not to invalidation (by the servlet)?
> 
> Using HttpSessionListener.sessionDestroyed(HttpSessionEvent se) does
> not work, because the data of HttpSessionEvent.getSession() is not
> accessible any more when the event is fired. Furthermore the
> HttpSessionEvent is fired when the session expires and when the session
> is manually invalidated.
> 
> Does anyone have advice?
> 
> THX,
> 
> Chris
> 



== 3 of 9 ==
Date: Mon, Dec 6 2004 8:04 am
From: [EMAIL PROTECTED] 

Hi Andrea,

thx for your reply.

>You will have to do that by yourself, keeping track of the sessions
you invalidate.
ok, I could do that

>For the data, try the session binding listener
To use this I would have to bind every single value that is stored in
the session. On expiration I would have to save every single value.
There must be a better way. 

Yours,

Chris




== 4 of 9 ==
Date: Mon, Dec 6 2004 11:25 am
From: Sudsy  

[EMAIL PROTECTED] wrote:
<snip>
>>For the data, try the session binding listener
> 
> To use this I would have to bind every single value that is stored in
> the session. On expiration I would have to save every single value.
> There must be a better way. 

There is: the data should be encapsulated in a single object which can
then be serialized when the session is unbound.

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.




== 5 of 9 ==
Date: Mon, Dec 6 2004 5:30 pm
From: Andrea Desole  

looking at the documentation I found out that there is another listener, 
  HttpSessionAttributeListener, which might be easier to use.
I don't have a better solution, but if you are keeping track of the 
sessions you invalidate, I would say that it might be better to keep 
track of the sessions that don't have to be saved. So you can do this:

if a session is invalidated, you register it as a "non save" session, 
for exemple by putting its id in a set
if a session expires its attributes will be removed. When the first 
attribute is removed you check if the session is in the set. If not, you 
can dump all the session attributes, and then add the session to the 
set. If the session is already in the set you do nothing.
when the session is destroyed you remove the session from the set.

A bit complex maybe, but it should do the job


[EMAIL PROTECTED] wrote:
> Hi Andrea,
> 
> thx for your reply.
> 
> 
>>You will have to do that by yourself, keeping track of the sessions
> 
> you invalidate.
> ok, I could do that
> 
> 
>>For the data, try the session binding listener
> 
> To use this I would have to bind every single value that is stored in
> the session. On expiration I would have to save every single value.
> There must be a better way. 
> 
> Yours,
> 
> Chris
> 



== 6 of 9 ==
Date: Mon, Dec 6 2004 8:45 am
From: [EMAIL PROTECTED] 

Hi Andrea,

>When the first attribute is removed .... you can dump all the session
attributes ...
This is not possible, because when the HttpSessionBindingEvent is
received, all attributes are already removed from the session and are
not accesible any more :(

To me dumping session variables on expiration seems to be a pretty
normal usecase, I can't believe there is no easy way of doing that.
Chris




== 7 of 9 ==
Date: Mon, Dec 6 2004 8:45 am
From: [EMAIL PROTECTED] 

Hi Andrea,

>When the first attribute is removed .... you can dump all the session
attributes ...
This is not possible, because when the HttpSessionBindingEvent is
received, all attributes are already removed from the session and are
not accesible any more :(

To me dumping session variables on expiration seems to be a pretty
normal usecase, I can't believe there is no easy way of doing that.
Chris




== 8 of 9 ==
Date: Mon, Dec 6 2004 11:58 am
From: Sudsy  

[EMAIL PROTECTED] wrote:
> Hi Andrea,
> 
> 
>>When the first attribute is removed .... you can dump all the session
> 
> attributes ...
> This is not possible, because when the HttpSessionBindingEvent is
> received, all attributes are already removed from the session and are
> not accesible any more :(
> 
> To me dumping session variables on expiration seems to be a pretty
> normal usecase, I can't believe there is no easy way of doing that.

A quick perusal of the javadocs (always a good place to start) shows
methods getName() and getValue() in HttpSessionBindingEvent. Have you
tried it?

-- 
Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development.




== 9 of 9 ==
Date: Mon, Dec 6 2004 9:37 am
From: Andrea Desole  

[EMAIL PROTECTED] wrote:
> Hi Andrea,
> 
> 
>>When the first attribute is removed .... you can dump all the session
> 
> attributes ...
> This is not possible, because when the HttpSessionBindingEvent is
> received, all attributes are already removed from the session and are
> not accesible any more :(

You might actually be right, even if it's quite counterintuitive. I 
would say that an event is fired after an object is removed, not after 
all the objects have been removed. Even worse, I can't find anything in 
the specs about that. Servlet lifecycle is not very well defined, I think.
Actually, after looking at the documentation, I would even say that 
apparently sessionDestroyed is called before valueUnbound or 
attributeRemoved (this is also, of course, not clear at all). This means 
that probably you can't remove your sessions from the set (or the 
container you are using) in the sessionDestroyed. Your container will 
grow. If it's true, I would consider Sudsy's solution, since it implies 
only one object. In the valueUnbound for that object you can remove the 
session from the set. This is probably safer and more portable.

> 
> To me dumping session variables on expiration seems to be a pretty
> normal usecase, I can't believe there is no easy way of doing that.
> Chris
> 

The way I look at it, I would be glad at least to have a good 
understanding of how this thing works. I looked at the servlet 2.3 
specs, and I don't expect newer versions to be much better.




==============================================================================
TOPIC: "static" prefix - to parallel "this" prefix
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f5dde10882ac2157
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 3:21 pm
From: Tim Tyler  

Chris Uppal <[EMAIL PROTECTED]> wrote or quoted:
> Tim Tyler wrote:

> > Suggested syntax would be "static.var" and "static.method()" -
> > instead of today's "ClassName.var" and "ClassName.method()".
> [...]
> > Has this been suggested before?
> >
> > Does it make sense to you?
> >
> > Are there any other proposals to deal with the same issue?
> 
> Yes, yes, and yes, respectively ;-)
> 
> Alex Hunsley posted a similar suggestion (maybe identical) a few months ago;
> see this thread (sorry about the URL, but it seems that Google is in the
> process of switching how the Google groups work):
> 
> http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4ceda7465055571c
> 
> (in case the URL stops working, the thread's title is "Good idea or full it
> it?")
> 
> Personally, I like the idea but think it would work still better with a
> different keyword such as 'thisClass', see my post in the above thread for
> details.

The idea of eliminating constructor names is appealing.

However, I'm not sure what syntax would be best for that.

About the only alternative I considered for "static." was "class.".

It would *have* to be an existing keyword (or a symbol?) - unless you were 
prepared for name clashes with identifiers in existing code.

I also think that "this." should be available to refer to static
data within static methods - and that there should be a corresponding
static object associated with the class that is accessible to the
programmer - i.e. that Java should behave more like smalltalk,
with everything being an object - and having a "this" reference.

However that would result in much more major surgery - and Java
probably has too much inertia for that sort of surgery to be
practical at this late date.
-- 
__________
 |im |yler  http://timtyler.org/  [EMAIL PROTECTED]  Remove lock to reply.




==============================================================================
TOPIC: file separator
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3f2ceedb5d08e69f
==============================================================================

== 1 of 2 ==
Date: Mon, Dec 6 2004 7:30 am
From: [EMAIL PROTECTED] 


juicy wrote:
> Can anyone tell me how to do file separator?

Your answer lies in the API Documents:


http://java.sun.com/j2se/1.4.2/docs/api/

http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#separator
Brock




== 2 of 2 ==
Date: Mon, Dec 6 2004 4:33 pm
From: Michael Borgwardt 
 

juicy wrote:

> Can anyone tell me how to do file separator?
> i am trying to send a directory requested by client. I separate file name
> and file data with '}', the client and server program encounter an
> exception of socketoutputstream and inputstream. And i have found that
> because i use writeBytes in server to write the all files data to buffer,
> and without put file separator, so when at receiving site, it only can
> receive first file only..

http://www.catb.org/~esr/faqs/smart-questions.html#writewell
http://www.physci.org/codes/sscce.jsp




==============================================================================
TOPIC: public folder in Exchange
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/27217e1d575b79bb
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 7:36 am
From: [EMAIL PROTECTED] (the_marsu007) 

Hello,

I want to read and write in the public folder on a Exchange server
with a JAVA code (using socket ...).
I think I can do it in nntp protocol. 
But how I can create a "contact" and not a simple mail ?

Who can help me ?

--
the marsu007




==============================================================================
TOPIC: Invalid cursor state - Am I completely stupid?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/780f6a3d7ad2d49a
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 10:46 am
From: "John C. Bollinger"  

Kyle wrote:

> I am going crazy trying to accomplish the simplest of tasks: retrieve
> data via JDBC.  I get a [Microsoft][ODBC Driver Manager] Invalid
> cursor state SQLException whenever I access the Resultset.get*
> methods.

If that is actual text from the exception's message then it suggests 
that there is a problem on the ODBC side.  That could mean you have 
configured your ODBC DataSource incorrectly -- for instance, there may 
be an access permission problem.

In troubleshooting this it is probably worth your while to examine the 
SQLException in more detail.  For instance, there may be more exceptions 
chained to this one (see SQLException.getNextException()).  You can also 
access a vendor-specific error code via SQLException.getErrorCode() that 
you may be able to use to extract information from Microsoft's knowledge 
base.  There is even some chance that SQLState string will be 
illuminating.  Read the SQLException API docs for details.

   And, yes, I have remembered to call the .next() method
> before the 1st access.  I am using the JDBC-ODBC bridge and get the
> same error with both Access and SQL Server databases.  The query
> executes and the Resultset exists as I can read the ResultSetMetaData
> object and successfully read the number of columns and column names. 
> So, the problem definitely is in the fetching of the data.
> 
> Please embarass me and enlighten me as to what stupid mistake I am
> making.
> 
> import java.sql.*;
> public void runquery() {
>     ResultSet rs = null;
>     Statement sql_stmt = null;
>     Connection conn = null;
> 
>     try {
>         Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>         conn = DriverManager.getConnection("jdbc:odbc:LDXTables",
> "sa", "");
>         sql_stmt = conn.createStatement();
> 
>         sql_stmt.execute("SELECT * FROM testtable");
>         rs = sql_stmt.getResultSet();
> 
>         if (rs!=null){
>             while (rs.next());
>             {
>                 //ODBC Invalid cursor state error occurs on the
> .getInt or .getString call
>                 String str = String.valueOf(rs.getInt(1)) +
> rs.getString(2) + "\n";
>             }
>         }

[...]

I don't see anything inherently wrong with that JDBC-wise.  If, as I 
wrote above, there is a permission problem, it may be that the empty 
password in getConnection() is not being communicated correctly.  You 
could try assigning and using a password; you could also try finding and 
using a form for the DB URL that incorporates the username and password 
directly.


John Bollinger
[EMAIL PROTECTED]




==============================================================================
TOPIC: Outputing JSP Code from a database
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3656d14aafe6341d
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 11:14 am
From: "John C. Bollinger"  

Henry F. Camacho Jr. wrote:

> This might be crazy, but I would like to explore this.
> 
> It is my desire to use a servlet to serve up pages from a MySQL
> database.  Of course I would like to be able to use .jsp code that
> would reside in the database.

I don't see the "of course" part.  Serving up straight HTML is one 
thing, as it can be passed on directly to the client, but JSP is a 
program component -- it must be compiled to a servlet, loaded, and run. 
   Once that was done, the generated servlet would be likely to remain 
loaded, at least for a time, so the advantage of having the application 
server draw the source from a database would be greatly diminished.

> Question:
> 
> How do I output that jsp code that sits in the database from a
> servlet, and have it parsed by the application server?

That's the wrong question.  You want to ask is "How do I make an 
application server serve JSPs whose source resides in a database instead 
of on the filesystem?"  Unless you plan to write a filesystem interface 
to the database, the answer is dependent on your servlet container.  For 
any particular container the answer may be that you need to modify the 
container.


John Bollinger
[EMAIL PROTECTED]




==============================================================================
TOPIC: Unable to establish a socket connection - Got it!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3db1070c05ec0b49
==============================================================================

== 1 of 2 ==
Date: Mon, Dec 6 2004 8:34 am
From: [EMAIL PROTECTED] 

Andrew Thompson wrote:
> On Sun, 05 Dec 2004 13:43:04 +0000, Steve Horsley wrote:
>
> > I think I know the answer. Move the initialisation code from
> > the constructor to the init() method instead.
>
> Ugggh... (slaps forehead).  Of course!
>
> That's exactly what I did before I first viewed the
> compiled code example in a browser.
>
> >..That should fix
> > your null exception in getCodeBase(). I get the same exception
> > if I put the code in the constructor.
>
> It would also explain the differences between Steve
> (Rulison's) output and my own.


Okay Andrew & Steve here is the revised code and results after moving
the getCodeBase().getHost() statements to the init method.  As you can
see that took care of the NullPointerException but I'm still not sure
what to make of the output from the getHost() method.

public class Applet1 extends Applet
{
//Constructor
public Applet1()
{}//Constructor

public void init()
{
try
{

System.out.println("Check point 1a");
System.out.println( "Code Base: '"
+ getCodeBase() + "'" );
System.out.println("Check point 1b");
System.out.println( "Host: '" +
getCodeBase().getHost() + "'" );

System.out.println("Check point 1");
Socket s = new Socket("10.44.1.250", 1427);

System.out.println("Check point 2");
System.out.println(getCodeBase().getHost() );

System.out.println("Check point 3");
}
catch(Exception e)
{
e.printStackTrace();
System.out.print("Socket connection unsuccessful.");
}//End of catch block.
}//End of init method
}//End of class Applet1.

Results:

Check point 1a
Code Base: 'file://JServer/JavaServer/'
Check point 1b
Host: ''
Check point 1
Check point 2
Check point 3




== 2 of 2 ==
Date: Mon, Dec 6 2004 9:01 am
From: [EMAIL PROTECTED] 


[EMAIL PROTECTED] wrote:
> Andrew Thompson wrote:
> > On Sun, 05 Dec 2004 13:43:04 +0000, Steve Horsley wrote:
> >
> > > I think I know the answer. Move the initialisation code from
> > > the constructor to the init() method instead.
> >
> > Ugggh... (slaps forehead).  Of course!
> >
> > That's exactly what I did before I first viewed the
> > compiled code example in a browser.
> >
> > >..That should fix
> > > your null exception in getCodeBase(). I get the same exception
> > > if I put the code in the constructor.
> >
> > It would also explain the differences between Steve
> > (Rulison's) output and my own.
>
>
> Okay Andrew & Steve here is the revised code and results after moving
> the getCodeBase().getHost() statements to the init method.  As you
can
> see that took care of the NullPointerException but I'm still not sure
> what to make of the output from the getHost() method.
>
> public class Applet1 extends Applet
> {
> //Constructor
> public Applet1()
> {}//Constructor
>
> public void init()
> {
> try
> {
>
> System.out.println("Check point 1a");
> System.out.println( "Code Base: '"
> + getCodeBase() + "'" );
> System.out.println("Check point 1b");
> System.out.println( "Host: '" +
> getCodeBase().getHost() + "'" );
>
> System.out.println("Check point 1");
> Socket s = new Socket("10.44.1.250", 1427);
>
> System.out.println("Check point 2");
> System.out.println(getCodeBase().getHost() );
>
> System.out.println("Check point 3");
> }
> catch(Exception e)
> {
> e.printStackTrace();
> System.out.print("Socket connection unsuccessful.");
> }//End of catch block.
> }//End of init method
> }//End of class Applet1.
>
> Results:
>
> Check point 1a
> Code Base: 'file://JServer/JavaServer/'
> Check point 1b
> Host: ''
> Check point 1
> Check point 2
> Check point 3


I forgot to include the results when applet was loaded on the JServer
workstation.  Not a whole lot of difference.

Check point 1a
Code Base: 'file:/C:/Java%20Server/'
Check point 1b
Host: ''
Check point 1
Check point 2

Check point 3





==============================================================================
TOPIC: Auto submit Struts form every 'n seconds
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f1db635d5081dd3
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 4:42 pm
From: "davout"  

Does anybody know of way of having a Struts form auto submit itself every 
'n' seconds?

I'm trying to build a form that reports back on the progress of an 
asynchronously executing task.







==============================================================================
TOPIC: Tomcat 5, EL Expressions in jsp:inlcude
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4da7307e1d9d37b9
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 10:55 am
From: Mark F  

Tomcat 5

I would like to create my JSPs as all XML like so:

<?xml version="1.0" ?>
<jsp:root version="2.0"
   xmlns:jsp="http://java.sun.com/JSP/Page";
   xmlns:f="http://java.sun.com/jsf/core";
   xmlns:h="http://java.sun.com/jsf/html";>
<f:view>
   <f:verbatim><![CDATA[<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>]]>
   </f:verbatim>
<html xmlns="http://www.w3.org/1999/xhtml";>
<jsp:include flush="false" page="../inc/head.jspf">
<jsp:param name="title" value="Logout"/>
</jsp:include>
<body>
   <f:loadBundle basename="general" var="msg"/>
   <f:loadBundle basename="logout" var="logoutmsg"/>
<jsp:include flush="true" page="../inc/topnav.jspf"/>
<jsp:include flush="true" page="../inc/header.jspf"/>
   <h:form>
     <h:panelGrid>
       <h:outputText value="#{logoutmsg.loggedout}"/>
       <h:outputText value="#{logoutmsg.closebrowser}"/>
     </h:panelGrid>
   </h:form>
   <jsp:include flush="true" page="../inc/footer.jspf"/>
</body>
</html>
</f:view>
</jsp:root>

Unfortunately the EL code in the included JSPs is not being evaluated.

It works fine if I use the <[EMAIL PROTECTED]> directive but this is not XML 
compatible.

Any help would be appreciated.

thanks,
-Mark





==============================================================================
TOPIC: how to declare constant with JAXB
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97102f429b2d83a2
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 8:59 am
From: [EMAIL PROTECTED] (Jean-Marie Condom) 

Hello

I am looking for a way to declare constants in XML schema
so that those constants appear in the code generated by xjc 
as declarations ; such as for instance :

public static final int CONST_TOT0 = 2;

is there a way to do that ?

thanks in advance

Jean-Marie




==============================================================================
TOPIC: ActiveX Container in Java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/188085b06e48f3d1
==============================================================================

== 1 of 3 ==
Date: Tues, Dec 7 2004 12:57 am
From: Dan  

Hi everyone,
I've been looking all over the place for an ActiveX Container in Java. 
If I cant find one I'll write one but I dont know where how. I know that 
using the JavaBeans to COM bridge from sun I am able to have my 
JavaBeans run in any ActiveX container but not the other way around. I 
was hoping that someone could help me out with this.

Has anyone seen anywhere an ActiveX container written in Java? If not 
does anyone know how I would write my own container if it is possible.

Also I'm using Sun's Java not Microsofts Java.

Help would be very much appreciated.

Daniel



== 2 of 3 ==
Date: Mon, Dec 6 2004 9:16 am
From: [EMAIL PROTECTED] 


Dan wrote:
> Hi everyone,
> I've been looking all over the place for an ActiveX Container in
Java.
> If I cant find one I'll write one but I dont know where how. I know
that
> using the JavaBeans to COM bridge from sun I am able to have my
> JavaBeans run in any ActiveX container but not the other way around.
I
> was hoping that someone could help me out with this.
>
> Has anyone seen anywhere an ActiveX container written in Java? If not

> does anyone know how I would write my own container if it is
possible.
>
> Also I'm using Sun's Java not Microsofts Java.
> 
> Help would be very much appreciated.
> 
> Daniel




== 3 of 3 ==
Date: Mon, Dec 6 2004 9:15 am
From: [EMAIL PROTECTED] 


Dan wrote:
> Hi everyone,
> I've been looking all over the place for an ActiveX Container in
Java.
> If I cant find one I'll write one but I dont know where how. I know
that
> using the JavaBeans to COM bridge from sun I am able to have my
> JavaBeans run in any ActiveX container but not the other way around.
I
> was hoping that someone could help me out with this.
>
> Has anyone seen anywhere an ActiveX container written in Java? If not

> does anyone know how I would write my own container if it is
possible.


At the risk of stating the obvious, I suspect you'll need to use
JNI (Java Native Interface).  Naturally your Java will no longer be
platform neutral, but then again I suppose you abandoned any notions
of cross-platform-ability when you elected to use ActiveX.  ;-)
http://java.sun.com/j2se/1.4.2/docs/guide/jni/


-FISH-   ><>





==============================================================================
TOPIC: Writing to SYSTEM.IN possible ? (other program should take this output)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3360e5fb92a5b1b2
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 6:08 pm
From: [EMAIL PROTECTED] (Ken Philips) 

I have a given java class which normally takes a file as an input parameter,
then reads the content and does something. E.g.

otherprog inputfile.txt

otherprog.class is written by someone else. I do not have access to the source 
code.

However, in some situations I want to feed directly (!) the program not by a 
file but
by the output of a second class myown.class. Ok, I could save the output first
to a temporary file and then pass this file as usual to the otherprog.class.

But I don't want to use an intermediate file. I want to pass the data directly.

In order to do this I consider a coding in myown.class like:

System.in.println("this text should be passed to the otherprog");
Runtime.getRuntime().exec("otherprog System.in);

But the trick above doesn't work. Are there any other workarounds ?

How can I write to System.in?

Ken





==============================================================================
TOPIC: Server to use with JMF?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5385de1842e9e5c8
==============================================================================

== 1 of 1 ==
Date: Mon, Dec 6 2004 5:31 pm
From: ted holden  



I have an application which has to look sort of like jukebox, i.e. a user
might want to select one mpeg video file from amongst many, and see it via
streaming on the JMF media player.

The JMF documentation lists several streaming servers which have been tested
with JMF including two opensource servers, and I notice also that the
Helix/Real servers are not on that list.

Does anybody have any particular media server they'd recommend for using in
such an application?






==============================================================================

You received this message because you are subscribed to the Google
Groups "comp.lang.java.programmer" group.

To post to this group, send email to [EMAIL PROTECTED] or
visit http://groups-beta.google.com/group/comp.lang.java.programmer

To unsubscribe from this group, send email to
[EMAIL PROTECTED]

To change the way you get mail from this group, visit:
http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

To report abuse, send email explaining the problem to [EMAIL PROTECTED]

==============================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to