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

Today's topics:

* Multiple char[] causing problems during SAX parsing - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16bb70967c0f8178
* Doesn't anyone manually compile JSPs? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4647a3307ad940db
* [jsp]: getProperty - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6230ddcfe0818100
* jdbc question - 5 messages, 4 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bab6d8d5c6089b91
* Year Long Contract Boston, MA Area for a APL / Java Programmer - 1 messages, 
1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c367d5016623242f
* Which Compiler? - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eaff02cdae418719
* Using anchor tags in struts - 4 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/74fff906636dadfd
* solving java.lang.ClassFormatError: Field "has inconsistent hierarchy" in 
class - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/774950f496689315
* Problem using ant to compile BlackBerry project - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97419fe62dab0882
* Sun download address? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9a9e60af2a2c51a3
* decompress Huffmann with java.util.zip? - 4 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc84c8df57c427a
* ip string to long and back again - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5c9c07b6c5b6449

==============================================================================
TOPIC: Multiple char[] causing problems during SAX parsing
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/16bb70967c0f8178
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 29 2004 6:53 am
From: [EMAIL PROTECTED] 

Interesting.  Well, my parser is often passing char arrays consisting
of thousands of characters to characters().  It is as if the entire XML
document is being treated like a text node.  Other times it consists of
characters from the wrong text nodes.

I am wondering if my migration from Websphere to Tomcat affected my
build order.  We are now using Java 1.4 for the first time which
contains Xerces.
Or perhaps the parser is not finding my schema, but that is unlikely.
Oh well, I need to keep trying.




== 2 of 2 ==
Date: Wed, Dec 29 2004 10:27 am
From: Sudsy  

[EMAIL PROTECTED] wrote:
> Interesting.  Well, my parser is often passing char arrays consisting
> of thousands of characters to characters().  It is as if the entire XML
> document is being treated like a text node.  Other times it consists of
> characters from the wrong text nodes.
<snip>

In that case your document format might be to blame. Have you tried
running it through a validating DOM parser?




==============================================================================
TOPIC: Doesn't anyone manually compile JSPs?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4647a3307ad940db
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 7:02 am
From: [EMAIL PROTECTED] 


Tomcat uses the /tomcat/bin/jspc.bat file to make java servlets out of
the JSPs.  Run this program without parameters to view the help screen.
It's pretty simple and easy to use.  You can set up another bat file
to call it with parameters.  Make sure to include the param "-p
org.apache.jsp" to create all servlets in the standard tomcat package
(package org.apache.jsp;)

Once you have servlets, use the java compiler (javac) to compile the
whole directory of servlets.  ie.  javac *.java   The classpath used by
the compiler must match the classpath set for Tomcat.  You'll also have
to include in the classpath any of your custom packages that the
servlets import.

Be careful about file and directory permissions.  The output of all
this has to be accessible to the user account that Tomcat runs under.



Duane Morse wrote:
> With the exception of JRun, I've not seen any references to manually
> compiling JSPs; everyone expects you
> to let the servlet container do the compiling.  Why is that?  It may
take a
> number of request-response
> iterations to get to the point where my JSP is invoked, and I really
don't
> want to spend all that time only
> to find out that the JSP won't even compile!
>
> JRun has a standalone JSP compiler, and I've gotten it to work for
JSPs that
> don't use tag libraries, but with
> tag libraries it never can find the .tld file, even when the uri
attribute
> in the taglib tag really and truly points
> to it (not that it's supposed to point to anything -- when used in a
servlet
> container, you map the uri to a
> real location in web.xml, but the standalone compiler doesn't seem to
use
> web.xml).
>
> Does anyone developing JSPs compile them outside of the servlet
container?
> Do your JSPs use tag libraries?
> If so, what tools are you using?  TIA.





==============================================================================
TOPIC: [jsp]: getProperty
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6230ddcfe0818100
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 29 2004 4:20 pm
From: "Marcus Reiter"  

1. I would love to ask my prof but it's currently winter break so I can't
ask.
2. It has  to be finished after this break.

3. change the name of the
> mutator in the bean code and the property name in the jsp:setProperty
> tag.

I have done that. But you don't seem to have read what I really wrote..

Marcus





== 2 of 2 ==
Date: Wed, Dec 29 2004 4:25 pm
From: Andrew Thompson  

On Wed, 29 Dec 2004 16:20:25 +0100, Marcus Reiter wrote:

> 1. I would love to ask my prof but it's currently winter break so I can't
> ask.
> 2. It has  to be finished after this break.

So you have left this too late.  That is bad for you.

Was there a compelling reason, such as a family/life crisis, flood
or earthquake[1]?  Or was it more tardyness and bad planning[2]?

[1] Which may gain you a reprieve in the form of an extension.
[2] Which will not cut much slack, there *or* here.

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

== 1 of 5 ==
Date: Wed, Dec 29 2004 3:26 pm
From: "Big Jim"  

"ByteCoder" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> jmt wrote:
> > Using JDBC , what would be a more elegant way of determining  whether or
> > not a record already exists in a DB table  before inserting it?
> >
> > Jeff
> > Registered Linux user number 366042
>
> There is a findByPrimaryKey method, if I am not mistaken.
>
> -- 
> -------------
> - ByteCoder -           ...I see stupid people
> -------------
>                     Curiosity *Skilled* the cat

I thought findByPrimaryKey was a J2EE method provided in the ejb container
by server vendors as it's required by the J2EE spec. I didn't think it had
anything to do with JDBC specifically. Please correct me if I'm wrong.

As for the original post, more elegant than what?





== 2 of 5 ==
Date: Wed, Dec 29 2004 3:42 pm
From: "Virgil Green"  

jmt wrote:
> Using JDBC , what would be a more elegant way of determining  whether
> or not a record already exists in a DB table  before inserting it?
>
> Jeff
> Registered Linux user number 366042

You really have to ask yourself how often this will occur. In DBMSs I've
worked with, a failure to find a given record was much more expensive than a
hit. That means that checking for existence before inserting when there are
few "collisions" invokes a lot of unnecessary expense. If there a lot of
collisions then you might be okay with the existence check.

Personally, I'd do the insert and then check for success or failure.

 - Virgil





== 3 of 5 ==
Date: Wed, Dec 29 2004 3:11 pm
From: "Chris Uppal"  

jmt wrote:

> Using JDBC , what would be a more elegant way of determining  whether or
> not a record already exists in a DB table  before inserting it?

Just attempt to insert it and catch and recover from the error (if any).

    -- chris





== 4 of 5 ==
Date: Wed, Dec 29 2004 7:40 pm
From: "Peter"  


"Chris Uppal" <[EMAIL PROTECTED]> skrev i en
meddelelse news:[EMAIL PROTECTED]
> jmt wrote:
>
> > Using JDBC , what would be a more elegant way of determining  whether or
> > not a record already exists in a DB table  before inserting it?
>
> Just attempt to insert it and catch and recover from the error (if any).

And if there is an error, I assume it is an SQLException. How does the
application know the reason for the exception, and therefore can determine
the action to take to recover? As far as I can determine there are no
sub-classes of SQLException, or "type" values, or any other indication of
the actual cause of the exception: for example, primary key exception, row
not found, sql error....

Peter





== 5 of 5 ==
Date: Wed, Dec 29 2004 7:36 pm
From: "Virgil Green"  

Peter wrote:
> "Chris Uppal" <[EMAIL PROTECTED]> skrev i en
> meddelelse news:[EMAIL PROTECTED]
>> jmt wrote:
>>
>>> Using JDBC , what would be a more elegant way of determining
>>> whether or not a record already exists in a DB table  before
>>> inserting it?
>>
>> Just attempt to insert it and catch and recover from the error (if
>> any).
>
> And if there is an error, I assume it is an SQLException. How does the
> application know the reason for the exception, and therefore can
> determine the action to take to recover? As far as I can determine
> there are no sub-classes of SQLException, or "type" values, or any
> other indication of the actual cause of the exception: for example,
> primary key exception, row not found, sql error....
>

By examining the properties of SQLException. The methods getErrorCode()
and/or getSQLState would lead you to the underlying cause of the exception.

 - Virgil






==============================================================================
TOPIC: Year Long Contract Boston, MA Area for a APL / Java Programmer
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c367d5016623242f
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 7:51 am
From: "[EMAIL PROTECTED]"  

APL / Java Programmer

Our client is in the process of converting a desktop based application
written in APL  to JAVA / Struts / EJB. This is a long term project
which will require a senior programmer with Java and APL experience who
will be able to conduct most of the conversion work themselves.

Required Skills:

*  5 to 10 years experience with the APL  language -- especially
version 3.0 or higher of the APL2000 development  environment for the
PC
*  Java / J2EE / Struts programming experience 3-5 years
*  Windows Development experience.

Big Plus
*  Experience programming  quantitative applications especially
statistical and performance related apps  (e.g. geometric linking,
standard deviation and regression  analysis)
Please respond to :

[EMAIL PROTECTED]

or 

[EMAIL PROTECTED]





==============================================================================
TOPIC: Which Compiler?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eaff02cdae418719
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 29 2004 11:10 am
From: "jeffc"  


"Smitsky" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >>Why did you want a compiler that was  *not* Sun's?
>
> Just interested to see if there was one perferred.
>
> Example:
>
> A lot of folks recommend Dev-C++ over MSVC++ 6.0 because it is more
> standards compliant
>
> ...something along those lines.

Well along those lines, you should use the Sun compiler.





== 2 of 2 ==
Date: Wed, Dec 29 2004 7:46 pm
From: "Ann"  


"Andrew Thompson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 22 Dec 2004 12:03:01 GMT, Smitsky wrote:
>
> >>>Why did you want a compiler that was  *not* Sun's?
> >
> > Just interested to see if there was one perferred.
> >
> > Example:
> >
> > A lot of folks recommend Dev-C++ over MSVC++ 6.0 because it is more
> > standards compliant
>
> A lot of folks recommend other things over the MS equivalent
> for much the same reason, but when it comes to Java, Sun *is*
> the standard.  Sun write Java.

Cows drink milk, cows MAKE milk !

>
> I'm sure there are other good compilers and RE's out there,
> but unless you have a specific and arcane need, I would stick
> to the ones that have the largest user/knowledge base.
>
> --
> 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: Using anchor tags in struts
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/74fff906636dadfd
==============================================================================

== 1 of 4 ==
Date: Wed, Dec 29 2004 8:45 am
From: [EMAIL PROTECTED] 

I'm looking for the recipe to do the following:

I have created a jsp struts page that contains a form.  The page is
called logon.jsp and it has a corresponding jsp page called done.jsp.

If the button on the form is a success, I redirect to done.jsp.  So far
so good.

If the button on the form encounters errors I return the appropriate
error messages to logon.jsp and they display exactly to <html:errors/>.

However, the next level of refinement has me puzzled.

Within logon.html, I have created an errors section at the bottom of
the page and I use an anchor tag, <a NAME="errors">, to identify its
beginning.

I have tried to map my 'failure' condition to logon.jsp#errors with no
luck.  The page is mapped to <whatever>logon.do no matter what
combinatorials I've tried.  And just to be clear, my jsp layout is
designed so that the errors section is intentionally unobtrusive to the
logon part of the page.  IOW, I know that I can just display the errors
higher on the page and so on.  The point is that I want a space for
verbose explanations that aren't disorientating to the user's
expection.

Is this exercise possible in Struts?




== 2 of 4 ==
Date: Wed, Dec 29 2004 10:57 am
From: "Ryan Stewart"  

<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> I'm looking for the recipe to do the following:
>
> I have created a jsp struts page that contains a form.  The page is
> called logon.jsp and it has a corresponding jsp page called done.jsp.
>
> If the button on the form is a success, I redirect to done.jsp.  So far
> so good.
>
> If the button on the form encounters errors I return the appropriate
> error messages to logon.jsp and they display exactly to <html:errors/>.
>
> However, the next level of refinement has me puzzled.
>
> Within logon.html, I have created an errors section at the bottom of
> the page and I use an anchor tag, <a NAME="errors">, to identify its
> beginning.
>
> I have tried to map my 'failure' condition to logon.jsp#errors with no
> luck.  The page is mapped to <whatever>logon.do no matter what
> combinatorials I've tried.  And just to be clear, my jsp layout is
> designed so that the errors section is intentionally unobtrusive to the
> logon part of the page.  IOW, I know that I can just display the errors
> higher on the page and so on.  The point is that I want a space for
> verbose explanations that aren't disorientating to the user's
> expection.
>
> Is this exercise possible in Struts?
>
Not exactly sure what you're saying/asking. Do you mean you have an action 
mapping like:
<action path="/logon" name="..." ...>
    <forward name="failure" path="index.jsp#errors"/>
    <forward name="success" path="done.jsp"/>
</action>

?? If so, that's fine. If you also, in your action, have a line like:
return mapping.findForward("failure");

in the case of a logon failure, then that's right too, and it's doing what 
you want. Ignore the fact that it shows "logon.do" in the address bar of 
your browser if that's what is bothering you. Have you tried manually 
navigating to "logon.jsp#errors"? Does it work as expected? This is all I 
can say right now. If you want a more specific answer, ask a more specific 
question. 





== 3 of 4 ==
Date: Wed, Dec 29 2004 10:02 am
From: [EMAIL PROTECTED] 

As I said the mappings work fine until I attempt to use an anchor.
<p>
For example:
<p>
<!-- Action Mappings --><br>
<action-mappings><br>
<action name="loginFormBean" path="/login" <br>scope="request"
<br>type="com.anyco.strutsdwproject.actions.Login"
input="Login.jsp"><br>
<forward name="success" path="/Goodbye.jsp" redirect="true"><br>
</forward><br>
<forward name="failure" path="/Login.jsp" redirect="false"
contextRelative="false"><br>
</forward><br>
</action><br>
</action-mappings><p>
<p>
This works fine.<p>But once I change 'Login.jsp' to 'Login.jsp#errors',
the anchor tag is ignored.




== 4 of 4 ==
Date: Wed, Dec 29 2004 1:42 pm
From: "Ryan Stewart"  

<[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> As I said the mappings work fine until I attempt to use an anchor.
> <p>
> For example:
> <p>
> <!-- Action Mappings --><br>
> <action-mappings><br>
> <action name="loginFormBean" path="/login" <br>scope="request"
> <br>type="com.anyco.strutsdwproject.actions.Login"
> input="Login.jsp"><br>
> <forward name="success" path="/Goodbye.jsp" redirect="true"><br>
> </forward><br>
> <forward name="failure" path="/Login.jsp" redirect="false"
> contextRelative="false"><br>
> </forward><br>
> </action><br>
> </action-mappings><p>
> <p>
> This works fine.<p>But once I change 'Login.jsp' to 'Login.jsp#errors',
> the anchor tag is ignored.
>
1) What's with all the markup in your action mapping?
2) What causes you to believe the anchor tag is ignored? 






==============================================================================
TOPIC: solving java.lang.ClassFormatError: Field "has inconsistent hierarchy" 
in class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/774950f496689315
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 3:09 pm
From: "Chris Uppal"  

vizlab wrote:

> java.lang.ClassFormatError: Field "has inconsistent hierarchy" in
> class myapp/web/servlets/ProjectListServlet has illegal signature "V"

Sounds like a corrupt .class file to me.

Unless there's a method called 'Field' in class
myapp.web.servlets.ProjectListServlet -- which I assume there isn't -- then
presumably the error message is complaining that some field is "declared" void.
Which is illegal/meaningless.

    -- chris






==============================================================================
TOPIC: Problem using ant to compile BlackBerry project
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/97419fe62dab0882
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 6:51 pm
From: David Rabinowitz  

Follow-up:

It seems it complains that the COD data section exceeds 64K (65536 
bytes). Does someone know how to control the order of the files inside 
the COD?

David

David Rabinowitz wrote:
> We are switching our build system to use ant + antenna due to the recent 
> support of the rapc. However, we get the following error from the rapc 
> task:
> output file: WorldMate.cod data section too large: 65860 bytes.
> We have encountered such messages while using the JDE, but we were able 
> to solve them by removing and adding some of  the resources. We have 
> noticed that the problem occurs only when we specify the path to the 
> application icon in the jad file (the line has been copied from the jad 
> file created by the JDE). When we remove the icon the compilation runs 
> smoothly.
> 
> Has someone solved anything like this before?
> 
> Thanks,
> David




==============================================================================
TOPIC: Sun download address?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9a9e60af2a2c51a3
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 5:32 pm
From: Andrew Thompson  

On Mon, 27 Dec 2004 19:27:12 GMT, Ann wrote:

> "Robert kebernet Cooper" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> http://java.com/en/download/manual.jsp
> 
> I just went to that page, it is version 4 not version 5.

This page[1] has a link to a 1.5.0_01 JRE download.  The Win version 
is 15.08 Meg.  Linux/Solaris variants are also on offer.

[1] <http://java.sun.com/j2se/1.5.0/download.jsp>
"JRE 5.0 Update 1"

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: decompress Huffmann with java.util.zip?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc84c8df57c427a
==============================================================================

== 1 of 4 ==
Date: Wed, Dec 29 2004 7:45 pm
From: "Andrei Kouznetsov"  

Hi all,

I know that Zip uses Huffmann-Compression.
Is there some way to (mis)use Deflater or may be
ZipInputStream to decompress data compressed with Huffman compression?

thanks

-- 
Andrey Kuznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities





== 2 of 4 ==
Date: Wed, Dec 29 2004 7:58 pm
From: ByteCoder  

Andrei Kouznetsov wrote:
> Hi all,
> 
> I know that Zip uses Huffmann-Compression.
> Is there some way to (mis)use Deflater or may be
> ZipInputStream to decompress data compressed with Huffman compression?

If Huffmann compression is the default for any zip file than yes, you 
can use the zipinputstream.

-- 
-------------
- ByteCoder -           ...I see stupid people
-------------
                    Curiosity *Skilled* the cat



== 3 of 4 ==
Date: Wed, Dec 29 2004 8:19 pm
From: "Andrey Kuznetsov"  

>> Hi all,
>>
>> I know that Zip uses Huffmann-Compression.
>> Is there some way to (mis)use Deflater or may be
>> ZipInputStream to decompress data compressed with Huffman compression?
>
> If Huffmann compression is the default for any zip file than yes, you can 
> use the zipinputstream.

what is zipinputstream? Do you mean java.util.zip.ZipInputStream?
ZipInputStream is awaiting data in defined format so may be I have to 
prepare
my data.

-- 
Andrey Kuznetsov
http://uio.dev.java.net Unified I/O for Java
http://reader.imagero.com Java image reader
http://jgui.imagero.com Java GUI components and utilities





== 4 of 4 ==
Date: Wed, Dec 29 2004 12:01 pm
From: "Chris Uppal"  

Andrei Kouznetsov wrote:

> I know that Zip uses Huffmann-Compression.
> Is there some way to (mis)use Deflater or may be
> ZipInputStream to decompress data compressed with Huffman compression?

No.

    -- chris






==============================================================================
TOPIC: ip string to long and back again
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5c9c07b6c5b6449
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 29 2004 8:36 pm
From: "Michiel Konstapel"  

>> Another thing that does not seem to have occured to anyone - a long is
>> not long enough to hold an IPv6 address. And any code that assumes that
>> IP addresses are only 4 bytes is broken.
>
> Thanks for the info. I thought a long had more memory available than an  
> int. Guess not.

It does, 8 bytes vs 4 for an int. But an IPv6 address is 128 bits or 16  
bytes.
Michiel



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

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

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

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

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

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

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

Reply via email to