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

Today's topics:

* jdeveloper project file structure - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f23ff9ae612cd6b5
* Cast problem. - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ba70e63a67de4e64
* Character encoding between Win and *nix - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d00907704bee1888
* A Jtidy question - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/101dc3467b393897
* Installing Tomcat 5 as service - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/765c97a661f8aba5
* request.setAttribute(...) versus session.setAttribute(...) - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e301f649474cd744
* Contructor bad practices----WAS: Re: Can someone use invokeLater()... - 2 messages, 
2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70ac1bf0cc54a090
* Ant Deploy Task Help Needed!!!!! - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c0e92f8078749598
* SOAP and servlets living together? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2dca87f4c115f04c
* Classes SSH-SCP for Java - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b78404f5308632ce
* unused methods and class - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/18983b9b8d7bad9c
* changing input text - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2edb53612cdb9ecf
* local search - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe99afb3cb58e3a0
* exception handling problem - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75dffc1e26b79688
* Saving data from a SQL-query for later use - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c40c88c74d93aa59
* JMX to manage application status - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/661f4562dc3ee314
* Enums in inner classes - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ecb6f0754c4b0df
* Where do you find out what type of questions are to be asked in each newsgroup? - 1 
messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c1d277b9ef3ecd3
* EL: how to access dotted-named attributes? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a39b758d0a7a408f
* Strange problem!!(it is, atleast to me!!) - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/275778583678f0e9
  
==========================================================================
TOPIC: jdeveloper project file structure
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f23ff9ae612cd6b5
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 6:54 am
From: Sudsy <[EMAIL PROTECTED]> 

nooobody wrote:
> Well, we are using Ant, just accessing it through the IDE. I may dump
> Jdeveloper and go back to Eclipse, which I used previously on simpler
> projects than my current one. I may  even try NetBeans. Sometimes I'm
> tempted to go back to Textpad; we have one developer where I work who
> does quite well with it.

Is Bad Boy hiring?

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





==========================================================================
TOPIC: Cast problem.
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ba70e63a67de4e64
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 8:31 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

bilbo wrote:
> Does anyone know the rationale for why a narrowing conversion is
> allowed for certain types and not others?

Only the language designers know for sure, if they even remember.  My 
guess would be that it is related to the fact that there is no way in 
Java to express a literal of type byte or short, and that char comes 
along for the ride as an additional "small" integral type.  In other 
words, it is allowed in those cases as a programming convenience, and 
designed in such a way that there are no special cases.  It applies to 
all compile-time constant values of the "small integer" type, and to all 
variables of the same category of types (for which narrowing might be 
required).

Castless narrowing of long to int is not permitted (I speculate) because 
to have a constant long in the first place you must have explicitly 
specified that type.  It is thus reasonable that Java wants you to 
declare what you are doing by means of a cast when you narrow a long; if 
you write such an assignment without a cast it is reasonably likely to 
reflect a design or coding error.

Narrowing of double to float is not permitted without a cast because in 
general it loses precision.

References can never be narrowed in Java without a cast; this is a 
fundamental design feature of the language.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Character encoding between Win and *nix
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d00907704bee1888
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 8:40 am
From: [EMAIL PROTECTED] 

No, haven't considered it, since I don't want to introduce a servlet
container for size sake. My package is currently no more than 200k and
I would like to keep it around that size. Introducing TomCat (or any
other servlet container for that matter) would significantly increase
this, I guess.. but maybe I'm wrong? Would you happen to know any
existing packages lots smaller than tomcat? 

Piet





==========================================================================
TOPIC: A Jtidy question
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/101dc3467b393897
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 8:41 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

mike wrote:

> I use Jtidy (api) to translate a HTML file into a "XHTML file".
>   But The "XHTML file" cannot be identified by nokia 6600.
>   Do I miss something important?
>   Or this is Jtidy's weakness or bug?

Didn't you ask the same question about a Nokia 6800 a week or two ago? 
The answer then was that the Nokia software only understands a subset of 
XHTML.  Very likely the same is true of the 6600.  You will need a 
special-purpose tool to strip the XHTML output of JTidy to the subset 
understood by the Nokia software.  Nokia might offer such a thing; 
otherwise you would have to write one yourself.  Do note that such a 
transformation will necessarily alter or remove some of the markup in 
the page.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Installing Tomcat 5 as service
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/765c97a661f8aba5
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 8:55 am
From: [EMAIL PROTECTED] (Cristina) 

Hi, I need help about how to install Tomcat 5 as a service shared from
many users. I usually test my application in the modality standalone;
now I need to install Tomcat on a computer of my university lab and to
have an application that I have developed tested (by navigation) by
many users from home.
I read Tomcat documentation but I found it not so clear... can anybody
tell me more simply how to do?

Thanks in advance,

Cristina




==========================================================================
TOPIC: request.setAttribute(...) versus session.setAttribute(...)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e301f649474cd744
==========================================================================

== 1 of 2 ==
Date:   Wed,   Oct 27 2004 9:13 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Matt wrote:

> I want to confirm the differences between request.setAttribute(key,
> value) versus session.setAttribute(key, value).
> 
> My understanding is that request.setAttribute only make the key
> available in the following jsp page. But session.setAttribute will
> make the key available in many pages, as long as in the same session,
> and browser not close.

A request attribute will be accessible via the specified key to all JSP 
pages (and other servlets) processing the same HTTP request.  There may 
be more than one such page / servlet if (and only if) one of them 
forwards to or includes another; an HTTP redirect, in contrast, causes 
the client to issue a new request.  A human user explicitly asks for a 
new request to be issued by clicking the "reload" button in his browser.

A session attribute will be accessible via the specified key to all JSP 
pages (and other servlets) processing a request in the same session. 
Period.  Closing all browser windows will typically prevent any more 
requests from being issued in any previously existing sessions tied to 
that browser; I don't know of any exceptions to that behavior, but it is 
outside the scope of the servlet spec.

> For example, the flow like page1->page2->page3->page4.
> session.setAttribute will make the key available in all pages. But if

There are some caveats, but basically yes.

> we use request.setAttribute in page2, then only page3 can get the key
> value set in page2.

I'm guessing that you mean the user clicks on a link or posts a form on 
page1 to get to page2; and likewise to get from page2 to page3 and from 
page3 to page4.  Each page is then served up in response to a separate 
request, and in that case NO, a request attribute set by page2 is NOT 
accessible in page3, it is only accessible in page2.  Furthermore, such 
a request attribute must be set anew during processing of *each visit* 
to page2 if it is to be used by the page implementation -- it is not 
inherited from any previous visit to that page.

As Sudsy was pointing out, you also need to watch out for caching 
behavior.  User agents (generally browsers), proxies, and web servers 
all may cache responses under certain circumstances.  All may cause 
trouble, but the most likely to do so are user agents.  For instance, 
when a human user clicks the "Back" button on his browser's toolbar, he 
will generally get a cached version of the previously visited page 
instead of causing a new request to be issued for that page.  This may 
be different from what he would get by reissuing the same request by 
which the cached page was originally fetched.


John Bollinger
[EMAIL PROTECTED]



== 2 of 2 ==
Date:   Wed,   Oct 27 2004 9:17 am
From: "pet0etie" <[EMAIL PROTECTED]> 

"Sudsy" <[EMAIL PROTECTED]> wrote in message

<quote>I've written an article about how the "back" button can actually
propogate upwards unintentionally, especially when you forward to another
Struts Action: you end up on the first page of a flow if you don't guard
your session/request attributes.</quote>

where can i find that article ?

greetings,
pet0etie






==========================================================================
TOPIC: Contructor bad practices----WAS: Re: Can someone use invokeLater()...
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/70ac1bf0cc54a090
==========================================================================

== 1 of 2 ==
Date:   Wed,   Oct 27 2004 9:21 am
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 

Alex Hunsley coughed up:
> Thomas G. Marshall wrote:
>> Alex Hunsley coughed up:
>>> well, if I didn't mean that, then I would be talking about calling
>>> private methods of *other classes* which wouldn't make any sense. So
>>> yes, I meant of that same object, sorry if I wasn't clear on that.
>>
>>
>> You were clear enough---I just wasn't paying /quite/ enough
>> attention.
>
> Ah, ok.
>
>>>> Then I totally agree.
>>
>>
>> I should not have said "totally" here either.  More like "almost
>> always". But again, even in this case I recognize how truly heroic
>> attempts at making pure code result in impossible to maintain ugly
>> code, so my comment regarding the weighing of costs stands.
>
> okeydoke.
>
>>>> Here's something else I see *all the time*:  (pseudo-java, ignore
>>>> scoping rules):
>>>>
>>>>    class A
>>>>    {
>>>>        A() { helper(); }
>>>>
>>>>        helper() {....};
>>>>    }
>>>>
>>>>    class B extends A
>>>>    {
>>>>        helper() {....};         // dangerous: overridden
>>>>    }
>>>
>>> Yup, I see that too. I see dead people.
>>
>>
>> ...You may be seeing the people I've /killed/ for making this
>> mistake. Tell'm to stop haunting me at night.  Nobody needs to have
>> ghosts chanting "code nazi....code nazi..." all the time...
>
> :) I wonder what the chances are of future version of javac emitting
> warnings on Bad Ideas(tm) such as we are discussing? Would love to
> see that.

Me too, but these are just "obviously stupid things", so I'm sure somebody
must have thought of them and dismissed them for some ungodly reason.  For
example, there is no reason whatsoever that I can see that a compiler should
not warn on the overriding of a method called by a superclass constructor.




>
> hmmm, you can define your own meta tags in 1.5.0, can't you?
>
> alex



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





== 2 of 2 ==
Date:   Wed,   Oct 27 2004 12:48 pm
From: "Stefan Schulz" <[EMAIL PROTECTED]> 

On Wed, 27 Oct 2004 16:21:23 GMT, Thomas G. Marshall  
<[EMAIL PROTECTED]> wrote:


>> :) I wonder what the chances are of future version of javac emitting
>> warnings on Bad Ideas(tm) such as we are discussing? Would love to
>> see that.
>
> Me too, but these are just "obviously stupid things", so I'm sure  
> somebody must have thought of them and dismissed them for someungodly  
> reason. For example, there is no reason whatsoever thatI can see that a  
> compiler should not warn on the overriding of a
> method called by a superclass constructor.

This would "leak" information about implementation details of the
superclass to the child. Also, there might be legitimate reasons to
do just that. I would argue against such a practice, though. It invites
too many hard-to-find errors (initialization issues usually are)


-- 

Whom the gods wish to destroy they first call promising.




==========================================================================
TOPIC: Ant Deploy Task Help Needed!!!!!
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c0e92f8078749598
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 9:33 am
From: bugbear <[EMAIL PROTECTED]> 

Chris Pieper wrote:
> Ok, I was hoping to use ANT to aid in my team's deployment's to our
> development server.
> 
> Currently the system is designed as follows:
> 
> Each Developer maintains a local checked out (from CVS) copy of a
> project. Each developer is tasked with making various changes, of
> which there is little chance for the need of mutliple editors on any
> given java file.
> 
> Then we have our development server which maintains the current
> working versions of all the java class files. Each developer after
> making his edits, copies the new class file to the server so that the
> dev server maintains an accurate collection of the system given
> changes by developer.

Why not get the developers to check in sources (to CVS)
and have an overnight build (on the central reference machine)
do a full checkout-build-test?

All this outside-CVS copying of class (AKA derived) files
seems horribly wrong.

    BugBear




==========================================================================
TOPIC: SOAP and servlets living together?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2dca87f4c115f04c
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 9:38 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

unixhack.blogspot.com wrote:

> I'm trying to develop an application that uses SOAP and servlets.
> So far I have some servlets and JSP's running fine. They access
> the database, modify it, display data, etc.

Good.

> I want to add some SOAP functionality to the application using
> Apache SOAP, but so far I haven't had much luck. I am following
> the Apache SOAP docs and the Tomcat/SOAP instructions at:
> 
>    http://www.onjava.com/pub/a/onjava/2002/02/27/tomcat.html

This is relatively old.

> So far I have modified catalina.sh to
> 
>     - add xercesImpl.jar at the beginning of the CLASSPATH
>     - add the path to my soap classes at the end of the CLASSPATH

If you are using Tomcat 4 or later, neither of these should be 
necessary.  You should be able to just put any jars you need into 
$CATLINA_BASE/shared/lib if you want them to be accessible to all 
webapps, or into a particular webapp's WEB-INF/lib if you only need them 
to be accessible to one webapp.

If you are running against Java 1.4 then you may well not need 
xercesImpl at all, as Java 1.4 includes a built-in XML parser 
implementation.

> This works, and I am able to deploy the sample SOAP service
> from the OnJava example using the ServiceManagerClient class.
> 
> This would be fine if I didn't had to access the classes I
> already wrote. Which is not the case.
> 
> So, I add the directory where my classes live at the end of
> the CLASSPATH in catalina.sh. This directory look something like:
> 
>    $CLASSPATH:$CATALINA_HOME/webapps/myapp/WEB-INF/classes

Ack! No! Never do that!  The classes associated with a specific webapp 
should never be in the server's base classpath.

If you are writing SOAP-based classes that depend on the classes of your 
existing webapp, then very likely they belong in the same webapp.  Put 
them there and you will not have dependency problems.  If you need to 
use multiple webapps for some reason, then put those classes that are 
needed by more than one webapp into appropriate subdirectories of 
$CATALINA_BASE/shared/classes, or jar them up and put the jar into 
$CATALINA_BASE/shared/lib.

> This allows the SOAP service to access public methods provided
> by my application. However, if I now try to access my application
> via the usual URL (http://my.host.com:8080/myapp), I get a 404
> error!
> 
> The Tomcat log shows a somewhat cryptic stack trace:
> 
> Oct 26, 2004 6:35:58 PM org.apache.catalina.startup.HostConfig deployDirectories
> SEVERE: Error deploying web application directory myapp
> java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
>         at java.lang.ClassLoader.defineClass0(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
>         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
> 3)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)

This is because the servlet API is not needed or included in Tomcat's 
base classpath.  You should not need to mess with catalina.sh; put your 
classes and jars into the correct places and Tomcat will do the right 
thing with them automagically.

> At this point, I'm completely stumped. Any idea of how to get
> SOAP and servlets to live together?

See above.  For real reference information you would want to read some 
of the Tomcat docs; a particularly relevant document (for Tomcat 4) 
would be

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

> Should I ditch the whole ServiceManagerClient/ RPC router
> thing and just chisel the SOAP functionality into my classes?

That shouldn't be necessary.

> If this is not the best forum to ask this type of questions, could
> you please recommend some other place to go?

We get lots of questions here about web applications and related Java 
technologies.  Questions specific to particular server implementations 
are sometimes referred to the support services of the purveyors of the 
server, but otherwise we try to handle them.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Classes SSH-SCP for Java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b78404f5308632ce
==========================================================================

== 1 of 2 ==
Date:   Wed,   Oct 27 2004 9:39 am
From: Rogan Dawes <[EMAIL PROTECTED]> 

Xavier wrote:

> Hello,
> 
> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ? Any link ?
> 
> Thanks
> 
> Xavier
> 
> 
Google for "Java ssh2 scp"?

Go on, just try it! Hint: The 5th link pointing to linuxmafia is the one 
you want. . . . .

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:   Wed,   Oct 27 2004 9:48 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Xavier wrote:

> I am searching for classes to use SCP (server use SSH2) in my Java
> application.
> Any idea ? Any link ?

Did you try Google?

http://www.google.com/search?hl=en&q=ssh+java&btnG=Google+Search

I can't recommend any particular solution, but it looks like there are 
quite a few available.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: unused methods and class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/18983b9b8d7bad9c
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 27 2004 9:46 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Fx wrote:

> I would like to clean my code by looking for unused methods -in particular in 
> interfaces- and unused classes even they are public.
> 
> Do you know if some tools (free or commercial) are able to do this job ?

A good IDE will help you identify this sort of thing.  Eclipse does, for 
instance.  (http://www.eclipse.org/)  Static source-checking tools such 
as Checkstyle (http://checkstyle.sourceforge.net/) may go some of the 
way.  You can sort out required class files from extraneous ones by 
suitable application of a classfileset in Ant (http://ant.apache.org/). 
  All of those tools are open source; there are undoubtedly many others, 
both open- and closed-source.


John Bollinger
[EMAIL PROTECTED]



== 2 of 3 ==
Date:   Wed,   Oct 27 2004 10:12 am
From: "Paul H. van Rossem" <[EMAIL PROTECTED]> 

AFAIK Eclipse doesn't check for unused classes and *public* methods.
It checks only at class scope (unused private methods, variables never 
set or read and unused parameters).
Paul.

On 27-10-2004 18:46, John C. Bollinger wrote:
> Fx wrote:
> 
>> I would like to clean my code by looking for unused methods -in 
>> particular in interfaces- and unused classes even they are public.
>>
>> Do you know if some tools (free or commercial) are able to do this job ?
> 
> 
> A good IDE will help you identify this sort of thing.  Eclipse does, for 
> instance.  (http://www.eclipse.org/)  Static source-checking tools such 
> as Checkstyle (http://checkstyle.sourceforge.net/) may go some of the 
> way.  You can sort out required class files from extraneous ones by 
> suitable application of a classfileset in Ant (http://ant.apache.org/). 
>  All of those tools are open source; there are undoubtedly many others, 
> both open- and closed-source.
> 
> 
> John Bollinger
> [EMAIL PROTECTED]



== 3 of 3 ==
Date:   Wed,   Oct 27 2004 12:43 pm
From: "Stefan Schulz" <[EMAIL PROTECTED]> 

On Wed, 27 Oct 2004 19:12:43 +0200, Paul H. van Rossem <[EMAIL PROTECTED]>  
wrote:

> AFAIK Eclipse doesn't check for unused classes and *public* methods.
> It checks only at class scope (unused private methods, variables never  
> set or read and unused parameters).

For good reason. If the method is public, someone might just come around  
and
use it, even if it is a class in a different project that only knows "there
is a jar somewhere"


-- 

Whom the gods wish to destroy they first call promising.




==========================================================================
TOPIC: changing input text
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2edb53612cdb9ecf
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 10:10 am
From: [EMAIL PROTECTED] (Alex Nazarian) 

Hi mates 
i have a small question 
i used the setComponentOrientation of class JTextField to change the
direction of text writing to right to left , i set the default input
language to Arabic from control panel and changed also the numbering
style to indic(arabic) numbers .. but the JTextField still using the
common numbers (012345...) what shall i do ?




==========================================================================
TOPIC: local search
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fe99afb3cb58e3a0
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 10:16 am
From: [EMAIL PROTECTED] (Fly) 

Have you tried lucene?

"D. S. Nachbar" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> hi
> 
> does anyone know any good reference or examples for generic local serach 
> algorithms under java. yes, gooogle, wasn't very helpful.
> 
> thanks, Dirk




==========================================================================
TOPIC: exception handling problem
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/75dffc1e26b79688
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 27 2004 10:30 am
From: "zcraven" <[EMAIL PROTECTED]> 

public void setPlayerHeight(int height_in_cms) throws
IllegalArgumentException
{
    Integer dwarf = new Integer(70);
    Integer giant = new Integer(270);
    Integer zero = new Integer(0);
/* if ((Integer (height_in_cms).intValue)=0){
throw new IllegalStateException("height cannot be blank.");
} */

    if (height_in_cms == zero.intValue()){
        throw new IllegalStateException("height cannot be a negative
number.");
    }
    if (height_in_cms <= dwarf.intValue()){
        throw new IllegalArgumentException("height cannot be less than
70cms");
    }
    if (height_in_cms >= giant.intValue()){
        throw new IllegalArgumentException("height cannot be above 270cms");
    }
    playerHeight = height_in_cms;
    }


Why doesn't this throw an error when I enter the height as too tall/short
etc? Weird...





== 2 of 3 ==
Date:   Wed,   Oct 27 2004 10:53 am
From: "Yogo" <n o s p a m> 

"zcraven" wrote:
>
...
>
> Why doesn't this throw an error when I enter the height as too tall/short
> etc? Weird...
>

It does throw an exception...


Yogo 





== 3 of 3 ==
Date:   Wed,   Oct 27 2004 10:59 am
From: Carl Howells <[EMAIL PROTECTED]> 

zcraven wrote:
> public void setPlayerHeight(int height_in_cms) throws
> IllegalArgumentException
> {
>     Integer dwarf = new Integer(70);
>     Integer giant = new Integer(270);
>     Integer zero = new Integer(0);
> /* if ((Integer (height_in_cms).intValue)=0){
> throw new IllegalStateException("height cannot be blank.");
> } */
> 
>     if (height_in_cms == zero.intValue()){
>         throw new IllegalStateException("height cannot be a negative
> number.");
>     }
>     if (height_in_cms <= dwarf.intValue()){
>         throw new IllegalArgumentException("height cannot be less than
> 70cms");
>     }
>     if (height_in_cms >= giant.intValue()){
>         throw new IllegalArgumentException("height cannot be above 270cms");
>     }
>     playerHeight = height_in_cms;
>     }
> 
> 
> Why doesn't this throw an error when I enter the height as too tall/short
> etc? Weird...
> 
> 

That code doesn't even come close to compiling.  It has multiple errors, 
both typographical and type-based, as well as being incomplete.  If you 
want to ask a question about the behavior of a particular piece of code, 
actually give us the piece of code you're using.  That's very clearly 
not it.




==========================================================================
TOPIC: Saving data from a SQL-query for later use
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c40c88c74d93aa59
==========================================================================

== 1 of 3 ==
Date:   Wed,   Oct 27 2004 11:01 am
From: [EMAIL PROTECTED] (Jesper Sahner) 

Hi!

How would you save data from a SQL-query for later use?
Is RowSet an option?

I know this is a broad question, but I would like some opinions on the subject.

Regards,
Jesper



== 2 of 3 ==
Date:   Wed,   Oct 27 2004 11:49 am
From: Bryce <[EMAIL PROTECTED]> 

On 27 Oct 2004 11:01:10 -0700, [EMAIL PROTECTED] (Jesper
Sahner) wrote:

>Hi!
>
>How would you save data from a SQL-query for later use?
>Is RowSet an option?
>
>I know this is a broad question, but I would like some opinions on the subject.

Well, depends on the requirements, but I generally have a java object
that maps to the columns of a particular rowset. If there are multiple
rows, then I have one object per row then save in a collection, such
as a Map or List...

--
now with more cowbell



== 3 of 3 ==
Date:   Wed,   Oct 27 2004 12:42 pm
From: Galen Boyer <[EMAIL PROTECTED]> 

On 27 Oct 2004, [EMAIL PROTECTED] wrote:
> Hi!
> 
> How would you save data from a SQL-query for later use?
> Is RowSet an option?

I wouldn't until it is shown that the trips to the database are
too expensive.

-- 
Galen Boyer




==========================================================================
TOPIC: JMX to manage application status
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/661f4562dc3ee314
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 11:50 am
From: [EMAIL PROTECTED] (Matthew Inger) 

>From what i understand, JMX can be used to restart applications that
may have failed.  Say for instance, I have a job server which is responsible
for executing the background processes, such as long running stored
procedures, etc...

I have two instances running, one which passively sits around and does
nothing, and one which actively responds to requests.  Job requests
are made via JMS.

Now, if the active server goes down, the passive server should become
active.  However, I would like to use JMX to do the following:

    1. Let the passive server know that it needs to become active
    2. Restart the server that went down, and put it in passive mode

Does anyone have any thoughts on how JMX can help me do this?  What about
situations where I don't have a backup running?  Can i have JMX restart
the application in that scenario?




==========================================================================
TOPIC: Enums in inner classes
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ecb6f0754c4b0df
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 12:04 pm
From: "Boudewijn Dijkstra" <[EMAIL PROTECTED]> 

"G Winstanley" <[EMAIL PROTECTED]> schreef in bericht 
news:[EMAIL PROTECTED]
>> I think the modifier it's complaining about is "static"--enums are
>> implicitly static, and you can't declare a static class inside a
>> non-static inner class.
>
> Ah ha! Of course, I should have realized that. Thanks for pointing out
> the obvious. Of course it now compiles.

Huh?  In your reply to my last post in this thread, you said you already tried 
static... 






==========================================================================
TOPIC: Where do you find out what type of questions are to be asked in each newsgroup?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c1d277b9ef3ecd3
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 12:41 pm
From: "Ken Adams" <[EMAIL PROTECTED]> 

So where do we find out what each newgroup theme is. Speciffically what are 
the diffrences between comp.lang.java.developer, ..java.help, .. 
java.programmer?

Thanks Alot 






==========================================================================
TOPIC: EL: how to access dotted-named attributes?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a39b758d0a7a408f
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 12:52 pm
From: Timo Nentwig <[EMAIL PROTECTED]> 

Hi!

How do you access an session attributes named "a.b.c" with EL?

Timo




==========================================================================
TOPIC: Strange problem!!(it is, atleast to me!!)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/275778583678f0e9
==========================================================================

== 1 of 1 ==
Date:   Wed,   Oct 27 2004 12:56 pm
From: [EMAIL PROTECTED] (P R Sen) 

Although, this is not a programming or development problem instead its
an end user problem which im facing and thought programmers /
developers could help.

--
I have Win XP SP2, JRE 1.5 installed with IE. Now for certain sites my
applets dont refresh after i click them (well ofcourse i click where a
click is expected :) this happens when i connect using my cable
broadband connection.
(I am connected to a local provider via LAN who provides me connection
to the primary ISP). On the other hand evrything works as expected
when i use dial up connection(using the phone line). Ive tried with
many browsers and it doesn work. Ive tried everything i could. And the
same site works well at my frnds place who has the same broadband ISP
but hes on a different LAN and rest all settings are the same.

The error i see on the console- " java.lang.NullpointerException Could
not send message".

I know the error wouldn be of much use but hope the explanation of the
problem may have some solutions.

Kindly help me.



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

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