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

Today's topics:

* Java trick - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfd25be52dc6a3ad
* Why does this work for Canvas but not for JPanel? - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/42cf2394a0e56b78
* Object class - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/63fef30fd89ad0f2
* what sample work to show in job interview? - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f7668b32a1da179
* writeObject and readObject problem - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a
* NYJavaSIG meeting - 9/30 - Tiger Release Party! - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7b6270565930bdb3
* problem with mysql 5.0 and java connector - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6db8779ad5c2254e
* Is Java good for writing simple, yet sleek GUI apps? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/597623eb2cda9cc3
* test - please ignore - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2f89ed9580d14a0
* VBTP Descriptions - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ebf3e54b30846df
* Integrating servlet container into my stand alone App - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/876916b4cfd4b10c
* Need help w. getOutputStream( ) - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/57fcce963c42a641
* Where is Roede?? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/78a25df0d465c899
* Extension problem Mac OS X (launching of external jar doesn't work) - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3dd4b342d0c112d6
* Help - J2ME implementation in BlackBerry -> Http - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aea41557e5aee825
* xdoclet entity and dao help - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51485373c1a7d27b
* Some sort of searchable or two way Map - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/315c1a2663bb6e58
  
==========================================================================
TOPIC: Java trick
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bfd25be52dc6a3ad
==========================================================================

== 1 of 2 ==
Date:   Sat,   Sep 25 2004 7:16 am
From: Chris Smith <[EMAIL PROTECTED]> 

Thomas G. Marshall wrote:
> ...I posted a question in c.o concerning the terminology of type when
> referring to poly-m objects.
> 
> The responses I got were, as you would expect, varied.  Very heavy hitting
> stuff in some cases, as is common among the purists in c.o, many of them
> authors of multiple OO books.

Interesting indeed.  What I bring out of that, which modifies my general 
understanding, is that there's a difference between what we mean by 
"type" in the context of the Java language, and in a general OO context.  
The two are related, and overlap considerably, but are not identical.  
That makes this much more tricky to use in conversation.  A good point 
is made that objects can be said to have "type" in general OO theory, 
despite the fact that a Java expression can never refer to them directly 
and so that type never needs to be used in Java.

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 2 of 2 ==
Date:   Sat,   Sep 25 2004 8:28 am
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Chris Smith coughed up:
> Thomas G. Marshall wrote:
>> ...I posted a question in c.o concerning the terminology of type when
>> referring to poly-m objects.
>>
>> The responses I got were, as you would expect, varied.  Very heavy
>> hitting stuff in some cases, as is common among the purists in c.o,
>> many of them authors of multiple OO books.
>
> Interesting indeed.  What I bring out of that, which modifies my
> general understanding, is that there's a difference between what we
> mean by "type" in the context of the Java language, and in a general
> OO context.

Perhaps.  Denizens in java land are prone to a java slant on OO terminology
and context, as are any language denizen.  But I think that this mismatch in
notions is consistent across nearly all OOPL's, imho particularly statically
typed ones.


> The two are related, and overlap considerably, but are
> not identical. That makes this much more tricky to use in
> conversation.

Oh criminey yes.


> A good point is made that objects can be said to have
> "type" in general OO theory, despite the fact that a Java expression
> can never refer to them directly and so that type never needs to be
> used in Java.

I'm not sure I read precisely that last point.  Perhaps because everything
is "a pointer to".  But for me to attempt a clarification is going to
bifurcate this thread beyond all reason :) .

That's the nature of this term.  Many in usenet are so confident that they
have the strongest handle on this term that arguments ensue, not about the
definition of the term, but /caused/ by a misunderstanding of what the other
was trying to say /because/ of a difference in definitions.

-- 
It'salwaysbeenmygoalinlifetocreateasignaturethatendedwiththeword"blarphoogy"
.






==========================================================================
TOPIC: Why does this work for Canvas but not for JPanel?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/42cf2394a0e56b78
==========================================================================

== 1 of 2 ==
Date:   Sat,   Sep 25 2004 7:27 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Sat, 25 Sep 2004 13:22:02 GMT, Jonck wrote:

>> Please shorten the lines in your posts, news clients
>> generally wrap at 72 chars.
> 
> Ok, sorry about that. I have changed the settings for my newsreader, 
> could you please confirm whether it's reading correctly for you this 
> time?

...errrm.  Looks fine.  But then my news client does not
even tell me how many chars I'm at, and I am not at all
sure of the exact number it should be ( I know it is somewhere
between 50 & 100 - shrugs ;-)

>> public void paintComponent(Graphics g) {
> 
> Thanks, you are of course right, I forgot to change paint to 
> paintComponent. However, when I do incorporate this change the behavior 
> is still incorrect, a dragged shape still leaves behind a "trail".

You are forgetting to paint the background, it has become 
your repsonsibility since you overrode paintComponent()

You can either.

// call the parent's implementation before you paint
super.paintComponent( g );
..

..or

// paint the background yellow yourself..
Color tempColor = g.getColor();
g.setColor(Color.YELLOW);
g.fillRect(0,0,
  this.getBounds().width,this.getBounds().height);
g.setColor(tempColor);
..

BTW.  I went to compile and test your original example
and was surprised to find a complete AWT version.  

Given your first post mentioned both a JFrame and a 
JPanel, why did you post the AWT based code?

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



== 2 of 2 ==
Date:   Sat,   Sep 25 2004 7:40 am
From: Babu Kalakrishnan <[EMAIL PROTECTED]> 

Jonck wrote:
>>Please shorten the lines in your posts, news clients
>>generally wrap at 72 chars.
> 
> 
> Ok, sorry about that. I have changed the settings for my newsreader, 
> could you please confirm whether it's reading correctly for you this 
> time?
> 
> 
>>public void paintComponent(Graphics g) {
> 
> 
> Thanks, you are of course right, I forgot to change paint to 
> paintComponent. However, when I do incorporate this change the behavior 
> is still incorrect, a dragged shape still leaves behind a "trail".
> 
> I'm sure I'm still doing something incorrect, as I've read many articles 
> on people using AffineTransform with Swing, but I can't seem to be able 
> to spot my mistake(s).
> 

The update method of Canvas class clears the background and then calls 
paint(). The JPanel class does it slightly differently, clearing of the 
background is done in its paintComponent method. So as Thomas suggested, 
adding a super.paintComponent() call at the start of the paintComponent 
method should take care of that.

The setSize() call in the Panel constructor also needs to be changed. 
You should use the setPreferredSize to set a preferred size.

BK




==========================================================================
TOPIC: Object class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/63fef30fd89ad0f2
==========================================================================

== 1 of 2 ==
Date:   Sat,   Sep 25 2004 7:42 am
From: "newbiejava" <[EMAIL PROTECTED]> 

I am wondering why all classes are extend the Object class.  Is it the only
reason that all objects are polymorphically of class Object, so Object is
the generic type for references that can refer to objects of any class?

Thanks in advance





== 2 of 2 ==
Date:   Sat,   Sep 25 2004 7:57 am
From: Chris Smith <[EMAIL PROTECTED]> 

newbiejava wrote:
> I am wondering why all classes are extend the Object class.  Is it the only
> reason that all objects are polymorphically of class Object, so Object is
> the generic type for references that can refer to objects of any class?

That's pretty much it.  java.lang.Object also defines some useful common 
behavior for all objects, such as comparisons and debug output 
representations.

-- 
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: what sample work to show in job interview?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f7668b32a1da179
==========================================================================

== 1 of 3 ==
Date:   Sat,   Sep 25 2004 7:42 am
From: [EMAIL PROTECTED] 

[EMAIL PROTECTED] (Matt) wrote in message news:<[EMAIL PROTECTED]>...
> For a job interview, what sample work we should show? We cannot show
> the source code we did in previous jobs, or documentations in previous
> jobs, because of company's propreitary, correct?
> 
> please advise. thanks!!

A personal home page with a couple of servlets running on it did it
for me. I mentioned in a cover-letter they they should have one of
their techies look at it; the logs showed that someone played poker
for half-an-hour. That job interview held no fear ...

.ed

www.EdmundKirwan.com - Home of The Fractal Class Composition



== 2 of 3 ==
Date:   Sat,   Sep 25 2004 8:39 am
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

[EMAIL PROTECTED] coughed up:
> [EMAIL PROTECTED] (Matt) wrote in message
> news:<[EMAIL PROTECTED]>...
>> For a job interview, what sample work we should show? We cannot show
>> the source code we did in previous jobs, or documentations in
>> previous jobs, because of company's propreitary, correct?
>>
>> please advise. thanks!!
>
> A personal home page with a couple of servlets running on it did it
> for me. I mentioned in a cover-letter they they should have one of
> their techies look at it; the logs showed that someone played poker
> for half-an-hour. That job interview held no fear ...
>
> .ed
>
> www.EdmundKirwan.com - Home of The Fractal Class Composition

Good idea.

Perhaps another good idea in applying in general is to supply a cd-rom with
a fully blown application that you've written on the side.  And make it
glitzy as hell using skinning.

To the side of the interview process, my favorite idea (for resume
submittal) is instead of placing the phrase

        "references available upon request"

in your resume, supply a sheet with 7 reference /quotes/ from your 7
greatest fan co-workers.  A sentence or 2 or a paragraph, as in the first
page of novels, extolling your abilities just shy of nauseum :)

        "This guy taught me more about OO than 10+ prior
        years of world experience.  He did this and that {etc....}"
        Dwight Shmidlap, principal architect
        Smedly Corp, [EMAIL PROTECTED]
        123-456-7890 x123

And then they'll be faced most resumes with unknown references, and then
yours which 7 known opinions, and names and emails to go with them.  This
works in another way too.  People often dread checking references, and often
don't do them at all.  When you supply them ahead of time, you'll have
references in their heads, and the others might not get checked at all.

You'll appear as a /known entity/.  A bird in the hand, to overuse a
metaphor.

IMHO.


-- 
It'salwaysbeenmygoalinlifetocreateasignaturethatendedwiththeword"blarphoogy"
.





== 3 of 3 ==
Date:   Sat,   Sep 25 2004 11:46 am
From: "Rogue Chameleon" <[EMAIL PROTECTED]> 

"Thomas G. Marshall" <[EMAIL PROTECTED]>
wrote in message news:[EMAIL PROTECTED]
>
> To the side of the interview process, my favorite idea (for resume
> submittal) is instead of placing the phrase
>
>         "references available upon request"
>
> in your resume, supply a sheet with 7 reference /quotes/ from your 7
> greatest fan co-workers.  A sentence or 2 or a paragraph, as in the first
> page of novels, extolling your abilities just shy of nauseum :)
>
>         "This guy taught me more about OO than 10+ prior
>         years of world experience.  He did this and that {etc....}"
>         Dwight Shmidlap, principal architect
>         Smedly Corp, [EMAIL PROTECTED]
>         123-456-7890 x123
>
> And then they'll be faced most resumes with unknown references, and then
> yours which 7 known opinions, and names and emails to go with them.  This
> works in another way too.  People often dread checking references, and
often
> don't do them at all.  When you supply them ahead of time, you'll have
> references in their heads, and the others might not get checked at all.
>
> You'll appear as a /known entity/.  A bird in the hand, to overuse a
> metaphor.
>
> IMHO.

This is an absolutely brilliant idea!  Thanks! :)






==========================================================================
TOPIC: writeObject and readObject problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6fc9480a3a7f42a
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 7:43 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Sat, 25 Sep 2004 09:21:53 -0400, juicy wrote:

>> (In case you are *compiling* with MS SDK - stop it and use Sun 
>> Java with options)
> 
> I must use MSVM to run my another virtual reality part which is controlled
> by java applet, if not, i will get all the exception like below. 
> 
> java.lang.UnsatisfiedLinkError: getBrowserType
>       at vrml.cosmo.Browser.getBrowserType(Native Method)

This thread* suggests such code will work only in the MSVM,
is that correct?  Is this Applet MSVM *only*?!?
<http://www.talkaboutprogramming.com/group/comp.lang.vrml/messages/32634.html>

You are coding for a dangerous dinosaur.  That particular VM is 
one that I make software specifically to help people *remove*.
<http://www.physci.org/jvmclean.jsp>

>>method 'action()' is also deprecated.
> Why method ation is deprecated?

Because time goes on.  That is irrelevant (you not 
need change) if you are coding only for MSVM.

> I don't know who is still willing offer help... what should i do now?? I
> will really appreaciate your help!!

My interest in helping you write code has plummeted since
I realised it was for a broken and insecure VM only.
I have far more ..this millenium things to be doing.

My advice is.  Give up on this folly.  

MS itself no longer provides IE with the MSVM, and at the 
rate they are being *uninstalled*, unless you get your 
project finished and make your millions off it within 6 
months, you will end up with a piece of software for which 
no-one has the plug-in.  It will be useless.

-- 
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: NYJavaSIG meeting - 9/30 - Tiger Release Party!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7b6270565930bdb3
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 9:18 am
From: Frank D. Greco <[EMAIL PROTECTED]> 

     Celebrate the Launch of J2SE 5.0
         Party with the Tiger!

Who:   Calvin Austin, Sun Microsystems
       J2SE 5.0 Specification Lead      
When:  Thursday, September 30, 2004 
       6:00pm - 8:00pm  
Where: Sun Microsystems 
       101 Park Avenue (40th St), 4th Floor 
       Gramercy Park Room (#4140) 
       NY, NY 10176 

YOU MUST RSVP (building security requirement):
      http://www.javasig.com  (click on "Next Meeting" or in "New" Swing window)

======================================
Help Celebrate the Launch of J2SE 5.0! 
======================================
Nearly six years ago Sun launched the initial release of J2SE (v 1.2) in New
York city to a very enthusiastic audience. As most of you remember, J2SE was a
major platform upgrade from the previous JDK 1.1 family. Two and half years in
development and 15 component JSRs later, Sun returns to New York to celebrate
the release of the latest J2SE release, v 5.0 (code-named "Tiger"). 

J2SE 5.0 includes the first source-level language updates in over nine years
since the inception of Java technology. Many exciting enhancements for
monitoring and management, stability, performance and rich desktop clients can
be found in JDK 5.0 and the JRE 5.0. 

Sun would like to invite all members of the NYJavaSIG, the dedicated Java
software developer, to a celebration of the release of J2SE 5.0 in our Midtown
Manhattan office. 

Beer, Wine, Soda, Munchies and some cool giveaways. 

Looking forward to seeing everyone. 

Frank G.
+==========================================+
| Crossroads Technologies Inc.             |
| www.CrossroadsTech dot com               |
| fgreco at REMOVE!cross!roads!tech!dot com|
+==========================================+




==========================================================================
TOPIC: problem with mysql 5.0 and java connector
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6db8779ad5c2254e
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 10:17 am
From: [EMAIL PROTECTED] (wildsurfer) 

I've a strange message when I try to connect to my db using java
connector ( mysql-connector-java-3.1.4-beta ):

javax.servlet.ServletException: Cannot connect to MySQL server on
localhost:3306. Is there a MySQL server running on the machine/port
you are trying to connect to? (java.lang.NumberFormatException)

I'm using tomcat 5.0.
Note that i don't have any problem to connect to the sql server using
for example mysql front or querying the server directly.
before I was using mysql 4.0.13 and everything just worked fine!
I wanted to upgrade my mysql server to the newer version, but I don't
know how to fix this problem.
I suppose that I had to unistall the old version and install mysql
5.0, but it doesn't work any more!do i have to change something else?
why the jdbc connector doesn't work any more?

this is what I use to connect to my db (I'm using dreamweawer and this
is the connection file)

<%
// FileName="Connection_jdbc_conn.htm"
// Type="JDBC" ""
// DesigntimeType="JDBC"
// HTTP="true"
// Catalog=""
// Schema=""
String MM_top11_DRIVER = "org.gjt.mm.mysql.Driver";
String MM_top11_USERNAME = "root";
String MM_top11_PASSWORD = "";
String MM_top11_STRING = "jdbc:mysql://localhost:3306/mydb";
%>


Thank you very much
Andrea




==========================================================================
TOPIC: Is Java good for writing simple, yet sleek GUI apps?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/597623eb2cda9cc3
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 10:24 am
From: "Mike Schilling" <[EMAIL PROTECTED]> 


"Joona I Palaste" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

>
> Because of my good knowledge of written English, I've been thought as a
> British woman living in Finland. I've responded by telling that I'm
> neither British nor a woman.


Nor an empire.

(If that's too obscure, see http://en.wikipedia.org/wiki/Holy_Roman_Empire) 






==========================================================================
TOPIC: test - please ignore
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a2f89ed9580d14a0
==========================================================================

== 1 of 2 ==
Date:   Sat,   Sep 25 2004 10:57 am
From: [EMAIL PROTECTED] (zxcv) 

<hr>
<table border=2>
<tr>
<td>test</td>
</tr>
<tr>
<td>I SAID IGNORE!!!!!!!!!!!!!</td>
</tr>
<tr>
<td>This concludes the test</td>
</tr>
</table>
<hr>



== 2 of 2 ==
Date:   Sat,   Sep 25 2004 11:23 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 25 Sep 2004 10:57:33 -0700, zxcv wrote:

Failed dismally!   alt.test.* is the place for testing. 

> <td>I SAID IGNORE!!!!!!!!!!!!!</td>

Don't shout, don't tell me what to do, and fix the..
<http://www.physci.org/kbd.jsp?key=shift1+1>
..key on your keyboard, it seems to be stuttering.

-- 
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: VBTP Descriptions
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ebf3e54b30846df
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 11:07 am
From: bcryor <[EMAIL PROTECTED]> 

Interim Transactions    
TRANS DATE      DESCRIPTION     AMOUNT  BALANCE
09/27/2004      SKOWHEGAN ME    $85.07- $1,180.68
09/27/2004      DEPOSIT         $48.25  $1,265.75
09/27/2004      EXXONMOBIL75 04560272 SKOWHEGA  $7.96-  $1,217.50
09/22/2004      PREAUTH TFR TO : SV 0000092319  $50.00- $1,225.46
09/22/2004      QUINN TRUE VALUE HDW SKOWHEGAN  $13.71- $1,275.46
09/21/2004      NML INSURANCE ISA PAYMNT        $280.10-        $1,289.17
09/21/2004      M C I THE NEIGHB EZPAY  $27.98- $1,569.27
09/21/2004      IRVING BIG STOP FAIRFIELD       $13.36- $1,597.25




==========================================================================
TOPIC: Integrating servlet container into my stand alone App
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/876916b4cfd4b10c
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 11:42 am
From: [EMAIL PROTECTED] (DiscoStu) 

Hello Everyone,

     I had this idea for an application I would like to write. I want
to write it as a java application, but be able to output
program-generated .html into an Internet Explorer window. Sending the
generated html to the IE window is easy... just using the Runtime
class. But I want the Internet Explorer window to be able to make http
calls back to my application for form submissions. I didn't want to
have to force my users to install Tomcat just so the internet explorer
could pass back information to the servlet in my .Jar file.

How hard is it to add a servlet container and respond to http post's
from the localhost internet explorer window? This is all from my .jar
file and not from a web application running under tomcat remember. The
only http requests coming into my application will be from that one
internet explorer window... so its really acting like a
single-user-local-machine Tomcat server. But I dont want the burden of
forcing Tomcat on people.

I suppose you'll say pick a standard application or a jsp/servlet
solution, but not both.... but I think there is a lot of flexability
to this method, being able to generate GUI screens on the fly in the
IE window is really exciting.

Thanks,

     Greg




==========================================================================
TOPIC: Need help w. getOutputStream( )
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/57fcce963c42a641
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 12:26 pm
From: Steve Burrus <[EMAIL PROTECTED]> 

Gordon Beaton wrote:
> On Sat, 25 Sep 2004 05:41:18 GMT, Steve Burrus wrote:
> 
>>I need some pretty immediate help w. using the getOutputStream()
>>servlet method to be able to see an image in my web browser!! Can
>>anyone possibly help me with this please???
> 
> 
> I don't know what kind of a response you were hoping for, but it
> usually helps if you actually ask a question. If someone can help,
> they will.
> 
> /gordon
> 

Well gordon, if u didn't quite understand my question that was posed 
last nite, I will say that I simply want to be able to get an image into 
a servlet to be viewed by my browser, i.e., a .gif and/or a .jpeg kind 
of an image! I tried to use that "getOutputStream()" method to do this, 
but the compiler returned an error saying that there was return value in 
the method! I just want to know how to use this method to see an image.




==========================================================================
TOPIC: Where is Roede??
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/78a25df0d465c899
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 12:43 pm
From: Steve Burrus <[EMAIL PROTECTED]> 

I was just wondering where our Roedy Green these days???! Maybe I 
haven't heard yet some big, big news about him, but I noticed that he 
hasn't posted to this group in the past several days!




==========================================================================
TOPIC: Extension problem Mac OS X (launching of external jar doesn't work)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3dd4b342d0c112d6
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 1:20 pm
From: contrex <[EMAIL PROTECTED]> 

> Ok, since you are getting a NoSuchMethodException could it be that the 
> method that is causing this exception is implemented only in Java 
> versions >1.3.1? Which version of Java are you using on your M$ and 
> Linux machines?

Yes, yes and yes, that's it!!!
"Install Anywhere" has an option (only for Mac OS) which defines the JVM 
the application shall use. And this one was set to 1.3.1. That's the 
reason why I wasn't asked while installation on Mac OS which JVM I want 
to use because the Installer already knew it. This is different on 
Windows and Linux: the end-user has to choose a JVM from a list during 
installation process. And when I choose a JVM < 1.4 it doesn't work 
neither!

Thus I made a new installer for Mac OS with option 1.4.* 
I installed it and it works like a charm!
Thanks Jonck for this great hint!




==========================================================================
TOPIC: Help - J2ME implementation in BlackBerry -> Http
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/aea41557e5aee825
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 2:08 pm
From: [EMAIL PROTECTED] (fabius) 

Hi, 

I tested this code in BlackBerry Handeld: 

====================== 
httpCon = (HttpConnection)Connector.open(http://server:8080
/sync4j/sync;WAPGatewayIP=x.x.x.x;WAPGatewayAPN=so
mething;WAPGatewayPort=9201");

httpCon.setRequestMethod(HttpConnection.POST); 
httpCon.setRequestProperty("content-length" , 
String.valueOf(dataToSend.length) ); 
httpCon.setRequestProperty ("content-type" ,
"application/vnd.syncml+xml");

System.out.println("debug ------------->>>>>> 2-content length:" + 
String.valueOf(dataToSend.length)); 

outputStream = httpCon.openDataOutputStream(); 

System.out.println("debug ------------->>>>>> 3"); 

outputStream.write(dataToSend); 

System.out.println("debug ------------->>>>>> 4"); 

inputStream = httpCon.openDataInputStream(); 

System.out.println("debug ------------->>>>>> 5"); 

int size = (int)httpCon.getLength(); 

System.out.println("debug ------------->>>>>> 6"); 

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

but if length of dataToSend byte array is larger then 1385 byte, code
some
time crashes at 
inputStream = httpCon.openDataInputStream(), and some time code works
well.
It's very strange..... (connection timeout?) 
However, if length of dataToSend byte array is less then 1385 byte,
code
works fine. 

This is the output of JDE debug attached 7230 handleld: 

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

CMM: SyncContact no sig from 0x33 
debug ------------->>>>>> 2-content length:1385 
debug ------------->>>>>> 3 
debug ------------->>>>>> 4 
VM:+GC(T) 

RX=174K,RF=284K,FF=6240K,HF=28322,OS=1673K,ON=16K
,OR=15,FR=556,HR=11,IS=1K
RA=1010K,RS=393K,RN=4K 
TA=1449K,TS=1104K,TN=8K 
PA=176K,PS=176K,PN=2K 
R0=178K,2=7K,3=20K,7=5K,8=3K,9=410K,10=2K,12=46K, 13=7K,15=24K,16=308K
VM:+PPO 
VM:-PPOc=26,n=1601,s=1K,r=0 
VM:PPOt=12,g=5,p=7769 
VM:+RSF 
VM:-RSF 
VM:+RR 
VM:-RR 
VM:+CSF 
VM:CSF 
VM:CSF 
VM:CSF 
VM:CSF 
VM:CSF 
VM:-CSF 

RX=184K,RF=696K,FF=6330K,HF=28354,OS=1515K,ON=14K
,OR=0,FR=0,HR=0,IS=1K
RA=598K,RS=0,RN=0 
TA=1360K,TS=1340K,TN=10K 
PA=175K,PS=175K,PN=1K 
R0=178K,2=7K,3=20K,7=5K,8=3K,10=2K,12=46K,13=6K,1 5=24K,16=308K 
VM:-GCt=1333,b=1,r=0,g=3,u=0,c=1 
VM:+CR 
VM:TI2R 
VM:-CR=3 
VM:+GC(F) 
VM:-GCt=54,b=1,r=0,g=1 
VM:+CR 
VM:TR2I 
VM:-CR=1 

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


Later I change 
"outputStream.write(dataToSend);" 

in 

"for (int i = 0, l=dataToSend.length; i < l; i++) { 
outputStream.write(dataToSend<i>); 
outputStream.flush(); 
} 

outputStream.close(); 
outputStream = null;" 

but it works at the same way. 

I can't understand.... 
Connection Buffer? Connection Timeout? 

Thanks & thanks & thanks.... 
for any suggestion. 
fabius




==========================================================================
TOPIC: xdoclet entity and dao help
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/51485373c1a7d27b
==========================================================================

== 1 of 1 ==
Date:   Sat,   Sep 25 2004 2:39 pm
From: William Zumwalt <[EMAIL PROTECTED]> 

I'm learning to work w/ DAO's and have this question. I'm trying to pull 
my database code out of my entity and and make use of DAO's. My DAO 
class is being generated from my entity by xdoclet, even though there's 
not much in it.

I have the following in my entity bean ...

/** 
 * @ejb.create-method
*/
public String ejbCreate(String id, String desc) throws 
ejbCreateException {
   HashMap memento = new HashMap();

   memento.put(SERIAL, serial = id);
   memento.put(DESC, description = desc);

   MyDAO.create(memento);

   return serial;
}

My question is how do I define (in this case) a create() method of my 
DAO which will look something like this (but hasn't been generated yet) 
...

public abstract class MyDAO { 
    static public void create(HashMap data) throws PersistanceException {
        CreateThing.getInstance().execute(data);
    }
}

I saw the @dao.call, but not sure how to use it.

Any help much appreciated.

Will




==========================================================================
TOPIC: Some sort of searchable or two way Map
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/315c1a2663bb6e58
==========================================================================

== 1 of 2 ==
Date:   Sat,   Sep 25 2004 3:23 pm
From: Albretch <[EMAIL PROTECTED]> 



 Is there such a thing?

 I need a Data Structure that would let you insert Strings into it and give you
back an index you could use later on to refer to the inserted String and it should 
work the other way around too, given the String it should return to you the index 
if the String exists.

 In my code trials I have noticed that:

 1._ Yes, a LinkedHashMap is really fast if you have the index, but you can not 
get an iterator from it and, it is really slow when you effectively loop over it
via:

 get(new Integer(Ix))

 2._ A LinkedList is faster but still in order to get to an item you must get an 
iterator and go over all of them and check them one by one

 I am thinkign of using a class containing two Maps in order to solve the problem, 
but there might be a more elegant solution to this prob.







== 2 of 2 ==
Date:   Sat,   Sep 25 2004 3:38 pm
From: Thomas Kellerer <[EMAIL PROTECTED]> 



Albretch wrote on 26.09.2004 00:23:
> 
>  Is there such a thing?
> 
>  I need a Data Structure that would let you insert Strings into it and give you
> back an index you could use later on to refer to the inserted String and it should 
> work the other way around too, given the String it should return to you the index 
> if the String exists.
> 

ArrayList is exactly what you need.

Have a look at the add(Object) and indexOf(Object) methods.

http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html

Thomas



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

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 

Reply via email to