PLEASE, HELP !!! upload problem

2002-02-22 Thread Serge A. Redchuk

Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
  private String pkPartner = null;
  private FormFile imgFile = null;
  ...
  public FormFile getImgFile(){
return this.imgFile;
  }
  public void setImgFile( FormFile imgFile ){
this.imgFile = imgFile;
  }
  public void reset( ActionMapping mapping, HttpServletRequest request ){
pkPartner = (String)request.getAttribute( pkPartner );
imgFile = null;
  }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
  public ActionForward perform( ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response, String userName )
throws IOException, ServletException
  {
String subpath = /partner;
String targetDir = ResourceHandler.getProperty( global,
  pictures.dyn.abs-root ) + subpath;
String dbPath = ResourceHandler.getProperty( global,
  pictures.dyn.rel-root ) + subpath;
ImagesPartnerForm iform = (ImagesPartnerForm)form;
FormFile ff = iform.getImgFile();
//
String name = ff.getFileName();
String targetFile = targetDir + / + name;
String dbFile = dbPath + / + name;
// Save file to filesystem
java.io.DataInputStream dis = new java.io.DataInputStream(
  ff.getInputStream() );
java.io.DataOutputStream dos = new java.io.DataOutputStream(
  new java.io.FileOutputStream( targetFile ) );
for( int i = 0; i  ff.getFileSize(); i++ ){
  dos.writeByte( dis.readByte() );
}
dos.flush();
dos.close();
dis.close();

return new ActionForward( /jsp/partner/test.jsp );
  }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element: Premature end 
of stream while reading multipart request
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:222)
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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




RE: PLEASE, HELP !!! upload problem

2002-02-22 Thread Ajay Thakral

hi all,
i want to use struts in my applications for the devolpment of a project on
bea weblogic server.
please suggest me what to download and what setting i have to do in the my
server settings
Thanks  Regards
Ajay

-Original Message-
From: Serge A. Redchuk [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 1:48 PM
To: [EMAIL PROTECTED]
Subject: PLEASE, HELP !!! upload problem


Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
  private String pkPartner = null;
  private FormFile imgFile = null;
  ...
  public FormFile getImgFile(){
return this.imgFile;
  }
  public void setImgFile( FormFile imgFile ){
this.imgFile = imgFile;
  }
  public void reset( ActionMapping mapping, HttpServletRequest request ){
pkPartner = (String)request.getAttribute( pkPartner );
imgFile = null;
  }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
  public ActionForward perform( ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response, String
userName )
throws IOException, ServletException
  {
String subpath = /partner;
String targetDir = ResourceHandler.getProperty( global,
  pictures.dyn.abs-root ) + subpath;
String dbPath = ResourceHandler.getProperty( global,
  pictures.dyn.rel-root ) + subpath;
ImagesPartnerForm iform = (ImagesPartnerForm)form;
FormFile ff = iform.getImgFile();
//
String name = ff.getFileName();
String targetFile = targetDir + / + name;
String dbFile = dbPath + / + name;
// Save file to filesystem
java.io.DataInputStream dis = new java.io.DataInputStream(
  ff.getInputStream() );
java.io.DataOutputStream dos = new java.io.DataOutputStream(
  new java.io.FileOutputStream( targetFile ) );
for( int i = 0; i  ff.getFileSize(); i++ ){
  dos.writeByte( dis.readByte() );
}
dos.flush();
dos.close();
dis.close();

return new ActionForward( /jsp/partner/test.jsp );
  }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element:
Premature end of stream while reading multipart request
at
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
java:222)
at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:76)
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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


INTIQUA International
Intelligent Solutions, Quality Execution

 
Note: The information and data contained in this message (and attachments)
may be privileged and confidential and protected from disclosure to any
party or parties apart from the intended recipient. If the reader of this
message is not the intended recipient, or an employee or agent responsible
for delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to the
message and deleting it from your computer.





PLEASE, HELP !!! upload problem

2002-02-22 Thread Serge A. Redchuk

Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
  private String pkPartner = null;
  private FormFile imgFile = null;
  ...
  public FormFile getImgFile(){
return this.imgFile;
  }
  public void setImgFile( FormFile imgFile ){
this.imgFile = imgFile;
  }
  public void reset( ActionMapping mapping, HttpServletRequest request ){
pkPartner = (String)request.getAttribute( pkPartner );
imgFile = null;
  }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
  public ActionForward perform( ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response, String userName )
throws IOException, ServletException
  {
String subpath = /partner;
String targetDir = ResourceHandler.getProperty( global,
  pictures.dyn.abs-root ) + subpath;
String dbPath = ResourceHandler.getProperty( global,
  pictures.dyn.rel-root ) + subpath;
ImagesPartnerForm iform = (ImagesPartnerForm)form;
FormFile ff = iform.getImgFile();
//
String name = ff.getFileName();
String targetFile = targetDir + / + name;
String dbFile = dbPath + / + name;
// Save file to filesystem
java.io.DataInputStream dis = new java.io.DataInputStream(
  ff.getInputStream() );
java.io.DataOutputStream dos = new java.io.DataOutputStream(
  new java.io.FileOutputStream( targetFile ) );
for( int i = 0; i  ff.getFileSize(); i++ ){
  dos.writeByte( dis.readByte() );
}
dos.flush();
dos.close();
dis.close();

return new ActionForward( /jsp/partner/test.jsp );
  }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element: Premature end 
of stream while reading multipart request
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:222)
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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




Re: pre-compiling JSPs w/ Struts

2002-02-22 Thread Matt Raible

Weblogic has a slick way of doing this - you just set a flag in one of the
deployment descriptor (xml) files, and it pre-compiles your JSPs when your app
starts up!  I wish Tomcat had a similar feature.

Do you use Ant and Tomcat?

If so, I wrote this task this morning to pre-compile my JSPs.  I'm putting
these into my WEB-INF classes directory, but it doesn't seem to be working -
maybe i should compile them right into
$CATALINA_HOME/work/localhost/${webapp.name}

property environment=env/

!-- === --
!--   Pre-Compile JSP's --
!-- === --
target name=jspc depends=deploy
!--  Use tomcats jspc's program to precompile jsp's   --
echo message=Pre-Compiling JSPs.../

exec dir=${build.home} executable=${env.CATALINA_HOME}/bin/jspc.bat
failonerror=on
arg value=-v3/
arg value=-uriroot/
arg value=${webapp.name}/
arg value=-d/
arg value=${webapp.name}/WEB-INF/classes/
arg value=-webapp/
arg value=${webapp.name}/
/exec
echo message=Compiling JSPs ---/
javac srcdir=${webapp.target}/WEB-INF/classes 
destdir=${webapp.target}/WEB-INF/classes 
debug=${compile.debug} deprecation=${compile.deprecation} 
optimize=${compile.optimize}
classpath refid=classpath/
/javac
/target

Hope this helps,

Matt

--- Joseph Barefoot [EMAIL PROTECTED] wrote:
 I'd like to go ahead and voice some thanks to anyone who can help me out on
 this...
 
 Ok, I know that this has hit the list a few times before, and I've peered
 into the mail-list archive (as well as my crystal ball) to figure this one
 out, but I was wondering if someone could give me a little validation:
 
 We already have an existing application built on the Struts framework (works
 great, woo-hoo!), but now we'd like to precompile the JSPs for production
 purposes (current production uses non-precompiled JSPs).  However, we'd like
 to retain the ability to use non-precompiled JSPs for development purposes,
 QA, etc.  I understand how to precompile the JSPs, and they should reside (I
 think) in the WEB-INF/classes folder.
 
 As I understand it, to enable precompilation with struts, one has to define
 a servlet-mapping (for each JSP class) in the web.xml file, and then refer
 to these mappings' url-pattern values in your forward tags within the
 struts-config.xml.
 
 To switch between precompiled and non-precompiled JSPs, one would swap out
 web.xml files (one w/ servlet mappings, another without), and switch your
 build target to package either JSP pages or their corresponding compiled
 classes.
 
 So, here's an example (as I see it) of using a precompiled JSP servlet
 mapping w/ a Struts forward (let me know if this is wrong):
 
 !-- From struts-config.xml --!
 
 forward name=new   path=/WEB-INF/jsp/common/login.jsp/
 
 
 
 !-- From web.xml  (assuming that login.jsp is compiled as
 JspServ.login) --!
 
 servlet
 servlet-name
 login
 /servlet-name
 servlet-class
 JspServ.login
 /servlet-class
  /servlet
 
 servlet-mapping
 servlet-name
login
 /servlet-name
 url-pattern
/WEB-INF/jsp/common/login.jsp/
 /url-pattern
 /servlet-mapping
 
 
 /* code snippet utilizing the above forward ('mapping' is an instance of
 ActionMapping):
 
   return( mapping.findForward(new));
 
 */
 
 
 
 So, is this the correct way to go about it?  If so, will Struts still handle
 forwards with appended URL parameters correctly, like this example?
 
 !-- From struts-config.xml --!
 forward name=confirmed  path=/login.do?confirmed=true redirect=true
 /
 
 
 Does anyone have experience moving from non-precompiled JSPs to precompiled
 ones, as we are trying to do here, and if so, are there any other gotchas
 you know about or tidbits of knowledge you'd like to impart?  :)
 
 Oh yeah, if I have all this completely wrong, do try and forgive me. :)
 
 
 thanks so much,
 
 Joe
 
 
 P.S.  How slick would it be if the Struts framework had facilities for doing
 this automatically?  In other words, have a tag within the struts-config.xml
 file that specifies precompilation: the precompiler class to use, the java
 compiler class to use, class path, etc., and then the Action servlet would
 handle forward requests by redirecting to the compiled JSP servlet instead
 of the actual .jsp page.  The Struts framework could maintain the mapping
 between forward URLs specified in the struts-config.xml and the actual
 compiled JSP servlet classes.  You could even have options like retainJSP,
 which would determine whether JSP files would be deleted after compilation,
 or retained on the file system.  That would be super-cool!!
 
 
 
 
 
 
 --
 To 

html:rewrite for static paths and good ol' jsessionid is messin' it up

2002-02-22 Thread Matt Raible

I'm using the forwards in my struts-config to configure static paths for
images, stylesheet, and javascript files:

forward name=styles path=/styles /
forward name=scripts path=/scripts /
forward name=images path=/images /

And in my baseLayout.jsp (for Tiles), I have the following:

style type=text/css media=screen
@import html:rewrite forward='styles'//leftmenu.css;
/style
script src=html:rewrite forward='scripts'//global.js
type=text/javascript/script

This results in:

style type=text/css media=screen
@import
/onpoint/styles;jsessionid=E9D4E67555F5B5493253B32673D22562/leftmenu.css;
/style
script
src=/onpoint/scripts;jsessionid=E9D4E67555F5B5493253B32673D22562/global.js
type=text/javascript/script

Is there anyway to fix this without coding a path to each file in my
struts-config.xml?

Thanks,

Matt



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




RE: Development Environment

2002-02-22 Thread Lawson, Rick

Using Netbeans and Windows 2000.


Keep thinking of creating a load of templates and so on for Netbeans but
never really getting round to it - maybe make it into a module or something
(to be used with struts console)

Has anybody already done this? 


Rick.

 -Original Message-
From:   Tim Sawyer [mailto:[EMAIL PROTECTED]] 
Sent:   21 February 2002 18:53
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject:RE: Development Environment

Netbeans/Ant/Windows NT

Tim.

-Original Message-
From: Dave Wellman [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 5:41 PM
To: [EMAIL PROTECTED]
Subject: Development Environment


Hello,

Quick question, what is the preferred development environment that you are
all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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




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


_
This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/


___
CONFIDENTIALITY NOTICE

The information contained in this e-mail is intended only for the individual or entity 
to whom it is addressed.  It may contain confidential and privileged information and 
if you are not an intended recipient, you must not copy, distribute or take any action 
in reliance on it.  If you have received this e-mail in error, please notify the 
sender and destroy and delete the message from your computer.

_
This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/

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




RE: Development Environment

2002-02-22 Thread Arnaud Buisine

VisualAge, Eclipse, WebSphere Studio Application Developer / Win2000

Deployment : Websphere, Tomcat, Weblogic


 -Message d'origine-
 De : Dave Wellman [mailto:[EMAIL PROTECTED]]
 Envoyé : jeudi 21 février 2002 18:41
 À : [EMAIL PROTECTED]
 Objet : Development Environment


 Hello,

 Quick question, what is the preferred development environment that you are
 all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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




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




Retaining checkbox state on redisplay

2002-02-22 Thread Steve Earl

Hi guys,

As usual with my questions this has probably been done to death but I still
haven't grasped it!! 

Can someone tell me the 'best practice' method of defining checkbox elements
to allow them to be re-populated with the user selected state
when a page is redisplayed.

I currently have a checkbox contained within my jsp which has the following
setup:

snip
html:checkbox property=direct value=Y /
snip

within my formbean for this page I have direct defined as a string, not a
boolean and set it as follows:
snip
public void setDirect(String direct) {
 this.direct = direct;
}
snip

The action class then examines the state of the direct attribute within the
formBean and if it's set to Y it does some work.

My problem is that on the redisplay of the page the checkbox is shown as
unchecked i.e. it reverts to its original state.

I read some messages on the archive suggesting that the formBean needed to
set the value of direct from within a reset() method
but didn't quite figure out whether that means that direct should be defined
as a boolean or not. Also had a look at most of the 
examples on the struts homepage and couldn't find any which included
checkboxes.

All a bit confused reallya normal Friday feeling..

tia
steve


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




Re: RES: handling exceptions

2002-02-22 Thread Ted Husted

Cakalic, James wrote:
 I can't comment on the nested exceptions of 1.4 as I haven't really looked
 at this. But I would venture that my above comments apply there equally.

Nested exceptions are really a very good thing, and not hard to do
pre-1.4

http://www.javaworld.com/javaworld/jw-08-2001/jw-0803-exceptions.html

See part 2 for exception chaining.

These work especially well with Struts, since you can pull off each
exception in the chain and convert it to an ActionError. If you are
wrapping low-level exceptions in higher level business tier exceptions,
then you end up with a general explanation followed by the lower level
cause. So the user's get what they want, and the techs get the detail
they need.


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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




Re: exception in action

2002-02-22 Thread Ted Husted

The Struts tags should be passing the original exception in the request
under the key Action.EXCEPTION_KEY so you can retrieve it from there on
your error page. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Ivan Siviero wrote:
 
 hi everyone.
 
 I have an errorpage to which all the exceptions are forwarded.
 This errorpage emails me the exception details and display a user friendly
 message instead of the complete exception details.
 Everything works fine when the exception occurs in some custom tag, i get
 the exception by pageContext.getException().
 Now let's suppose the exception occurs in some Action.
 The pageContext.getException() in the errorpage returns null.
 So i do not know both the exception detail and the action who raised it.
 How can i get this information?
 Bye
 IVan.
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: EJB = bad = MS.net

2002-02-22 Thread Jon Ferguson

Hey guys,

I've been too heads down to contribute here.. but I just caught Ghoot's comment and I 
have to agree with him and Juan.  There's a lot of hype in the marketplace, our jobs 
are to get underneath, understand the tradeoffs and use them intelligently.  That's 
where elegance and beauty come into software development.

Cheers,
Jon

Emaho, Ghoot wrote:

 This has been an interesting discussion on many levels, but there doesnt seem to be 
much 'real world' substance there.

 We have been developing enterprise software (some utilising EJB, some not) since EJB 
were way back at 0.7 (ish) (1997). Systems with 1000's or 10,000's concurrent users. 
We did it for real - NOT abstract theory.

 What this discussion has highlighted is that age old thing inthe software industry - 
bandwagon. You have the media/hype bandwagon, but you also have the 'developer 
opinion' bandwagon, where certain opinions become flavour of the month. Now it's 
EJB's are bad, it has been JSP's are bad and so on.

 Let's get one thing straight - NO technology is perfect. So why do some developers 
engage in 'my technology is better than yours' type holy wars ? Because they are 
human and they dont know any better. Thats all. All of the really good developers 
I've ever known have never subscribed to 'fixed viewpoints' ie EJB = BAD, Microsoft = 
Evil, Java = whatever. Because they really understand what technology is about.

 Those who do dig their heels in on any particular standpoint, show only one thing - 
their ignorance.

 All technologies have their place and their uses. It's up to a competent Architect 
to decide what's right for their problem domain. What's right for mine, might not be 
right for yours. I mean this is elementary stuff ! But many so called developers 
behave as if they are really engaged in a holy war ! This just makes me laugh :) 
Leave them too it is all I say...

 Ultimately you have to make an INFORMED choice - there is no absolute right or wrong 
way. This should be the number one lesson any developer ever learns, but sadly many 
never learn it.

 The beauty of becoming a good developer is to be able to make these informed choices 
as you create your masterpiece, and not get stuck in the narrow-minded arguments of 
'my toy is better than yours' - wether it's an OS, developer tool , language, 
technology choice or whatever. Because then you resign yourself to reproducing copies 
of other peoples art. And you make yourself look foolish in the process.

 This email is not an attack on anyone, and especially not Vic. He has his opinions. 
Maybe the way he expresses them doesn't appeal to some, and maybe he did it with 
tongue in cheek to provoke a response. Who knows ? It certainly reveals a lot about 
the kind of developer he is and thats enough for me.

 If more developers could have a more altruistic attitude towards the tools they use, 
then more quality software would be built. I have built software teams for many 
years, and I have never employed a developer who demonstrates this 'small-minded' 
mentality. Why ? Because in this industry things (tools, technolgies etc) change 
quicker than peoples attitudes ! So you have to remain open-minded to succeed.

 Ultimately, why argue over the tools you are using ? When it's the artwork that 
really matters.

 It's time for more developers to take responsibility in these matters. It's easy to 
play the name calling game - children can do that. But it takes real skill to develop 
good software, all the more if you are using 'less than perfect' technologies. But 
that is also part of the challenge.

 Finally, non-EJB solutions dont always outperfrom EJB solutions - AND VICE VERSA ! 
We have software in production which operates with large-scale load, using EJB's and 
the performance is excellent. But this doesnt mean I'm saying EJB's are great. You 
can make them work for you, but it doesnt come for free. And to say the are outright 
bad as a solution is simply misinformed.

 Like anything else, it's not a black and white situation.

 Ghoot Emaho (ok, yes I'm a tree huggin hippy)

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


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




RE: Itext - PDF from struts

2002-02-22 Thread Arun_Kumar_N



Hello,
 I am making use of Itext.jar to generate PDF files in Broadvision6.0 using
JSP.
I am able to generate PDF file,but I am not able to write the image in the
generate PDF file.
Please look into this

Rregards
Arun



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




RE: Retaining checkbox state on redisplay

2002-02-22 Thread Steve Earl

well, blow me - managed to sort my own problem for a change.

Removed the 'value=Y' from my checkbox definition, defined the attribute
as a boolean within the formBean and the little fella now works like a
charm.

Apologies to Ted for saying there were no examples around, I have now
checked the Artimus example on his website!

regards,
steve

__ 


-Original Message-
From: Steve Earl [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 9:24 AM
To: 'Struts Users Mailing List' (E-mail)
Subject: Retaining checkbox state on redisplay


Hi guys,

As usual with my questions this has probably been done to death but I still
haven't grasped it!! 

Can someone tell me the 'best practice' method of defining checkbox elements
to allow them to be re-populated with the user selected state
when a page is redisplayed.

I currently have a checkbox contained within my jsp which has the following
setup:

snip
html:checkbox property=direct value=Y /
snip

within my formbean for this page I have direct defined as a string, not a
boolean and set it as follows:
snip
public void setDirect(String direct) {
 this.direct = direct;
}
snip

The action class then examines the state of the direct attribute within the
formBean and if it's set to Y it does some work.

My problem is that on the redisplay of the page the checkbox is shown as
unchecked i.e. it reverts to its original state.

I read some messages on the archive suggesting that the formBean needed to
set the value of direct from within a reset() method
but didn't quite figure out whether that means that direct should be defined
as a boolean or not. Also had a look at most of the 
examples on the struts homepage and couldn't find any which included
checkboxes.

All a bit confused reallya normal Friday feeling..

tia
steve


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

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




RE: Error 500 using property of type FormFile

2002-02-22 Thread Chris Birch

Does your html:form tag have the enctype attribute on the end? e.g.

html:form method=POST enctype=multipart/form-data

Regards,
Chris.

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: 21 February 2002 21:37
To: Struts Users Mailing List
Subject: Error 500 using property of type FormFile


Hey gang

I was trying to implement an upload to help Henry Lu get his going, since
I'll need the same functionalty later anyway.  I believe I have everything
hooked up correctly, but I get an error 500 when I submit the form.  Any
help regarding this would be most appreciated by myself, and I'm sure Henry
too.  Here is the resulting error:

Error: 500
Location: /upload.do
Internal Servlet Error:

javax.servlet.ServletException: BeanUtils.populate
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:774)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Root cause:
java.lang.IllegalArgumentException: argument type mismatch
 at java.lang.reflect.Method.invoke(Native Method)
 at
org.apache.struts.util.PropertyUtils.setSimpleProperty(PropertyUtils.java:98
8)
 at
org.apache.struts.util.PropertyUtils.setNestedProperty(PropertyUtils.java:90
4)
 at org.apache.struts.util.PropertyUtils.setProperty(PropertyUtils.java:932)
 at org.apache.struts.util.BeanUtils.populate(BeanUtils.java:509)
 at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:772)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
 at org.apache.tomcat.core.Handler.service(Handler.java:286)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Thanks so much!

Eddie



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


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




EVAL_BODY_TAG has been deprecated ???

2002-02-22 Thread Maris Orbidans


hello

If I compile my webapp with Tomcat 4.0 library it shows following
warnings:

saraksts.jsp: Warning #: 368 : variable EVAL_BODY_TAG in interface
javax.servlet.jsp.tagext.BodyTag has been deprecated at line 24


Could anybody tell why ?

Maris


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




Re: Exception handling best-practise

2002-02-22 Thread Ted Husted

Jonathan Fuerth wrote:
 This seems to break the MVC design pattern though, because now the
 controller contains information the belongs to the view (message keys)
 and is making decisions that are the responsibility of the model
 (handling the exceptions that the model generated).  Or is it, in
 fact, the controller's job to do exception handling?  If so, what
 mechanism in MVC generates the error message that the user sees?

IMHO, the messages and the messages keys belong to the model. The
controller is simply transferring this data to the view, as it does with
everything else, like records from a database. 

The view's only responsibility is to markup the data it receives (which
is really quite enough these days).

In most cases, exceptions can be converted to ActionErrors. I would try
and do all of this in the Action, so that the view doesn't have to
think about anything. Also, in the Action it is much easier to access
utility methods to parse the exception for you. A base method for your
Actions might be able to do everything; so in the main perform, all you
end up doing is passing back the instant request, ActionError object,
and the exception. A base method could handle it from there. 

If you are using the nightly build, you might have the controller add a
user-friendly error first, and then post the detail from the exception.
This way everybody is happy. You can do this with 1.0.x too, but the
order in which they are displayed is not defined. Another approach would
be to pass the exception under a known key in the request, as the Struts
JSP tags do, and have your page display the exception message separately
(when there is one). 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Jonathan Fuerth wrote:
 
 I'm refactoring an existing web application into the Struts MVC
 framework, and I'm moving from the implementation planning to the
 coding stage now.  Before I act on some potentially poor choices, I'd
 like to run some of my ideas past the group:
 
 The Model part of my application, which handles all the SQL database
 interaction and business logic, will inevitably encounter semantically
 incorrect user input that the ActionForms in the view could not have
 known was incorrect (example: invalid username/password on the login
 screen).  Some of these semantic errors will result in SQLExceptions
 and the like, which the view (JSPs, ActionForms) should not have
 visibility to.
 
 My knee-jerk reaction to this problem was to have the controller
 (Action class) catch these exceptions and add ActionErrors to the
 response, indicating appropriate message keys which the JSP could
 display in the user's favourite language.
 
 This seems to break the MVC design pattern though, because now the
 controller contains information the belongs to the view (message keys)
 and is making decisions that are the responsibility of the model
 (handling the exceptions that the model generated).  Or is it, in
 fact, the controller's job to do exception handling?  If so, what
 mechanism in MVC generates the error message that the user sees?
 
 My current plan of attack is to create a custom exception class for
 everything that could go wrong while the model is doing its thing, and
 let them pass through my Action classes to the JSPs.  The JSPs will
 handle the exceptions by cross-referencing the exception type to a
 message key.. and the user will get an error message in their native
 language.
 
 The main problem with this approach is that a lot of things can go
 wrong in an application, and this will entail a large number of
 exception classes.  An ultimate goal of MVC is to keep the application
 maintainable as it grows.  A large number of documented exceptions
 *seems* reasonably maintainable... but I haven't started coding yet. :)
 
 So, I hope to learn from your experiences.  What have you people done
 when a login fails, a database goes away, a resultset overflows, or
 other nasty things happen to the business layer?
 
 Thanks!
 
 --
 Jonathan Fuerth - SQL Power Group Inc.
 (416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
 Unleash the Power of your Corporate Data - www.sqlpower.ca
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




ActionForm, initialization, submit back to same Action, validation, ActionErrors

2002-02-22 Thread Adam Hardy

Hi All,

I've read a few posts in the archives and not seen anything conclusive on this apart 
from the recommendation to stick to 

action - page - action

What I want to do is this:

firstpage - action1 - formpage1 - action1 - action2 - page2 etc

I've just got to the point where I'm coding the validation for form1 and I am getting 
all my validation ActionErrors appearing when I first call up the form page. Since 
it's the first time I'm calling this page, I don't want anything validated at all. 

Do I have to switch validation off with a switch in my ActionForm validate method, or 
am I doing something wrong? 

Or should I define an ActionMapping with validation set to false to display this form 
page for the first time, and have the form submit to another ActionMapping with 
validation set to true?

Just wondering if I've missed something important.

Thanks
Adam


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

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




Re: action and form contract

2002-02-22 Thread Ted Husted

How about this:

Do not blindly check for null ActionForm beans in all your Actions

If an Action expects an ActionForm bean, then its API contact with the
ActionMappings should require that a particular ActionForm bean, or
subclass thereof, be named in the ActionMapping. The Action's contract
with the controller is that it will always instantiate the bean before
the Action is called. If either contract is broken, the application
should expose a null pointer exception so that the programming error is
fixed and the misunderstanding resolved. Whether an Action expects an
ActionForm bean should be specified in its Javadoc.

Alternatively, the perform method should provide a general check of all
its preconditions, including, but not limited to, the existance of an
ActionForm bean. 

Do check for essential preconditions in your Actions

The perform method in the Action is a key hotspot in the framework, and
may be realizing several different API contracts. To be sure all the
contracts are being met, provide a general error catching routine for
your Actions. This can look for any number of preconditions including
whether there is a form bean when one is expected, and whether it is of
the requesite class, and provide the appropriate error messages. 

See the SuperAction class in the Scaffolding package for a working
example. Scaffolding can be found in the Contrib folder of the nightly
build.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Carter, Steve wrote:
 
 On husted.com, Ted Husted wrote:
 Do not check for null ActionForm beans in your Actions
 If an Action expects an ActionForm bean, then its API contact with the 
ActionMappings should require that this bean, or a subclass, be named in the 
ActionMapping. The Actions contact wit the controller is that it will always 
instantiate the bean before the Action is called. If either contact is broken, the 
application should expose a null pointer exception so that the problem is fixed and 
the misunderstanding resolved. Whether an Action expects an ActionForm bean should be 
specified in its Javadoc.
 
 Now I'm wondering if 'contact' was a type and what he meant was 'contract', that is, 
in the sense of an API contract or implied constrain, pre-condition.
 
 (You out there Ted?)
 
 Anyway, this seems like a good idea. I'm always complaining that exceptions are 
often overused or misused in Java, and this seems like a good use: let the exception 
raise havoc, in order to inform you of a really exceptional condition, and one that 
should be exposed if it exists.
 
 Steve Carter
 Sr. Software Engineer
 Swift Rivers
 [EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




configuring an action for url pattern

2002-02-22 Thread Torgeir Veimo

I would like to redirect all url's of the form 
/pages/whatever/comes/here to a single action.

How do I do that?

I tried setting up a forwarding of the /pages/* url to the action 
servlet in web.xml, but I don't know how to use patterns in the 
strust-config.xml.

-- 
-Torgeir


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




Re: anyone using Castor with Struts?

2002-02-22 Thread Oleg V Alexeev

Hello John,

We use Castor  Struts in our projects.
The right way to use Castor is to develop beans to work with
entities from the problem domain, develop database structure and
mapping configuration. And after that develop your Struts application.
Struts' ActionForms are presentation specific classes - a some kind of
informational proxy between entity beans and HTML form data from user
input. Action classes incorporates business logic and work with Castor
to take and store entity beans from/to persistence storage. I think
that idea to use ActionForm as beans in Castor mapping is a potential
source of problems. ActionForm must store field values between user
submits and the best choice for type of properties in ActionForm is
java.lang.String. Entity beans can contains any type properties and
all values for it you can transfer from the ActionForm with help of
BeanUtils.populate() method, which perform automatic conversion of
the field values between String values and such types as Data, Integer
and so on.

Friday, February 22, 2002, 7:30:12 AM, you wrote:

JM I am considering using Castor as a Persistance mechanism with Struts.  Does
JM anyone currently use Castor?  Since Castor is desinged to work with any bean
JM like class, to implement castor should I use Castor QQL directly from my
JM ActionForm classes or should there be some kind of redirection from the
JM ActionForm to a more Castor specific class?

JM -john


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



-- 
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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




Re: ActionForm, initialization, submit back to same Action,validation, ActionErrors

2002-02-22 Thread Ted Husted

Adam Hardy wrote:
 Or should I define an ActionMapping with validation set to false to display this 
form page for the first time, and have the form submit to another ActionMapping with 
validation set to true?

Yes. This is why there *is* a validation switch. =:o)


 Just wondering if I've missed something important.

If you are forwarding an ActionForm between Actions 

action1 - action2

it can be helpful to have a switch in your base ActionForm to make it
immutable. This way the controller won't step on any changes you make to
the form, and avoids mucking about with dynamic ActionForwards. See the
http.SuperForm in the contrib/scaffold package for an example.

For multipage forms (wizard workflows), it's often helpful to define a
property on your form to give validate a clue as to what fields it
should be working with. The ValidatorForm handles this rather well. 
There is a page property, and you can assign each field to a page in the
configuration file. The validator then only validates fields with a page
equal to or less then the current page number. If things get moved
around, you can just reflect the changes in the configuration file.
(Then just be careful about what you do in reset.)


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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




Re: Error in tag library tiles.tld??

2002-02-22 Thread Cedric Dumoulin


  InsertTag inherit from DefinitionTagSupport which contains the setter for
controllerUrl. Try the latest version to see if problem persist.
  Hope this help,

Cedric

Struts Newsgroup (@Basebeans.com) wrote:

 Subject: Error in tag library tiles.tld??
 From: Nav Sandhu [EMAIL PROTECTED]
  ===
 I upgraded to a recent (2/15) nightly build and I get the following
 exception:

 Error in using tag library uri='/tag/tiles.tld' prefix='tiles': The Tag
 class 'org.apache.struts.taglib.tiles.InsertTag' has no setter method
 corresponding to TLD declared attribute 'controllerUrl', (JSP 1.1 spec,
 5.4.1)
 probably occurred due to an error in
 /integral/dealing/monitor/CurrentMonitorTemplate.jsp line 11:
 %@ taglib uri=/tag/tiles.tld prefix=tiles %

 I have checked the 'InsertTag.java' and it doesn't contain the setter for
 the
 attribute 'controllerUrl'.  Any idea why this would occur?

 Nav

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


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




Re: Retaining checkbox state on redisplay

2002-02-22 Thread SUPRIYA MISRA

In Reset Method
this.direct =null;

From: Steve Earl [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' (E-mail)  
[EMAIL PROTECTED]
Subject: Retaining checkbox state on redisplay
Date: Fri, 22 Feb 2002 09:24:25 -

Hi guys,

As usual with my questions this has probably been done to death but I still
haven't grasped it!!

Can someone tell me the 'best practice' method of defining checkbox 
elements
to allow them to be re-populated with the user selected state
when a page is redisplayed.

I currently have a checkbox contained within my jsp which has the following
setup:

snip
html:checkbox property=direct value=Y /
snip

within my formbean for this page I have direct defined as a string, not a
boolean and set it as follows:
snip
public void setDirect(String direct) {
  this.direct = direct;
}
snip

The action class then examines the state of the direct attribute within the
formBean and if it's set to Y it does some work.

My problem is that on the redisplay of the page the checkbox is shown as
unchecked i.e. it reverts to its original state.

I read some messages on the archive suggesting that the formBean needed to
set the value of direct from within a reset() method
but didn't quite figure out whether that means that direct should be 
defined
as a boolean or not. Also had a look at most of the
examples on the struts homepage and couldn't find any which included
checkboxes.

All a bit confused reallya normal Friday feeling..

tia
steve


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





_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: EJB = bad = MS.net

2002-02-22 Thread David Hamilton

No, I wouldn't say that the combination of Struts and EJB is problem prone.

The problems lie mainly with EJB and are in the following areas..

1) EJBs are only useful/applicable is certain situations.  Incorrect use of
EJBs (i.e. dictated by management when inappropriate) is a source of a lot
of issues.
2) Incorrect usage of EJB types by designers.  Studying the design patterns
and using the right type of beans for the right task is essential.
3) Inexperienced developers.  The EJB spec is large and the learning curve
steep.

The problems addressed by EJBs are non-trivial, and the method of
programming them is different to that which most programmers will be used
to.  Hence the problems that are being reported.

I do think that people like Vic stating 'EJB=bad' is extremely unhelpful
(and is probably more a reflection of the fact that they have not looked
into the subject deeply enough to understand why it is incorrect).

Also 'EJBs are for newbies' could not be more wrong.  EJBs are about as much
for newbies as the javax.swing.text packages are!

BTW: I ended up getting a copy of the Monson-Haefel book for each of my
developers, and I would recommend that development teams get a copy of the
chosen EJB reference text for each developer, as it seems to be important to
help the developers immerse themselves in the technology to be able to make
it work.

Hope that helps
david


- Original Message -
From: Yu, Yanhui [EMAIL PROTECTED]
To: 'Vic Cekvenich' [EMAIL PROTECTED]; Struts Users Mailing List
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 8:27 PM
Subject: RE: EJB = bad = MS.net


 Hi,

 I am involved in a pretty large project (we have not really started coding
 yet).  As far as I can tell, we seem to go with Struts + WSAD + EJBs 
Java
 + JSP.  Am I right to interpret that you mean the combination of Struts
and
 EJBs are problem prone?  Please help me to clarify on this.  Thank you
very
 much,

 Yanhui




 -Original Message-
 From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, February 20, 2002 11:42 AM
 To: Struts Users Mailing List
 Cc: [EMAIL PROTECTED]
 Subject: EJB = bad = MS.net


 Home page of Jakarta has this
 http://jakarta.apache.org/site/news.html#0130.2
 on this:
 http://www.mail-archive.com/general%40jakarta.apache.org/msg03376.html

 I agree. Doing EJBs is bad on many levels and creates more problems.
 Avoid EJB if you want to stay in Java.

 Alternative is to just use Struts + TomCat + RowSet (or DAO if you are
 doing something simple or small) and done. This is the sweet spot. MVC
 is all you need.

 Alternative, do EJBs and your organization WILL switch to MS .NET on the
 next project, leave J2EE, and you have to learn VB.net.

 EJBs are for newbies. (If you need middleware (very rare) use SOAP)

 lol,
 Vic



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




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




Re: PLEASE, HELP !!! upload problem

2002-02-22 Thread SUPRIYA MISRA

try increasing buffer on your jsp page
%@ page buffer=1000kb /


From: Serge A. Redchuk [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: PLEASE, HELP !!! upload problem
Date: Fri, 22 Feb 2002 10:17:54 +0200

Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
   private String pkPartner = null;
   private FormFile imgFile = null;
   ...
   public FormFile getImgFile(){
 return this.imgFile;
   }
   public void setImgFile( FormFile imgFile ){
 this.imgFile = imgFile;
   }
   public void reset( ActionMapping mapping, HttpServletRequest request ){
 pkPartner = (String)request.getAttribute( pkPartner );
 imgFile = null;
   }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
   public ActionForward perform( ActionMapping mapping, ActionForm form,
  HttpServletRequest request, HttpServletResponse response, String 
userName )
 throws IOException, ServletException
   {
 String subpath = /partner;
 String targetDir = ResourceHandler.getProperty( global,
   pictures.dyn.abs-root ) + subpath;
 String dbPath = ResourceHandler.getProperty( global,
   pictures.dyn.rel-root ) + subpath;
 ImagesPartnerForm iform = (ImagesPartnerForm)form;
 FormFile ff = iform.getImgFile();
 //
 String name = ff.getFileName();
 String targetFile = targetDir + / + name;
 String dbFile = dbPath + / + name;
 // Save file to filesystem
 java.io.DataInputStream dis = new java.io.DataInputStream(
   ff.getInputStream() );
 java.io.DataOutputStream dos = new java.io.DataOutputStream(
   new java.io.FileOutputStream( targetFile ) );
 for( int i = 0; i  ff.getFileSize(); i++ ){
   dos.writeByte( dis.readByte() );
 }
 dos.flush();
 dos.close();
 dis.close();

 return new ActionForward( /jsp/partner/test.jsp );
   }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element: 
Premature end of stream while reading multipart request
 at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:222)
 at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76)
 at 
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
 at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at 
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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





_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




Re: no subject I have a question about putting jsp in web-inf

2002-02-22 Thread Chuck Amadi

Keith wrote:

Users can't get at anything under web-inf by name. So it stops them running
your jsp directly or viewing their source code.
They still work because they can be referenced by a Sevlet (ie the struts
ActionServlet). (not all servers are the same here).
It's a 'rule' for commercial/senstive sites that every reference from the
browser is a symbolic ref. (eg. a webapp + a ref. to an entry in
struts-config.xml). This stops hackers/spies from viewing js source or even
knowing directory names or file names.
Looks like paranoia but I guess people have been burned.
A few years ago you could get at server directory listing from browsers  steal
files but these days this also is blocked. It's geting really boring...



--- James Mitchell [EMAIL PROTECTED] wrote:

Question?

What is the point of putting jsp pages in web-inf?


Someone please correct me if I am wrong but,

If I see a web application URL such as
http://www.someweb.com/myapp/web-inf/somedir/mypage.jsp then I can only
assume that I can also go to

http://www.someweb.com/myapp/web-inf/web.xml
or
http://www.someweb.com/myapp/web-inf/classes/ (god forbid that you have
directory browsing enabled, then I could read your database connection
login and passwords (if avaialable, such as poolman.xml) or any of your
resource bundle files.

Or worse, I could download your .class and .jar files.






P.S. Did you actually click on those links?  They won't work because I made
them up:-)


James Mitchell
Software Engineer
Open-Tools.org
Home Phone (770) 822-3359
Cell Phone: (678) 910-8017


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 15, 2002 10:04 AM
To: Struts Users Mailing List
Subject: no subject


depends on where your pages are.
If you have them in the root web app dir, use:

frameset
  frame src=myNavigation.jsp
  frame src=myContent.jsp
/frameset

If you have it , let's say under root/myjsps, use:

frameset
  frame src=myjsps/myNavigation.jsp
  frame src=myjsps/myContent.jsp
/frameset

Having the jsps under WEB-INF doesn't work on some servers WL, for instance.

From: Henry Lu
Subject: Re: frame page src=?
Date: Fri, 15 Feb 2002 05:59:28 -0800




No it doesn't work either. Could you show me a working examples?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Fri, 15 Feb 2002, Jin Bal wrote:

how about
src=something.do
- Original Message -
From: Henry Lu [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 15, 2002 1:34 PM
Subject: frame page src=?


How to specify src path in the frame tag under struts?

I did the following and it didn't work

src=/WEB-INF/jsp/login/blank.jsp
neither
src=/do/someting
neither
src=/jsp/login/blank.jsp

Could you show me an example?


--
-

Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372


--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:

mailto:[EMAIL PROTECTED]

For additional commands, e-mail:

mailto:[EMAIL PROTECTED]


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




__
Seien Sie dabei und sichern Sie sich 100% Leistung, 100% Prmie und
100% Zufriedenheit. Jetzt unter http://club.web.de/?mc=021105


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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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

Hi you may believe this is wrong albiet i have been briefed that the 
WEB-INF is accessable if you are running the service under W$ NT thus 
your classes,jsp and beans etc can be viewed. Apparently NT4 does not 
know the difference between Web-Inf ,WEB-INF or web-inf . thus this may 
now have  been rectified. Please let me know otherwise.

Note Could be the case of careless whispers

Cheers Chuck Amadi
Systems Programmer.



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




Changing Request Parameters

2002-02-22 Thread Phase Communcations

I am forwarding from one Action to Another. I need to tweak the request
parameters. Is there a way to do this?

I tried to set the reqest value by calling the FormBean and set it from the
action. But, it doesn't carry over to the next Action. I can't find a way to
change the request parameters. Please help.

I saw some discussion on the archive. But, is pretty aimless and not very
clear.

I am running Servlet 2.2 so don't tell me about getParameterMap().

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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




Re: EJB = bad = MS.net

2002-02-22 Thread Edward Q. Bridges

location independence means independent of location, that is all. 

if you're implementing two interfaces to do (more or less) the exact same 
thing, and one is called local and one is called remote that is 
absolutely *not*, by any stretch of the imagination,  location 
independent. _end of story_.

with EJBs the method call does not appear to be remote, because it is 
*explicitly* remote.  the method is in a RemoteInterface and throws a 
RemoteException for crying out loud!

furthermore, it's not about box1 vs box12.  to be more precise, it's about 
vm1 vs. vm12.  and, if you are writing a client, your client has business 
logic to take care of.  it's the servers responsibility to determine 
whether it should call a method at vm1 or at vm12.

IMNSHO, this is the achilles heel of EJB.

--e--



On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:

The method call can take place anywhere, but always appears to be 
remote. That could be many remote machines though. Location independence 
is not about local vs remote, it's more about box1 vs box12.





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




NEVERMIND: Changing Request Parameters

2002-02-22 Thread Phase Communcations

A little more research and I find that it is not possible and that I need to
rebuild the and redirect. Cheezy.

-Original Message-
From: Phase Communcations [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 5:08 AM
To: Struts Users Mailing List
Subject: Changing Request Parameters


I am forwarding from one Action to Another. I need to tweak the request
parameters. Is there a way to do this?

I tried to set the reqest value by calling the FormBean and set it from the
action. But, it doesn't carry over to the next Action. I can't find a way to
change the request parameters. Please help.

I saw some discussion on the archive. But, is pretty aimless and not very
clear.

I am running Servlet 2.2 so don't tell me about getParameterMap().

Brandon Goodin
Phase Web and Multimedia
P (406) 862-2245
F (406) 862-0354
[EMAIL PROTECTED]
http://www.phase.ws



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



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




Re: html:file tag and FormFile

2002-02-22 Thread Henry Lu

Eddie, I got errors when i use:
html:form action=/saveIdForm encType=multipart/form-data

errors:
encType: invalid according to the specified TLD

Could you send me your jsp page with the html:file tag?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Thu, 21 Feb 2002, Eddie Bush wrote:

 What does your html:form tag look like, Henry?  Be sure you specify
 encType=multipart/form-data as an attribute to the html:form tag.  ex:

 html:form action=/upload encType=multipart/form-data
 html:file property=theFile/
 /html:form

 I'm having an odd problem with mine hanging for some odd reason though - it
 just sits there now.  It DOES make it to the action however.  I just threw
 together a simple action that prints the file's contents.  I didn't think it
 was doing anything but it apprantly flushed the buffer when I killed the
 built-in tomcat server.  I got the entire file contents printed in my output
 window.

 HTH Henry!

 Eddie


 - Original Message -
 From: Henry Lu [EMAIL PROTECTED]
 To: struts users [EMAIL PROTECTED]
 Sent: Thursday, February 21, 2002 2:53 PM
 Subject: html:file tag and FormFile


  Is there any one who may help me to figure out how to use html:file rag
  and FormFile in a ActionForm? I got errors where I tried to use both.
  errors are:
 
  javax.servlet.ServletException: BeanUtils.populate
  
  Root Cause:
  java.lang.IllegalArgumentException: argument type mismatch
 
  my JSP file has:
 
  html:file property=myfile/
 
  and my ActionForm has:
 
  private FormFile myfile;
 
  // getter and setter
 
 
 
  --
 -
  Henry Lu
  MCITphone: (734) 936-2063
  University of Michigan Medical Center   fax:   (734) 763-4372
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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



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




Nesting Tiles within each other problem

2002-02-22 Thread Ian Beaumont

I have a page, which uses tiles:insert to insert another page that also
has a tiles:insert.  Is this possible?  I just keep getting a servlet
exception.  Below is a simplified example of what I'm doing.


base.jsp
%@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
html:html locale=true
body
tiles:insert attribute=body/
/body
/html:html

middle.jsp
%@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
tiles:insert attribute=anotherBody/

top.jsp
pHello World/p


From tiles definition
definition name=/baseLayout path=/base.jsp
  put name=body value=/
/definition

definition name=/middleLayout extends=/baseLayout
  put name=body value=/middle.jsp/
  put name=anotherBody value=/ 
/definition

definition name=/top extends=/middleLayout
  put name=anotherBody value=/top.jsp/
/definition

The error I get on trying to display the page 'top' is:
ServletException in:/middle.jsp] Error - Tag Insert : No value found for
attribute 'anotherBody'.' 
Thanks
Ian Beaumont




Re: NEVERMIND: Changing Request Parameters

2002-02-22 Thread Jin Bal

Equally cheesy would be  to set request attributes and get the receiving
action to check the attributes before checking the req params.  It's dirty I
know, but it may be slightly preferable to constructing query strings on the
server and creating a new request...

Just a thought.

HTH
Jin
- Original Message -
From: Phase Communcations [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 12:16 PM
Subject: NEVERMIND: Changing Request Parameters


 A little more research and I find that it is not possible and that I need
to
 rebuild the and redirect. Cheezy.

 -Original Message-
 From: Phase Communcations [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 5:08 AM
 To: Struts Users Mailing List
 Subject: Changing Request Parameters


 I am forwarding from one Action to Another. I need to tweak the request
 parameters. Is there a way to do this?

 I tried to set the reqest value by calling the FormBean and set it from
the
 action. But, it doesn't carry over to the next Action. I can't find a way
to
 change the request parameters. Please help.

 I saw some discussion on the archive. But, is pretty aimless and not very
 clear.

 I am running Servlet 2.2 so don't tell me about getParameterMap().

 Brandon Goodin
 Phase Web and Multimedia
 P (406) 862-2245
 F (406) 862-0354
 [EMAIL PROTECTED]
 http://www.phase.ws



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



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



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




PLEASE, HELP !!! upload problem

2002-02-22 Thread Serge A. Redchuk

Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
  private String pkPartner = null;
  private FormFile imgFile = null;
  ...
  public FormFile getImgFile(){
return this.imgFile;
  }
  public void setImgFile( FormFile imgFile ){
this.imgFile = imgFile;
  }
  public void reset( ActionMapping mapping, HttpServletRequest request ){
pkPartner = (String)request.getAttribute( pkPartner );
imgFile = null;
  }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
  public ActionForward perform( ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response, String userName )
throws IOException, ServletException
  {
String subpath = /partner;
String targetDir = ResourceHandler.getProperty( global,
  pictures.dyn.abs-root ) + subpath;
String dbPath = ResourceHandler.getProperty( global,
  pictures.dyn.rel-root ) + subpath;
ImagesPartnerForm iform = (ImagesPartnerForm)form;
FormFile ff = iform.getImgFile();
//
String name = ff.getFileName();
String targetFile = targetDir + / + name;
String dbFile = dbPath + / + name;
// Save file to filesystem
java.io.DataInputStream dis = new java.io.DataInputStream(
  ff.getInputStream() );
java.io.DataOutputStream dos = new java.io.DataOutputStream(
  new java.io.FileOutputStream( targetFile ) );
for( int i = 0; i  ff.getFileSize(); i++ ){
  dos.writeByte( dis.readByte() );
}
dos.flush();
dos.close();
dis.close();

return new ActionForward( /jsp/partner/test.jsp );
  }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element: Premature end 
of stream while reading multipart request
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:222)
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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




PLEASE, HELP !!! upload problem

2002-02-22 Thread Serge A. Redchuk

Hello All !

I use the Struts v.1.0.2

Unfortunatelly I can't realize file uploading.

And the most confusing that I have 2 different errors on different
files with the same code.

Here's my form:

html:form action=/addImage.do enctype=multipart/form-data 
html:hidden property=pkPartner /
html:file property=imgFile /
br
html:submit property=submit value=Save /
html:reset/
/html:form

Here's form bean:
...
public final class ImagesPartnerForm extends ActionForm {
  private String pkPartner = null;
  private FormFile imgFile = null;
  ...
  public FormFile getImgFile(){
return this.imgFile;
  }
  public void setImgFile( FormFile imgFile ){
this.imgFile = imgFile;
  }
  public void reset( ActionMapping mapping, HttpServletRequest request ){
pkPartner = (String)request.getAttribute( pkPartner );
imgFile = null;
  }
...

Here's action that handles form data:
public final class AddImage extends ActionExt {
  public ActionForward perform( ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse response, String userName )
throws IOException, ServletException
  {
String subpath = /partner;
String targetDir = ResourceHandler.getProperty( global,
  pictures.dyn.abs-root ) + subpath;
String dbPath = ResourceHandler.getProperty( global,
  pictures.dyn.rel-root ) + subpath;
ImagesPartnerForm iform = (ImagesPartnerForm)form;
FormFile ff = iform.getImgFile();
//
String name = ff.getFileName();
String targetFile = targetDir + / + name;
String dbFile = dbPath + / + name;
// Save file to filesystem
java.io.DataInputStream dis = new java.io.DataInputStream(
  ff.getInputStream() );
java.io.DataOutputStream dos = new java.io.DataOutputStream(
  new java.io.FileOutputStream( targetFile ) );
for( int i = 0; i  ff.getFileSize(); i++ ){
  dos.writeByte( dis.readByte() );
}
dos.flush();
dos.close();
dis.close();

return new ActionForward( /jsp/partner/test.jsp );
  }
}

ERRORS:
0) short text file was uploaded without any corruption, but:

1) One jpeg file was uploaded, but had less size then source.

2) Other jpeg file uploading caused an exception:

javax.servlet.ServletException: IOException while reading file element: Premature end 
of stream while reading multipart request
at 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.java:222)
at 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMultipartRequestHandler.java:76)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
at 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:2061)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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




Re: html:file tag and FormFile

2002-02-22 Thread Henry Lu

Eddie, I figured out that it should be enctype instead of encType.
But I got another err:
javax.servlet.ServletException: MultipartIterator: no multipart request
data sent

Why? How to get rid of it?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Thu, 21 Feb 2002, Eddie Bush wrote:

 What does your html:form tag look like, Henry?  Be sure you specify
 encType=multipart/form-data as an attribute to the html:form tag.  ex:

 html:form action=/upload encType=multipart/form-data
 html:file property=theFile/
 /html:form

 I'm having an odd problem with mine hanging for some odd reason though - it
 just sits there now.  It DOES make it to the action however.  I just threw
 together a simple action that prints the file's contents.  I didn't think it
 was doing anything but it apprantly flushed the buffer when I killed the
 built-in tomcat server.  I got the entire file contents printed in my output
 window.

 HTH Henry!

 Eddie


 - Original Message -
 From: Henry Lu [EMAIL PROTECTED]
 To: struts users [EMAIL PROTECTED]
 Sent: Thursday, February 21, 2002 2:53 PM
 Subject: html:file tag and FormFile


  Is there any one who may help me to figure out how to use html:file rag
  and FormFile in a ActionForm? I got errors where I tried to use both.
  errors are:
 
  javax.servlet.ServletException: BeanUtils.populate
  
  Root Cause:
  java.lang.IllegalArgumentException: argument type mismatch
 
  my JSP file has:
 
  html:file property=myfile/
 
  and my ActionForm has:
 
  private FormFile myfile;
 
  // getter and setter
 
 
 
  --
 -
  Henry Lu
  MCITphone: (734) 936-2063
  University of Michigan Medical Center   fax:   (734) 763-4372
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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



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




Re: NEVERMIND: Changing Request Parameters

2002-02-22 Thread Ted Husted

Phase Communcations wrote:
 I tried to set the reqest value by calling the FormBean and set it from the
 action. But, it doesn't carry over to the next Action. I can't find a way to
 change the request parameters. Please help.

The trick is to put a switch on your form bean to make it immutable.
This way the controller can't mess with it between actions. 


private boolean mutable = true;
public void setMutable(boolean mutable) {
this.mutable = mutable;
}
public boolean isMutable() {
return this.mutable;
}

public String whatever = null;
public void setWhatever(String whatever) {
if (isMutable()) this.whatever = whatever;
}
public String getWhatever() {
return this.whatever;
}

Then be sure that reset uses the setters (and doesn't clear mutable).


-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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




RE: anyone using Castor with Struts?

2002-02-22 Thread John Menke

Wow,  Chiki looks great!  I want to help!!!  Had a problem signing up for
mailing list though:

Fatal error: Call to a member function on a non-object in
../mail/mail_utils.php on line 24


-john

-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 3:26 AM
To: Struts Users Mailing List
Subject: RE: anyone using Castor with Struts?


Hi John,

Chiki currently uses Castor for Xml Binding. You can download the source
code as it's opensource.

Take a look http://chiki.emaho.org

Regards

Ghoot

 -Original Message-
 From: John Menke [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 04:30
 To: struts-user
 Subject: anyone using Castor with Struts?


 I am considering using Castor as a Persistance mechanism with
 Struts.  Does
 anyone currently use Castor?  Since Castor is desinged to
 work with any bean
 like class, to implement castor should I use Castor QQL
 directly from my
 ActionForm classes or should there be some kind of
 redirection from the
 ActionForm to a more Castor specific class?

 -john


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



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


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




RE: anyone using Castor with Struts?

2002-02-22 Thread Lawson, Rick

Php?



-Original Message-
From: John Menke [mailto:[EMAIL PROTECTED]]
Sent: 22 February 2002 15:57
To: Struts Users Mailing List
Subject: RE: anyone using Castor with Struts?

Wow,  Chiki looks great!  I want to help!!!  Had a problem signing up for
mailing list though:

Fatal error: Call to a member function on a non-object in
../mail/mail_utils.php on line 24


-john

-Original Message-
From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 3:26 AM
To: Struts Users Mailing List
Subject: RE: anyone using Castor with Struts?


Hi John,

Chiki currently uses Castor for Xml Binding. You can download the source
code as it's opensource.

Take a look http://chiki.emaho.org

Regards

Ghoot

 -Original Message-
 From: John Menke [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 04:30
 To: struts-user
 Subject: anyone using Castor with Struts?


 I am considering using Castor as a Persistance mechanism with
 Struts.  Does
 anyone currently use Castor?  Since Castor is desinged to
 work with any bean
 like class, to implement castor should I use Castor QQL
 directly from my
 ActionForm classes or should there be some kind of
 redirection from the
 ActionForm to a more Castor specific class?

 -john


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



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


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


_
This message has been checked for all known viruses by UUNET delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/


___
CONFIDENTIALITY NOTICE

The information contained in this e-mail is intended only for the individual or entity 
to whom it is addressed.  It may contain confidential and privileged information and 
if you are not an intended recipient, you must not copy, distribute or take any action 
in reliance on it.  If you have received this e-mail in error, please notify the 
sender and destroy and delete the message from your computer.

_
This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/

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




RE: anyone using Castor with Struts?

2002-02-22 Thread Emaho, Ghoot

Hi John,

thanks for the feedback.

The error is from Sourceforge's site, which sometimes suffers in this way due to load, 
just try again. That usually works for me.

Thanks

Ghoot

 -Original Message-
 From: John Menke [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 15:57
 To: Struts Users Mailing List
 Subject: RE: anyone using Castor with Struts?
 
 
 Wow,  Chiki looks great!  I want to help!!!  Had a problem 
 signing up for
 mailing list though:
 
 Fatal error: Call to a member function on a non-object in
 ../mail/mail_utils.php on line 24
 
 
 -john
 
 -Original Message-
 From: Emaho, Ghoot [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 3:26 AM
 To: Struts Users Mailing List
 Subject: RE: anyone using Castor with Struts?
 
 
 Hi John,
 
 Chiki currently uses Castor for Xml Binding. You can download 
 the source
 code as it's opensource.
 
 Take a look http://chiki.emaho.org
 
 Regards
 
 Ghoot
 
  -Original Message-
  From: John Menke [mailto:[EMAIL PROTECTED]]
  Sent: 22 February 2002 04:30
  To: struts-user
  Subject: anyone using Castor with Struts?
 
 
  I am considering using Castor as a Persistance mechanism with
  Struts.  Does
  anyone currently use Castor?  Since Castor is desinged to
  work with any bean
  like class, to implement castor should I use Castor QQL
  directly from my
  ActionForm classes or should there be some kind of
  redirection from the
  ActionForm to a more Castor specific class?
 
  -john
 
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 

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




Memory consumption of tags

2002-02-22 Thread JC

Hi,
We're working on a struts application running on
Websphere 3.5.4. I was doing some performance testing
when I noticed that it consumed a whole lot of memory
which I couldn't really explain. So I ran the
application supervised by JProbe and discovered some
interesting things.

On one of the JSP's there were nearly 50 000 object
created of the class java.beans.MethodDescriptor and
half as many of java.beans.PropertyDescriptor. This
made my investigate things further, and I bottled down
a JSP with only a simple bean:write name=testBean
property=value/ - tag in it. On a request to this
JSP I got these results:

java.beans.MethodDescriptor:106 objects á 36 bytes
(3816bytes)
java.beans.PropertyDescriptor:  35 objects á 52 bytes
(1820bytes)

The upmost rows of the trace looked like this:
GenericBeanInfo.init(GenericBeanInfo)
Introspector.getBeanInfo(Class);
JspRuntimeLibrary.introspecthelper(Object, String,
String, ServletRequest, String, boolean)
_test_jsp_0_jspService(HttpServletRequest,
HttpServletResponse)

And this is just for the simple write tag. The
iterate tag generated over 700 objects of the
MethodDescriptor class.

What I did then, was to run the same investigation
using the Tomcat4 (latest binary production release)
and what I found was... no objects at all of these
classes was created!!

The conclusion here must be that the Websphere servlet
engine must produce a lot of overhead using the tags.
This is of real concern on a site with some real load
to it.

Has anyone running Struts on Websphere noticed these
oddities as well or maybe explain the reason for this?

/Johannes

_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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




RE: Memory consumption of tags

2002-02-22 Thread Patrick Logé

We plan to do so using WS 3.5.4, and we should
have some load...

you'r frighten me :(



Has anyone running Struts on Websphere noticed these
oddities as well or maybe explain the reason for this?

/Johannes

_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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


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




Re: Nesting Tiles within each other problem

2002-02-22 Thread Cedric Dumoulin


  Sure it is possible.
  In your example, what url do you use to access the page ?
  Remember that a definition name is a logical name. It can not be used as an
url. You can use it in insert name=defName /, or as the path of a Struts
forward.


Ian Beaumont wrote:

 I have a page, which uses tiles:insert to insert another page that also
 has a tiles:insert.  Is this possible?  I just keep getting a servlet
 exception.  Below is a simplified example of what I'm doing.

 base.jsp
 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
 html:html locale=true
 body
 tiles:insert attribute=body/
 /body
 /html:html

 middle.jsp
 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
 tiles:insert attribute=anotherBody/

 top.jsp
 pHello World/p

 From tiles definition
 definition name=/baseLayout path=/base.jsp
   put name=body value=/
 /definition

 definition name=/middleLayout extends=/baseLayout
   put name=body value=/middle.jsp/
   put name=anotherBody value=/
 /definition

 definition name=/top extends=/middleLayout
   put name=anotherBody value=/top.jsp/
 /definition

 The error I get on trying to display the page 'top' is:
 ServletException in:/middle.jsp] Error - Tag Insert : No value found for
 attribute 'anotherBody'.'
 Thanks
 Ian Beaumont


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




RE: Nesting Tiles within each other problem

2002-02-22 Thread Ian Beaumont

I access it by going to /myPage.do.  Here is an extract from the
struts-config.

actionpath=/myPage
   type=com.categoric.criticallogistix.client.DoFirst
scope=request 
  forward name=success  path=/top/
/action

DoFirst is just
import org.apache.struts.action.*;
import javax.servlet.http.*;

public class DoFirst extends Action {

public ActionForward perform(
ActionMapping aMapping,
ActionForm aForm,
HttpServletRequest aRequest,
HttpServletResponse aResponse
) {
return aMapping.findForward(success);
}




-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: 22 February 2002 13:36
To: Struts Users Mailing List
Subject: Re: Nesting Tiles within each other problem



  Sure it is possible.
  In your example, what url do you use to access the page ?
  Remember that a definition name is a logical name. It can not be used as
an
url. You can use it in insert name=defName /, or as the path of a Struts
forward.


Ian Beaumont wrote:

 I have a page, which uses tiles:insert to insert another page that also
 has a tiles:insert.  Is this possible?  I just keep getting a servlet
 exception.  Below is a simplified example of what I'm doing.

 base.jsp
 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
 html:html locale=true
 body
 tiles:insert attribute=body/
 /body
 /html:html

 middle.jsp
 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
 tiles:insert attribute=anotherBody/

 top.jsp
 pHello World/p

 From tiles definition
 definition name=/baseLayout path=/base.jsp
   put name=body value=/
 /definition

 definition name=/middleLayout extends=/baseLayout
   put name=body value=/middle.jsp/
   put name=anotherBody value=/
 /definition

 definition name=/top extends=/middleLayout
   put name=anotherBody value=/top.jsp/
 /definition

 The error I get on trying to display the page 'top' is:
 ServletException in:/middle.jsp] Error - Tag Insert : No value found for
 attribute 'anotherBody'.'
 Thanks
 Ian Beaumont


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



Re: Nesting Tiles within each other problem

2002-02-22 Thread Cedric Dumoulin


  In your example, you insert definition /top, which by extensions use
'base.jsp' as layout. In this later, you do insert attribute=body /. Body
value is page /middle.jsp, wich is inserted. But, /midle.jsp is a page, not a
definition. In /midle.jsp, you do insert attribute=anotherBody /, but
anotherBody is not defined for the page.

  You should either do  :

   * Pass the attribute value when you insert the page
   * Insert a definition using the page as layout, and declaring the attribute

  Cedric

Ian Beaumont wrote:

 I access it by going to /myPage.do.  Here is an extract from the
 struts-config.

 actionpath=/myPage
type=com.categoric.criticallogistix.client.DoFirst
 scope=request 
   forward name=success  path=/top/
 /action

 DoFirst is just
 import org.apache.struts.action.*;
 import javax.servlet.http.*;

 public class DoFirst extends Action {

 public ActionForward perform(
 ActionMapping aMapping,
 ActionForm aForm,
 HttpServletRequest aRequest,
 HttpServletResponse aResponse
 ) {
 return aMapping.findForward(success);
 }

 -Original Message-
 From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 13:36
 To: Struts Users Mailing List
 Subject: Re: Nesting Tiles within each other problem

   Sure it is possible.
   In your example, what url do you use to access the page ?
   Remember that a definition name is a logical name. It can not be used as
 an
 url. You can use it in insert name=defName /, or as the path of a Struts
 forward.

 Ian Beaumont wrote:

  I have a page, which uses tiles:insert to insert another page that also
  has a tiles:insert.  Is this possible?  I just keep getting a servlet
  exception.  Below is a simplified example of what I'm doing.
 
  base.jsp
  %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
  html:html locale=true
  body
  tiles:insert attribute=body/
  /body
  /html:html
 
  middle.jsp
  %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
  tiles:insert attribute=anotherBody/
 
  top.jsp
  pHello World/p
 
  From tiles definition
  definition name=/baseLayout path=/base.jsp
put name=body value=/
  /definition
 
  definition name=/middleLayout extends=/baseLayout
put name=body value=/middle.jsp/
put name=anotherBody value=/
  /definition
 
  definition name=/top extends=/middleLayout
put name=anotherBody value=/top.jsp/
  /definition
 
  The error I get on trying to display the page 'top' is:
  ServletException in:/middle.jsp] Error - Tag Insert : No value found for
  attribute 'anotherBody'.'
  Thanks
  Ian Beaumont

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


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




ActionForm datatypes best practices - ideas? Editable date fields, moneyvalues...

2002-02-22 Thread Andrew . Goodnough


 Oleg V Alexeev wrote:
ActionForm must store field values between user
submits and the best choice for type of properties in ActionForm is
java.lang.String.

I've been chewing on the data type issue on ActionForms and I am starting
to agree with Oleg that Strings are the best datatypes for ActionForms.  I
would like to solicit ideas on what everyone is doing in this vein.
Specifically, how are you typing Dates?  For instance, if you define:

/** Getter for property poDate.
 * @return Value of property poDate.
 */
public java.util.Date getPODate() {
return poDate;
}

/** Setter for property poDate.
 * @param poDate New value of property poDate.
 */
public void setPODate(java.util.Date poDate) {
this.poDate = poDate;
}

and the user types in blah, how does Struts set that value into a date?
Assuming I have not defined form.validate(), how could this work?
Similarly, what does Struts do if the date is in the wrong format?  Most
datatypes have constructors which accept Strings (even BigDecimal) but
java.util.Date doesn't.

The only answer that I can fathom right now (testing all of this over the
weekend...) is to specify all dates as Strings and do a
dateFormat.parse(strVal); on each - either in the form.validate() method or
in the Domain Object setter.  Following this line of thinking, why not do
the same for BigDecimal?


Andy


Andrew Goodnough
Dana Commercial Credit
Programmer









   
   
Oleg V 
   
Alexeev  To: Struts Users Mailing List 
[EMAIL PROTECTED] 
oalexeev@apacc:   
   
che.org Subject: Re: anyone using Castor with 
Struts?
   
   
02/22/2002 
   
05:40 AM   
   
Please 
   
respond to 
   
Struts Users  
   
Mailing List  
   
   
   
   
   



Hello John,

We use Castor  Struts in our projects.
The right way to use Castor is to develop beans to work with
entities from the problem domain, develop database structure and
mapping configuration. And after that develop your Struts application.
Struts' ActionForms are presentation specific classes - a some kind of
informational proxy between entity beans and HTML form data from user
input. Action classes incorporates business logic and work with Castor
to take and store entity beans from/to persistence storage. I think
that idea to use ActionForm as beans in Castor mapping is a potential
source of problems. ActionForm must store field values between user
submits and the best choice for type of properties in ActionForm is
java.lang.String. Entity beans can contains any type properties and
all values for it you can transfer from the ActionForm with help of
BeanUtils.populate() method, which perform automatic conversion of
the field values between String values and such types as Data, Integer
and so on.

Friday, February 22, 2002, 7:30:12 AM, you wrote:

JM I am considering using Castor as a Persistance mechanism with Struts.
Does
JM anyone currently use Castor?  Since Castor is desinged to work with any
bean
JM like class, to implement castor should I use Castor QQL directly from
my
JM ActionForm classes or should there be some kind of redirection from the
JM ActionForm to a more Castor specific class?

JM -john


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



--
Best regards,
 Olegmailto:[EMAIL PROTECTED]



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






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

Re: anyone using Castor with Struts?

2002-02-22 Thread John M. Corro

Ive also used Castor for converting existing beans/classes to XML via Castor
mappings.  Though I'm interested in hearing about the performance of their
JDO/OQL functionalityJDO just seems like it'd be so much faster from an
app development standpoint, but what I am worried about is the performance
of the OQL queries and how easily you can deal w/ beans whose properties are
populated from multiple tables.  From one of the earlier posts it sounded
like the way to get around this (bean that spans multiple tables) by
building the object model first than building your DB from your object
model.

- Original Message -
From: Emaho, Ghoot [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 5:25 AM
Subject: RE: anyone using Castor with Struts?


Hi John,

Chiki currently uses Castor for Xml Binding. You can download the source
code as it's opensource.

Take a look http://chiki.emaho.org

Regards

Ghoot

 -Original Message-
 From: John Menke [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 04:30
 To: struts-user
 Subject: anyone using Castor with Struts?


 I am considering using Castor as a Persistance mechanism with
 Struts.  Does
 anyone currently use Castor?  Since Castor is desinged to
 work with any bean
 like class, to implement castor should I use Castor QQL
 directly from my
 ActionForm classes or should there be some kind of
 redirection from the
 ActionForm to a more Castor specific class?

 -john


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



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





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




RE: Memory consumption of tags

2002-02-22 Thread Dave J Dandeneau

We actually opened a support issue with WebSphere because our JSPs were generating 
Branch too large exceptions in Websphere but in no other servers. They told us that 
there was an optimization in the works that a client is testing but it is not public 
yet. 

Here is what the jsp compiler generates for each message tag on Websphere 4.0.1:

MessageTag messagetag = new MessageTag();
messagetag.setPageContext(pagecontext);
messagetag.setParent(htmltag);
JspRuntimeLibrary.introspecthelper(messagetag, key, Loginlogout.login.title, null, 
null, false);
try
{
  int k = messagetag.doStartTag();
  if(k == 2)
throw new JspTagException(Since tag handler class 
org.apache.struts.taglib.bean.MessageTag does not implement BodyTag, it can't return 
BodyTag.EVAL_BODY_TAG);
 
  if(k == 0);
  
  if(messagetag.doEndTag() == 5)
  {
return;
  }
} finally {
  messagetag.release();
}
((JspWriter) (obj3)).print(_jspx_html_data[6]);

It doesn't look like too many objects are created, but it seems like there may be some 
way to optimize it further.

Thanks,
dave dandeneau

-Original Message-
From: Patrick Logé [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 8:20 AM
To: Struts Users Mailing List
Subject: RE: Memory consumption of tags


We plan to do so using WS 3.5.4, and we should
have some load...

you'r frighten me :(



Has anyone running Struts on Websphere noticed these
oddities as well or maybe explain the reason for this?

/Johannes

_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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


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


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




html:file and action

2002-02-22 Thread Henry Lu

I got error:
javax.servlet.ServletException: MultipartIterator: no multipart request


my JSP file has:
html:form method=post action=/saveIdForm enctype=multipart/form-data
html:file property=myfile/
...

and my ActionForm has:

private FormFile myfile;

// getter and setter

What is wrong?


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372



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




RE: Nesting Tiles within each other problem

2002-02-22 Thread Ian Beaumont

  You should either do  :
   * Pass the attribute value when you insert the page
   * Insert a definition using the page as layout, and declaring the
attribute

I'm not clear what you mean by either of these statements.

What I want to achieve is for all my pages to have a base layout, and some
of the pages have a slightly more complex layout, which itself is based on
the base layout.

Thanks
Ian

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: 22 February 2002 14:08
To: Struts Users Mailing List
Subject: Re: Nesting Tiles within each other problem



  In your example, you insert definition /top, which by extensions use
'base.jsp' as layout. In this later, you do insert attribute=body /.
Body
value is page /middle.jsp, wich is inserted. But, /midle.jsp is a page, not
a
definition. In /midle.jsp, you do insert attribute=anotherBody /, but
anotherBody is not defined for the page.

  You should either do  :

   * Pass the attribute value when you insert the page
   * Insert a definition using the page as layout, and declaring the
attribute

  Cedric

Ian Beaumont wrote:

 I access it by going to /myPage.do.  Here is an extract from the
 struts-config.

 actionpath=/myPage
type=com.categoric.criticallogistix.client.DoFirst
 scope=request 
   forward name=success  path=/top/
 /action

 DoFirst is just
 import org.apache.struts.action.*;
 import javax.servlet.http.*;

 public class DoFirst extends Action {

 public ActionForward perform(
 ActionMapping aMapping,
 ActionForm aForm,
 HttpServletRequest aRequest,
 HttpServletResponse aResponse
 ) {
 return aMapping.findForward(success);
 }

 -Original Message-
 From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 13:36
 To: Struts Users Mailing List
 Subject: Re: Nesting Tiles within each other problem

   Sure it is possible.
   In your example, what url do you use to access the page ?
   Remember that a definition name is a logical name. It can not be used as
 an
 url. You can use it in insert name=defName /, or as the path of a
Struts
 forward.

 Ian Beaumont wrote:

  I have a page, which uses tiles:insert to insert another page that
also
  has a tiles:insert.  Is this possible?  I just keep getting a servlet
  exception.  Below is a simplified example of what I'm doing.
 
  base.jsp
  %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
  html:html locale=true
  body
  tiles:insert attribute=body/
  /body
  /html:html
 
  middle.jsp
  %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
  tiles:insert attribute=anotherBody/
 
  top.jsp
  pHello World/p
 
  From tiles definition
  definition name=/baseLayout path=/base.jsp
put name=body value=/
  /definition
 
  definition name=/middleLayout extends=/baseLayout
put name=body value=/middle.jsp/
put name=anotherBody value=/
  /definition
 
  definition name=/top extends=/middleLayout
put name=anotherBody value=/top.jsp/
  /definition
 
  The error I get on trying to display the page 'top' is:
  ServletException in:/middle.jsp] Error - Tag Insert : No value found for
  attribute 'anotherBody'.'
  Thanks
  Ian Beaumont

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


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



Indexed Properties

2002-02-22 Thread Sridhar M

Hi,
  I have a requirement wherein my HTML Form contains
around 100 textfields. I want to use struts to handle
this form automatically. But the problem is that I
can't define 100 setter and getter methods.I tried
using indexed properties with form beans but did not
succeed. 

Does Struts support the indexed properties concept
defined by Javabeans. If so how to implement it.

Thanks in advance,
Sridhar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Re: Indexed Properties

2002-02-22 Thread Arron Bates

Sridhar,

I've had to make one such application of equally nasty size. To get the 
job done the nested tags were made. They made the truly daunting task a 
walk in the park.
They're in the nightly build, or if you're confined to an earlier 
release of Struts you can get them as a separate jar here...

http://www.keyboardmonkey.com/struts

Link above will also provide a primer, tutorial, and some advanced 
tricks. The latest docco is on the nightly build part of the struts site 
documentation.

Arron.

Sridhar M wrote:

Hi,
  I have a requirement wherein my HTML Form contains
around 100 textfields. I want to use struts to handle
this form automatically. But the problem is that I
can't define 100 setter and getter methods.I tried
using indexed properties with form beans but did not
succeed. 

Does Struts support the indexed properties concept
defined by Javabeans. If so how to implement it.

Thanks in advance,
Sridhar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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





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




RE: Struts tag for label

2002-02-22 Thread Yu, Yanhui

Could you try to change disabled=true to readonly?  or there is a readonly
in struts?

Yanhui




-Original Message-
From: Jakkampudi, ChandraseKhar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Struts tag for label


Is there a way to have display only properties on a form? For example, I
want to display UserID as non-editable field and address as editable. I
cannot use the disabled attribute on text tag because these values are not
passed to the server and I need the userID to edit proper values.

I am doing something weird like using both 
html:text property=userID  disabled=true/
html:hidden property=userID/

The text tag is used to display the data and the hidden variable passes the
data to the action form. Seems kludey but it works. Is there a better way.
Maybe a tag that can store additional information about a form that is not
an input field.

Maris: Try my suggetion and see if that works for you.

JC

-Original Message-
From: Maris Orbidans [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:35 AM
To: Struts Users Mailing List
Subject: Struts tag for label



hello

What if I want to just display some property of form bean (without any
input field) ?
Is there a tag for it ?


thanx in advance

Maris Orbidans
Data Pro


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

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




how to use an images for submit, cancel button etc

2002-02-22 Thread KM

Hi

I am trying to develop a page where the user has to
select options from a drop down box and either clicks
submit or cancel. The submit and cancel options are
images instead of a button

Following is my code


tr
td align=right
  logic:equal name=subscriptionForm
property=action
  scope=request value=Create
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Delete
html:submit
  bean:message key=button.confirm/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Edit
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
/td
td align=left
  logic:notEqual name=subscriptionForm
property=action
 scope=request value=Delete
html:reset
  bean:message key=button.reset/
/html:reset
  /logic:notEqual
  nbsp;
  html:cancel
bean:message key=button.cancel/
  /html:cancel
/td
  /tr

here instead of the save, reset, cancel buttons I
would like to user save.gif, reset.gif, cancel.gif etc
.How to set up struts to use this.. 

Any tips on how to do this is appreciated

KM



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




RE: Development Environment

2002-02-22 Thread Yu, Yanhui

Windows 2000, WSAD (used to VAJ + WebSphereStudio)

-Original Message-
From: Jonathan James [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 11:51 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Development Environment


Windows 2000, cygwin  vim

- Original Message -
From: Dave Wellman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 11:41 AM
Subject: Development Environment


 Hello,

 Quick question, what is the preferred development environment that you are
 all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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





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




RE: Memory consumption of tags

2002-02-22 Thread Johannes Carlén

Well, actually, look at the code Tomcat generated:

org.apache.struts.taglib.bean.WriteTag writeTag = new
org.apache.struts.taglib.bean.WriteTag();
writeTag.setPageContext(pageContext);
writeTag.setParent(_jspx_th_html_html_0);
writeTag.setName(testBean);
writeTag.setProperty(value);
try {
int result = writeTag.doStartTag();
if (result ==
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_BUFFERED)
throw new JspTagException(Since tag handler class
org.apache.struts.taglib.bean.WriteTag does not
implement BodyTag, it can't return
BodyTag.EVAL_BODY_TAG);
if (result != javax.servlet.jsp.tagext.Tag.SKIP_BODY)
{
do {
// end
// begin
[file=/testWrite.jsp;from=(16,0);to=(16,46)]
} while (writeTag.doAfterBody() ==
javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN);
}
if (writeTag.doEndTag() ==
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
return;
} finally {
writeTag.release();
}

It doesn't make any calls to the introspecthelper
method at all. It sets the attributes on the tag
directly. So websphere does some extra work here...
Could this be recognized as a bug? Or is it just an
old way of handling tags?

/Johannes


 --- Dave J Dandeneau [EMAIL PROTECTED]
wrote:
 We actually opened a support issue with WebSphere
 because our JSPs were generating Branch too large
 exceptions in Websphere but in no other servers.
 They told us that there was an optimization in the
 works that a client is testing but it is not public
 yet. 
 
 Here is what the jsp compiler generates for each
 message tag on Websphere 4.0.1:
 
 MessageTag messagetag = new MessageTag();
 messagetag.setPageContext(pagecontext);
 messagetag.setParent(htmltag);
 JspRuntimeLibrary.introspecthelper(messagetag,
 key, Loginlogout.login.title, null, null,
 false);
 try
 {
   int k = messagetag.doStartTag();
   if(k == 2)
 throw new JspTagException(Since tag handler
 class org.apache.struts.taglib.bean.MessageTag does
 not implement BodyTag, it can't return
 BodyTag.EVAL_BODY_TAG);
  
   if(k == 0);
   
   if(messagetag.doEndTag() == 5)
   {
 return;
   }
 } finally {
   messagetag.release();
 }
 ((JspWriter) (obj3)).print(_jspx_html_data[6]);
 
 It doesn't look like too many objects are created,
 but it seems like there may be some way to optimize
 it further.
 
 Thanks,
 dave dandeneau
 
 -Original Message-
 From: Patrick Logé [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 8:20 AM
 To: Struts Users Mailing List
 Subject: RE: Memory consumption of tags
 
 
 We plan to do so using WS 3.5.4, and we should
 have some load...
 
 you'r frighten me :(
 
 
 
 Has anyone running Struts on Websphere noticed these
 oddities as well or maybe explain the reason for
 this?
 
 /Johannes
 

_
 Hitta snörapporter... 
 från 500 olika skidorter i Europa
 på http://se.snow.yahoo.com
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
  

_
Hitta snörapporter... 
från 500 olika skidorter i Europa
på http://se.snow.yahoo.com

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




Multiple Fields In Struts

2002-02-22 Thread Lundin, Michael


Hello,

I am new to struts and am trying to get a set of multiple fields to work on
both the request and response page.  The page needs to be able to display a
set of fields that are determined at runtime (therefore no specific set and
get methods can be used).  I've got it working under a non-struts
environment, but can't get it to work under struts.

My main question is how to turn it into struts and still keep the same
functionality.  If I just change the form elements to Struts HTML elements,
it doesn't function (with an Action object that simply forwards it onto the
results page).  

Here's what I have for the non-struts solution:

Initial Page: 

html
headtitleJSP Page/title/head
body
jsp:useBean id=multitest scope=request
class=com.summitsite.trueimage.MultiBean /

form action=MultiResults.jsp
%  String[] fieldNames = multitest.getDocumentFieldNames();
String currentName = null;
for (int i = 0; i  10; i++) { 
currentName = fieldNames[i];
p%= currentName %: input type=hidden name=fieldName
value=%= currentName % /
input type=text name=documentSearchField size=40
//p
   % } %
input type=submit value=Submit/
/form
/body
/html

Results Page:

html
headtitleJSP Page/title/head
body

jsp:useBean id=multitest scope=request
class=com.summitsite.trueimage.MultiBean
/jsp:useBean

%  

String[] setFields =
request.getParameterValues(documentSearchField);
String[] setNames  = request.getParameterValues(fieldName);
if (setFields != null) {
for (int i = 0; i  setNames.length; i++) {
multitest.setDocumentSearchField(i, setFields[i]);
multitest.setFieldName(i, setNames[i]);
}
for (int i = 0; i  setNames.length; i++) {
out.println(p + multitest.getFieldName(i) + : 
+ multitest.getDocumentSearchField(i) + /p);
}
}
%

/body
/html

Bean:

public class MultiBean extends ActionForm implements Serializable {

private String[] documentSearchField = new String[50];
private String[] fieldName   = new String[50];

public MultiBean() {
}

public String[] getDocumentSearchField() {
System.out.println(String[] getDocumentSearchField());
return documentSearchField;
}

public void setDocumentSearchField(String[] fields) {
System.out.println(void setDocumentSearchField(String[]
fields));
this.documentSearchField = fields;
}

public String getDocumentSearchField(int i) {
System.out.println(String getDocumentSearchField(int i));
return documentSearchField[i];
}

public void setDocumentSearchField(int i, String field) {
System.out.println(void setDocumentSearchField(int i,
String field));
this.documentSearchField[i] = field;
}

public String[] getDocumentFieldNames() {
System.out.println(String[] getDocumentFieldNames());
String[] array = new String[15];

for (int i = 0; i  array.length; i++) {
array[i] = Field  + i;
}

return array;
}


public String[] getFieldName() {
return fieldName;
}

public void setFieldName(String[] fields) {
this.fieldName = fields;
}

public String getFieldName(int i) {
return fieldName[i];
}

public void setFieldName(int i, String field) {
this.fieldName[i] = field;
}
}


Any assistance would be greatly appreciated.  Thanks,

Michael Lundin

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




looking for html taglib...

2002-02-22 Thread bwml

Hi,

Does someone can help me to find a jsp taglib as struts but for basics html tags like 
table,td, and so on..

thanks for your help
Gaetan

--
NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar...
Web/Wap : www.netcourrier.com
Téléphone/Fax : 08 92 69 00 21 (0,34 E TTC/min - 2,21 F TTC/min)
Minitel: 3615 NETCOURRIER (0,15 E TTC/min - 1,00 F TTC/min)


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




Re: Indexed Properties

2002-02-22 Thread Erik Tennant

I've had repeated problems with IE and Netscape on win9x platforms using a 
large number of text fields.  The browser display seems to become corrupt 
after a short period of time using the screens.  It might be worth your 
time to mock up some screens on your target platform(s) and make sure you 
don't encounter similar problems.

-Erik

At 08:48 AM 2/22/2002, Sridhar M wrote:
Hi,
   I have a requirement wherein my HTML Form contains
around 100 textfields. I want to use struts to handle
this form automatically. But the problem is that I
can't define 100 setter and getter methods.I tried
using indexed properties with form beans but did not
succeed.

Does Struts support the indexed properties concept
defined by Javabeans. If so how to implement it.

Thanks in advance,
Sridhar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


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




How do I use onblur for text tag

2002-02-22 Thread Boyalla, Raveendra

Hi 

How do I use onBlur for text tag

Thank you
Raveendra

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




logic tag

2002-02-22 Thread Dua, Amit

Hi 
how can I compare two variables which are stored in my session attribute by
using the
logic tag.

As what I know is the logic:equal / or any other comparison tag compares
the value with a constant.


any suggestions.

Thanks
Amit

-Original Message-
From: Boyalla, Raveendra [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:58 AM
To: '[EMAIL PROTECTED]'
Subject: How do I use onblur for text tag


Hi 

How do I use onBlur for text tag

Thank you
Raveendra

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

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




[OT] ServletExceptions in StartupServlet Logging

2002-02-22 Thread Matt Raible

Is it possible with Log4j or other logging mechanisms to show
ServletExceptions in the console.  They show up fine in my tomcat
logfile, but not in the stdout.  

In tomcat's log file I get:

2002-02-22 10:09:52 StandardContext[/onpoint]: Servlet /onpoint threw
load() exception
javax.servlet.ServletException: 'repositoryRootDir' Context Parameter is
not a valid directory
at
com.onpoint.webapp.StartupServlet.init(StartupServlet.java:90)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j
ava:3267)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3384
)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454)
at
org.apache.catalina.core.StandardHost.install(StandardHost.java:712)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:599)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:777)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:46
3)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:155)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
at
org.apache.catalina.core.StandardService.start(StandardService.java:388)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
at
org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
at
org.apache.catalina.startup.Catalina.process(Catalina.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)

And I wan this to show up in either my application log or stdout so
System Administrators can see it - is this possible?

Here is my log4j.properties file:

log4j.rootCategory=info, stdout, R

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%p [%t] [%c] %C{1}.%M(%L)
| %m%n

log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=onpoint.log

log4j.appender.R.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R.MaxBackupIndex=1

log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n

# If programmed properly the most messages would be at DEBUG 
# and the least at FATAL.

# Options are: DEBUG, INFO, WARN, ERROR, FATAL
log4j.category.Init=DEBUG
log4j.category.Digester=FATAL
log4j.category.Config=FATAL
log4j.category.Actions=DEBUG
log4j.category.Repository=FATAL
log4j.category.Persister=FATAL
log4j.category.Translator=DEBUG
log4j.category.Cache=FATAL
log4j.category.Validator=FATAL
log4j.category.Registry=FATAL
log4j.category.Event=FATAL
log4j.category.Filter=DEBUG
log4j.category.Test=DEBUG



RE: how to use an images for submit, cancel button etc

2002-02-22 Thread Todd G. Nist

You could try something like the below:

for cancel you could do this:

html:image src=images/cancel.gif border=0
property=org.apache.struts.taglib.html.CANCEL/

for the others you would need to do something like:
html:link href=javascript:submit();
html:image src=images/save.gif value=save border=0/
/html:link

Regards,

Todd G. Nist

-Original Message-
From: KM [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:27 AM
To: Struts Users Mailing List
Subject: how to use an images for submit, cancel button etc


Hi

I am trying to develop a page where the user has to
select options from a drop down box and either clicks
submit or cancel. The submit and cancel options are
images instead of a button

Following is my code


tr
td align=right
  logic:equal name=subscriptionForm
property=action
  scope=request value=Create
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Delete
html:submit
  bean:message key=button.confirm/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Edit
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
/td
td align=left
  logic:notEqual name=subscriptionForm
property=action
 scope=request value=Delete
html:reset
  bean:message key=button.reset/
/html:reset
  /logic:notEqual
  nbsp;
  html:cancel
bean:message key=button.cancel/
  /html:cancel
/td
  /tr

here instead of the save, reset, cancel buttons I
would like to user save.gif, reset.gif, cancel.gif etc
.How to set up struts to use this..

Any tips on how to do this is appreciated

KM



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




RE: how to use an images for submit, cancel button etc

2002-02-22 Thread Boyalla, Raveendra

Hi


How can I code for onBlur event of a Text tag.


Regards,

Raveendra Boyalla

-Original Message-
From: Todd G. Nist [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:13 AM
To: 'Struts Users Mailing List'
Subject: RE: how to use an images for submit, cancel button etc 


You could try something like the below:

for cancel you could do this:

html:image src=images/cancel.gif border=0
property=org.apache.struts.taglib.html.CANCEL/

for the others you would need to do something like:
html:link href=javascript:submit();
html:image src=images/save.gif value=save border=0/
/html:link

Regards,

Todd G. Nist

-Original Message-
From: KM [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:27 AM
To: Struts Users Mailing List
Subject: how to use an images for submit, cancel button etc


Hi

I am trying to develop a page where the user has to
select options from a drop down box and either clicks
submit or cancel. The submit and cancel options are
images instead of a button

Following is my code


tr
td align=right
  logic:equal name=subscriptionForm
property=action
  scope=request value=Create
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Delete
html:submit
  bean:message key=button.confirm/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Edit
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
/td
td align=left
  logic:notEqual name=subscriptionForm
property=action
 scope=request value=Delete
html:reset
  bean:message key=button.reset/
/html:reset
  /logic:notEqual
  nbsp;
  html:cancel
bean:message key=button.cancel/
  /html:cancel
/td
  /tr

here instead of the save, reset, cancel buttons I
would like to user save.gif, reset.gif, cancel.gif etc
.How to set up struts to use this..

Any tips on how to do this is appreciated

KM



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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


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




Re: Display taglib

2002-02-22 Thread Sriram Nookala

My working example is as below:


%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/display.tld prefix=display %


display:table width=75% name=seglist
display:column property=name title=Name
  href=/campaignapp/do/segment/details paramId=id paramProperty=id
/
display:column property=sql title=SQL /
/display:table

html:form action=/segment/details
 html:submit property=submit value=New Segment/
/html:form

- Original Message -
From: Steve Earl [EMAIL PROTECTED]
To: 'Struts Users Mailing List' (E-mail) [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 11:26 AM
Subject: Display taglib


 Oh my godanother Friday nightmare...

 Has anyone got a working example of the use of the Ed Hill's Display Tag
 Library to show a table being formatted
 from a collection of objects held on the request.
 I can't get the examples and documentation to make much sense. Do I need
to
 import the java.collection and the
 object class itself into the jsp page??

 very confused and going home...!
 regards,
 steve



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



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




Re: Nesting Tiles within each other problem

2002-02-22 Thread Cedric Dumoulin

  What doesn't work in your example is that at a time you insert page
/middle.jsp without passing it any attribute. This page use  an attribute in its
insert tag. You have two solution to pass the attribute :

   * while you do the insert :
  middle.jsp
 %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
 tiles:insert attribute=anotherBody
   tiles:put beanName=anotherAttribute beanScope=tile/
 /tiles:insert

   * By defining a definition declaring the attribute, and then use the
 definition name rather than the page url.

  Remember that Tiles attribute values passed to a tile are only visible inside
this tile, not from its parent, neither from sub-tiles.

  Doesn't the following solution met your needs ? :

definition name=simpleLayout path=/simpleLayout.jsp
   put name=title value=aBody/
   put name=header value=aHeader/
   put name=footer value=aFooter/
   put name=menu value=amenu/
 /definition

definition name=complexLayout path=/complexLayout.jsp
extends=simpleLayout
   put name=header value=complexHeader/
   put name=secondHeader value=anotherHeader/
 /definition

definition name=aSimplePage extends=simpleLayout
   put name=body value=aPageBody/
 /definition

definition name=aComplexPage extends=complexLayout
   put name=body value=aPageBody2/
 /definition

  Cedric


Ian Beaumont wrote:

   You should either do  :
* Pass the attribute value when you insert the page
* Insert a definition using the page as layout, and declaring the
 attribute

 I'm not clear what you mean by either of these statements.

 What I want to achieve is for all my pages to have a base layout, and some
 of the pages have a slightly more complex layout, which itself is based on
 the base layout.

 Thanks
 Ian

 -Original Message-
 From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
 Sent: 22 February 2002 14:08
 To: Struts Users Mailing List
 Subject: Re: Nesting Tiles within each other problem

   In your example, you insert definition /top, which by extensions use
 'base.jsp' as layout. In this later, you do insert attribute=body /.
 Body
 value is page /middle.jsp, wich is inserted. But, /midle.jsp is a page, not
 a
 definition. In /midle.jsp, you do insert attribute=anotherBody /, but
 anotherBody is not defined for the page.

   You should either do  :

* Pass the attribute value when you insert the page
* Insert a definition using the page as layout, and declaring the
 attribute

   Cedric

 Ian Beaumont wrote:

  I access it by going to /myPage.do.  Here is an extract from the
  struts-config.
 
  actionpath=/myPage
 type=com.categoric.criticallogistix.client.DoFirst
  scope=request 
forward name=success  path=/top/
  /action
 
  DoFirst is just
  import org.apache.struts.action.*;
  import javax.servlet.http.*;
 
  public class DoFirst extends Action {
 
  public ActionForward perform(
  ActionMapping aMapping,
  ActionForm aForm,
  HttpServletRequest aRequest,
  HttpServletResponse aResponse
  ) {
  return aMapping.findForward(success);
  }
 
  -Original Message-
  From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
  Sent: 22 February 2002 13:36
  To: Struts Users Mailing List
  Subject: Re: Nesting Tiles within each other problem
 
Sure it is possible.
In your example, what url do you use to access the page ?
Remember that a definition name is a logical name. It can not be used as
  an
  url. You can use it in insert name=defName /, or as the path of a
 Struts
  forward.
 
  Ian Beaumont wrote:
 
   I have a page, which uses tiles:insert to insert another page that
 also
   has a tiles:insert.  Is this possible?  I just keep getting a servlet
   exception.  Below is a simplified example of what I'm doing.
  
   base.jsp
   %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
   html:html locale=true
   body
   tiles:insert attribute=body/
   /body
   /html:html
  
   middle.jsp
   %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles %
   tiles:insert attribute=anotherBody/
  
   top.jsp
   pHello World/p
  
   From tiles definition
   definition name=/baseLayout path=/base.jsp
 put name=body value=/
   /definition
  
   definition name=/middleLayout extends=/baseLayout
 put name=body value=/middle.jsp/
 put name=anotherBody value=/
   /definition
  
   definition name=/top extends=/middleLayout
 put name=anotherBody value=/top.jsp/
   /definition
  
   The error I get on trying to display the page 'top' is:
   ServletException in:/middle.jsp] Error - Tag Insert : No value found for
   attribute 'anotherBody'.'
   Thanks
   Ian Beaumont
 
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]

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

Re:Help on WebSphere installation

2002-02-22 Thread Ben Liang

I am trying to install Struts under WS 3.5.4, but could not find a correct
version of xerces.jar to get it work. I downloaded
java_xml_pack-winter-01_01-dev which include JAXP 1.2, and put the
xerces.jar under WS /servlets. And I get this error from the log:

[02.02.22 11:26:24:062 CST] ecd486c1 WebGroup  A SRVE0092I: [Servlet
LOG]: database: Database load exception:
org.xml.sax.SAXNotRecognizedException: http://xml.org/sax/features/raw-names
 at org.xml.sax.SAXException.init(SAXException.java:45)
 at
org.xml.sax.SAXNotRecognizedException.init(SAXNotRecognizedException.java:
38)
 at
org.apache.xerces.parsers.AbstractSAXParser.setFeature(AbstractSAXParser.jav
a:1289)
 at
org.xml.sax.helpers.XMLReaderAdapter.setupXMLReader(XMLReaderAdapter.java:20
4)
 at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:193)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at org.apache.struts.digester.Digester.parse(Digester.java:755)
 at
org.apache.struts.webapp.example.DatabaseServlet.load(DatabaseServlet.java:2
51)

Then I try to put another version of xerces.jar that I've been using to
replace the one come from Sun, and I got another error:
[02.02.22 10:57:32:125 CST] ecf40f0d ServletInstan X Uncaught init()
exception thrown by servlet {0}: {1}
 action
 javax.servlet.ServletException:
org.apache.xerces.dom.NodeImpl: method
init(Lorg/apache/xerces/dom/DocumentImpl;)V not found

The doc said I need JAXP1.0.1, but I can't find from Sun's site anymore. Any
suggestion???

Ben


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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




RE: EJB = bad = MS.net

2002-02-22 Thread Joseph Barefoot

IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are getting
hairy these days :)

-Original Message-
From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 4:15 AM
To: dIon Gillard; Struts Users Mailing List
Subject: Re: EJB = bad = MS.net


location independence means independent of location, that is all.

if you're implementing two interfaces to do (more or less) the exact same
thing, and one is called local and one is called remote that is
absolutely *not*, by any stretch of the imagination,  location
independent. _end of story_.

with EJBs the method call does not appear to be remote, because it is
*explicitly* remote.  the method is in a RemoteInterface and throws a
RemoteException for crying out loud!

furthermore, it's not about box1 vs box12.  to be more precise, it's about
vm1 vs. vm12.  and, if you are writing a client, your client has business
logic to take care of.  it's the servers responsibility to determine
whether it should call a method at vm1 or at vm12.

IMNSHO, this is the achilles heel of EJB.

--e--



On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:

The method call can take place anywhere, but always appears to be
remote. That could be many remote machines though. Location independence
is not about local vs remote, it's more about box1 vs box12.





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


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




RE: EJB = bad = MS.net

2002-02-22 Thread Malcolm Davis

Is there an off-ramp section for EJB flares?
People can write cramp in any language or technology.
This is a Struts Mailing List.

   -Original Message-
   From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 22, 2002 6:15 AM
   To: dIon Gillard; Struts Users Mailing List
   Subject: Re: EJB = bad = MS.net
  
  
   location independence means independent of
   location, that is all.
  
   if you're implementing two interfaces to do
   (more or less) the exact same
   thing, and one is called local and one is
   called remote that is
   absolutely *not*, by any stretch of the
   imagination,  location
   independent. _end of story_.
  
   with EJBs the method call does not appear to
   be remote, because it is
   *explicitly* remote.  the method is in a
   RemoteInterface and throws a
   RemoteException for crying out loud!
  
   furthermore, it's not about box1 vs box12.  to
   be more precise, it's about
   vm1 vs. vm12.  and, if you are writing a
   client, your client has business
   logic to take care of.  it's the servers
   responsibility to determine
   whether it should call a method at vm1 or at vm12.
  
   IMNSHO, this is the achilles heel of EJB.
  
   --e--
  
  
  
   On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
  
   The method call can take place anywhere, but
   always appears to be
   remote. That could be many remote machines
   though. Location independence
   is not about local vs remote, it's more about
   box1 vs box12.
   
  
  
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  


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




is there a way to bring up simple js windows for prompts rather thancreating a form?

2002-02-22 Thread theron . kousek


Hi Folks:

Pardon my ignorance.You guys have been a great help.Only been using
struts for a week or so.

Here's the scenario:

Step 1
Screen 1 has a menu of html:link
- Add Biller
- Edit Biller
- View Biller

Step 2
When you click Edit or View, I bring up another form (Screen 2) to prompt
for the Billing ID.

Step 3
I bring up the actual billing form screen using the Billing ID entered in
Step 2/Screen 2

Now for the question:
- For step 2, I had to create an action an a really simple form just to get
the billing id from the window.   This is kind of a pain.   I was wondering
if Step 2 can be eliminated in favor of some kind of JavaScript prompting
window (called from Step 1) that will get the billingid and forward that
BillingID as a part of the html:link in Step 1/Screen 1?

thanks for any help,
Theron





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




Token questions

2002-02-22 Thread Press, Michael

I see that a token can be set and queried by Action classes as a way of
verifying that a certain flow from page A to page B has occurred.
 
Can I have more than 1 token at a time for 1 user in an application?  I
might want to verify flow A-B and separately, C-D, but if there's only 1
token than A-D might work, even though it's not valid.
 
If so, how do I differentiate my tokens, since the call
isTokenValid(request) just passes the request, not a token name?
 
Thanks,
Michael
 
 
 
 

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




viewing email from this list

2002-02-22 Thread Sarah Farrell

Is anyone *not* having problems viewing the email from this list?  And if
you aren't having problems, what email program are you using?  (Never mind
if you're using Pine on Unix.)

My email client, Eudora, hides some of the text if it looks like an HTML
tag.  I can only see it if I view source and there's no way to turn HTML
viewing off.  I can send as text only but I can't set it to view as
text only.

Suggestions?

-- Sarah


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




Re: is there a way to bring up simple js windows for prompts rather thancreating a form?

2002-02-22 Thread John M. Corro

At a glance this might be an option

On the popup screen generate a list of valid Billing IDs and on each link
set href=# and onclick=selectBillingID(bean:write); return false;.
The selectBillingID method will call a method of the parent browser (ie the
one that it popped up from).  The method of the parent browser will populate
the field on the main form.

If it's not possible/feasible to generate a listing of Billing ID links, you
can always use a straight text box (using plain HTML input tag, not the
Struts tag) and maybe have the user click a button when they've typed in the
billing id.  Set the button onPress=selectBillingID().  In this case, you
might want to read the user entered ID from the actual selectBillingID()
method.  Here you wouldn't need to create a custom Action form since the
ActionForm for the parent page will be able to do validation.

Don't know if there's a cleaner way.

- Original Message -
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 12:24 PM
Subject: is there a way to bring up simple js windows for prompts rather
thancreating a form?



 Hi Folks:

 Pardon my ignorance.You guys have been a great help.Only been
using
 struts for a week or so.

 Here's the scenario:

 Step 1
 Screen 1 has a menu of html:link
 - Add Biller
 - Edit Biller
 - View Biller

 Step 2
 When you click Edit or View, I bring up another form (Screen 2) to prompt
 for the Billing ID.

 Step 3
 I bring up the actual billing form screen using the Billing ID entered in
 Step 2/Screen 2

 Now for the question:
 - For step 2, I had to create an action an a really simple form just to
get
 the billing id from the window.   This is kind of a pain.   I was
wondering
 if Step 2 can be eliminated in favor of some kind of JavaScript prompting
 window (called from Step 1) that will get the billingid and forward that
 BillingID as a part of the html:link in Step 1/Screen 1?

 thanks for any help,
 Theron





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





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




Re: PLEASE, HELP !!! upload problem

2002-02-22 Thread Eddie Bush

I uploaded graphics just fine just now.  My code is slightly different than
yours.  I simply call the getFileData() method of FormFile to return the
data, and write it all out at once.  Then flush the buffer and close the
file.

Try something along the lines of:

FormFile ff = ... get the FormFile field

FileOutputStream fos = new FileOutputStream(/some/path/ +
ff.getFileName());

fos.write(ff.getFileData());
fos.flush();
fos.close();

If you still have problems let us know.  I have to warn you, however, that
people don't seem to care about file uploads.  I asked for help and never
got it.  Of course my mistakes were because I was new, and a small amount of
experimentation got me where I needed to go, but it's still annoying to be
totally ignored.

Hope that helps!  Let us know if it does not.

Eddie

- Original Message -
From: Serge A. Redchuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 2:17 AM
Subject: PLEASE, HELP !!! upload problem


 Hello All !

 I use the Struts v.1.0.2

 Unfortunatelly I can't realize file uploading.

 And the most confusing that I have 2 different errors on different
 files with the same code.

 Here's my form:

 html:form action=/addImage.do enctype=multipart/form-data 
 html:hidden property=pkPartner /
 html:file property=imgFile /
 br
 html:submit property=submit value=Save /
 html:reset/
 /html:form

 Here's form bean:
 ...
 public final class ImagesPartnerForm extends ActionForm {
   private String pkPartner = null;
   private FormFile imgFile = null;
   ...
   public FormFile getImgFile(){
 return this.imgFile;
   }
   public void setImgFile( FormFile imgFile ){
 this.imgFile = imgFile;
   }
   public void reset( ActionMapping mapping, HttpServletRequest request ){
 pkPartner = (String)request.getAttribute( pkPartner );
 imgFile = null;
   }
 ...

 Here's action that handles form data:
 public final class AddImage extends ActionExt {
   public ActionForward perform( ActionMapping mapping, ActionForm form,
  HttpServletRequest request, HttpServletResponse response, String
userName )
 throws IOException, ServletException
   {
 String subpath = /partner;
 String targetDir = ResourceHandler.getProperty( global,
   pictures.dyn.abs-root ) + subpath;
 String dbPath = ResourceHandler.getProperty( global,
   pictures.dyn.rel-root ) + subpath;
 ImagesPartnerForm iform = (ImagesPartnerForm)form;
 FormFile ff = iform.getImgFile();
 //
 String name = ff.getFileName();
 String targetFile = targetDir + / + name;
 String dbFile = dbPath + / + name;
 // Save file to filesystem
 java.io.DataInputStream dis = new java.io.DataInputStream(
   ff.getInputStream() );
 java.io.DataOutputStream dos = new java.io.DataOutputStream(
   new java.io.FileOutputStream( targetFile ) );
 for( int i = 0; i  ff.getFileSize(); i++ ){
   dos.writeByte( dis.readByte() );
 }
 dos.flush();
 dos.close();
 dis.close();

 return new ActionForward( /jsp/partner/test.jsp );
   }
 }

 ERRORS:
 0) short text file was uploaded without any corruption, but:

 1) One jpeg file was uploaded, but had less size then source.

 2) Other jpeg file uploading caused an exception:

 javax.servlet.ServletException: IOException while reading file element:
Premature end of stream while reading multipart request
 at
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
java:222)
 at
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
partRequestHandler.java:76)
 at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
 at
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
61)
 at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
 at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


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



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




RE: struts-user Digest 22 Feb 2002 17:34:22 -0000 Issue 1164

2002-02-22 Thread Pierce, Britt


I have to admit that I have not read all of the messages in this thread, so
I apologies if I am repeating anything...

But, I found in the archives that you can check to see if an image button is
clicked you can do it on the server side by looking for the .x or .y
property.  

So, for example, to check to see if an image button with property=cancel
was clicked, you would do this in the action class:

Enumeration attr = request.getParameterNames();
String att;
while(attr.hasMoreElements()){
att = ( String )attr.nextElement();
if ( att.equals( cancel.x )) {  
return (mapping.findForward( canceled ));

}
You could then use this in your JSP to display your image button:
html:image src=images/cancel.gif property=cancel.

The problem with image buttons is the browser does not return the 'value' of
the button, unlike a submit button.  Instead, an image button returns the
x/y position of the mouse click.  The above code will table up all of the
properties and check to see if the x' property of cancel was created.  If
it exists, the button was clicked.  Again, unlike submit buttons, you can
NOT check the value because the browser never passes it.



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




Re: Exception handling best-practise

2002-02-22 Thread Jonathan Fuerth

On Fri, Feb 22, 2002 at 04:58:28AM -0500, Ted Husted wrote:
 IMHO, the messages and the messages keys belong to the model. The
 controller is simply transferring this data to the view, as it does with
 everything else, like records from a database. 

Aha, that makes perfect sense to me!  Thanks for clarifying that.  I'm
sure I would have worked myself into a real mess while labouring under
that misconception. :)

 In most cases, exceptions can be converted to ActionErrors. I would try
 and do all of this in the Action, so that the view doesn't have to
 think about anything. Also, in the Action it is much easier to access
 utility methods to parse the exception for you. A base method for your
 Actions might be able to do everything; so in the main perform, all you
 end up doing is passing back the instant request, ActionError object,
 and the exception. A base method could handle it from there. 

This sounds like a good plan.  Would this base class also be an
appropriate place to acquire a Connection, then make sure it's
released using try .. finally around the call to the subclass?  I'm
getting connections via a getConnection call in my custom LoginSession
class, which I plan to hook up with Poolman later on.

Thanks again for your help.

-- 
Jonathan Fuerth - SQL Power Group Inc.
(416)218-5551 (Toronto); 1-866-SQL-POWR (Toll-Free)
Unleash the Power of your Corporate Data - www.sqlpower.ca

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




Dynamic form fields

2002-02-22 Thread John Regan

I've searched the mail list and cannot find a clear answer to this one!
Here is an example of what I need:
A user enters the # of Travelers for their vacation in the first jsp of the
sequence.
In the second jsp I want to display an  html:text input field for each
traveler's age.

what is the simplest way to accomplish this using Struts?

Thank you for any response.

JBR




RE: logic tag

2002-02-22 Thread Dua, Amit

no response from any one so far

-Original Message-
From: Dua, Amit 
Sent: Friday, February 22, 2002 12:03 PM
To: 'Struts Users Mailing List'
Subject: logic tag


Hi 
how can I compare two variables which are stored in my session attribute by
using the
logic tag.

As what I know is the logic:equal / or any other comparison tag compares
the value with a constant.


any suggestions.

Thanks
Amit

-Original Message-
From: Boyalla, Raveendra [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 11:58 AM
To: '[EMAIL PROTECTED]'
Subject: How do I use onblur for text tag


Hi 

How do I use onBlur for text tag

Thank you
Raveendra

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

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

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




Re: EJB = bad = MS.net

2002-02-22 Thread David Smith

I'm staying out of this discussion, but to answer your question --

IMNSHO = In My Not So Humble Opinion

--David

On Friday 22 February 2002 01:03 pm, you wrote:
 IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are getting
 hairy these days :)

 -Original Message-
 From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 4:15 AM
 To: dIon Gillard; Struts Users Mailing List
 Subject: Re: EJB = bad = MS.net


 location independence means independent of location, that is all.

 if you're implementing two interfaces to do (more or less) the exact same
 thing, and one is called local and one is called remote that is
 absolutely *not*, by any stretch of the imagination,  location
 independent. _end of story_.

 with EJBs the method call does not appear to be remote, because it is
 *explicitly* remote.  the method is in a RemoteInterface and throws a
 RemoteException for crying out loud!

 furthermore, it's not about box1 vs box12.  to be more precise, it's about
 vm1 vs. vm12.  and, if you are writing a client, your client has business
 logic to take care of.  it's the servers responsibility to determine
 whether it should call a method at vm1 or at vm12.

 IMNSHO, this is the achilles heel of EJB.

 --e--

 On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
 The method call can take place anywhere, but always appears to be
 remote. That could be many remote machines though. Location independence
 is not about local vs remote, it's more about box1 vs box12.

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




Re: EJB = bad = MS.net

2002-02-22 Thread Eddie Bush

IMNSHO = In My Not So Humble Opinion?

- Original Message -
From: Joseph Barefoot [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]; Edward Q.
Bridges [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 12:03 PM
Subject: RE: EJB = bad = MS.net


 IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are getting
 hairy these days :)

 -Original Message-
 From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 4:15 AM
 To: dIon Gillard; Struts Users Mailing List
 Subject: Re: EJB = bad = MS.net


 location independence means independent of location, that is all.

 if you're implementing two interfaces to do (more or less) the exact same
 thing, and one is called local and one is called remote that is
 absolutely *not*, by any stretch of the imagination,  location
 independent. _end of story_.

 with EJBs the method call does not appear to be remote, because it is
 *explicitly* remote.  the method is in a RemoteInterface and throws a
 RemoteException for crying out loud!

 furthermore, it's not about box1 vs box12.  to be more precise, it's about
 vm1 vs. vm12.  and, if you are writing a client, your client has business
 logic to take care of.  it's the servers responsibility to determine
 whether it should call a method at vm1 or at vm12.

 IMNSHO, this is the achilles heel of EJB.

 --e--



 On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:

 The method call can take place anywhere, but always appears to be
 remote. That could be many remote machines though. Location independence
 is not about local vs remote, it's more about box1 vs box12.
 




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


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



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




Re: EJB = bad = MS.net

2002-02-22 Thread Eddie Bush

I thought we had abandoned this thread in favor of Struts related questions
=)

- Original Message -
From: David Smith [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 1:41 PM
Subject: Re: EJB = bad = MS.net


 I'm staying out of this discussion, but to answer your question --

 IMNSHO = In My Not So Humble Opinion

 --David

 On Friday 22 February 2002 01:03 pm, you wrote:
  IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
getting
  hairy these days :)
 
  -Original Message-
  From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 4:15 AM
  To: dIon Gillard; Struts Users Mailing List
  Subject: Re: EJB = bad = MS.net
 
 
  location independence means independent of location, that is all.
 
  if you're implementing two interfaces to do (more or less) the exact
same
  thing, and one is called local and one is called remote that is
  absolutely *not*, by any stretch of the imagination,  location
  independent. _end of story_.
 
  with EJBs the method call does not appear to be remote, because it is
  *explicitly* remote.  the method is in a RemoteInterface and throws a
  RemoteException for crying out loud!
 
  furthermore, it's not about box1 vs box12.  to be more precise, it's
about
  vm1 vs. vm12.  and, if you are writing a client, your client has
business
  logic to take care of.  it's the servers responsibility to determine
  whether it should call a method at vm1 or at vm12.
 
  IMNSHO, this is the achilles heel of EJB.
 
  --e--
 
  On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
  The method call can take place anywhere, but always appears to be
  remote. That could be many remote machines though. Location
independence
  is not about local vs remote, it's more about box1 vs box12.

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



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




RE:how to use an images for submit, cancel button etc

2002-02-22 Thread KM

I have tried the following as suggested

html:image src=images/cancel_button.gif 
width=88 height=24 border=0 
property=org.apache.struts.taglib.html.CANCEL//td

how ever I get an error
Attribute value should be quoted

so I tried to put value=cancel in the above string

but it still gives me the error. Any suggestions on
how to resolve this. I will have to write the action
methods as suggested by  Mr Press later, but first I
need the image to display right?

Help???

KM

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




RE: EJB = bad = MS.net

2002-02-22 Thread Wes Bramhall

But it's Friday now, so SSS is allowed, right?

(SSS = Small Scale Spamming)

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 1:45 PM
To: Struts Users Mailing List
Subject: Re: EJB = bad = MS.net


I thought we had abandoned this thread in favor of Struts related questions
=)

- Original Message -
From: David Smith [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 1:41 PM
Subject: Re: EJB = bad = MS.net


 I'm staying out of this discussion, but to answer your question --

 IMNSHO = In My Not So Humble Opinion

 --David

 On Friday 22 February 2002 01:03 pm, you wrote:
  IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
getting
  hairy these days :)
 
  -Original Message-
  From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 4:15 AM
  To: dIon Gillard; Struts Users Mailing List
  Subject: Re: EJB = bad = MS.net
 
 
  location independence means independent of location, that is all.
 
  if you're implementing two interfaces to do (more or less) the exact
same
  thing, and one is called local and one is called remote that is
  absolutely *not*, by any stretch of the imagination,  location
  independent. _end of story_.
 
  with EJBs the method call does not appear to be remote, because it is
  *explicitly* remote.  the method is in a RemoteInterface and throws a
  RemoteException for crying out loud!
 
  furthermore, it's not about box1 vs box12.  to be more precise, it's
about
  vm1 vs. vm12.  and, if you are writing a client, your client has
business
  logic to take care of.  it's the servers responsibility to determine
  whether it should call a method at vm1 or at vm12.
 
  IMNSHO, this is the achilles heel of EJB.
 
  --e--
 
  On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
  The method call can take place anywhere, but always appears to be
  remote. That could be many remote machines though. Location
independence
  is not about local vs remote, it's more about box1 vs box12.

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



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

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




Re: Indexed Properties

2002-02-22 Thread dhay


loads on this in the archive.




Sridhar M [EMAIL PROTECTED] on 02/22/2002 09:48:36 AM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  Indexed Properties


Hi,
  I have a requirement wherein my HTML Form contains
around 100 textfields. I want to use struts to handle
this form automatically. But the problem is that I
can't define 100 setter and getter methods.I tried
using indexed properties with form beans but did not
succeed.

Does Struts support the indexed properties concept
defined by Javabeans. If so how to implement it.

Thanks in advance,
Sridhar

__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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








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




Re: Development Environment

2002-02-22 Thread dhay


does it have support for jsp's?

Dave





John M. Corro [EMAIL PROTECTED] on 02/21/2002 02:11:39 PM

Please respond to Struts Users Mailing List
  [EMAIL PROTECTED]

To:   Struts Users Mailing List [EMAIL PROTECTED]
cc:
Subject:  Re: Development Environment


Glad to see someone else using JEdit.  Thought I was the lone sole.

- Original Message -
From: Chris Birch [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Thursday, February 21, 2002 1:07 PM
Subject: RE: Development Environment


 Jedit and make on Solaris at work.
 Apple ProjectBuilder at home with Ant (great for C and Apple only Java,
OK
 ish for straight forward java).

 Best team IDE I've ever used is Visual Age for Java, drop the visual bits
 and its outstanding.  Can easily view class in their package hierarchy or
 class hierarchy, or a list of classes that reference your current class.
 Incremental compiler, excellent debugger, command lookup and
completion...
 the list goes on...

 Eclispe is open source and free (eclipse.org) and smells like Visual Age
for
 Java, even looks like it... so it must be...

 Regards,
 Chris.

 -Original Message-
 From: Dave Wellman [mailto:[EMAIL PROTECTED]]
 Sent: 21 February 2002 17:41
 To: [EMAIL PROTECTED]
 Subject: Development Environment


 Hello,

 Quick question, what is the preferred development environment that you
are
 all using, Linux - Emacs, VIM,  Windows - JBuilder, VisualAge?


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


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





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








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




RE: EJB = bad = MS.net

2002-02-22 Thread Galbreath, Mark

 ROTFLMAO!

Mark

-Original Message-
From: Wes Bramhall
To: 'Struts Users Mailing List'
Sent: 2/22/02 2:52 PM
Subject: RE: EJB = bad = MS.net

But it's Friday now, so SSS is allowed, right?

(SSS = Small Scale Spamming)

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 1:45 PM
To: Struts Users Mailing List
Subject: Re: EJB = bad = MS.net


I thought we had abandoned this thread in favor of Struts related
questions
=)

- Original Message -
From: David Smith [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 1:41 PM
Subject: Re: EJB = bad = MS.net


 I'm staying out of this discussion, but to answer your question --

 IMNSHO = In My Not So Humble Opinion

 --David

 On Friday 22 February 2002 01:03 pm, you wrote:
  IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
getting
  hairy these days :)
 
  -Original Message-
  From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 4:15 AM
  To: dIon Gillard; Struts Users Mailing List
  Subject: Re: EJB = bad = MS.net
 
 
  location independence means independent of location, that is all.
 
  if you're implementing two interfaces to do (more or less) the exact
same
  thing, and one is called local and one is called remote that is
  absolutely *not*, by any stretch of the imagination,  location
  independent. _end of story_.
 
  with EJBs the method call does not appear to be remote, because it
is
  *explicitly* remote.  the method is in a RemoteInterface and
throws a
  RemoteException for crying out loud!
 
  furthermore, it's not about box1 vs box12.  to be more precise, it's
about
  vm1 vs. vm12.  and, if you are writing a client, your client has
business
  logic to take care of.  it's the servers responsibility to determine
  whether it should call a method at vm1 or at vm12.
 
  IMNSHO, this is the achilles heel of EJB.
 
  --e--
 
  On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
  The method call can take place anywhere, but always appears to be
  remote. That could be many remote machines though. Location
independence
  is not about local vs remote, it's more about box1 vs box12.

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



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

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

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




Re: Thanks Eddie.

2002-02-22 Thread Henry Lu

Thanks Eddie, it work fine now!


---
Henry Lu
MCITphone: (734) 936-2063
University of Michigan Medical Center   fax:   (734) 763-4372

On Fri, 22 Feb 2002, Eddie Bush wrote:

 I uploaded graphics just fine just now.  My code is slightly different than
 yours.  I simply call the getFileData() method of FormFile to return the
 data, and write it all out at once.  Then flush the buffer and close the
 file.

 Try something along the lines of:

 FormFile ff = ... get the FormFile field

 FileOutputStream fos = new FileOutputStream(/some/path/ +
 ff.getFileName());

 fos.write(ff.getFileData());
 fos.flush();
 fos.close();

 If you still have problems let us know.  I have to warn you, however, that
 people don't seem to care about file uploads.  I asked for help and never
 got it.  Of course my mistakes were because I was new, and a small amount of
 experimentation got me where I needed to go, but it's still annoying to be
 totally ignored.

 Hope that helps!  Let us know if it does not.

 Eddie

 - Original Message -
 From: Serge A. Redchuk [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, February 22, 2002 2:17 AM
 Subject: PLEASE, HELP !!! upload problem


  Hello All !
 
  I use the Struts v.1.0.2
 
  Unfortunatelly I can't realize file uploading.
 
  And the most confusing that I have 2 different errors on different
  files with the same code.
 
  Here's my form:
 
  html:form action=/addImage.do enctype=multipart/form-data 
  html:hidden property=pkPartner /
  html:file property=imgFile /
  br
  html:submit property=submit value=Save /
  html:reset/
  /html:form
 
  Here's form bean:
  ...
  public final class ImagesPartnerForm extends ActionForm {
private String pkPartner = null;
private FormFile imgFile = null;
...
public FormFile getImgFile(){
  return this.imgFile;
}
public void setImgFile( FormFile imgFile ){
  this.imgFile = imgFile;
}
public void reset( ActionMapping mapping, HttpServletRequest request ){
  pkPartner = (String)request.getAttribute( pkPartner );
  imgFile = null;
}
  ...
 
  Here's action that handles form data:
  public final class AddImage extends ActionExt {
public ActionForward perform( ActionMapping mapping, ActionForm form,
   HttpServletRequest request, HttpServletResponse response, String
 userName )
  throws IOException, ServletException
{
  String subpath = /partner;
  String targetDir = ResourceHandler.getProperty( global,
pictures.dyn.abs-root ) + subpath;
  String dbPath = ResourceHandler.getProperty( global,
pictures.dyn.rel-root ) + subpath;
  ImagesPartnerForm iform = (ImagesPartnerForm)form;
  FormFile ff = iform.getImgFile();
  //
  String name = ff.getFileName();
  String targetFile = targetDir + / + name;
  String dbFile = dbPath + / + name;
  // Save file to filesystem
  java.io.DataInputStream dis = new java.io.DataInputStream(
ff.getInputStream() );
  java.io.DataOutputStream dos = new java.io.DataOutputStream(
new java.io.FileOutputStream( targetFile ) );
  for( int i = 0; i  ff.getFileSize(); i++ ){
dos.writeByte( dis.readByte() );
  }
  dos.flush();
  dos.close();
  dis.close();
 
  return new ActionForward( /jsp/partner/test.jsp );
}
  }
 
  ERRORS:
  0) short text file was uploaded without any corruption, but:
 
  1) One jpeg file was uploaded, but had less size then source.
 
  2) Other jpeg file uploading caused an exception:
 
  javax.servlet.ServletException: IOException while reading file element:
 Premature end of stream while reading multipart request
  at
 org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
 java:222)
  at
 org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
 partRequestHandler.java:76)
  at
 org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
  at
 org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
 61)
  at
 org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
  at
 org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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



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




RE: EJB = bad = MS.net

2002-02-22 Thread Cakalic, James

== Rolling on the floor laughing my ass off

 -Original Message-
 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 1:57 PM
 To: 'Wes Bramhall '; ''Struts Users Mailing List' '
 Subject: RE: EJB = bad = MS.net
 
 
  ROTFLMAO!
 
 Mark
 
 -Original Message-
 From: Wes Bramhall
 To: 'Struts Users Mailing List'
 Sent: 2/22/02 2:52 PM
 Subject: RE: EJB = bad = MS.net
 
 But it's Friday now, so SSS is allowed, right?
 
 (SSS = Small Scale Spamming)
 
 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 1:45 PM
 To: Struts Users Mailing List
 Subject: Re: EJB = bad = MS.net
 
 
 I thought we had abandoned this thread in favor of Struts related
 questions
 =)
 
 - Original Message -
 From: David Smith [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Friday, February 22, 2002 1:41 PM
 Subject: Re: EJB = bad = MS.net
 
 
  I'm staying out of this discussion, but to answer your question --
 
  IMNSHO = In My Not So Humble Opinion
 
  --David
 
  On Friday 22 February 2002 01:03 pm, you wrote:
   IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
 getting
   hairy these days :)
  
   -Original Message-
   From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 22, 2002 4:15 AM
   To: dIon Gillard; Struts Users Mailing List
   Subject: Re: EJB = bad = MS.net
  
  
   location independence means independent of location, 
 that is all.
  
   if you're implementing two interfaces to do (more or 
 less) the exact
 same
   thing, and one is called local and one is called 
 remote that is
   absolutely *not*, by any stretch of the imagination,  location
   independent. _end of story_.
  
   with EJBs the method call does not appear to be remote, 
 because it
 is
   *explicitly* remote.  the method is in a RemoteInterface and
 throws a
   RemoteException for crying out loud!
  
   furthermore, it's not about box1 vs box12.  to be more 
 precise, it's
 about
   vm1 vs. vm12.  and, if you are writing a client, your client has
 business
   logic to take care of.  it's the servers responsibility 
 to determine
   whether it should call a method at vm1 or at vm12.
  
   IMNSHO, this is the achilles heel of EJB.
  
   --e--
  
   On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
   The method call can take place anywhere, but always appears to be
   remote. That could be many remote machines though. Location
 independence
   is not about local vs remote, it's more about box1 vs box12.
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 



Re: Thanks Eddie.

2002-02-22 Thread Eddie Bush

Glad to have helped =)

- Original Message -
From: Henry Lu [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 2:01 PM
Subject: Re: Thanks Eddie.


 Thanks Eddie, it work fine now!


 --
-
 Henry Lu
 MCITphone: (734) 936-2063
 University of Michigan Medical Center   fax:   (734) 763-4372

 On Fri, 22 Feb 2002, Eddie Bush wrote:

  I uploaded graphics just fine just now.  My code is slightly different
than
  yours.  I simply call the getFileData() method of FormFile to return the
  data, and write it all out at once.  Then flush the buffer and close the
  file.
 
  Try something along the lines of:
 
  FormFile ff = ... get the FormFile field
 
  FileOutputStream fos = new FileOutputStream(/some/path/ +
  ff.getFileName());
 
  fos.write(ff.getFileData());
  fos.flush();
  fos.close();
 
  If you still have problems let us know.  I have to warn you, however,
that
  people don't seem to care about file uploads.  I asked for help and
never
  got it.  Of course my mistakes were because I was new, and a small
amount of
  experimentation got me where I needed to go, but it's still annoying to
be
  totally ignored.
 
  Hope that helps!  Let us know if it does not.
 
  Eddie
 
  - Original Message -
  From: Serge A. Redchuk [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, February 22, 2002 2:17 AM
  Subject: PLEASE, HELP !!! upload problem
 
 
   Hello All !
  
   I use the Struts v.1.0.2
  
   Unfortunatelly I can't realize file uploading.
  
   And the most confusing that I have 2 different errors on different
   files with the same code.
  
   Here's my form:
  
   html:form action=/addImage.do enctype=multipart/form-data 
   html:hidden property=pkPartner /
   html:file property=imgFile /
   br
   html:submit property=submit value=Save /
   html:reset/
   /html:form
  
   Here's form bean:
   ...
   public final class ImagesPartnerForm extends ActionForm {
 private String pkPartner = null;
 private FormFile imgFile = null;
 ...
 public FormFile getImgFile(){
   return this.imgFile;
 }
 public void setImgFile( FormFile imgFile ){
   this.imgFile = imgFile;
 }
 public void reset( ActionMapping mapping, HttpServletRequest
request ){
   pkPartner = (String)request.getAttribute( pkPartner );
   imgFile = null;
 }
   ...
  
   Here's action that handles form data:
   public final class AddImage extends ActionExt {
 public ActionForward perform( ActionMapping mapping, ActionForm
form,
HttpServletRequest request, HttpServletResponse response,
String
  userName )
   throws IOException, ServletException
 {
   String subpath = /partner;
   String targetDir = ResourceHandler.getProperty( global,
 pictures.dyn.abs-root ) + subpath;
   String dbPath = ResourceHandler.getProperty( global,
 pictures.dyn.rel-root ) + subpath;
   ImagesPartnerForm iform = (ImagesPartnerForm)form;
   FormFile ff = iform.getImgFile();
   //
   String name = ff.getFileName();
   String targetFile = targetDir + / + name;
   String dbFile = dbPath + / + name;
   // Save file to filesystem
   java.io.DataInputStream dis = new java.io.DataInputStream(
 ff.getInputStream() );
   java.io.DataOutputStream dos = new java.io.DataOutputStream(
 new java.io.FileOutputStream( targetFile ) );
   for( int i = 0; i  ff.getFileSize(); i++ ){
 dos.writeByte( dis.readByte() );
   }
   dos.flush();
   dos.close();
   dis.close();
  
   return new ActionForward( /jsp/partner/test.jsp );
 }
   }
  
   ERRORS:
   0) short text file was uploaded without any corruption, but:
  
   1) One jpeg file was uploaded, but had less size then source.
  
   2) Other jpeg file uploading caused an exception:
  
   javax.servlet.ServletException: IOException while reading file
element:
  Premature end of stream while reading multipart request
   at
 
org.apache.struts.upload.MultipartIterator.getNextElement(MultipartIterator.
  java:222)
   at
 
org.apache.struts.upload.DiskMultipartRequestHandler.handleRequest(DiskMulti
  partRequestHandler.java:76)
   at
  org.apache.struts.util.RequestUtils.populate(RequestUtils.java:735)
   at
 
org.apache.struts.action.ActionServlet.processPopulate(ActionServlet.java:20
  61)
   at
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
   at
  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
 
 
  --

html:link Request Parms Use Name NOT ParamName

2002-02-22 Thread Jack Frosch

FYI:

The HTML TagLib Developer Guide.pdf says,

To pass multiple dynamic parameters, you can store them in a
java.util.Map, and use the name of the
map for the ***paramName***. The map must then contain one or more
paramIds and their corresponding
values. As the Map is processed, the keys are assumed to be the names of
query parameters to be appended.
The value associated with each key must be either a String or a String
array representing the parameter
value(s). If a String array is specified, more than one value for the
same query parameter name will be
created. [*** notes my emphasis]

After unsuccessfully struggling to get my parameter map to work, I broke
down and reviewed the LinkTag source code.  To construct the parms, it
relies on the computeParameters method in RequestUtils.  That method has
the following code snippet:

  // Locate the Map containing our multi-value parameters map
  Map map = null;
  try {
if (name != null)
  map = (Map) lookup(pageContext, name, property, scope);
  } catch ...

So it seems, the paramName attribute is not the one to use, but the name
parameter is.  I assigned the Map name to the name attribute and it
worked!

Maybe the docs are wrong.  Maybe the RequestUtils computeParameters
method is wrong.  Maybe I just got it all wrong.  I'm not sure which,
but finally my code works.


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




Re: EJB = bad = MS.net

2002-02-22 Thread Eddie Bush

I believe we all knew that one, James ;)
... but thanks for your clearification none-the-less =)

- Original Message - 
From: Cakalic, James [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 2:02 PM
Subject: RE: EJB = bad = MS.net


 == Rolling on the floor laughing my ass off
 
  -Original Message-
  From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 1:57 PM
  To: 'Wes Bramhall '; ''Struts Users Mailing List' '
  Subject: RE: EJB = bad = MS.net
  
  
   ROTFLMAO!
  
  Mark
  
  -Original Message-
  From: Wes Bramhall
  To: 'Struts Users Mailing List'
  Sent: 2/22/02 2:52 PM
  Subject: RE: EJB = bad = MS.net
  
  But it's Friday now, so SSS is allowed, right?
  
  (SSS = Small Scale Spamming)
  
  -Original Message-
  From: Eddie Bush [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 1:45 PM
  To: Struts Users Mailing List
  Subject: Re: EJB = bad = MS.net
  
  
  I thought we had abandoned this thread in favor of Struts related
  questions
  =)
  
  - Original Message -
  From: David Smith [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, February 22, 2002 1:41 PM
  Subject: Re: EJB = bad = MS.net
  
  
   I'm staying out of this discussion, but to answer your question --
  
   IMNSHO = In My Not So Humble Opinion
  
   --David
  
   On Friday 22 February 2002 01:03 pm, you wrote:
IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
  getting
hairy these days :)
   
-Original Message-
From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 4:15 AM
To: dIon Gillard; Struts Users Mailing List
Subject: Re: EJB = bad = MS.net
   
   
location independence means independent of location, 
  that is all.
   
if you're implementing two interfaces to do (more or 
  less) the exact
  same
thing, and one is called local and one is called 
  remote that is
absolutely *not*, by any stretch of the imagination,  location
independent. _end of story_.
   
with EJBs the method call does not appear to be remote, 
  because it
  is
*explicitly* remote.  the method is in a RemoteInterface and
  throws a
RemoteException for crying out loud!
   
furthermore, it's not about box1 vs box12.  to be more 
  precise, it's
  about
vm1 vs. vm12.  and, if you are writing a client, your client has
  business
logic to take care of.  it's the servers responsibility 
  to determine
whether it should call a method at vm1 or at vm12.
   
IMNSHO, this is the achilles heel of EJB.
   
--e--
   
On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
The method call can take place anywhere, but always appears to be
remote. That could be many remote machines though. Location
  independence
is not about local vs remote, it's more about box1 vs box12.
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 


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




Re: EJB = bad = MS.net

2002-02-22 Thread Bob Williams

TGIF
- Original Message - 
From: Cakalic, James [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 2:02 PM
Subject: RE: EJB = bad = MS.net


 
 == Rolling on the floor laughing my ass off
 
  -Original Message-
  From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 1:57 PM
  To: 'Wes Bramhall '; ''Struts Users Mailing List' '
  Subject: RE: EJB = bad = MS.net
  
  
   ROTFLMAO!
  
  Mark
  
  -Original Message-
  From: Wes Bramhall
  To: 'Struts Users Mailing List'
  Sent: 2/22/02 2:52 PM
  Subject: RE: EJB = bad = MS.net
  
  But it's Friday now, so SSS is allowed, right?
  
  (SSS = Small Scale Spamming)
  
  -Original Message-
  From: Eddie Bush [mailto:[EMAIL PROTECTED]]
  Sent: Friday, February 22, 2002 1:45 PM
  To: Struts Users Mailing List
  Subject: Re: EJB = bad = MS.net
  
  
  I thought we had abandoned this thread in favor of Struts related
  questions
  =)
  
  - Original Message -
  From: David Smith [EMAIL PROTECTED]
  To: Struts Users Mailing List [EMAIL PROTECTED]
  Sent: Friday, February 22, 2002 1:41 PM
  Subject: Re: EJB = bad = MS.net
  
  
   I'm staying out of this discussion, but to answer your question --
  
   IMNSHO = In My Not So Humble Opinion
  
   --David
  
   On Friday 22 February 2002 01:03 pm, you wrote:
IMNSHO?  What the hell is that?  Man, the colloquial shortcuts are
  getting
hairy these days :)
   
-Original Message-
From: Edward Q. Bridges [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 4:15 AM
To: dIon Gillard; Struts Users Mailing List
Subject: Re: EJB = bad = MS.net
   
   
location independence means independent of location, 
  that is all.
   
if you're implementing two interfaces to do (more or 
  less) the exact
  same
thing, and one is called local and one is called 
  remote that is
absolutely *not*, by any stretch of the imagination,  location
independent. _end of story_.
   
with EJBs the method call does not appear to be remote, 
  because it
  is
*explicitly* remote.  the method is in a RemoteInterface and
  throws a
RemoteException for crying out loud!
   
furthermore, it's not about box1 vs box12.  to be more 
  precise, it's
  about
vm1 vs. vm12.  and, if you are writing a client, your client has
  business
logic to take care of.  it's the servers responsibility 
  to determine
whether it should call a method at vm1 or at vm12.
   
IMNSHO, this is the achilles heel of EJB.
   
--e--
   
On Sat, 23 Feb 2002 05:24:22 +1100, dIon Gillard wrote:
The method call can take place anywhere, but always appears to be
remote. That could be many remote machines though. Location
  independence
is not about local vs remote, it's more about box1 vs box12.
  
   --
   To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
 


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




RE: how to use an images for submit, cancel button etc

2002-02-22 Thread Mattos, John

Could you do the following...

!-- JSP Snippet--
html:image onclick=javascript:submit(); src=../images/onion.gif
border=0/

html:image onclick=../whereIWasBefore.jsp src=../images/onionCancel.gif
border=0/

html:image onclick=javascript:reset();return false;
src=../images/onionReset.gif border=0/
!-- End 'o snippet --


Reset and submit work fine, but you need to implement the cancel to do
whatever you need it to do.

Is that overly simplistic?

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: KM [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 10:27 AM
To: Struts Users Mailing List
Subject: how to use an images for submit, cancel button etc 


Hi

I am trying to develop a page where the user has to
select options from a drop down box and either clicks
submit or cancel. The submit and cancel options are
images instead of a button

Following is my code


tr
td align=right
  logic:equal name=subscriptionForm
property=action
  scope=request value=Create
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Delete
html:submit
  bean:message key=button.confirm/
/html:submit
  /logic:equal
  logic:equal name=subscriptionForm
property=action
  scope=request value=Edit
html:submit
  bean:message key=button.save/
/html:submit
  /logic:equal
/td
td align=left
  logic:notEqual name=subscriptionForm
property=action
 scope=request value=Delete
html:reset
  bean:message key=button.reset/
/html:reset
  /logic:notEqual
  nbsp;
  html:cancel
bean:message key=button.cancel/
  /html:cancel
/td
  /tr

here instead of the save, reset, cancel buttons I
would like to user save.gif, reset.gif, cancel.gif etc
.How to set up struts to use this.. 

Any tips on how to do this is appreciated

KM



__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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

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




RE: EJB = bad = MS.net

2002-02-22 Thread Malcolm Davis

I think I was better off not sending that last email,
especially on a Friday.  :)
Thanks for education…

- Malcolm

   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 22, 2002 2:09 PM
   To: Struts Users Mailing List
   Subject: Re: EJB = bad = MS.net
  
  
   TGIF
   - Original Message -
   From: Cakalic, James [EMAIL PROTECTED]
   To: 'Struts Users Mailing List'
   [EMAIL PROTECTED]
   Sent: Friday, February 22, 2002 2:02 PM
   Subject: RE: EJB = bad = MS.net
  
  
   
== Rolling on the floor laughing my ass off
   
 -Original Message-
 From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 1:57 PM
 To: 'Wes Bramhall '; ''Struts Users Mailing List' '
 Subject: RE: EJB = bad = MS.net


  ROTFLMAO!

 Mark

 -Original Message-
 From: Wes Bramhall
 To: 'Struts Users Mailing List'
 Sent: 2/22/02 2:52 PM
 Subject: RE: EJB = bad = MS.net

 But it's Friday now, so SSS is allowed, right?

 (SSS = Small Scale Spamming)

 -Original Message-
 From: Eddie Bush [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 1:45 PM
 To: Struts Users Mailing List
 Subject: Re: EJB = bad = MS.net


 I thought we had abandoned this thread in
   favor of Struts related
 questions
 =)

 - Original Message -
 From: David Smith [EMAIL PROTECTED]
 To: Struts Users Mailing List
   [EMAIL PROTECTED]
 Sent: Friday, February 22, 2002 1:41 PM
 Subject: Re: EJB = bad = MS.net


  I'm staying out of this discussion, but
   to answer your question --
 
  IMNSHO = In My Not So Humble Opinion
 
  --David
 
  On Friday 22 February 2002 01:03 pm, you wrote:
   IMNSHO?  What the hell is that?  Man,
   the colloquial shortcuts are
 getting
   hairy these days :)
  
   -Original Message-
   From: Edward Q. Bridges
   [mailto:[EMAIL PROTECTED]]
   Sent: Friday, February 22, 2002 4:15 AM
   To: dIon Gillard; Struts Users Mailing List
   Subject: Re: EJB = bad = MS.net
  
  
   location independence means
   independent of location,
 that is all.
  
   if you're implementing two interfaces
   to do (more or
 less) the exact
 same
   thing, and one is called local and
   one is called
 remote that is
   absolutely *not*, by any stretch of
   the imagination,  location
   independent. _end of story_.
  
   with EJBs the method call does not
   appear to be remote,
 because it
 is
   *explicitly* remote.  the method is in
   a RemoteInterface and
 throws a
   RemoteException for crying out loud!
  
   furthermore, it's not about box1 vs
   box12.  to be more
 precise, it's
 about
   vm1 vs. vm12.  and, if you are writing
   a client, your client has
 business
   logic to take care of.  it's the
   servers responsibility
 to determine
   whether it should call a method at vm1
   or at vm12.
  
   IMNSHO, this is the achilles heel of EJB.
  
   --e--
  
   On Sat, 23 Feb 2002 05:24:22 +1100,
   dIon Gillard wrote:
   The method call can take place
   anywhere, but always appears to be
   remote. That could be many remote
   machines though. Location
 independence
   is not about local vs remote, it's
   more about box1 vs box12.
 
  --
  To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


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

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

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

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


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




RE: struts-example won't run

2002-02-22 Thread Subhadra Vemuri

Guy,
Some of my colleagues here are able to
work with struts and 3.2 tomcat. I am
using Tomcat 3.3a.

This error really baffles me. It works
for some and doesn't for some. I didn't
like having to install a new tomcat -
but that's what worked for me.

For now, I am glad you were able to
work around this.

Bye,
Subhadra



-Original Message-
From: NTL [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 21, 2002 8:17 AM
To: Struts Users Mailing List
Subject: Re: struts-example won't run


 --- Subhadra Vemuri [EMAIL PROTECTED] wrote:
  I had the same problem too - and I didn't have to
  change any source code. I just reinstalled
  tomcat and all my troubles were gone. It just
  worked without any changes. I downloaded
  tomcat version 3.3a.

Yes, I got around the same problem by upgrading from Tomcat 3.2 to 4.0.  The
release notes for Struts said that it should work with 3.2, but it didn't.
I was a little alarmed that the example did not work. I think I saw a
pending bug report somewhere.

Guy Roberts
Sun Certified Web Component Developer

Looking for Struts/JSP/Java work in the UK 0115 9820709




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



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




Re: viewing email from this list

2002-02-22 Thread Ted Husted

Netscape Messenger works great for me. 

It also threads everything, so if something goes off topic, it's easy to
start ignoring the thread =:O)

-Ted.

Sarah Farrell wrote:
 
 Is anyone *not* having problems viewing the email from this list?  And if
 you aren't having problems, what email program are you using?  (Never mind
 if you're using Pine on Unix.)
 
 My email client, Eudora, hides some of the text if it looks like an HTML
 tag.  I can only see it if I view source and there's no way to turn HTML
 viewing off.  I can send as text only but I can't set it to view as
 text only.
 
 Suggestions?
 
 -- Sarah
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]

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




Re: viewing email from this list

2002-02-22 Thread Eddie Bush

OutlookExpress works in a similar fashion =)

- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, February 22, 2002 2:28 PM
Subject: Re: viewing email from this list


 Netscape Messenger works great for me.

 It also threads everything, so if something goes off topic, it's easy to
 start ignoring the thread =:O)

 -Ted.

 Sarah Farrell wrote:
 
  Is anyone *not* having problems viewing the email from this list?  And
if
  you aren't having problems, what email program are you using?  (Never
mind
  if you're using Pine on Unix.)
 
  My email client, Eudora, hides some of the text if it looks like an HTML
  tag.  I can only see it if I view source and there's no way to turn
HTML
  viewing off.  I can send as text only but I can't set it to view as
  text only.
 
  Suggestions?
 
  -- Sarah
 
  --
  To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

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



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




RE: how to use an images for submit, cancel button etc

2002-02-22 Thread KM

Thanks for the tip Mattos, However javascript is not
something the end client likes in this case, so trying
to minimise using javascript. Any clue as to why the
code I posted is not working?

Thanks for your time

KM
--- Mattos, John [EMAIL PROTECTED] wrote:
 Could you do the following...
 
 !-- JSP Snippet--
 html:image onclick=javascript:submit();
 src=../images/onion.gif
 border=0/
 
 html:image onclick=../whereIWasBefore.jsp
 src=../images/onionCancel.gif
 border=0/
 
 html:image onclick=javascript:reset();return
 false;
 src=../images/onionReset.gif border=0/
 !-- End 'o snippet --
 
 
 Reset and submit work fine, but you need to
 implement the cancel to do
 whatever you need it to do.
 
 Is that overly simplistic?
 
 John Mattos
 Sr. Developer and Architect
 iNDEMAND
 345 Hudson St. 16th Floor
 New York, New York
 10014
 
 -Original Message-
 From: KM [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 22, 2002 10:27 AM
 To: Struts Users Mailing List
 Subject: how to use an images for submit, cancel
 button etc 
 
 
 Hi
 
 I am trying to develop a page where the user has to
 select options from a drop down box and either
 clicks
 submit or cancel. The submit and cancel options are
 images instead of a button
 
 Following is my code
 
 
 tr
 td align=right
   logic:equal name=subscriptionForm
 property=action
   scope=request value=Create
 html:submit
   bean:message key=button.save/
 /html:submit
   /logic:equal
   logic:equal name=subscriptionForm
 property=action
   scope=request value=Delete
 html:submit
   bean:message key=button.confirm/
 /html:submit
   /logic:equal
   logic:equal name=subscriptionForm
 property=action
   scope=request value=Edit
 html:submit
   bean:message key=button.save/
 /html:submit
   /logic:equal
 /td
 td align=left
   logic:notEqual name=subscriptionForm
 property=action
  scope=request value=Delete
 html:reset
   bean:message key=button.reset/
 /html:reset
   /logic:notEqual
   nbsp;
   html:cancel
 bean:message key=button.cancel/
   /html:cancel
 /td
   /tr
 
 here instead of the save, reset, cancel buttons I
 would like to user save.gif, reset.gif, cancel.gif
 etc
 .How to set up struts to use this.. 
 
 Any tips on how to do this is appreciated
 
 KM
 
 
 
 __
 Do You Yahoo!?
 Yahoo! Sports - Coverage of the 2002 Olympic Games
 http://sports.yahoo.com
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:  
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

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




Help needded on Struts-config file

2002-02-22 Thread subhendukumar mohanty

Hi

One of the mapping in struts-config.xml file comes with example is as follows

action-mappings 
action path=/logon type=org.apache.struts.example.LogonAction
 name=logonForm
 scope=request
 input=/logon.jsp
 unknown=false validate=true / 
/action-mappings 

Could anybody explain me what the input element means. How it is used by controller.

Thanks,
Subhendu

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




Re: Changing Request Parameters

2002-02-22 Thread Michael Baldwin

Since you're forwarding from Action to Action, you do have a minor issue.  Things
you set in the request will be reset after the forward.

Solution 1: add what you need to the session.
Solution 2: extend ActionForward with a subclass that takes a map of name value
pairs to stick in the request.  Override the getPath() method to return the path
for the forward, plus the query string to follow it.  (e.g. String getPath() {
returns something like /myAction.do?mapParam1=val1mapParam2=val2 )

You'll probably want to create this ActionForward yourself (MyActionForward f =
new MyActionForward(path, paramMap) );  You just need to be careful that the
ActionForward doesn't get reused (for obvious reasons).  I believe that the
ActionForwards in struts are static so if you use mapping.findForward(foo), and
then add params to that, I think other actions might see them.  I'm not sure.

You could probably write your action forward to take an action forward in its
constructor such that you can reuse the static one in your dynamic one (if it is
static indeed).  i.e., MyActionForward f = new MyActionForward
(mapping.findForward(foo), Map paramMap)


cheers,
--Michael


Phase Communcations wrote:

 I am forwarding from one Action to Another. I need to tweak the request
 parameters. Is there a way to do this?

 I tried to set the reqest value by calling the FormBean and set it from the
 action. But, it doesn't carry over to the next Action. I can't find a way to
 change the request parameters. Please help.

 I saw some discussion on the archive. But, is pretty aimless and not very
 clear.

 I am running Servlet 2.2 so don't tell me about getParameterMap().

 Brandon Goodin
 Phase Web and Multimedia
 P (406) 862-2245
 F (406) 862-0354
 [EMAIL PROTECTED]
 http://www.phase.ws

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


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




RE: Help needded on Struts-config file

2002-02-22 Thread Lundin, Michael

My understanding of the input is that it's a mapping to the document that
submits the form.  For this example, it's the page that presents you with
the username/password screen.

This way if there is an error, you can send the user back to the input
screen that they came from.

-Original Message-
From: subhendukumar mohanty [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 22, 2002 12:37 PM
To: [EMAIL PROTECTED]
Subject: Help needded on Struts-config file


Hi

One of the mapping in struts-config.xml file comes with example is as
follows

action-mappings 
action path=/logon type=org.apache.struts.example.LogonAction
 name=logonForm
 scope=request
 input=/logon.jsp
 unknown=false validate=true / 
/action-mappings 

Could anybody explain me what the input element means. How it is used by
controller.

Thanks,
Subhendu

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

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




  1   2   >