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

Today's topics:

* ParserCallback closing tags automatically - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/556a08ed35720732
* JOption Pane/ How to check string - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b94c7b6218a6dd3
* deep copy quesiton - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170
* XSLT WYSIWYG editor? - 4 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7bb5ea79eb10c28b
* Does this make sense? - 3 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38f8c9208b6b7d36
* Java and xmlrpc? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4304527fb69e181
* Finding Date Difference - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
* opinion on coding standard - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
* Beginning EJB - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c
* Retrieving data from a hashmap from within a JSP - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e2993b48c4584aed
* What the different between form ".this" and ".class"? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc0d4d78310386ca
* search(Object criteria) - to vague? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70
* Sun's JMS API Tutorial: just hangs - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ffd2dbf4cfdc3ba9
* Reading lines from a text file using The BufferedReader class - 1 messages, 1 
author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/233d65fcdc22d9cc
* Multidimensional hash - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085
* request directory in server - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5e516bd06745ac3
* Memory leak - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/03d171ccb3bbc421

==============================================================================
TOPIC: ParserCallback closing tags automatically
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/556a08ed35720732
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 12:15 pm
From: "Bruce Lee"  

I'm using the HTMLEditorKit.ParserCallback to parse and format html but I am
having problems with object implying that tags should be closed. ie. if a
<FORM> tag isn't closed beform the next tag it'll close it automatically.
How do I stop it doing this and just parse what it sees? Do I have to modify
the IMPLIED object that is passed to the attribute set, and how would I do
that?

Thanks






==============================================================================
TOPIC: JOption Pane/ How to check string
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2b94c7b6218a6dd3
==============================================================================

== 1 of 3 ==
Date: Thurs, Dec 2 2004 2:02 pm
From: "Miller_Man"  

I just want to thank all who posted a reply.
I figured I might get laughed at because I knew it was 
a simple question.  You all were very polite and informative.
Thanks so much. 




== 2 of 3 ==
Date: Thurs, Dec 2 2004 6:24 pm
From: Andrew Thompson  

On 2 Dec 2004 07:54:55 -0800, Brock Heinz wrote:

> Andrew Thompson wrote in message news:...

>> if ( answer.equals("Y") ) {
>>  ....
> 
> This is a bit 'nit picky',  .. 
(snip better colution)

Be 'nit picky' as it encourages others to give excellent, rather than 
merely 'will do' answers.  

OTOH, please also trim excess quoted material from your responses.  
It highlights the important bits, and saves us all bandwidth.

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



== 3 of 3 ==
Date: Thurs, Dec 2 2004 9:22 am
From: "Fahd Shariff"  

Use the charAt method to get chars from a String.

String s = "YES" ;
char c = s.charAt(0) ; // returns the first character
if(c=='Y') ...

or compare the string directly:
if(s.equals("Y"))...
or
if(s.startsWith("Y"))...

Look in the java api for many more String methods.

--
Fahd Shariff
http://www.fahdshariff.cjb.net
"Let the code do the talking... "





==============================================================================
TOPIC: deep copy quesiton
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/757fd06eb0970170
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 7:37 pm
From: "Heiner Kücker"  

> Is it possible to subclass clone() ???

Serialization is an good approach to clone an
hierarchical object tree.
There is no problem with inheritance.

Heiner Kuecker
Internet: http://www.heinerkuecker.de  http://www.heiner-kuecker.de
JSP WorkFlow PageFlow Page Flow FlowControl Navigation: 
http://www.control-and-command.de
Expression Language Parser: http://www.heinerkuecker.de/Expression.html






==============================================================================
TOPIC: XSLT WYSIWYG editor?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7bb5ea79eb10c28b
==============================================================================

== 1 of 4 ==
Date: Thurs, Dec 2 2004 5:42 pm
From: Iain Robinson  

milkyway wrote:
> Hello once more,
> 
> Sorry if this question has already been asked but here goes:
> 
> Does such a thing as a WYSIWYG XSLT editor exist? If so, where might
> one download this?
> 
> TIA
> 

Altova's XMLSpy does this -- http://www.xmlspy.com .... but more than a 
time limited demo will cost you - dont know of any free software that 
has wysiwig functionality...but if you find some let me know ;)

P@



== 2 of 4 ==
Date: Thurs, Dec 2 2004 4:35 am
From: "milkyway"  

Hello once more,

Sorry if this question has already been asked but here goes:

Does such a thing as a WYSIWYG XSLT editor exist? If so, where might
one download this?

TIA




== 3 of 4 ==
Date: Thurs, Dec 2 2004 4:48 am
From: Andrew Thompson  

On 2 Dec 2004 04:35:15 -0800, milkyway wrote:

> Hello once more,

ditto.  

Please ensure you do not 'double click' the submit button 
when posting, as we do not need to see each question twice.

Further.  X-posted to..
comp.text.xml, comp.lang.java.help, 
comp.lang.java.programmer, comp.lang.java.beans

Stop it!  *Three* groups is a wide cross-posting for an highly 
technical question, but for this it is overkill.  Further, x-posting
between c.l.j.programmer and c.l.j.help is *never* a good idea. 
Please restrict your posts to c.l.j.help until you get the hang of things.
<http://www.physci.org/codes/javafaq.jsp#xpost>

F'Ups set to c.l.j.help only.

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



== 4 of 4 ==
Date: Thurs, Dec 2 2004 4:35 am
From: "milkyway"  

Hello once more,

Sorry if this question has already been asked but here goes:

Does such a thing as a WYSIWYG XSLT editor exist? If so, where might
one download this?

TIA





==============================================================================
TOPIC: Does this make sense?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38f8c9208b6b7d36
==============================================================================

== 1 of 3 ==
Date: Thurs, Dec 2 2004 4:33 am
From: "milkyway"  

Hello,

I am trying to find an old post I had but here goes another :-)

I am trying to make an application that will work under WML and from
the regular computer.

>From what I have read, one can do the following:

1. The user sees a .wml or a .html file on the client side

2. In the .wml file or the .html file is a point to a .jsp file (for
example, process.jsp) so that process.jsp will do all of the work.

3. process.jsp will have a java bean associated with it so that the
"set" properties are activated within the bean (ex: setFirstName,
setLastName, etc.)

4. Hopefully, the items that are retrieved are kept in the session of
the user.

5. Processing is done by the JSP to create an XML.

6. The XML is ran through the XSLT so that it will create the
appropriate file for the appropriate client (Browser, PDF, WAP, etc.)

And the process is repeated over and over for the processing of the
application.

Does this line of thinking make sense?

JSP - creates -> XML - ran through -> XSLT - Producing -> HTML or  WML,
etc.


I am new to this area and am trying to understand how all of this can
be accomplished. I have some beans that I want to use too.
Any help, hints or advice would be appreciated :-)

TIA




== 2 of 3 ==
Date: Thurs, Dec 2 2004 4:33 am
From: "milkyway"  

Hello,

I am trying to find an old post I had but here goes another :-)

I am trying to make an application that will work under WML and from
the regular computer.

>From what I have read, one can do the following:

1. The user sees a .wml or a .html file on the client side

2. In the .wml file or the .html file is a point to a .jsp file (for
example, process.jsp) so that process.jsp will do all of the work.

3. process.jsp will have a java bean associated with it so that the
"set" properties are activated within the bean (ex: setFirstName,
setLastName, etc.)

4. Hopefully, the items that are retrieved are kept in the session of
the user.

5. Processing is done by the JSP to create an XML.

6. The XML is ran through the XSLT so that it will create the
appropriate file for the appropriate client (Browser, PDF, WAP, etc.)

And the process is repeated over and over for the processing of the
application.

Does this line of thinking make sense?

JSP - creates -> XML - ran through -> XSLT - Producing -> HTML or  WML,
etc.


I am new to this area and am trying to understand how all of this can
be accomplished. I have some beans that I want to use too.
Any help, hints or advice would be appreciated :-)

TIA




== 3 of 3 ==
Date: Thurs, Dec 2 2004 12:51 pm
From: Andrew Thompson  

On 2 Dec 2004 04:33:40 -0800, milkyway wrote:

> I am trying to find an old post I had but here goes another :-)

ditto my other post to you..
<http://groups-beta.google.com/[EMAIL PROTECTED]>

-- 
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: Java and xmlrpc?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e4304527fb69e181
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 3:51 pm
From: ted holden  

ted holden wrote:

> 
> 
> Has anybody set up xmlrpc for Java recently, say within the last six
> months, and gotten it to work?
> 
> I'm trying to figure out how to use the Apache xmlrpc jar files with
> Eclipse and I'm not getting anywhere terribly quickly...


Problem fixed.  This was basically an eclipse glitch, you have to include
the external jars apriori as you create a project.  Adding them later
should have worked but didn't.





==============================================================================
TOPIC: Finding Date Difference
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b9df8bc4e9c538dd
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 8:36 pm
From: Thomas Fritsch  

Thomas Fritsch wrote:
> Mick wrote:
> 
>> Thanks...but
>>
>> Why does this not compile??
>>
>> Calendar thisCal_1 = Calendar.getInstance();
>> thisDate_1 = new java.util.Date(strStartDate);
> 
> thisDate_1 is assigned a Date object ...
> 
>> thisCal_1.setTime(thisDate_1);
> 
> ... but setTime(...) expects a long.
> I could set a link to the javadoc of Date#setTime here, but I don't ;-)
Sorry, my answer was wrong.
I confused Date#setTime with Calendar#setTime
> 
>>
>> Mick
> 
> 
> Thomas


-- 
"Thomas:Fritsch$ops:de".replace(':','.').replace('$','@')





==============================================================================
TOPIC: opinion on coding standard
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1f96751a1d317c1a
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 10:27 am
From: [EMAIL PROTECTED] (Tim Jowers) 

[EMAIL PROTECTED] (John) wrote in message news:<[EMAIL PROTECTED]>...
> Our project leader is making the decision to enforce coding standards
> through the use of our IDE.  While standards and consistency are
> beneficial, I'm unhappy with one limitation of our IDE (IntelliJ IDEA
> 4.5), namely its inability to preserve extra spaces.  I've found that
> a judicious use of spacing can often make code much easier to read and
> consequently to understand.  Below is an example of before and after
> formatting.  For me, the formatted code seems to blur together and is
> much harder to read.  I'm wondering what opinions others might have.
> 
<snip>

Good example of good use of spaces. I think it is defensible.

Personally, I'd like to see better comments more than better
formatting. Two other points:

First, we run code through a beautifier here so what you get out of
source control will not necessarily be formatted like what you put
into source control. E.g. the tool puts args on multiple lines like
the Windows coding style. Works fine I think.

Second, I've worked on lots of projects and the occassions for
multiple people to touch the same source are alot less than imagined.
Maybe two and possibly three people will ever change a block of code.
The two cases I've seen are persons leaves and newbie takes over.
Formatting can help because the task of reading and understanding the
code is daunting. Other case is fixing some bug. IME, stupid variable
names and plain poor coding are MUCH harder to fix than weird
formatting. To me, individual formatting is like an artists' style and
certainly we all know enough about compilers to realise it is
syntactically the same. Maybe code formatting bothers other people
more than me.

So, my opinion is good coders can read code and understand it.
Comments are more important than a particular fomatting. Modern tools
that match braces and check syntax and flag errors dynamically make
coding standards more of a business decision than engineering
decision.

As engineers and scientists we need to focus on real problems.

That said, it is nice to be able to glance at Linux source and know
something is a macro but I find following the links to the declaration
more useful in any language because then you are 100% accurate. Oh
yeah, WebLogic WorkShop only follows to the definition as of SP3!
C'mon BEA! Even Eclipse is better at this!

TimJowers




==============================================================================
TOPIC: Beginning EJB
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d49babfdb472b21c
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 11:52 am
From: "Nagu"  

Hello All,

I have interests to pursue career in components development (EJB ).
Where do I start. I have good knowledge about JAVA language but not on
any other J2EE or J2Se technologies? What are the prerequisites to
learn EJB?

Thanks Much

Nagendra





==============================================================================
TOPIC: Retrieving data from a hashmap from within a JSP
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e2993b48c4584aed
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 3:43 pm
From: Kieron Briggs  

kbd wrote:
 > [... snip ...]
> I will be able to retrieve the objects with a
> String.  Ie. if the form name is "manager", get("manager") will return
> the corresponding FormRole object.
> Correct??

So far so good...

 > [... snip ...]
>       fRoles.keySet() returns [country , manager , region , currency ,
> classificationType , managerFundClass , pgsPortfolio ,
> pgsMgrAllocations , pgsPortfolioShareClass , managerFund ,
> classification ]
 > [... snip ...]

It looks to me like you might have some trailing whitespace on the 
strings used as the key of the hashmap. And, since "manager " != 
"manager", your call to containsKey returns false.

Try adding the elements to the hashmap with
        hMap.put(rs.getString("FormName").trim(),  fRoles);
                                         ^^^^^^^
and see if that helps.


Home this helps,

Kieron




==============================================================================
TOPIC: What the different between form ".this" and ".class"?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/cc0d4d78310386ca
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 8:07 pm
From: "Ryan Stewart"  

"Bruce Sam" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Here ".class" not means the class file.For example,in
> "String.class.toString();".What does the ".class" and ".this" means?
>
The .class is kind of like a static member that isn't really there. It's a
shortcut to String's Class object. Same result as
Class.forName("java.lang.String").

And what do you mean ".this"? "this" is a keyword which is a reference to an
instance of the class you're coding. When dealing with nested classes,
".this", IIRC, can get you the reference to the enclosing instance.






==============================================================================
TOPIC: search(Object criteria) - to vague?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8c9970db76f9ab70
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 3:04 am
From: "VisionSet"  


I have a series of input components, text fields, check boxes etc in a
series of view subclasses.
When a user presses search, a method collects the inputs and forwards them
to a controllers search(Object criteria) method.
So it may get a String[] or perhaps a single String or maybe an Object[]
with Boolean and String etc.
Each view has its own controller so the search method is tailored to that
view, but it is being called via an interface method search(Object criteria)
Is there a better way to design this? Or if this is broadly okay what is
best practise to implement it properly, constants etc...

TIA
-- 
Mike W






==============================================================================
TOPIC: Sun's JMS API Tutorial: just hangs
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/ffd2dbf4cfdc3ba9
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 12:24 pm
From: "TC"  

I'm working on the API tutorial where I get two machines to talk to
each other.  The first sends 3 messages to a queue.  The second should
read these but appears to just sit and wait.  It tells me the queue
name and waits.

I'm not sure what info to add to the post.  Let me know and I'll add it.

Thanks!




==============================================================================
TOPIC: Reading lines from a text file using The BufferedReader class
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/233d65fcdc22d9cc
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 5:36 pm
From: NOBODY  

-stop silently catching exceptions...
-read the jdk doc



        public static void readFile() {
                BufferedReader input = null;
                PrintWriter output = null;

                try {
                        input = new BufferedReader(new FileReader("Input.txt"));
                        output = new PrintWriter(new BufferedWriter(new 
FileWriter("Output.txt")));

                        String line = null;
                        while( (line=input.readLine()) != null) {
                                StringTokenizer st = new StringTokenizer(line, 
"\r\n
\t\f ");
                                while(st.hasMoreTokens()) {
                                        String word = st.nextToken();
                                        if(word.length()==4)
                                                output.println("****");
                                        else
                                                output.println(word);
                                }
                        }
                        
                        output.flush();
                        
                } catch (IOException e) {
                        e.printStackTrace();
                } finally {
                        try {
                                input.close();
                        } catch (IOException e1) {
                                e1.printStackTrace();
                        }
                        output.close();
                }
        }




==============================================================================
TOPIC: Multidimensional hash
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eb079f5a11951085
==============================================================================

== 1 of 2 ==
Date: Thurs, Dec 2 2004 1:28 pm
From: "Todd B."  

I would like to create a multidimensional hash such as:

my %hash{string}{integer}{integer}= double || "";

or (less desirable):

my %hash{integer}{integer}{integer}= double;

I have googled and search Sun's (sic) documentation and have not found 
any examples.

The other question is how to set a double to null?

Thanks,

Todd










== 2 of 2 ==
Date: Thurs, Dec 2 2004 7:00 pm
From: Andrew Thompson  

On Thu, 02 Dec 2004 15:28:14 -0600, Todd B. wrote:

> The other question is how to set a double to null?

You can set a Double and Integer or an Object to null, but 
you cannot assign null to any primitive like int, double, 
float or boolean.

-- 
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: request directory in server
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5e516bd06745ac3
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 2 2004 11:41 pm
From: "juicy"  

How to do if client specify a path of a directory and server will tell the
client that directory is exist or not






==============================================================================
TOPIC: Memory leak
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/03d171ccb3bbc421
==============================================================================

== 1 of 1 ==
Date: Fri, Dec 3 2004 4:10 am
From: [EMAIL PROTECTED] (Anon) 

I have a strange problem. There is a memory leak in my application
which grows steadily even if no action is being performed on it. AFter
some initial action, when the application is left running with no
action ebing performed,  the memory usage  by means of the Task
Manager by process java.exe (virtual machine) grows steadily. But if I
minimize Command Prompt window, memory drops down (from 100-120MB)
almost to 10MB. Then it grows again. The memory in the task manager
keeps on increasing even with no action on the application. COuld
anyone give a clue on this?
Rdrs,
Anon



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

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