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

Today's topics:

* J2ME: The Complete Reference - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29dde018c381d116
* Newbee question Mobile software - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f36a637b3fe577e4
* Is JAXB supported in any J2ME? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b3f95d6334ff08c
* How best to do this... - 5 messages, 4 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/139fe9ada71808aa
* Execute command on remote server - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aea2e27783906e46
* Multiple JVMs; specifying the runtime lib - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a0514c6cbf4dc13a
* Thread synchronization - 4 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/172837b7b0667fd1
* Applet/Servlet Communication 1.4 - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/72ce4fcf85399830
* JVM as service - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ca2d0e75df3526fa
* what u program? - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ee20f99e67fd5410
* what is the difference between j2ee and j2se - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/363ad64739aa166c
* ERWin conversion to Rational Rose - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9321a75628bf08d0
* How to incremet IndetAddress / IP numbers - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94897e32234ceaaf
* chat client alpha version - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7b0e616eb35b4b1f
* nested locks - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e57863f17acef231
* J2SE 5.0 SDK - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34434161a91e61bb
* Inserting components into a JTextPane - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8de30a108c9b450
* Accessing the http session objects - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43f39bba2c4d811
* RMI: remote call or local call - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fc3a94862dd47001
* String[] files = {"a.doc, b.doc"}; VERSUS String[] files = new String[] {"a.doc, 
b.doc"}; - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39e65137dfea9036
  
==========================================================================
TOPIC: J2ME: The Complete Reference
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/29dde018c381d116
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 10:10 am
From: "Darryl L. Pierce" <[EMAIL PROTECTED]> 

Andrew Thompson wrote:

> I went hunting at amazon, and while I found this..
>
<http://www.amazon.com/exec/obidos/tg/detail/-/0072227109/ref=sib_rdr_dp/103-4155585-8239062
%5Fencoding=UTF8&no=283155&me=ATVPDKIKX0DER&st=books>
> ..it fails to mention the CDLC/MIDP versions,
> and the only 'example page' offered is the
> front cover.  :-(

Then I would wager it's a MIDP 1.0 book. I personally don't have that one.

-- 
/**
 * @author Darryl L. Pierce <[EMAIL PROTECTED]>
 * @see    The Infobahn Offramp <http://mcpierce.mypage.org>
 * @quote  "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
 */




==========================================================================
TOPIC: Newbee question Mobile software
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f36a637b3fe577e4
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Sep 16 2004 10:11 am
From: "Darryl L. Pierce" <[EMAIL PROTECTED]> 

Andrew Thompson wrote:

> On Wed, 15 Sep 2004 09:53:46 +0200, [EMAIL PROTECTED] wrote:
> 
>> Ok, this does it.
>> 
>> *ploink*
> 
> Did you mean 'plonk', perhaps?    ;-)

That's the sound it makes in a relatively empty killfile. As it fills up,
and the echo dies down, it makes more of a plOnk rather than a plOInk. :) 

-- 
/**
 * @author Darryl L. Pierce <[EMAIL PROTECTED]>
 * @see    The Infobahn Offramp <http://mcpierce.mypage.org>
 * @quote  "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
 */



== 2 of 2 ==
Date:   Thurs,   Sep 16 2004 11:29 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Thu, 16 Sep 2004 13:11:45 -0400, Darryl L. Pierce wrote:
> Andrew Thompson wrote:
>> On Wed, 15 Sep 2004 09:53:46 +0200, [EMAIL PROTECTED] wrote:
>> 
>>> Ok, this does it.
>>> 
>>> *ploink*
>> 
>> Did you mean 'plonk', perhaps?    ;-)
> 
> That's the sound it makes in a relatively empty killfile. As it fills up,
> and the echo dies down, it makes more of a plOnk rather than a plOInk. :)

Well that is more impressive.

Not only am I in his kill-file, but I
am one of the *few* who reached that 
'hallowed' stage.

( ..and now I can say pretty much anything 
I like about him ..with no comeback! )

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: Is JAXB supported in any J2ME?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4b3f95d6334ff08c
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 10:18 am
From: "Darryl L. Pierce" <[EMAIL PROTECTED]> 

Pancrazio Auteri wrote:

> we have developed a J2SE application using JAXB heavily to manage XML
> messaging.
> 
> Do you know if JAXB is supported in J2ME?

Not yet.

-- 
/**
 * @author Darryl L. Pierce <[EMAIL PROTECTED]>
 * @see    The Infobahn Offramp <http://mcpierce.mypage.org>
 * @quote  "Lobby, lobby, lobby, lobby, lobby, lobby..." - Adrian Monk
 */




==========================================================================
TOPIC: How best to do this...
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/139fe9ada71808aa
==========================================================================

== 1 of 5 ==
Date:   Thurs,   Sep 16 2004 4:12 pm
From: [EMAIL PROTECTED] (Tim Jowers) 

"Ike" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> I have a Vector() class....
> 
> I want to make it so that I will only have one instance of a given variable.
> 
> So, if my Vector class contains, say, Strings only......I want to make sure
> that I don't have any dupe strings.......what ought I do? Just thought I
> would ask here to get other's feedback. Thanks, Ike

You mean an instance of that type.

The idea to over-ride Vector is probably right in Java. Something like:

class TypeSafeVector extends Vector
{  Class allowed;
   public TypeSafeVector(Class typeAllowed)
   { allowed = typeAllowed;  
   }
  //something like this?
   Object set(Object o )
   {  if( allowed.getName() == o.getClass().getName() )
         return super.set(o);
      else barf;
   }   
}



== 2 of 5 ==
Date:   Thurs,   Sep 16 2004 4:41 pm
From: "P.Hill" <[EMAIL PROTECTED]> 

Tim Jowers wrote:

>    {  if( allowed.getName() == o.getClass().getName() )

Hmm, this solution doesn't do subclasses and the instanceof doesn't do dynamic 
class specification.

-Paul





== 3 of 5 ==
Date:   Fri,   Sep 17 2004 12:10 am
From: Peter Davis <[EMAIL PROTECTED]> 

On 2004-09-16 16:41:30 -0700, "P.Hill" 
<[EMAIL PROTECTED]> said:

> Tim Jowers wrote:
> 
>>    {  if( allowed.getName() == o.getClass().getName() )
> 
> Hmm, this solution doesn't do subclasses and the instanceof doesn't do 
> dynamic class specification.

allowed.isAssignableFrom(o.getClass())

-- 
Peter Davis <[EMAIL PROTECTED]>
"Furthermore, I believe bacon prevents hair loss!"




== 4 of 5 ==
Date:   Fri,   Sep 17 2004 1:13 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Paul Lutus wrote:
>>So, if my Vector class contains, say, Strings only......I want to make
>>sure that I don't have any dupe strings.......what ought I do?
> 
> 
> An easy way, if you are limiting yourself to Vector, is to look at all the
> entries in the Vector to see if there is already a match to a string about
> to be inserted.

Or, for short, use the contains() method.



== 5 of 5 ==
Date:   Fri,   Sep 17 2004 1:19 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Ike wrote:

> I have a Vector() class....

Vector is obsolescent and should almost always be replaced with ArrayList.
If it is appropriate in the first place, that is.

> I want to make it so that I will only have one instance of a given variable.

Then you do NOT want a List, you want a Set.

If you also want to preserve the order in which the elements were inserted, then
LinkedHashSet is exactly what you want. Only if you want to be able to insert
new elements in the middle of the implied list (or replace elements) do you
actually need a List. And then, if performance is a concern, you should still
use a Set in parallel to avoid wasting time on the test whether an element is
already present.




==========================================================================
TOPIC: Execute command on remote server
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aea2e27783906e46
==========================================================================

== 1 of 3 ==
Date:   Thurs,   Sep 16 2004 4:26 pm
From: [EMAIL PROTECTED] (Tim Jowers) 

Andrew Thompson <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> On Thu, 16 Sep 2004 13:49:43 -0400, Sam Palanivel wrote:
> 
> > Is there any other method to execute command in remote server?
> 
> Ring the SysOp.  Offer beer.   ;-)

RPC is the typical one. Telnet sessions are the other. 

What do you mean? HTTPS does no exec. ;-) It sends IP packets to a
server applciation.

Do you mean a way to communicate with a remote application, typically
a server or daemon? Yes.

HTTPS Server (aka web server or app server)
listens for IP messages on port 80 or port 443 etc.

RMI (ala Java) listens on 1099 etc. rmid.exe I think is the default
server program for RMI.

So, you want to know what other apps are running on your server with
which you want to communicate. If you hit a server running SNA then
you'll typicall hit certain a port (search the net for "iana port
numbers" for a list of typical port numbers). Yu can also run a port
scan (dumb sw that tries to open a socket to each port number and
saying UDP or TCP. Or really dumb do a telnet servername.com 21 to try
port 21 for instance).

Ahh, the joys of network programming. And you thought I knew some
magical command to send to a server in order to get it to give you a
command prompt? Most of these bugs have been fixed but, unfortunately,
lots more bugs are made every year.

Enough ideas?

Oh yeah, do a search on "social hacking" or something like that. It is
an angle on the "beer" approach. The basic hack is to call and say,
"I'm secretary blondie working for Mr. doofus. He forget password.
Real important. What is it?" The phone hackers used to use the one, "I
from phone co. Please reset root password to stupidme." Don't think
that'll work anymore though. ;-)

I'm just joking. Don't do these stupid things.

Best luck,
TimJowers



== 2 of 3 ==
Date:   Thurs,   Sep 16 2004 5:06 pm
From: [EMAIL PROTECTED] (Yakov) 

In J2SE you can also use sockets (read about classes Socket and ServerSocket).

J2EE has more, i.e. JMS, EJB, ....



== 3 of 3 ==
Date:   Fri,   Sep 17 2004 1:12 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Yakov wrote:
> In J2SE you can also use sockets (read about classes Socket and ServerSocket).

RMI and web servers also use sockets.

> J2EE has more, i.e. JMS, EJB, ....

All of which use sockets.





==========================================================================
TOPIC: Multiple JVMs; specifying the runtime lib
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a0514c6cbf4dc13a
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 4:31 pm
From: [EMAIL PROTECTED] (Tim Jowers) 

[EMAIL PROTECTED] (Scott Edward Skinner) wrote in message news:<[EMAIL PROTECTED]>...
> Is it possible to specify the location of the Java runtime lib (i.e.,
> jvm.dll) through an environmental variable or as a parameter passed to
> java.exe?

yes.

> 
> I'd like to use a variety of JVMs on a test server without actually
> installing any of them. By installing I mean running the installer
> which creates a Windows Registry entry and thus a system-wide default
> JVM. I want to manually specify which JVM to use through batch files.
> 
> In general, what is the best way to handle multiple JVMs?

Pick the fastest one.

> 
> -S

Seriously, java.exe is the exectuable. Executables are found via PATH.
"set PATH" works in Windows and Linux/Unix. Or even launch using
chosen JVM.

Also you should check out the performance.

java -verbosegc
or something like
java -Xhperf or whatever the command is.

Have a blast,
TimJowers




==========================================================================
TOPIC: Thread synchronization
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/172837b7b0667fd1
==========================================================================

== 1 of 4 ==
Date:   Thurs,   Sep 16 2004 5:07 pm
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

xarax coughed up:
> "Thomas G. Marshall"
> <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED] /snip/
>> Override /all/ of the accessor/mutator's and methods with similar
>> side effects?  Unless there is a protected/public common subroutine
>> to all of them, IMHO you've now created a technique that is adding
>> more potential instability than you were trying to avoid in the
>> first place.
>
> Only the public methods would be overridden with
> synchronized variants.
>
> A better solution is to wrap the ArrayList within
> a new class that only has methods that are of interest
> to the client application. The wrapper instance is
> shared among the threads, instead of the raw ArrayList
> instance.

And just make sure to have that new class implement List if you want it to
be compatible to all the other List cognizant sections of the jdk.


>> Interestingly (to me at least) there /are/ inner classes called, for
>> one example, Collections.SynchronizedCollection, etc.  But it is
>> declared with package scope, so you cannot extend it.
>
> Hmmm, I can't find that class in the JavaDoc for 1.4.2.


For 1.4.2_05?  Look in the source:

    mumble/java/util/Collections.java, line 1518.

Like I said though, it's a package scope thing.  So it's not for general
usage.

You could copy it out and use it I suppose, but you'd have to be careful to
make sure that it changes with the collection api's should they change (like
they did for generics support in 1.5).



-- 
"His name was Robert Paulson. His name was Robert Paulson. His name was
Robert Paulson..."





== 2 of 4 ==
Date:   Thurs,   Sep 16 2004 5:25 pm
From: "Mike Schilling" <[EMAIL PROTECTED]> 


"Thomas G. Marshall" <[EMAIL PROTECTED]> 
wrote in message news:[EMAIL PROTECTED]
> xarax coughed up:
>> "Thomas G. Marshall"
>> <[EMAIL PROTECTED]> wrote in
>> message news:[EMAIL PROTECTED] /snip/
>>> Override /all/ of the accessor/mutator's and methods with similar
>>> side effects?  Unless there is a protected/public common subroutine
>>> to all of them, IMHO you've now created a technique that is adding
>>> more potential instability than you were trying to avoid in the
>>> first place.
>>
>> Only the public methods would be overridden with
>> synchronized variants.
>>
>> A better solution is to wrap the ArrayList within
>> a new class that only has methods that are of interest
>> to the client application. The wrapper instance is
>> shared among the threads, instead of the raw ArrayList
>> instance.
>
> And just make sure to have that new class implement List if you want it to
> be compatible to all the other List cognizant sections of the jdk.
>
>
>>> Interestingly (to me at least) there /are/ inner classes called, for
>>> one example, Collections.SynchronizedCollection, etc.  But it is
>>> declared with package scope, so you cannot extend it.
>>
>> Hmmm, I can't find that class in the JavaDoc for 1.4.2.
>
>
> For 1.4.2_05?  Look in the source:
>
>    mumble/java/util/Collections.java, line 1518.
>
> Like I said though, it's a package scope thing.  So it's not for general
> usage.
>
> You could copy it out and use it I suppose, but you'd have to be careful 
> to
> make sure that it changes with the collection api's should they change 
> (like
> they did for generics support in 1.5).

This is presumably the type returned by Collections.synchronizedCollection() 
?  How would you want to use it other than by calling that method? 





== 3 of 4 ==
Date:   Thurs,   Sep 16 2004 5:55 pm
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Mike Schilling coughed up:
> "Thomas G. Marshall"
> <[EMAIL PROTECTED]> wrote in
> message news:[EMAIL PROTECTED]
>> xarax coughed up:
>>> "Thomas G. Marshall"
>>> <[EMAIL PROTECTED]> wrote in
>>> message news:[EMAIL PROTECTED] /snip/
>>>> Override /all/ of the accessor/mutator's and methods with similar
>>>> side effects?  Unless there is a protected/public common subroutine
>>>> to all of them, IMHO you've now created a technique that is adding
>>>> more potential instability than you were trying to avoid in the
>>>> first place.
>>>
>>> Only the public methods would be overridden with
>>> synchronized variants.
>>>
>>> A better solution is to wrap the ArrayList within
>>> a new class that only has methods that are of interest
>>> to the client application. The wrapper instance is
>>> shared among the threads, instead of the raw ArrayList
>>> instance.
>>
>> And just make sure to have that new class implement List if you want
>> it to be compatible to all the other List cognizant sections of the
>> jdk.
>>
>>
>>>> Interestingly (to me at least) there /are/ inner classes called,
>>>> for one example, Collections.SynchronizedCollection, etc.  But it
>>>> is declared with package scope, so you cannot extend it.
>>>
>>> Hmmm, I can't find that class in the JavaDoc for 1.4.2.
>>
>>
>> For 1.4.2_05?  Look in the source:
>>
>>    mumble/java/util/Collections.java, line 1518.
>>
>> Like I said though, it's a package scope thing.  So it's not for
>> general usage.
>>
>> You could copy it out and use it I suppose, but you'd have to be
>> careful to
>> make sure that it changes with the collection api's should they
>> change (like
>> they did for generics support in 1.5).
>
> This is presumably the type returned by
> Collections.synchronizedCollection() ?  How would you want to use it
> other than by calling that method?

/I/ wouldn't.  This discussion is about how xarax is advocating the
extension of ArrayList into something more dedicated for synchronization
reasons of his (walk up this thread a couple of posts or so), to avoid
having to externally synchronize on the class itself.

He would be aided by being able to extend a synchronized collection class.
The problem is that you can get a synchronized collection at runtime, but
they do not seem to allow you to grab one at compile time because the class
is package scope.  I find that limitation a /tad/ curious.


-- 
"So I just, uh... I just cut them up like regular chickens?"
"Sure, just cut them up like regular chickens."





== 4 of 4 ==
Date:   Thurs,   Sep 16 2004 5:56 pm
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Thomas G. Marshall coughed up:
> Mike Schilling coughed up:
>> "Thomas G. Marshall"
>> <[EMAIL PROTECTED]> wrote in
>> message news:[EMAIL PROTECTED]
>>> xarax coughed up:
>>>> "Thomas G. Marshall"
>>>> <[EMAIL PROTECTED]> wrote in
>>>> message news:[EMAIL PROTECTED] /snip/
>>>>> Override /all/ of the accessor/mutator's and methods with similar
>>>>> side effects?  Unless there is a protected/public common
>>>>> subroutine to all of them, IMHO you've now created a technique
>>>>> that is adding more potential instability than you were trying to
>>>>> avoid in the first place.
>>>>
>>>> Only the public methods would be overridden with
>>>> synchronized variants.
>>>>
>>>> A better solution is to wrap the ArrayList within
>>>> a new class that only has methods that are of interest
>>>> to the client application. The wrapper instance is
>>>> shared among the threads, instead of the raw ArrayList
>>>> instance.
>>>
>>> And just make sure to have that new class implement List if you want
>>> it to be compatible to all the other List cognizant sections of the
>>> jdk.
>>>
>>>
>>>>> Interestingly (to me at least) there /are/ inner classes called,
>>>>> for one example, Collections.SynchronizedCollection, etc.  But it
>>>>> is declared with package scope, so you cannot extend it.
>>>>
>>>> Hmmm, I can't find that class in the JavaDoc for 1.4.2.
>>>
>>>
>>> For 1.4.2_05?  Look in the source:
>>>
>>>    mumble/java/util/Collections.java, line 1518.
>>>
>>> Like I said though, it's a package scope thing.  So it's not for
>>> general usage.
>>>
>>> You could copy it out and use it I suppose, but you'd have to be
>>> careful to
>>> make sure that it changes with the collection api's should they
>>> change (like
>>> they did for generics support in 1.5).
>>
>> This is presumably the type returned by
>> Collections.synchronizedCollection() ?  How would you want to use it
>> other than by calling that method?
>
> /I/ wouldn't.  This discussion is about how xarax is advocating the
> extension of ArrayList into something more dedicated for
> synchronization reasons of his (walk up this thread a couple of posts
> or so), to avoid having to externally synchronize on the class

object


> itself.
>
> He would be aided by being able to extend a synchronized collection
> class. The problem is that you can get a synchronized collection at
> runtime, but they do not seem to allow you to grab one at compile
> time because the class is package scope.  I find that limitation a
> /tad/ curious.

-- 
"So I just, uh... I just cut them up like regular chickens?"
"Sure, just cut them up like regular chickens."






==========================================================================
TOPIC: Applet/Servlet Communication 1.4
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/72ce4fcf85399830
==========================================================================

== 1 of 3 ==
Date:   Thurs,   Sep 16 2004 5:11 pm
From: [EMAIL PROTECTED] (shahram) 

Hi,

I have a problem with Applet/Servlet Communication after upgrading
from 1.3.1 to 1.4.X. My program use to work perfect with 1.3.1 and
with 1.4 it does not
create any Exception and Servlet does not get called.

server environment (jakarta-tomcat-4.0.1)

Any help would be appreciated.


Thanks
Shahram...



== 2 of 3 ==
Date:   Thurs,   Sep 16 2004 6:35 pm
From: "Ike" <[EMAIL PROTECTED]> 

Post us some code so we can see what your problem is!
-Ike

"shahram" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I have a problem with Applet/Servlet Communication after upgrading
> from 1.3.1 to 1.4.X. My program use to work perfect with 1.3.1 and
> with 1.4 it does not
> create any Exception and Servlet does not get called.
>
> server environment (jakarta-tomcat-4.0.1)
>
> Any help would be appreciated.
>
>
> Thanks
> Shahram...





== 3 of 3 ==
Date:   Thurs,   Sep 16 2004 11:06 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Fri, 17 Sep 2004 01:35:21 GMT, Ike wrote:

> Post us some code so we can see what your problem is!

The only thing I would disagree with is the word 
'some', which to me implies a code snippet.  How 
about you make that code sample an SSCCE?
<http://www.physci.org/codes/sscce.jsp>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: JVM as service
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ca2d0e75df3526fa
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 6:23 pm
From: [EMAIL PROTECTED] (Mark A. Washburn) 

[EMAIL PROTECTED] (Jonathan Neve) wrote in message news:<[EMAIL PROTECTED]>...
> Hi all!
> 
> Has anyone ever tried to make the JVM into a OS service, so that
> instead of having to load it for each and every Java application, it
> could be loaded once by the OS at startup. Then, if you want to launch
> a Java application, all you would have to do would be to call the JVM
> service, and tell it which class to load, in exactly the same way as
> it is now. The only difference would be that the JVM wouldn't have to
> be loaded every time, which would considerably reduce both startup
> time and memory consumption.
> 
> Has anyone done this? Any ideas?
> 
> Thanks!
> Jonathan Neve.

Jsh may interest you.

Jsh is a java application shell where all Java applications run in a
single Java virtual machine ( JVM), saving memory and launching Java
applications faster.

Homepage,
http://gerard.collin3.free.fr/
Download,
http://sourceforge.net/projects/jsh/

Jsh is currently an integration within JDistro.  JDistro Warf mode may
interest you, also.

maw




==========================================================================
TOPIC: what u program?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ee20f99e67fd5410
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Sep 16 2004 7:47 pm
From: jaYPee <[EMAIL PROTECTED]> 

I just wanted to know what most program u do in java? coz i'm a vb
programmer and i do a lot of database programming.

thanks in advance



== 2 of 2 ==
Date:   Thurs,   Sep 16 2004 10:36 pm
From: [EMAIL PROTECTED] (Malcolm Dew-Jones) 

jaYPee ([EMAIL PROTECTED]) wrote:
: I just wanted to know what most program u do in java? coz i'm a vb
: programmer and i do a lot of database programming.

Gee, I guess this is what happens when you do too much vb programming...




==========================================================================
TOPIC: what is the difference between j2ee and j2se
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/363ad64739aa166c
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 8:42 pm
From: Jacob <[EMAIL PROTECTED]> 

Bob wrote:

> what is meant by enterprise application?

It is really a silly term, probably created by some
marketing departement... :-)

 From O'Reilly "Java Enterprise in a Nutshell":

"The term enterprise computing is simply a synonym
for distributed computing: computation done by groups
of programs interacting over a network."





==========================================================================
TOPIC: ERWin conversion to Rational Rose
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9321a75628bf08d0
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 8:26 pm
From: [EMAIL PROTECTED] (Jim) 

Hello,

  I have an ERWin Logical model set of files and I would like to
port/convert/import them to Rational Rose.  I am currently using
Rational Rose XDE, but I suppose that the versions should not matter
much.    Does anyone know either the tools or steps to achieve this?

   Thank you.

   J.




==========================================================================
TOPIC: How to incremet IndetAddress / IP numbers
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/94897e32234ceaaf
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Sep 16 2004 8:41 pm
From: "Markus Kern" <[EMAIL PROTECTED]> 

Hey,

i am coding a simple port scanner.
now i want to make it scan a whole range of ip numbers. how can i 
increment the datatype InetAddress? i checked all it's methodes, but
i can't see a nice solution for that. you could cast it to string and split 
it into int octets, but thats not really nice i think.

then i thought about the getAddress methode, but look at this code:

public class test {

 public static void main(String[] args) throws UnknownHostException {
  InetAddress test = null;
  test = InetAddress.getByName("200.120.254.255");
  byte[] ip = test.getAddress();
  for (int i = 0; i<ip.length; i++)
   System.out.println (ip[i]);
 }
}

output:
-56
120
-2
-1

so this dosn't help me really - i thought i get the real octets then and could write
a methode to inc them, but like this i don't really know what to do.

i think you understood my problem.
maybe someone has a nice solution for this.
(btw i googeled alot for ip/port scanner java source code - but couldn't find help
do you got a hint where to find code snipplets etc)

thanx in advance.
markus






== 2 of 2 ==
Date:   Thurs,   Sep 16 2004 10:28 pm
From: Paul Lutus <[EMAIL PROTECTED]> 

Markus Kern wrote:

> Hey,
> 
> i am coding a simple port scanner.
> now i want to make it scan a whole range of ip numbers. how can i
> increment the datatype InetAddress?

Your inquiry has been asked and answered, in a thread you started in
comp.lang.java.help on 9/14/2004. Don't ask the same question again.

If you post to Usenet, you are expected to read the replies. If you do not
read the replies, you can expect us not to try again. It is just that
simple.

-- 
Paul Lutus
http://www.arachnoid.com





==========================================================================
TOPIC: chat client alpha version
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7b0e616eb35b4b1f
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 11:19 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Thu, 16 Sep 2004 23:08:28 +0200, andreas wrote:

> i wrote a chat client and just finished an alpha-version.

Please refrain from multi-posting, andreas.
<http://www.physci.org/codes/javafaq.jsp#xpost>

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane




==========================================================================
TOPIC: nested locks
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e57863f17acef231
==========================================================================

== 1 of 2 ==
Date:   Thurs,   Sep 16 2004 11:50 pm
From: Rogan Dawes <[EMAIL PROTECTED]> 

VisionSet wrote:

> "Rogan Dawes" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
>>VisionSet wrote:
>>
>>
>>>I'm aware that nesting synchronisation blocks is generally a bad idea.
>>>Is this just due to the ease of deadlock?
>>>
>>>Does this advice apply to implicit inner locks eg
>>>
>>>Set mySyncedSet = Collections.synchronizedSet(new HashSet());
>>>...
>>>synchronized(this) {
>>>
>>>    mySyncedSet.add(anObj);
>>>
>>>}
>>>
>>>I guess in this case it would be fine because the Set is not going to
> 
> hold
> 
>>>any locks for long.
>>>I suppose the only problem would be if the inner lock does a loop on
> 
> wait()
> 
>>>or blocks on I/O.
>>>But the Javadoc(umentation) is not enforced in this area, it is not
> 
> always
> 
>>>apparant if a method is synced or not, let alone the details of the
> 
> objects
> 
>>>blocking.
>>>Any guidelines available in this case?
>>
>>My understanding is that the risks of nesting locks is that you could
>>deadlock, as you suggest. The other possibility is the added overhead
>>involved in actually synchronizing. If you can synchronize once, rather
>>than multiple times, that might be a better approach.
>>
>>What I mean is, perhaps you don't need to make your set a
>>synchronizedSet, if accesses to the set are already done in synchronized
>>blocks . . .
>>
> 
> 
> Yes, I appreciate what you are saying, my point is that when calling a
> library method you may not know or be able to determine if there is any
> internal synchronization on that method or what it invloves.  You may
> therefore inadvertently nest locks.
> 

In that case I'd say that if they do not tell you, it is because it 
doesn't really matter . . . ;-)

Regards,

Rogan
-- 
Rogan Dawes

*ALL* messages to [EMAIL PROTECTED] will be dropped, and added
to my blacklist. Please respond to "nntp AT dawes DOT za DOT net"



== 2 of 2 ==
Date:   Fri,   Sep 17 2004 1:07 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

VisionSet wrote:
> I'm aware that nesting synchronisation blocks is generally a bad idea.
> Is this just due to the ease of deadlock?

Yes.

> Does this advice apply to implicit inner locks eg
> 
> Set mySyncedSet = Collections.synchronizedSet(new HashSet());
> ...
> synchronized(this) {
> 
>     mySyncedSet.add(anObj);
> 
> }
> 
> I guess in this case it would be fine because the Set is not going to hold
> any locks for long.

No, it's fine because there almost certainly can be no deadlocks. Nested locks
result in deadlocks only if they are acquired in varying orders.

In your example, a deadlock could only occur if one of the synchronized Set methods
attempted to get a lock on "this", because then it coul happen that one thread has
the lock on "this" and waits for the lock on the set, while another thread has the
lock on the set and waits for the lock on "this".

The only way you could theoretically get a deadlock were if you added the "this" object
to the HashSet *and* if the class's equals() or hashCode() methods (which are called 
from
within HashSet) were synchronized *and* if at some point you called a method on the set
without first synchronizing on "this".




==========================================================================
TOPIC: J2SE 5.0 SDK
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34434161a91e61bb
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 11:53 pm
From: Peter Davis <[EMAIL PROTECTED]> 

On 2004-09-16 09:04:57 -0700, Dino Buljubasic <[EMAIL PROTECTED]> said:

> heard that there is 5.0 version but I can not find it on Sun's wweb
> page.  All I found is J2SE 5.0 RC

RC = Release Candidate

Meaning it's not the final version yet, but it's nearly there.

-- 
Peter Davis <[EMAIL PROTECTED]>
"Furthermore, I believe bacon prevents hair loss!"





==========================================================================
TOPIC: Inserting components into a JTextPane
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8de30a108c9b450
==========================================================================

== 1 of 1 ==
Date:   Thurs,   Sep 16 2004 11:59 pm
From: "Andrei Kouznetsov" <[EMAIL PROTECTED]> 

> I am trying to set up a JTextPane that will not only hold text but
> components as well. So what I want is for a user to be able to type
> some text in the JTextPane, then insert a component, type some more
> text, etc...

did you tried to set border of your component to EmptyBorder?
alternatively you could also insert Icon.
write custom Icon which renders supplied text...

-- 
Andrei Kouznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader






==========================================================================
TOPIC: Accessing the http session objects
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/43f39bba2c4d811
==========================================================================

== 1 of 3 ==
Date:   Fri,   Sep 17 2004 12:55 am
From: [EMAIL PROTECTED] (Roger) 

Hi all. 

I've got servlets running in a chain. This works fine if users access
the servlets and JSPs. Now I'm trying to write a java class that can
emulate the browser, so that the applications runs without user
interaction.
I got the connection to work with authentification and I can access
the InputStream I get back, but I couldn't figure out how to access my
objects that I pinned to the session in my servlet chain.
(Startpage.jsp-->servlet-->output.jsp) The output.jsp accesses the
objects that were pinned to the session by the servlet.
I would now like to connect(better POST) to the servlet like the
Startpage.jsp does but from a java class. That would make my
application run without a browser having to connect...

------------java class code-----------------
 String authString = "admin" + ":" + "admin";
            String auth = "Basic " + new
sun.misc.BASE64Encoder().encode(authString.getBytes());
            URL url = new URL("http://localhost:8080/Dummy";);
            URLConnection conn = url.openConnection();
            conn.setRequestProperty("Authorization", auth);
            System.out.println(conn.getInputStream().toString());
            BufferedReader in = new
            BufferedReader(new
InputStreamReader(conn.getInputStream()));
            String line;
            while((line = in.readLine()) != null) {
                // process line
                System.out.println(line);
            }                                   
------------/code--------------
This works find, but as mentionned I cant figure out how to access my
session objects, something that is aquivalent to
request.getAttribute(key) or request.getParameter within the servlet.
Can anyone help me or has got a hint?

Greets 

Roger



== 2 of 3 ==
Date:   Fri,   Sep 17 2004 1:04 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 17 Sep 2004 00:55:28 -0700, Roger wrote:

> That would make my
> application run without a browser having to connect...

What is the point of that?

a) If the servlets are not local, you still 
need an internet connection.
b) If the servlets *are* local, convert them 
to an application and be done with it.

(Just some thoughts, I may have missed 
some important point in what you wrote.)

-- 
Andrew Thompson
http://www.PhySci.org/codes/  Web & IT Help
http://www.PhySci.org/  Open-source software suite
http://www.1point1C.org/  Science & Technology
http://www.lensescapes.com/  Images that escape the mundane



== 3 of 3 ==
Date:   Fri,   Sep 17 2004 1:17 am
From: Shanmuhanathan T <[EMAIL PROTECTED]> 

on 9/17/2004 1:25 PM Roger Wrote:
> Hi all. 
> 
> I've got servlets running in a chain. This works fine if users access
> the servlets and JSPs. Now I'm trying to write a java class that can
> emulate the browser, so that the applications runs without user
> interaction.
> I got the connection to work with authentification and I can access
> the InputStream I get back, but I couldn't figure out how to access my
> objects that I pinned to the session in my servlet chain.
> (Startpage.jsp-->servlet-->output.jsp) The output.jsp accesses the
> objects that were pinned to the session by the servlet.
> I would now like to connect(better POST) to the servlet like the
> Startpage.jsp does but from a java class. That would make my
> application run without a browser having to connect...
> 
> ------------java class code-----------------
>  String authString = "admin" + ":" + "admin";
>             String auth = "Basic " + new
> sun.misc.BASE64Encoder().encode(authString.getBytes());
>             URL url = new URL("http://localhost:8080/Dummy";);
>             URLConnection conn = url.openConnection();
>             conn.setRequestProperty("Authorization", auth);
>             System.out.println(conn.getInputStream().toString());
>             BufferedReader in = new
>             BufferedReader(new
> InputStreamReader(conn.getInputStream()));
>             String line;
>             while((line = in.readLine()) != null) {
>                 // process line
>                 System.out.println(line);
>             }                                   
> ------------/code--------------
> This works find, but as mentionned I cant figure out how to access my
> session objects, something that is aquivalent to
> request.getAttribute(key) or request.getParameter within the servlet.
> Can anyone help me or has got a hint?
> 
> Greets 
> 
> Roger
You could try using the httpclient from Apache commons instead.
http://jakarta.apache.org/commons/httpclient/
-- 
Shanmu.




==========================================================================
TOPIC: RMI: remote call or local call
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fc3a94862dd47001
==========================================================================

== 1 of 1 ==
Date:   Fri,   Sep 17 2004 1:05 am
From: Esmond Pitt <[EMAIL PROTECTED]> 

Buu Nguyen wrote:
>
> Esmond, I have searched the API and found no such method? the
> RemoteServer only exposes method like getClientHost() which return the
> IP of the calling host.

Yes, that's the one I meant.





==========================================================================
TOPIC: String[] files = {"a.doc, b.doc"}; VERSUS String[] files = new String[] 
{"a.doc, b.doc"};
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/39e65137dfea9036
==========================================================================

== 1 of 1 ==
Date:   Fri,   Sep 17 2004 1:15 am
From: [EMAIL PROTECTED] (Jesper Nordenberg) 

"Will Hartung" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> With the arrays, I don't believe that Java will statically allocate the
> array using the first technique.
...
> If it creates the array anew with every method call, then they'd be
> different.

Actually both statements produce exactly the same byte code which
creates a new array and fills it with String's. You can't have
String[]'s in the class file constant pool, only String's.

/Jesper Nordenberg



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

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

comp.lang.java.programmer
[EMAIL PROTECTED]

Change your subscription type & other preferences:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

Report abuse:
* send email explaining the problem to [EMAIL PROTECTED]

Unsubscribe:
* click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe


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



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BCfwlB/TM
--------------------------------------------------------------------~-> 

<a href=http://English-12948197573.SpamPoison.com>Fight Spam! Click Here!</a> 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/kumpulan/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to