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

Today's topics:

* JSP View Problem: send the content of the file to the client - 1 messages, 1
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/df74ffc5752b0664
* question about Object.clone - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/86e64c7b7efb3866
* .NET Programmer Needs To Learn Java - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b99c5dff939a0cea
* Limit to size of POST in forms using javax.servlet.http.HttpServlet? - 2 messages, 2 
authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eccae01bb9ab22ff
* JSP output string with HTML query - 4 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84285a470181b30e
* Looking for open source Asteroids game - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6113c3e5f8b103b6
* Java applet failed when I try to load the avi file in my java applet - 1 messages, 1 
author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eee0d2c54a4b7feb
* Thread synchronization - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/172837b7b0667fd1
* A better looking JTable - 2 messages, 2 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a622f715a932901b
* Browser Back Button (IE) Caching Problem in Struts Land - 3 messages, 3 authors
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2661162f4dfe878
* gmail anyone? - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/edb0463a590e0ea1
* Fixed: servet session context sharing in JBoss - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5c162455ab1c1bde
* Embeded Java DB with inverted indexing and searching capabilities for Java Beans - 2 
messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5759f9725211e342
* store whole InputStream in a String - 1 messages, 1 author
  
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d510835287103e9
  
==========================================================================
TOPIC: JSP View Problem: send the content of the file to the client
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/df74ffc5752b0664
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 4:31 pm
From: "Murray" <[EMAIL PROTECTED]> 


"Matt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I posted similar problem before, the problem is when the user selects
> a file, and submit,
> it will show the content to the user, or pop up a file download dialog
> to save the file
> in the local machine.
>
> The approach I am using is to send the content of the file (character
> text)
> to the client.
>
> It will pop up a file download dialog box, which is fine,
> but the problem is the file name is the  JSP file name, not the
> filename of
> the file I want to open. For example, I want to open myfile.doc, in
> the file
> download dialog box, it still shows fileview2.doc, and prompts the
> user
> to save the file as fileview2.doc instead of myfile.doc.
>
> any ideas?? In my problem, what is the best approach to this problem?
> Should I let
> the web browser should take care of the file, or I should read the
> file byte by
> byte, and write it to the client??
>
>
> //fileview.jsp
> <FORM ACTION="fileview2.jsp" method="POST">
> <P><input type="FILE" name="filename">
> <P><input type="submit">
>
> //fileview2.jsp
>
> <%@ page import="java.io.*"%>
> <%
> try
> {
> String fileName = request.getParameter("filename");
> File file = new File(fileName);
> response.addHeader("content-type", "application/msword"); //OPEN
> MS-WORD DOCUMENT
> BufferedInputStream bis = new BufferedInputStream(new
> FileInputStream(file));
> long count = file.length();
> PrintWriter rsp = response.getWriter();
> for (long index = 0; index < count; index ++)
> {
> int ch = bis.read();
> rsp.write(ch);
> }
> bis.close();
> }
> catch(Exception e)
> { out.println(e);
> }
> %>

Try adding the following header

response.setHeader("Content-Disposition", "attachment; filename=\"" +
shortFilename + "\"");

where shortFilename is just the name of the file itself without any
directory prefix.

I'd also advise against using response.getWriter() unless you're confident
you won't be using binary files. Use response.getOutputStream() instead









==========================================================================
TOPIC: question about Object.clone
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/86e64c7b7efb3866
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 4:42 pm
From: "Tony Morris" <[EMAIL PROTECTED]> 

> BTW, you can in fact change one aspect of classes (the visibility of
> fields and methods) through reflection, which is something that would
> be necessary here.

Are you referring to java.lang.reflect.AccessibleObject#setAccessible ?
This doesn't change anything about the class.
If not, what are you referring to?

-- 
Tony Morris
http://xdweb.net/~dibblego/







==========================================================================
TOPIC: .NET Programmer Needs To Learn Java
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b99c5dff939a0cea
==========================================================================

== 1 of 3 ==
Date:   Tues,   Sep 14 2004 6:16 pm
From: "Gary Labowitz" <[EMAIL PROTECTED]> 

"scorpion53061" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I am a vb.net programmer. That being said I have been forced to conclude I
> need to learn java ...

"forced to conclude"
Red flag number one.

> Some questions:
>
> 1. Is there a low cost way to learn, compile and develop for this
langauge?
> (aka Visual Studio but not costing an arm and a leg like this platform)

Yes, many. Sun makes all its SDK and lots of other libraries available free,
has a large set of tutorials, all free, and there is much else to be had.
You haven't checked on Google, have you?
Red flag number two.

> 2. Can programs written here run on AIX 5.1 (non DB2 environment)?  is
there
> a specific install I need to do to make these programs work on AIX 5.1?

Probably.

> 3. I believe they use .idx files for their database structure. Can Java be
> of use in reading, modifying and inserting data into these environments?

If so, they are truly obsolete. idx/htx was an early attempt to do what is
now done with ASP(MS) or JSP(Sun). You won't find much help keeping idx
files up-to-date. Of course, if you meant instead idx files as indexes to a
database (ala dBase or FoxPro) then you are seriously out-of-date. Either
way ...
Red flag number three.

> 4. What is the java equivalent (if there is one) to ADO.NET?

Not parallel, but you would use JDBC and either bridge to ODBC (not
recommended for production work) or get a driver for the database in use for
JDBC. These run from baby systems for free (like the JDBC/ODBC bridge) to
fully capable DB drivers for lots of $$$$. I am presuming here you don't use
XML, but if so there are parsers for that as well.

> 5. Am I looking at a huge learning curve?

Probably. The fact that COBOL was even mentioned, and idx, and ADO means you
may be locked into old technologies. Replacing these with current
technologies will be a large task. So, to be even remotely successful you
will have to WANT to do it, not feel that you are forcing yourself.

Too many red flags.
-- 
Gary





== 2 of 3 ==
Date:   Tues,   Sep 14 2004 6:58 pm
From: Peter Ashford <[EMAIL PROTECTED]> 

scorpion53061 wrote:
> Hello,
> 
> I am a vb.net programmer. That being said I have been forced to conclude I 
> need to learn java ...
> 
> Some questions:
> 
> 1. Is there a low cost way to learn, compile and develop for this langauge? 
> (aka Visual Studio but not costing an arm and a leg like this platform)

IMO Eclipse is the best free IDE out there.  The latest version of 
Netbeans ain't too bad either.  Both are free but big downloads.

The Sun Java SDK is free.  Also from Sun, grab the Java Tutorial (you 
can download it for offline usage which is handy) and be sure to grab 
the Java docs too.  Between these two documentation sources, you can 
find most of your answers.  Otherwise, google is your friend.

I'm not too sure of the answers to your other questions, so I'll skip them.



== 3 of 3 ==
Date:   Tues,   Sep 14 2004 10:23 pm
From: "Tony Morris" <[EMAIL PROTECTED]> 

"scorpion53061" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I am a vb.net programmer. That being said I have been forced to conclude I
> need to learn java ...
>
> Some questions:
>
> 1. Is there a low cost way to learn, compile and develop for this
langauge?
> (aka Visual Studio but not costing an arm and a leg like this platform)

Yes, download the SDK - start up your favourite text editor and get
learning.

> 2. Can programs written here run on AIX 5.1 (non DB2 environment)?  is
there
> a specific install I need to do to make these programs work on AIX 5.1?

Yes - I have been writing Java applications for AIX for many years.
What do you mean by '(non DB2 environment)'? DB2 has nothing to do with
Java.

> 3. I believe they use .idx files for their database structure. Can Java be
> of use in reading, modifying and inserting data into these environments?

A file with the extension of .idx has nothing to do with Java.

> 4. What is the java equivalent (if there is one) to ADO.NET?

JDBC 3.0 and/or JDO 1.0.

> 5. Am I looking at a huge learning curve?

The .NET CLR and Java have many striking similarities.
Assuming you are familiar with the CLR, Java should be a breeze - however,
there are a few pitfalls that apply to Java and not .NET (and vice versa).


-- 
Tony Morris
http://xdweb.net/~dibblego/







==========================================================================
TOPIC: Limit to size of POST in forms using javax.servlet.http.HttpServlet?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eccae01bb9ab22ff
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 14 2004 6:41 pm
From: "news.amnet.net.au" <[EMAIL PROTECTED]> 

Hi

I am running Apache Oracle http server 1.3.22 and I have written a jsp where
the size of the information sent in a form with the POST procedure can be
quite large: long description fields together with a long list of pathnames
of files. The POST event sends of this information to another jsp where file
uploading is done. Note that I am forced to use an older Java Runtime
environment, namely Java(TM) 2, build 1.3.1_01 as that is what is packaged
with Oracle.

The problem is that when the description and/or the list of pathnames is
very long, the jsp window just hangs (there isn't even an hourglass to tell
the user it is busy processing).

I have independently tested making very large uploads with a non-browser
java program to my Oracle CMSDK area (files in a database with metadata) and
there seems to be no limit to that.

I suspect the problem is with the size of the strings that are posted to the
next jsp, before the upload is done. In any case, uploading only starts in
the next window, so if the upload is the problem one can expect the browser
to display the next window, then in that second window hang on the upload.
However, I never get to my next window.

In addition, I also have this problem in another jsp where there is no
uploading but again, very large description fields.

I have tried manually setting the contentlength with the build-in http
response/request functions of javax.servlet.http.HttpServletRequest and
javax.servlet.http.HttpServletResponse i.e.

response.setContentLength(5000);

In fact, this does not only seem to set the size of what can be posted, but
also the size of everything showing on the page - if you set it to small,
only part of the page is displayed, if you set it too large, things appear
twice!

Setting the content length does not seem to help at all - and if you check
the contentlength without setting it first with

int contentlength = request.getContentLength()

the size of the content is automatically adjusted for the amount of
information in the page. However, over contentlength around 1500 the page
always just hangs forever.

Is there a limit to the size of the information that can be sent via a POST
event? If so, is there a place where this can be changed?
Is the limit a web server limitation, a javax.servlet.http.HttpServlet
limitation or perhaps a limitation of the browser? Most people here use
Internet Explorer.

Any help or information will be greatly appreciated.

Thanks

Hugo





== 2 of 2 ==
Date:   Tues,   Sep 14 2004 10:00 pm
From: Sudsy <[EMAIL PROTECTED]> 

news.amnet.net.au wrote:
<snip>
> Is there a limit to the size of the information that can be sent via a POST
> event? If so, is there a place where this can be changed?
> Is the limit a web server limitation, a javax.servlet.http.HttpServlet
> limitation or perhaps a limitation of the browser? Most people here use
> Internet Explorer.
<snip>

There are a couple of parameters you might want to tweak:
LimitRequestLine and LimitRequestBody.
But if either is exceeded then you should have an error
message in the log file, even if nothing gets back to the
browser.





==========================================================================
TOPIC: JSP output string with HTML query
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/84285a470181b30e
==========================================================================

== 1 of 4 ==
Date:   Tues,   Sep 14 2004 7:08 pm
From: [EMAIL PROTECTED] (June Moore) 

Hi,
I would like to output a string in a JSP page. The string contains
HTML tag.
How do I display the HTML version of the string in JSP?

e.g. String str = "<b><u>bold and underlined</u></b>";

In JSP, I use <%=str%>

Instead of displaying the HTML version of the string (with bold and
underlining of the text), the above string is displayed. Can you help?

Thanks,
June.



== 2 of 4 ==
Date:   Tues,   Sep 14 2004 8:04 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 14 Sep 2004 19:08:03 -0700, June Moore wrote:

> I would like to output a string in a JSP page. 
..
> e.g. String str = "<b><u>bold and underlined</u></b>";

<% out.print(s); %>

HTH

-- 
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



== 3 of 4 ==
Date:   Tues,   Sep 14 2004 8:07 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Wed, 15 Sep 2004 03:04:39 GMT, Andrew Thompson wrote:

> On 14 Sep 2004 19:08:03 -0700, June Moore wrote:
> 
>> I would like to output a string in a JSP page. 
> ..
>> e.g. String str = "<b><u>bold and underlined</u></b>";

// correction
<% out.print(str); %>



== 4 of 4 ==
Date:   Tues,   Sep 14 2004 10:26 pm
From: "Tony Morris" <[EMAIL PROTECTED]> 


"June Moore" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I would like to output a string in a JSP page. The string contains
> HTML tag.
> How do I display the HTML version of the string in JSP?
>
> e.g. String str = "<b><u>bold and underlined</u></b>";
>
> In JSP, I use <%=str%>
>
> Instead of displaying the HTML version of the string (with bold and
> underlining of the text), the above string is displayed. Can you help?
>
> Thanks,
> June.

Your JSP is correct.
I'm guessing you aren't running the code on a servlet container, but a web
server.
Why you would write code like that I don't know, but then, I've seen some
strange stuff in JSP before.

-- 
Tony Morris
http://xdweb.net/~dibblego/






==========================================================================
TOPIC: Looking for open source Asteroids game
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6113c3e5f8b103b6
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 7:52 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On Tue, 14 Sep 2004 16:23:16 -0400, <[EMAIL PROTECTED]> wrote:

>> Just out of curiosity.... why?
> 
> Looking to modify it for a specialized one handed keyboard so that users can 
> get a feel for the keyboard in their hand before they learn to type with it.

Is asteroids the ideal game for this?  

It might be better to start with simple 
children's games of 'put the puppy in 
the kennel' (but with ..different words 
and pictures probably)

-- 
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology




==========================================================================
TOPIC: Java applet failed when I try to load the avi file in my java applet
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/eee0d2c54a4b7feb
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 7:53 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 14 Sep 2004 12:58:24 -0700, Krista wrote:

> Hi, you mean I should post the question in comp.lany.java.help?

That is what I recommend.

-- 
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology




==========================================================================
TOPIC: Thread synchronization
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/172837b7b0667fd1
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 8:07 pm
From: "Thomas G. Marshall" <[EMAIL PROTECTED]> 


This is getting far too twisted for me.  See ya.


Lee Fesperman coughed up:
> Thomas G. Marshall wrote:
>>
>> Lee Fesperman coughed up:
>>> Thomas G. Marshall wrote:
>>>>
>>>> Lee Fesperman coughed up:
>>
>> ...[rip]...
>
> By 'rip', I assume that means that you are throwing in the towel on
> finding any useful case where synchronization is used to protect
> anything but shared state. Synchronization is used to protect
> (control access) to shared state, nothing else.
>
>>>>> Ok. You meant synchronization block.
>>>>
>>
>> Once again, I meant what I said.  You snipped a section here without
>> warning.  The section where I show you that your objection to the
>> terminology I used was without merit.  I guess you really didn't
>> want others to see that.
>>
>> In usenet, it is /very/ improper to snip out sections without
>> warning, particularly to make it sound as if the conversation had
>> proceeded without interruption, when it did not.
>
> I was saving a few electrons, since you are loath to back down on
> even the smallest detail. You insist, so I'll bother some electrons...
>
> You used "synchronization structure" without a modifier. That is
> imprecise and confusing. Java is in the C language family. In the C
> family, structure without a modifier refers to a data block. A class
> in Java is conceptually a structure with behavior. A better term is
> synchronization block (referring to a code block), though
> synchronized block is really to the point.
>
> I suggested you could have used "synchronization control structure".
> Control structure is a term that was used prior to the C family but
> is accepted in that family as meaning a code block with associated
> logic -- for, while, if, and, reasonably, synchronized. You demurred,
> even though your usage was inappropriate.
>
>>>>> To continue: By /within/, do you mean --- lines of code textually
>>>>> inside the braces of a synchronization block (or synchronized
>>>>> method)?
>>>>
>>>> The execution of such lines of code.  Yep.
>>>
>>> The effect is to say that lines of code textually 'exterior' to the
>>> synchronized block are not protected.
>>
>> I did not say, nor imply that at all.
>>
>>> That is wrong. Code /within/
>>> the block may call methods outside the block even in different
>>> classes, packages and standard API. This code (during the call) will
>>> be synchronized on the synchronization object's monitor.
>>
>> No kidding.  When I say
>>
>>         The execution of such lines of code.  Yep
>>
>> You think it's ok to say that I'm implying that the function calls
>> within the block are not protected?  You think that's somehow not
>> clear that they are???  When you execute a line of code, you execute
>> it, regardless of what that line of code entails, which includes
>> method calls.  If you think that needs to be spelled out, you are in
>> the wrong place in usenet entirely.
>
> Yes it was not clear. You explicitly stated that lines of code not
> within the block were not synchronized. Lets ignore reflection for
> the time being. Given dynamic loading and dynamic dispatch, there are
> no lines of code that you can guarantee won't be synchronized by a
> synchronization block (except pathologic cases). As usual, you are
> splitting the wrong hair.

-- 
Forgetthesong,I'dratherhavethefrontallobotomy...






==========================================================================
TOPIC: A better looking JTable
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a622f715a932901b
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 14 2004 8:27 pm
From: Rob W <[EMAIL PROTECTED]> 

I want to create a JTable that emulates the appearance of native tables 
on Windows and OSX. In particular, if the panel that a table is in is 
taller than the size of the table (due to the table only having a few 
rows), I want the extra space in the table to be filled with empty 
cells, so that the table fills the whole panel.

This behaviour is present in most native apps I've seen that use tables. 
A good example is the iTunes songs list.

My specific scenario is that I have a table which may contain only 1 
row, or may contain as many as 50 (typically it contains 2 or 3 rows).x

I want to display this table in a pane that is resizable.

This means that the table may have a lot of extra veritcal space, 
relative to the rows being displayed. I want it to fill the unused, 
lower part of the pane with empty cells as the pane is made larger (and 
when it is first drawn).

Is there a simple way to do this, or do I need to create a custom JTable 
class to paint the table as described?

Any suggestions will be much appreciated.

Rob



== 2 of 2 ==
Date:   Tues,   Sep 14 2004 9:40 pm
From: Paul Lutus <[EMAIL PROTECTED]> 

Rob W wrote:

> I want to create a JTable that emulates the appearance of native tables
> on Windows and OSX. In particular, if the panel that a table is in is
> taller than the size of the table (due to the table only having a few
> rows), I want the extra space in the table to be filled with empty
> cells, so that the table fills the whole panel.
> 
> This behaviour is present in most native apps I've seen that use tables.
> A good example is the iTunes songs list.
> 
> My specific scenario is that I have a table which may contain only 1
> row, or may contain as many as 50 (typically it contains 2 or 3 rows).x
> 
> I want to display this table in a pane that is resizable.
> 
> This means that the table may have a lot of extra veritcal space,
> relative to the rows being displayed. I want it to fill the unused,
> lower part of the pane with empty cells as the pane is made larger (and
> when it is first drawn).
> 
> Is there a simple way to do this, or do I need to create a custom JTable
> class to paint the table as described?
> 
> Any suggestions will be much appreciated.

Add empty rows to your table. Create a class that fills in the JTable to the
degree necessary to meet your requirement without actually creating
meaningless data in the original data set.

-- 
Paul Lutus
http://www.arachnoid.com





==========================================================================
TOPIC: Browser Back Button (IE) Caching Problem in Struts Land
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2661162f4dfe878
==========================================================================

== 1 of 3 ==
Date:   Tues,   Sep 14 2004 8:33 pm
From: [EMAIL PROTECTED] (praveen) 

Hello and thank you in advance for your reply!

Summary:
--------
Unable to eliminate "Page Unavailable" errors when a user hits on the
Browser "Back" button in Internet Explorer.

App Overview:
-------------
A Stateful Session Bean & CMP based J2EE application using Struts 1.1
application built using WSAD 5.0.1 Integration Edition, talking to a
DB2 8.1 UDB and deployed on WAS 5.0.2 EE.

Browser - Internet Explorer 6.x on Windows XP SP1.

Problem:
--------
Although I implemented a collections based "Back" button
concept(Allowing the user to physically store page names from the
start of the business process till the end of the submission and then
clearing the stack!) to implement the "back-button" functionality on
the page to override the Browser back button, my superiors insist that
I "Do something" about making the browser's back button to work with
the App without any "Page Unavailable" errors and manual page
refreshing!

I have tried "googled" solutions, including the following from
struts-user groups etc.:

1. Physically setting the META headers "Cache-Control" and "Pragma" as
per W3C recommendations in the JSP's.

2. Using servlet response to set headers with expiration date to the
past, and including the headers outlined in solution 1. above.

3. Adding <controller> tag entry and setting nocache=false
i.e. <controller nocache="false" /> in struts config. (Should I try
including it within the <action> tags under ActionServlet ?)


I have implemented a Synchronizer pattern, and hence
redundant/duplicate form submissions are not a problem for me.

I have been trying to enable this feature but couldn't find any proper
answers. Although "Struts in Action" refers to programmatically
altering the RequestProcessor by extending it and then altering the
default controller settings (overriding processNoCache method), I
can't find anything else. If there is a easier way, I would appreciate
if any of you can share your thoughts on this.

Some say that this is a IE bug (headers greater than 64 kb get ignored
and IE reverts to default settings), the explanation of which I am not
satisfied with!


A quick response is appreciated!

Thanks.. 

Praveen



== 2 of 3 ==
Date:   Tues,   Sep 14 2004 8:49 pm
From: Andrew Thompson <[EMAIL PROTECTED]> 

On 14 Sep 2004 20:33:57 -0700, praveen wrote:

> ...my superiors insist that
> I "Do something" about making the browser's back button to work with
> the App without any "Page Unavailable" errors and manual page
> refreshing!

I will cede to the server-side gurus on this one,
(I have done a smattering of Java server-side 
and a whole lot of site design) but it actually 
sounds like this might be the real problem.  Not so 
much the behaviour of the app., as the expectation 
that it makes sense to have the back button work 
in this linear web-application.  

Perhaps a 'Canel Everything and return to 
Main Page' button is more appropriate?

> Some say that this is a IE bug (headers greater than 64 kb get ignored
> and IE reverts to default settings), the explanation of which I am not
> satisfied with!

So.. what have you done to test that theory?
How does the app. behave using Mozilla/Netscape
or Opera?

HTH

-- 
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology



== 3 of 3 ==
Date:   Tues,   Sep 14 2004 9:19 pm
From: "David Hilsee" <[EMAIL PROTECTED]> 

"praveen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello and thank you in advance for your reply!
>
> Summary:
> --------
> Unable to eliminate "Page Unavailable" errors when a user hits on the
> Browser "Back" button in Internet Explorer.
>
> App Overview:
> -------------
> A Stateful Session Bean & CMP based J2EE application using Struts 1.1
> application built using WSAD 5.0.1 Integration Edition, talking to a
> DB2 8.1 UDB and deployed on WAS 5.0.2 EE.
>
> Browser - Internet Explorer 6.x on Windows XP SP1.
>
> Problem:
> --------
> Although I implemented a collections based "Back" button
> concept(Allowing the user to physically store page names from the
> start of the business process till the end of the submission and then
> clearing the stack!) to implement the "back-button" functionality on
> the page to override the Browser back button, my superiors insist that
> I "Do something" about making the browser's back button to work with
> the App without any "Page Unavailable" errors and manual page
> refreshing!
>
> I have tried "googled" solutions, including the following from
> struts-user groups etc.:
>
> 1. Physically setting the META headers "Cache-Control" and "Pragma" as
> per W3C recommendations in the JSP's.
>
> 2. Using servlet response to set headers with expiration date to the
> past, and including the headers outlined in solution 1. above.
>
> 3. Adding <controller> tag entry and setting nocache=false
> i.e. <controller nocache="false" /> in struts config. (Should I try
> including it within the <action> tags under ActionServlet ?)
>
>
> I have implemented a Synchronizer pattern, and hence
> redundant/duplicate form submissions are not a problem for me.
>
> I have been trying to enable this feature but couldn't find any proper
> answers. Although "Struts in Action" refers to programmatically
> altering the RequestProcessor by extending it and then altering the
> default controller settings (overriding processNoCache method), I
> can't find anything else. If there is a easier way, I would appreciate
> if any of you can share your thoughts on this.
>
> Some say that this is a IE bug (headers greater than 64 kb get ignored
> and IE reverts to default settings), the explanation of which I am not
> satisfied with!

You, as an HTML/JavaScript/etc programmer, do not have much control over
what happens when a user clicks the back button.  This is especially true if
you are relying only on HTML, or only on browser-agnostic approaches.  If
anyone orders you to make the browser behave in a certain way when the back
button is clicked, I suggest telling them how hard it is to do that, unless
there is a straightforward and standard (cross-browser) way to do what they
want.  The "Page Unavailable" errors that you are describing sound very
difficult to deal with.  Even when you fix that problem, I would be
surprised if it worked with other browser, other versions of IE, other
browsers, or even with other similar-looking problems.  If it does work with
every client configuration you have to deal with, then consider youself
lucky, and go with it.

-- 
David Hilsee






==========================================================================
TOPIC: gmail anyone?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/edb0463a590e0ea1
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 9:15 pm
From: "hilz" <[EMAIL PROTECTED]> 

As much as i hate to answer this, and knowing that a lot of people are being
annoyed by it,  i feel i have to answer since i started all this mess.

Dear Rene, you said:

> It sounds like a "yawn yet another scam to fish mail addresses" type of
> answer to me. And still does.

> Yeah and that's the main point that made me explain it a bit more verbose.
> Because to scam a scammer has become a sport and making his obfuscated
> email easy to be picked up by spam harvesters looks exactly like that.
> Otherwise what exactly was the point of hilz answer except to deobfuscate
> the mail address?
>

let me assure you i am no scammer. i hate spam just as much as everybody
else.
all what i was trying to do is to give away some of the gmail invitations
that i have. Before i got an invitation myself, i was wishing for one, and
when i got it, i though there must be a lot of people on this news group
that would like to have one.

and dear Grant, you said:

>hilz got the joke, guess it was missed by others.

god, how smart and sexy i feel right now!


>His mailbox on Hotmail is probably filling with offers for Viagra and pleas
>from the wives of Nigeria Generals looking to move money out of the country
as
>we speak.

and i still find your joke very funny.
You are so wrong, buddy, and that's what makes your joke funny.
This email address is not my primary one. and i use it to subscribe to every
other website that needs subscription. i check it only at times when i am
expecting something, like after i posted the OP.
and i never depend on it. in other words, your funny joke will have no
effect on my life what so ever !
so let's get over it and move on.
if you want an invitation, email me at that address, otherwise, let's end it
here!

cheers to all.
hilz






==========================================================================
TOPIC: Fixed: servet session context sharing in JBoss
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5c162455ab1c1bde
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 7:30 pm
From: Kieron Briggs <[EMAIL PROTECTED]> 

Kieron Briggs wrote:
> Does anyone know of a way to share a servlet context between two web 
> applications packaged in separate EAR files? I would like to be able to 
> access, for example, a session-scoped javabean from both applications, 
> and allow the user to seamlessly switch back and forth with their 
> session intact.

Found a workaround: using session.getServletContext().getContext() to 
get a known context, one application pushes its bean into that context 
(with its session ID as part of the name), and links to the second 
application have the session ID appended to the URL. The second 
application can then find that known context and use the session ID it 
was passed to retrieve the bean.

It's kind of a hack, but it should work. Just thought I'd reply to 
myself in case anyone else encounters a similar situation...



Kieron Briggs,
Web Admin, http://www.andrewwilkie.org.au/
Proudly a member of the Ryde Epping Greens




==========================================================================
TOPIC: Embeded Java DB with inverted indexing and searching capabilities for Java Beans
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5759f9725211e342
==========================================================================

== 1 of 2 ==
Date:   Tues,   Sep 14 2004 10:35 pm
From: [EMAIL PROTECTED] (Sakthi) 

Hi,
  
   BeanIndex is an embeded Java DB with inverted indexing and
searching capabilities for Java Beans. It is released under LGPL.
   BeanIndex is ideal for websites with large number of product item
listings (tested with half a million items) and the product items have
few searchable fields.
Sites selling music files,stock photos and book would benefit the most
as they have few fields that can be searchable.

BeanIndex is a combination of Berkley DB JE and Apache Lucene index.

BeanIndex is Multi threaded. It is configurable to be single / multi
threaded.
BeanIndex uses LRU cache for efficient memory usage.
BeanIndex can have multiple indeces against one Dictionary file.
Download and try it at http://beanindex.sourceforge.net

Regards
Sakthi.



== 2 of 2 ==
Date:   Tues,   Sep 14 2004 10:35 pm
From: [EMAIL PROTECTED] (Sakthi) 

Hi,
  
   BeanIndex is an embeded Java DB with inverted indexing and
searching capabilities for Java Beans. It is released under LGPL.
   BeanIndex is ideal for websites with large number of product item
listings (tested with half a million items) and the product items have
few searchable fields.
Sites selling music files,stock photos and book would benefit the most
as they have few fields that can be searchable.

BeanIndex is a combination of Berkley DB JE and Apache Lucene index.

BeanIndex is Multi threaded. It is configurable to be single / multi
threaded.
BeanIndex uses LRU cache for efficient memory usage.
BeanIndex can have multiple indeces against one Dictionary file.
Download and try it at http://beanindex.sourceforge.net

Regards
Sakthi.




==========================================================================
TOPIC: store whole InputStream in a String
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d510835287103e9
==========================================================================

== 1 of 1 ==
Date:   Tues,   Sep 14 2004 10:51 pm
From: "Mike Schilling" <[EMAIL PROTECTED]> 


"Paul Lutus" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> http://www.cs.yorku.ca/eiffel/FAQ/gotos-loops-breaks.htm

Duelling academic papers!

http://stwww.weizmann.ac.il/g-cs/benari/articles/loop.pdf

This one claims that loops which exit in the middle can be easier to verify. 
It says, among other things:

    WHERE TO EXIT A LOOP
    Where should we place the exit point of a loop? Actu-
    ally, it doesn't matter. Any loop will have an invari-
    ant and an exit condition. There is no a-priori reason
    to suppose that an exit at the start of the loop is bet-
    ter than an exit from the middle.

There's also a famous paper by Eric Roberts of Stanford called "Loop exits 
and structured programming: reopening the debate".  It can be found at

http://portal.acm.org/citation.cfm?id=199688.199815&dl=GUIDE&dl=ACM&type=series&idx=199688&part=Proceedings&WantType=Proceedings&title=Technical%20Symposium%20on%20Computer%20Science%20Education

though you'll need an ACM web account to read it.  The abstract says:

    Internal exits from loops represent a critically important control
    structure that should be taught in the introductory CS1 curriculum. 





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

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 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/BCfwlB/TM
--------------------------------------------------------------------~-> 

<a href=http://English-12948197573.SpamPoison.com>Fight Spam! Click Here!</a> 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/kumpulan/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to