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

Today's topics:

* the troubles with Java on old Win CE device. - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2a25ce1189dd5c24
* Attributes always empty when parsing XML documents - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f93920023b216158
* ide sugestions for j2me dev - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95ffdcc28f2b1a33
* 'A'++ == 'B': Always True? - 5 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb79b41e32f311b2
* PreparedStatement can't handle "IN" in "WHERE" clause - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2210b34eda18992b
* Calendar.getInstance() wrong?? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3454bcad8dd780c
* What is package cache in a jar file - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dec0c6e21c7d3f0b
* poblem with Java ( XP SP2) - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9671bb3935502091
* Environment variable - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962
* Open Source library for Data validation and Mapping using XML config file - 1 
messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dc6337f258814da8
* Character Encoding of a DOM object - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/989f73fe61ccf13b
* generate the actual month - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/496cc429e694ff9e
* Why my servlet always be loaded for three times? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41db7d702e514554
* Java on Linux - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b359a0d20324fdbe
* Need as much help as possible - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8
* jvm wont start - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e7908b9ab87f83ff
* Hardware spec published? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/de3a1ca8e469825c
* Windows services with java - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3970ff12276a4be5
* How secure is Java? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3
* What's wrong with BasicArrowButton? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6d7b9492ffcaa1a
* Receiving TAG attribute values in JSP - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/24f7514e14a312d9
  
==========================================================================
TOPIC: the troubles with Java on old Win CE device.
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2a25ce1189dd5c24
==========================================================================

== 1 of 2 ==
Date:   Wed,   Nov 17 2004 7:33 am
From: "Michael Shestero" <[EMAIL PROTECTED]> 

I have an old Windows CE 2.1 device with MIPS CPU.
The only one VM I have found for this device is pocket-Java 1.0 (Sun). There
was probably some VM by Micorsoft, but I cannot find it (MS annihilated
every mention about it on the site).
I found that classes created by default Java compiler (from JDKs) don't
work: the message "class XXX is not found" appeared. But classes created by
Jikes compiler works fine.
I have no idea why does it happend. Are several specifications of
class-files existed? Classes that was created by Jikes are larger in size...
Perhabs I should turn some option in compiler?

The second problem is that there is no Swing library included into that VM.
I hope it is nevertheless possible to use the Swing there if I recompile it
all using Jikes. But I cannot find the good sources of Swing in the Net. I
would be glad to have several ones. Now I have only one, and it doesn't want
to compile even with standart compiler. I have got also SwingGW sources, but
I see they depended on several libraries that is given without sources and
used the platform-depended binaries, so it will scarcely work under Win CE.

Michael






== 2 of 2 ==
Date:   Wed,   Nov 17 2004 7:33 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Michael Shestero wrote:
> I have an old Windows CE 2.1 device with MIPS CPU.
> The only one VM I have found for this device is pocket-Java 1.0 (Sun). There
> was probably some VM by Micorsoft, but I cannot find it (MS annihilated
> every mention about it on the site).
> I found that classes created by default Java compiler (from JDKs) don't
> work: the message "class XXX is not found" appeared. But classes created by
> Jikes compiler works fine.
> I have no idea why does it happend. Are several specifications of
> class-files existed?

Yes.

> Classes that was created by Jikes are larger in size...
> Perhabs I should turn some option in compiler?

Yes, specifically the -target 1.1 option
Not sure if that will run if the JVM really only supports Java 1.0


> The second problem is that there is no Swing library included into that VM.
> I hope it is nevertheless possible to use the Swing there if I recompile it
> all using Jikes.

No, that won't work. But including the old Swing JARs, from the time when it was
distributed separately might. You can find that old release here:
http://java.sun.com/products/archive/jfc/1.1.1/index.html
Or maybe this older version fits your JVM better:
http://java.sun.com/products/archive/jfc/1.0.3/index.html




==========================================================================
TOPIC: Attributes always empty when parsing XML documents
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f93920023b216158
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 7:25 am
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> 

A DOM parser is usually easier to use, but be aware that it sucks in
the whole document before giving you a look at it (which could cause
problems when processing very large documents).





==========================================================================
TOPIC: ide sugestions for j2me dev
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/95ffdcc28f2b1a33
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 7:25 am
From: "duckling" <[EMAIL PROTECTED]> 

don't know if i can help 'coz i'm using a 'heavy ass computer with 512Mb'. 
But for those looking for suggestions, I'm using eclipse with the EclipseME 
plugin. and sun's WTK2.1 of course...

"Mike Crabs" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> can anyone recommend an ide that does not require some kind of super
> computer to be able to use it.
>
> i'de like to dabble in j2me development - which is to make little tiny
> thin kvm running applications - and all the ide's ive seen require
> some kind of heavy ass computer with 512 mb of ram and shit like that.
> Why the fuck do you need a mainframe to develope kvm shit.
>
> help me out comrads
>
> tyia 






==========================================================================
TOPIC: 'A'++ == 'B': Always True?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb79b41e32f311b2
==========================================================================

== 1 of 5 ==
Date:   Wed,   Nov 17 2004 7:28 am
From: Chris Smith <[EMAIL PROTECTED]> 

Michael Borgwardt wrote:
> Chris Smith wrote:
> > The only case where your program would produce different output is in 
> > the unlikely event that the system default encoding doesn't actually 
> > represent one or both of the characters 'A' and 'B'.
> 
> But this would only matter during compilation. Once the program is compiled,
> it will produce the same results on any standards-conforming JVM.

No, that's not true.  Use of the platform default encoding is one of 
several ways of introducing platform-dependency to a Java application.  
System.out is an instance of PrintStream which is initialized to the 
platform default encoding.  The actual bytes sent to standard output are 
dependent on that encoding.

As I said, it's unlikely to be an issue when there are ASCII characters 
involved, since very few encodings omit them.

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 2 of 5 ==
Date:   Wed,   Nov 17 2004 7:38 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Chris Smith wrote:
>>>The only case where your program would produce different output is in 
>>>the unlikely event that the system default encoding doesn't actually 
>>>represent one or both of the characters 'A' and 'B'.
>>
>>But this would only matter during compilation. Once the program is compiled,
>>it will produce the same results on any standards-conforming JVM.
> 
> 
> No, that's not true.

OK, it might influence what actually shows up on STDOUT, but values in the
program itself would not be affected (they might be, during compilation).




== 3 of 5 ==
Date:   Wed,   Nov 17 2004 7:44 am
From: Chris Smith <[EMAIL PROTECTED]> 

Michael Borgwardt wrote:
> OK, it might influence what actually shows up on STDOUT, but values in the
> program itself would not be affected (they might be, during compilation).

Yes, that's true.  I don't understand your point about compilation.  Are 
you referring to the possibility that Fritx intends to write the code 
that he posted, but doesn't because of platform encoding issues?  That's 
even more tenuous, because it's really impossible to write Java code in 
a language that doesn't have at least the basic ASCII characters (even 
Unicode escapes require a backslash and the letter u).

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



== 4 of 5 ==
Date:   Wed,   Nov 17 2004 7:54 am
From: Michael Borgwardt <[EMAIL PROTECTED]> 

Chris Smith wrote:
>>OK, it might influence what actually shows up on STDOUT, but values in the
>>program itself would not be affected (they might be, during compilation).
> 
> 
> Yes, that's true.  I don't understand your point about compilation.  Are 
> you referring to the possibility that Fritx intends to write the code 
> that he posted, but doesn't because of platform encoding issues?

I meant that while the unicode code point 'A' is follwed numerically by 'B',
the literal 'A' in the source code could theoretically end up not being
turned into the unicode character 'A', if the compiler uses some sort of
really weird encoding.


> That's 
> even more tenuous, because it's really impossible to write Java code in 
> a language that doesn't have at least the basic ASCII characters (even 
> Unicode escapes require a backslash and the letter u).

Hey, it was *you* who started talking about encodings that don't know 'A'!
*are* there actually such pathological cases?

OTOH, considering encodings pathological for not including latin letters
is kinda ethnocentric...




== 5 of 5 ==
Date:   Wed,   Nov 17 2004 9:53 am
From: Chris Smith <[EMAIL PROTECTED]> 

Michael Borgwardt wrote:
> Hey, it was *you* who started talking about encodings that don't know 'A'!
> *are* there actually such pathological cases?

I don't know for certain.  I have vague memories of a Japanese encoding 
that cannot represent all ASCII characters... but I'm not sure if it 
lacks 'A' and 'B' or not.

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

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation




==========================================================================
TOPIC: PreparedStatement can't handle "IN" in "WHERE" clause
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2210b34eda18992b
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 7:54 am
From: "Thomas S." <[EMAIL PROTECTED]> 

salaryman wrote:

> DISTINCT id from TheTable WHERE id IN (?)
> statement.setString(1, "'1', '2', '3', '4'");

This is right:

"DISTINCT id from TheTable WHERE id IN (?,?,?,?)"

statement.setString( 1, '1' );
statement.setString( 2, '2' );
statement.setString( 3, '3' );
statement.setString( 4, '4' );

A PreparedStatement does no plain String actions but generates the
fitting Parameters for the specific JDBC interface (every interface
could use a different synthax for their parameters).

Thomas




==========================================================================
TOPIC: Calendar.getInstance() wrong??
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f3454bcad8dd780c
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 8:06 am
From: "Ann" <[EMAIL PROTECTED]> 


"Eric" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am using JBuilder 2005 with Tomcat 5 to develop JSPs.  Inside my JSP I
> have the following code:
>
> int monthA = Calendar.getInstance().MONTH;
> int monthB = new Date().getMonth();
>
> monthA is getting the value of 2 (incorrect, it is not March)
> monthB is getting the value of 10 (correct, it is November)
>
> My system clock is correct (WinXPsp2)
>
> Any ideas why the Calendar class is reporting the incorrect month?
>
> Thanks in advance.
>
> -Eric
> ------------- try this ---------------
Calendar c = Calendar.getInstance();
      Y = c.get(Calendar.YEAR);
      M = c.get(Calendar.MONTH) + 1;
      D = c.get(Calendar.DATE);
      System.out.println("Using Today: Y=" + Y + ", M=" + M + ", D=" + D);






==========================================================================
TOPIC: What is package cache in a jar file
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dec0c6e21c7d3f0b
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 8:10 am
From: "Ann" <[EMAIL PROTECTED]> 


"HS1" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello all
> I know that a jar file is considered as zip file. I see a Jar file that
has
> a package cache. Could you please tell me the purpose of this "package" or
> locate a tutorial about content of a jar file...
> Many thanks
> SH1
>
What is a "package cache" ?






==========================================================================
TOPIC: poblem with Java ( XP SP2)
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9671bb3935502091
==========================================================================

== 1 of 2 ==
Date:   Wed,   Nov 17 2004 8:33 am
From: [EMAIL PROTECTED] (Ruvim Pinka) 

Hello!

The one java network application work fine under Windows 2000 and XP
SP1, but don't work under XP SP2.

In the Java Web Start Console i have a follow dump:
=====
Java Web Start Console, started ***
Java 2 Runtime Environment: Version 1.4.2_03 by Sun Microsystems Inc.
AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode: 
 faultString: (405)Method not allowed
 faultActor: 
 faultNode: 
 faultDetail: 
        {}string: return code:  405

[...]
(405)Method not allowed

        at 
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)

        at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)

        at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
[...]

=====

Does anybody solve such problem ?


--
ruv



== 2 of 2 ==
Date:   Wed,   Nov 17 2004 9:03 am
From: Collin <[EMAIL PROTECTED]> 

> 
> [...]
> (405)Method not allowed
> 
>         at 
> org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630)
> 
>         at 
> org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128)
> 
>         at 
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
> [...]
> 
> =====
> 
> Does anybody solve such problem ?
> 

Try temporarily turning off the firewall that is included with XP SP2 
and see if that helps.




==========================================================================
TOPIC: Environment variable
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e10a85f420f52962
==========================================================================

== 1 of 3 ==
Date:   Wed,   Nov 17 2004 8:53 am
From: Thomas Weidenfeller <[EMAIL PROTECTED]> 

Stefan Poehn wrote:
  > Thanks. It works. Is there a replacement for this method that is not
> deprecated, 

The method should never have been deprecated, and Sun corrected this at 
some point in time. At least, it is not deprecated in 1.5.

> or is it "forbidden" to use environment vars in java?

No, why should it? Some people have the argument that environment 
variables don't exist on all platforms, so such a method is not a good 
idea. However, this was not a really good reason to deprecate the method.

It is possible to provide an entirely conforming implementation  on 
systems which don't have environment variables. The method is supposed 
to return null if a variable does not exist (which can happen on 
platforms with environment variables, too). So a compliant 
implementation on systems without any environment variable would be to 
always return null - which then correctly indicates that the variable 
does not exist.

Alternatively, VM implementers could provide means to set "environment 
variables" for a particular VM, e.g. by making the System.Properties (or 
some other set of properties) available via the getenv() call, too. This 
would be compliant, because the API spec does not provide a clear 
definition of what an "environment variable" is supposed to be. Quote

        "An environment variable is a system-dependent external variable that 
has a string value."

There are other - Java independent - reasons why using environment 
variables are often not a good idea. Controlling application behavior or 
configuration via environment variables is a no-no, because this is 
usually not what a user expects. Users usually don't want their 
applications to behave differently just because the environment has 
changed. Instead, application behavior is expected to be deterministic, 
only depending on the input explicitly provided to the application.

Of course, there are exceptions, e.g. Unix users expect that the default 
printer name is picked up from the PRINTER environment variable, or the 
default editor form the EDITOR or VISUAL variable.

But in general, application configuration should be done via command 
line options or some configuration file, not via some "hidden" 
environment variables.

/Thomas



== 2 of 3 ==
Date:   Wed,   Nov 17 2004 9:28 am
From: "Stefan Poehn" <[EMAIL PROTECTED]> 

"Thomas Weidenfeller" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 
news:[EMAIL PROTECTED]
> [...]
> There are other - Java independent - reasons why using environment 
> variables are often not a good idea. Controlling application behavior or 
> configuration via environment variables is a no-no, because this is 
> usually not what a user expects. Users usually don't want their 
> applications to behave differently just because the environment has 
> changed. Instead, application behavior is expected to be deterministic, 
> only depending on the input explicitly provided to the application.
>
> Of course, there are exceptions, e.g. Unix users expect that the default 
> printer name is picked up from the PRINTER environment variable, or the 
> default editor form the EDITOR or VISUAL variable.
>

I can explain in simple words why we want to have an environment variable: 
every developer has another folder structure on his harddisk. If you need 
the absolute path to the project, you have to store this path outside your 
program. This can be done with environment vars or registry entries, and I 
really do not want to use the registry. (We are working on Windows only and 
do not need to support other platforms).

> But in general, application configuration should be done via command line 
> options or some configuration file, not via some "hidden" environment 
> variables.
>
> /Thomas 





== 3 of 3 ==
Date:   Wed,   Nov 17 2004 11:19 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Wed, 17 Nov 2004 18:28:06 +0100, Stefan Poehn wrote:

> I can explain in simple words why we want to have an environment variable: 
> every developer has another folder structure on his harddisk. If you need 
> the absolute path to the project, you have to store this path outside your 
> program. This can be done with environment vars or registry entries, ..

..or <http://www.physci.org/codes/javafaq.jsp#path>.

HTH

-- 
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: Open Source library for Data validation and Mapping using XML config file
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dc6337f258814da8
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 9:02 am
From: [EMAIL PROTECTED] (CompGrmmR) 

Hi folks,

I am looking for a way to do validation and data mapping by picking up
the validation rules and mapping rules from an XML config file.

I want to do this so that I dont have to recompile the code if there
are any changes in validation/mapping for the values.

Hence I am looking for some open source utility(like Apache Commons
package)
to do the foll : -

1) Validate a set of data (say from a msg over the n/w) based on the
rules in an XML config file
2) Map this data to a value as specified in an XML config file (i.e to
form a java object with the correct mapped values)

For part 1) there is already Apache Commons Validator, but I cannot
use it for mapping the data to a particular value from an XML config
file..

Could you pls suggest any open source library I could use to
accomplish the above? Also, any other ideas are welcome..

Thanks




==========================================================================
TOPIC: Character Encoding of a DOM object
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/989f73fe61ccf13b
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 9:57 am
From: [EMAIL PROTECTED] (Rakesh Pandit) 

"Rakesh Pandit" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> All:
> 
>     How can one find out the character encoding of
> a DOM Document after an XML file has been
> converted to the DOM object.
> 
> Thanks
> 
> Rakesh

Thanks for the reply. Let me try to clarify my question:

1. We have a input xml stream of the type:

<?xml version="1.0" encoding = "shift_JIS"?>
<TestMessage>
</TestMessage>

2. We then create a DOM object out of thr xml stream

Document doc = m_docBuilder.parse(xmlstream);

3. We wanted to find out the encoding property of the
doc, which should give us the result "shift_JIS".

Is their a method to extract this property ?


Thanks

Rakesh




==========================================================================
TOPIC: generate the actual month
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/496cc429e694ff9e
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 9:34 am
From: Oscar kind <[EMAIL PROTECTED]> 

[Miren] <[EMAIL PROTECTED]> wrote:
> i want to print one calendar object,
> i want to make one method with 2 params (motnh and year), and with this two 
> params to print the month.
> Can you help me?

I did: I listed all things you need to know about Calendar objects to
generate the output you mean. To actually do this is up to you.

Unless you mean I should write some code for you. In that case I'm sorry,
but my time is extremely limited until the new year. I can't spend any on
tutoring.


-- 
Oscar Kind                                    http://home.hccnet.nl/okind/
Software Developer                    for contact information, see website

PGP Key fingerprint:    91F3 6C72 F465 5E98 C246  61D9 2C32 8E24 097B B4E2




==========================================================================
TOPIC: Why my servlet always be loaded for three times?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/41db7d702e514554
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 10:09 am
From: "John C. Bollinger" <[EMAIL PROTECTED]> 

Duncan wrote:

> my web.xml like below
> 
> <servlet>
>     <servlet-name>TimerAutoRecharge</servlet-name>
>     <servlet-class>com.unify.voip.control.TimerAutoRecharge</servlet-class>
>     <load-on-startup>1</load-on-startup>
>   </servlet>
>   <servlet>
>     <servlet-name>AppHandler_system</servlet-name>
>     <servlet-class>com.unify.voip.control.AppHandler</servlet-class>
>     <load-on-startup>2</load-on-startup>   
>   </servlet>
>   <servlet>
>     <servlet-name>ApplRequestProcessor</servlet-name>
>     <servlet-class>com.unify.voip.control.ApplRequestProcessor</servlet-class>
>     <load-on-startup>3</load-on-startup>   
>   </servlet>
>      
>   
>   
>   <servlet-mapping>
>     <servlet-name>TimerAutoRecharge</servlet-name>
>     <url-pattern>/TimerAutoRecharge</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>AppHandler_system</servlet-name>
>     <url-pattern>/AppHandler_system</url-pattern>             
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>ApplRequestProcessor</servlet-name>
>     <url-pattern>/ClientProcessor</url-pattern>             
>   </servlet-mapping>
> 
> Why all my three servlets are always being loaded for three times when
> tomcat server startup?

Define what you mean by all three servlets being loaded three times. 
What is the evidence you have for this?  Are you certain you have not 
deployed multiple copies of your whole webapp?

No servlet container should ever maintain more than one live instance of 
any servlet in any one webapp at any one time, but servlet containers 
are free to at any time take one servlet instance out of service and 
replace it with a different instance of the same servlet.  Do note also 
that there is a difference between the JVM loading and initializing the 
servlet's class on the one hand, and the servlet container instantiating 
the class and initializing the instance to prepare it for service.  It 
is the latter that load-on-startup should control (but, of course, that 
requires on the former to have already happened).

Does the same thing happen if you remove the load-on-startup 
specifications?  Load-on-startup is rarely (if ever) necessary, except 
as a crutch for poor webapp design, and I have yet to see an example 
where it provided significant benefit (despite being unnecessary) to a 
well-designed webapp.  The typical uses of load-on-startup are served 
better by suitable ServletContextListeners.  Among other things, 
ServletContextListeners have the property that the servlet spec requires 
that they remain loaded until shutdown of the servlet container -- 
unlike servlet instances, for which there is no such gurantee.


John Bollinger
[EMAIL PROTECTED]




==========================================================================
TOPIC: Java on Linux
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b359a0d20324fdbe
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 10:37 am
From: [EMAIL PROTECTED] (Lesley) 

Oscar kind <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Lesley <[EMAIL PROTECTED]> wrote:
> > 
> > I have no clue how to install Java on a Linux box [...]
> 
> The correct procedure depends on your distribution.
> 
> If it is RedHat or another distribution that uses rpm (or can handle it
> using alien), you want to download the rpm file from sun (same URL as for
> Windows: http://java.sun.com/). The procedure is as follows:
> 1. Make the file executable.
> 2. Run the file; it creates an rpm file.
> 3. As root, install the rpm file in the usual manner.
> 
> If your distribution is something else, use the generic Linux
> distribution. This requires a bit more work though:
> 1. Make the file executable.
> 2. Run the file; it unpacks into a subdirectory.
> 3. As root, move the newly created subdirectory to a convenient place,
>    such as /usr/local .
> 4. As root, change the ownership to root.root .
> 5. As root, add JAVA_HOME to /etc/profile (adjust the path correctly):
>       export JAVA_HOME=/dir/to/java
> The next part is subjective, but I'd do it thus:
> 6. As root, link the binaries to /usr/local/bin to make them generally
>    available: ln -s ${JAVA_HOME}/bin/* /usr/local/bin/
> 7. As root, link the manual pages to /usr/local/man/man1 to make them
>    generally available: ln -s ${JAVA_HOME}/man/man1/* /usr/local/man/man1/
> 8. Reload your environment, and you're set.

Sorry for the delay in replying but thank you very much for these
details.
I have SuSE 8.3 on a laptop and am currently running XP on my Athlon
box.  The Athlon had a few problems when I tried to install Linux on
it last year but that was v2.4.10 of the kernel.  When I tried to
connect the laptop up to the Celeron box I also have something went
wrong with the NIC on the Celeron, which had previously thrown a fault
after an online update. (SuSE again).

I have tried installing Java from the 8.3 distro disks but do not get
the javac compiler at all, just the GNU one.  I now need to remove all
the existing Java and install what I want outside the normal SuSE
remit.

Interestingly I installed Debian woodyr2 on the Celron box and the
ethernet card came back up but I am suspecting my 5-6 year old
faithful workhorse is on it's last legs.

Anyhow I've downloaded both the Windows and Linux versions of Java 2
SDK 1.4.2-04 with NetBeans and I'll see how that goes.  Selecting the
right package isn't easy and I noted there's a number of different
packages, JS2E has a version 5.0 and a 1.4.2 with Sun being remarkably
forthright about what these version numbers refer to on this page
http://java.sun.com/j2se/ .  And of course v 5,0 is really v 1.5.0
which presumably is in beta?

Once again many thanks for your help 

Regards

Lesley




==========================================================================
TOPIC: Need as much help as possible
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 10:45 am
From: "Virgil Green" <[EMAIL PROTECTED]> 

"Virgil Green" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Thomas G. Marshall"
<[EMAIL PROTECTED]>
> wrote in message news:[EMAIL PROTECTED]
> > Virgil Green coughed up:
> > > "Thomas G. Marshall"
> > > <[EMAIL PROTECTED]> wrote in
> > > message news:[EMAIL PROTECTED]
> > >> Rob coughed up:
> > >>> dar7yl wrote:
> > >>> I'll do it for a bottle of vodka.
> > >>> That, or $25 CDN.
> > >>
> > >> Vodka?  Real engineers are powered by Diet Coke.
> > >>
> > >> By the freaking gallon....
> > >
> > > "Diet"?
> > >
> > > Yech.... only full strength (and original) for me.
> > >
> > >  - Virgil
> >
> > Diet /is/ full strength.
>
> For some definition of "full strength".
>
> > Adding sugar only causes your body to react by
> > flooding your system with enough insulin to transfer the sugar through
the
> > cell boundaries alright, but will also hang around long enough in your
> > system to risk putting you to sleep.  Or at least largely negate the
> affect
> > of the caffeine.
>
> Taste, Marshal, taste...
>
>  - Virgil

Oops... sorry. I know someone named Marshal. Didn't mean to address you by
last name only and didn't mean to misspell it.

 - Virgil






==========================================================================
TOPIC: jvm wont start
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e7908b9ab87f83ff
==========================================================================

== 1 of 2 ==
Date:   Wed,   Nov 17 2004 11:10 am
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Wed, 17 Nov 2004 15:35:50 +0200, jmt wrote:

> We had a power failure yesterday and that seem to have stuffed up my 
> vm.Typing "java"   from the command prompt , I get the following error 
> message :
> 
> Error occurred during initialization of VM
> java/lang/NoClassDefFoundError: java/lang/Object

That's too bad.  ..did you have a question?

-- 
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:   Wed,   Nov 17 2004 11:55 am
From: Steve Horsley <[EMAIL PROTECTED]> 

jmt wrote:
> Hi guys
> We had a power failure yesterday and that seem to have stuffed up my 
> vm.Typing "java"   from the command prompt , I get the following error 
> message :
> 
> Error occurred during initialization of VM
> java/lang/NoClassDefFoundError: java/lang/Object
> 
> Jeff
> 
> Registered Linux user number 366042

Urgh!
I would delete and re-install the JVM, I guess.

Steve




==========================================================================
TOPIC: Hardware spec published?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/de3a1ca8e469825c
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 11:15 am
From: "VisionSet" <[EMAIL PROTECTED]> 

Does sun produce a hardware spec for swing?
eg graphics card/cpu specs?

-- 
Mike W






==========================================================================
TOPIC: Windows services with java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/3970ff12276a4be5
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 11:33 am
From: [EMAIL PROTECTED] (Tim Jowers) 

IchBin <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Presidente wrote:
> > Somebody can help me to write a program in Java, which is able to find
> > if a Windows service has been started or not.
> > I mean, i need to know whether a specified service has been started or
> > not, if it isn't runnign i start it.
> > Thanks.
> Sorry, but I do not think you can do this in java directly. You need 
> access to some windows API's to do this..

Lazy man's way is to issue "net start" command. Windows Lan Manager
calls still give you a full list of services running. Try it with DOS
Single Command Line Shell (start->run->cmd).  You can go:
net start "Event Log"
or
net stop "Event Log"

That's really lazy! Or you can look into Service Control Manager and
write some C code. It's fairly trivial as well.

Best luck,
TimJowers




==========================================================================
TOPIC: How secure is Java?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 11:54 am
From: Steve Horsley <[EMAIL PROTECTED]> 

hiwa wrote:
> Do you happen know, what would happen if we, with root privilege,  run
> an rm -fr / or equivalent by using Runtime#exec() or java.io.File
> methods?

For a local java application, it would (normally) be allowed to trash
your computer this way. 

An applet run within a browser would (normally) not be allowed to even
read files on the disk, certainly not launch other proccesses with root 
privilege.

This is all controlled by a SecurityManager, which all the I/O routines
consult for permission before doing I/O. The browser loads a very 
restrictive SecurityManager before launching an applet.

Steve




==========================================================================
TOPIC: What's wrong with BasicArrowButton?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e6d7b9492ffcaa1a
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 12:01 pm
From: DeMarcus <[EMAIL PROTECTED]> 


Why doesn't javax.swing.plaf.basic.BasicArrowButton
get the same Look-and-Feel as the rest of the components?

I've changed the Look-and-Feel to the Windows L&F, and
all the components changed except the BasicArrowButton.

How come?

/Daniel





==========================================================================
TOPIC: Receiving TAG attribute values in JSP
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/24f7514e14a312d9
==========================================================================

== 1 of 1 ==
Date:   Wed,   Nov 17 2004 12:06 pm
From: [EMAIL PROTECTED] (Tauqir Ghani) 

I am creating a JSP page in which data is received through a TAG
library. e.g the value of the variable XYZ is given by the following
tag line.

<template:variable name="XYZ">

I have to do some processing on the variable XYZ before I display it.
Can I do an assignment like

<%String MyString=%><template:variable name="XYZ"> <%;%>

or is there an alternate way of receiving the variable values in java
or javascript from the JSP tags.

Thanks in advance



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

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