Re: [jug-discussion] Server now running

2008-03-04 Thread William H. Mitchell

Chris,

About the multipart data, it sounds like the Tomahawk Extensions 
filter is perhaps all you're missing.  Take a look at this,
http://myfaces.apache.org/tomahawk/extensionsFilter.html, and see 
where that leaves you.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jug-discussion] Server now running

2008-03-03 Thread Christopher Sharp
Hi William and Andrew,

I'm having a bit of a problem navigating around 
http://myfaces.apache.org/tomahawk/ .? I downloaded the code from the "File 
Upload" link where a link to an example is given as "examples/fileupload.jsp", 
but this is very confusing, and I eventually found it at 
http://www.irian.at/myfacesexamples/fileupload.jsf.? As was said, the "enctype" 
has to be set to "multipart/form-data".? It also says that the MultiPart Filter 
has to be enabled in web.xml.? This is mentioned in "Core JavaServer Faces" 
where a listing is given, but so far I've been unable to find a link to it 
giving details of the xml file on the website you gave me.

I've also had problems getting hold of the API, namely javax.faces.Input, 
org.apache.myfaces, and the API link on the website doesn't work, nor does 
"Impl", which presumably means implementation.? I got the code in the section 
on file upload in chapter 13 of "Core JavaServer Faces" to work on my laptop 
with Glassfish, but the listings are much more complicated than in the link you 
gave me.? The listings in the book imports org.apache.common.fileupload.* etc., 
which are included in jar files, as opposed to the link above where the bean 
imports org.apache.myfaces.custom.fileupload.?? I don't know how different this 
is.

The problem I have with the book is that after the first few chapters it gives 
some very detailed examples, such as for file upload, which is good, but I'm 
lacking a tutorial on something very simple to get me started on this.? Taking 
the detailed example in chapter 13 and wading through it and extracting what I 
really need looks quite involved, so some help in getting started on this would 
be very much appreciated.

Regards,

Christopher

-Original Message-
From: William H. Mitchell <[EMAIL PROTECTED]>
To: jug-discussion@tucson-jug.org
Sent: Fri, 29 Feb 2008 8:17 pm
Subject: Re: [jug-discussion] Server now running









There's a key point on that page of t:fileUpload documentation: "set 
the form's attribute "enctype" to "multipart/form-data".?
?

Without that enctype, the setter indicated by the tag's "value" 
attribute is simply never called.?
?

I should mention that Andy is the one who pointed out that enctype issue to me.?
?

p.s.?

I think Dr. Sharp's work puts an end to the myth of JEE complexity -- 
he's proved that even an astrophysicist with a programming background 
can develop a JEE web app by himself! :)?
?


-?

To unsubscribe, e-mail: [EMAIL PROTECTED]

For additional commands, e-mail: [EMAIL PROTECTED]
?



 



Re: [jug-discussion] Server now running

2008-03-01 Thread Christopher Sharp
Many thanks for the correction.

While working at Steward Observatory I was paid about the same as a 3rd grade 
primary school teacher, which I regarded as unacceptable,?but while I was under 
the restrictions of a?visa regime there was little I could do about it.? Once I 
got my "Green Card" and?had a big?paper in the Astrophysical Journal accepted 
for publication I felt free to strike out in a different direction.

I guess that many?commercial JEE etc. programmers don't know much about 
scientific?and mathematical computing, and most scientists who do the latter 
(to a great extent in FORTRAN), don't know much about JEE programming.? 
Naturally I'm looking at possibilities that can take advantage of these 
combined skills, even though I'm still very new to JEE, and spend a lot of time 
learning and making mistakes.

Best wishes,

Christopher

-Original Message-
From: William H. Mitchell <[EMAIL PROTECTED]>
To: jug-discussion@tucson-jug.org
Sent: Fri, 29 Feb 2008 8:17 pm
Subject: Re: [jug-discussion] Server now running


There's a key point on that page of t:fileUpload documentation: "set the form's 
attribute "enctype" to "multipart/form-data".?
?
Without that enctype, the setter indicated by the tag's "value" attribute is 
simply never called.?
?
I should mention that Andy is the one who pointed out that enctype issue to me.?
?
p.s.?
I think Dr. Sharp's work puts an end to the myth of JEE complexity -- he's 
proved that even an astrophysicist with a programming background can develop a 
JEE web app by himself! :)?
?
-?
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
?



Re: [jug-discussion] Server now running

2008-03-01 Thread Christopher Sharp
Hi Andrew,

Many thanks for your quick reply, and in particular for your information with 
the link.? It's really frustrating working in isolation here in France, without 
any person able to help me with my various questions, so I've had to use books 
and the Internet to get all my information.? Basically I started with Glassfish 
and server-side programming completely from scratch when I started here in 
October.? However, the positive side of my situation is that nobody here knows 
how I'm writing the code or understands what I'm doing, they only see the end 
result, so if I goof up, which I've done often, they don't see my silly 
mistakes, and I just say there is a bug which I'm trying to fix!

I first worked on this project here a year ago, but they were unable to provide 
a computer to host the website, due to delays in getting the required funds, 
and I didn't have a laptop with Linux on it.? Moreover there was not much in 
the way of tools,?so when I first started I didn't know what server technology 
to use, so I developed all the client-side code in HTML, CSS, and JavaScript by 
hand using Notepad and a couple of browsers.? When I got Glassfish running in 
the fall, I already had my forms wired up using JavaScript and DOM, and rather 
than rewriting the client-side code from scratch, I modified the JavaScript to 
that I could concatenate the values from the various input fields on a page, 
then used the DOM to write to a separate JSF form I have at the bottom of a 
page.??No doubt there is a much better way of doing this, but I wanted to take 
advantage of what I had already coded and debugged.

I have a bean that picks up the concatenated input, parses it, and sends the 
output to a directory which is periodically scanned by a Linux script, which 
then calls some FORTRAN code written by one of the people here.? Originally I 
wanted a bean to invoke C via the JNI, from which FORTRAN can be called, or 
invoke a Linux script from Java, and I found out how to do?both of these?and 
got some code to work.? However, the powers that be and their mentality on 
security meant neither of these methods were acceptable.

On a completely different subject, I spent a couple of weeks last month 
learning some Flash, and put together my first attempt at 
http://csharp.com/mirrors.html , the idea coming from a T-shirt design at 
Steward Observatory.

Yes, many thanks, I also certainly look forward to meeting you in person at the 
next JUG meeting after I get back to Tucson.

Regards,

Christopher

-Original Message-
From: Andrew Barton <[EMAIL PROTECTED]>
To: jug-discussion@tucson-jug.org; Christopher Sharp <[EMAIL PROTECTED]>
Sent: Fri, 29 Feb 2008 5:25 pm
Subject: Re: [jug-discussion] Server now running


Hi Christopher, 



Congratulations on getting your application up. I look forward to looking it 
over.




For JSF file upload, the Apache Myfaces project provides several sets of 
components. In particular, I find the Tomahawk components invaluable for JSF 
development. The Tomahawk components also conveniently include a file upload 
component. See?http://myfaces.apache.org/tomahawk/fileUpload.html for details.




In way of demonstration, in my application I have:











In my backing bean, this maps to?private UploadedFile customImageFile1;




UploadedFile is an abstract type provided by Tomahawk that provides storage for 
all components of an uploaded file.




That should get you started.




I look forward to meeting you in person at the Tucson JUG.




Regards,




Andrew

?


On Feb 29, 2008, at 9:06 AM, Christopher Sharp wrote:


Hi Andrew,

I've completed most of my work here and plan to return to Tucson on March 18.? 
The server is now up and running at http://phoenix.ens-lyon.fr/simulator/ , but 
some debugging is still required.? It's been really difficult, as I've been 
effectively working on my own for the last few months.? I don't think anybody 
in the astronomy department here knows Java, and I don't know anybody in Lyon 
who knows Java Server Faces, although there must be some, so for the last few 
months I've had to learn the hard way from books and Google on my own.

One last hurdle is to figure out how to program Glassfish to enable one to 
incorporate file uploads in a web page.? Chapter 13 of Core JavaServer Faces by 
Geary and Horstmann goes into some detail on this, but in fact too much detail, 
and I would most appreciate some advice on code that is as simple as possible 
to perform this task.

There is a chance I may be back in France later in the spring or the summer to 
continue some of my work here for a few more months, but in the mean time I'm 
looking into possible jobs in Arizona and New Mexico.? What I'm also interested 
in doing after I get back to Tucson is to get more familiar with a number of 
aspects of JSF and certainly plan to attend further JUG meetings afte

Re: [jug-discussion] Server now running

2008-02-29 Thread William H. Mitchell
There's a key point on that page of t:fileUpload documentation: "set 
the form's attribute "enctype" to "multipart/form-data".


Without that enctype, the setter indicated by the tag's "value" 
attribute is simply never called.


I should mention that Andy is the one who pointed out that enctype issue to me.

p.s.
I think Dr. Sharp's work puts an end to the myth of JEE complexity -- 
he's proved that even an astrophysicist with a programming background 
can develop a JEE web app by himself! :)



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jug-discussion] Server now running

2008-02-29 Thread Andrew Barton

Hi Christopher,

Congratulations on getting your application up. I look forward to  
looking it over.


For JSF file upload, the Apache Myfaces project provides several sets  
of components. In particular, I find the Tomahawk components  
invaluable for JSF development. The Tomahawk components also  
conveniently include a file upload component. See http://myfaces.apache.org/tomahawk/fileUpload.html 
 for details.


In way of demonstration, in my application I have:

storage="file"/>


In my backing bean, this maps to private UploadedFile customImageFile1;

UploadedFile is an abstract type provided by Tomahawk that provides  
storage for all components of an uploaded file.


That should get you started.

I look forward to meeting you in person at the Tucson JUG.

Regards,

Andrew

On Feb 29, 2008, at 9:06 AM, Christopher Sharp wrote:


Hi Andrew,

I've completed most of my work here and plan to return to Tucson on  
March 18.  The server is now up and running at http://phoenix.ens-lyon.fr/simulator/ 
 , but some debugging is still required.  It's been really  
difficult, as I've been effectively working on my own for the last  
few months.  I don't think anybody in the astronomy department here  
knows Java, and I don't know anybody in Lyon who knows Java Server  
Faces, although there must be some, so for the last few months I've  
had to learn the hard way from books and Google on my own.


One last hurdle is to figure out how to program Glassfish to enable  
one to incorporate file uploads in a web page.  Chapter 13 of Core  
JavaServer Faces by Geary and Horstmann goes into some detail on  
this, but in fact too much detail, and I would most appreciate some  
advice on code that is as simple as possible to perform this task.


There is a chance I may be back in France later in the spring or the  
summer to continue some of my work here for a few more months, but  
in the mean time I'm looking into possible jobs in Arizona and New  
Mexico.  What I'm also interested in doing after I get back to  
Tucson is to get more familiar with a number of aspects of JSF and  
certainly plan to attend further JUG meetings after I get back.


Regards,

Christopher
Supercharge your AIM. Get the AIM toolbar for your browser.


--
Andrew Barton
eBlox, Inc.

512.867.1001 x101


Check out the new Free Distributor Resource Center (including an  
online directory of more than 1200

Suppliers)! http://www.distributorresourcecenter.com





[jug-discussion] Server now running

2008-02-29 Thread Christopher Sharp
Hi Andrew,

I've completed most of my work here and plan to return to Tucson on March 18.? 
The server is now up and running at http://phoenix.ens-lyon.fr/simulator/ , but 
some debugging is still required.? It's been really difficult, as I've been 
effectively working on my own for the last few months.? I don't think anybody 
in the astronomy department here knows Java, and I don't know anybody in Lyon 
who knows Java Server Faces, although there must be some, so for the last few 
months I've had to learn the hard way from books and Google on my own.

One last hurdle is to figure out how to program Glassfish to enable one to 
incorporate file uploads in a web page.? Chapter 13 of Core JavaServer Faces by 
Geary and Horstmann goes into some detail on this, but in fact too much detail, 
and I would most appreciate some advice on code that is as simple as possible 
to perform this task.

There is a chance I may be back in France later in the spring or the summer to 
continue some of my work here for a few more months, but in the mean time I'm 
looking into possible jobs in Arizona and New Mexico.? What I'm also interested 
in doing after I get back to Tucson is to get more familiar with a number of 
aspects of JSF and certainly plan to attend further JUG meetings after I get 
back.

Regards,

Christopher