Hi Jay,
It works if I give in this way but I wanted to upload by giving relative
path. i.e. the context in which the application is working. Also if I print
File fileTemp = new File(fileName2);
System.out.println("fileTemp:
"+fileTemp.getAbsolutePath());
I g
how is ur file path given ??/
please try to give the full path ie like "C:\Program Files\Tomcat
5.0\webapps\cevm\uploadedimages\"
ie filePath value should be C:\Program Files\Tomcat
5.0\webapps\cevm\uploadedimages\
ie in your jsp page give something as below .
- Original Message -
Fr
Hi Jay,
I tried this way too, but I am actually getting FileNotFoundException. This
is the modified code
String filePath = theForm.getFilePath();
System.out.println("filePath:"+filePath);
String fileName2 = filePath+fileName;
System.out.println("fileName2:"+fileName2);
//byte[]
More importantly (from the perspective of Struts) is that the webapp
framework should not *dictate* a decision for how you factor your
business logic and persistence logic. That is a decision that should
be made on it's own merits (independently of how you choose your view
tier framework) -- any s
On Thu, 16 Dec 2004 11:21:01 -0500, Chaikin, Yaakov Y.
<[EMAIL PROTECTED]> wrote:
> Craig,
>
> What is the reason the configuration gets "frozen"? I don't mean to ask
> about the mechanics of how it's frozen. I am just curious as to why freeze
> it and not let it be dynamically updated during appl
Dude ... don't sweat it. Do whatcha got to do. If it's their issue,
and this is what you've got to do so they can find the problem ...
then, so be it.
Now, if you start sending 20 a day, that might aggravate me :-)
Good Luck!
Eddie
On Sat, 18 Dec 2004 19:26:23 -0500, David G. Friedman
<[EMAIL
What version of struts are you using! I think that the version you are
using might be de reason for this problem.
ActionErrors has been deprecated in favor of ActionMessages as far as
I know in recent struts versions.
On the other hand, "struts in action" covers afaik version 1.1.
Hope this help
I have configured two modules in my web application using Struts 1.2.
Each has its own struts config as defined in the web application's
web.xml. Each has its own validation XML and resource bundles as defined
in their respective struts config files.
The problem I'm seeing is that if I violate a v
Is the Action path include the parameter I pass in the request ?
For an example:
Form A to B, I will pass code='Bcode' in Action B
Form B to C, I will pass code='Ccode' in Action C
If I back Form C to B, I need to pass code='Bcode'
The Question is Is the Action path will include this 'Bcode'
If
Mike Darretta a écrit :
I encountered a strange issue that may be relevant to others
After upgrading our JDK from 1.4.2_05 to 1.4.2_06, many of our struts
actions reported the following error:
Got the same problem when update tomcat and jdk (don't know which causes
troubles).
"No getter m
java.lang.NoSuchMethodException:
mypackage.myclass.validateTotalFunds(java.lang.Object,
org.apache.commons.validator.ValidatorAction,
org.apache.commons.validator.Field,
org.apache.struts.action.ActionMessages, javax.servlet.http.HttpServletRequest)
As you can see here it is looking for a method
Hi,
Is there any restriction in the data struts populates from ActionForm
classes when validate is turn on?
I mean, I put a Map in the action form and it seems normal keys (String
vs String) are populated but keys which point to lists (String vs List)
are not there after the form.validate() metho
I have the following problem with checkbox arrays. I would
really appreciate clues on what is the best workaround.
The situation is this:
- I have a data entry page flow with multiple pages
entering data into a form bean stored on the session
(all the actions share the same form bean).
- Sever
Hi!
Is there any known issue related to populating a List in a Mapped Back
Action Form?
It works ok when validation is not active but when I set validate to
true in the action mapping the list vanishes.
This does not happen with the rest of the form parameters.
Any clue?
Thanks!
--
Saludos,
Validation of data in form fields worked fine when I had only default
resource bundle. But, when I started using multiple resource bundles,
the validation failed. I tried to specify the value for bundle attribute
for the 'arg' elements(s), and 'msg' elements but didn't work.
Following is my enviro
Why don't you create the file with a temporary filename and return a link to
the file you created. If you do this, you will not have to lock your action.
-Richard
-Original Message-
From: Behrang Saeedzadeh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 3:25 PM
To: Struts U
Hi,
I have a problem:
Struts config file has:
On JSP I have:
It generates folowing HTML:
But when I submit the form actual values in a bean are
not updated. They are still the same.
What do I do wrong?
Thanks,
Eugene
__
Do you Yaho
I may not be understanding this, because it seems somewhat obvious... I
assume you can determine on which page of the wizard the validation
failed... Assuming that's true, simply don't return the input forward,
instead have three forwards in your /submission mapping, as it looks
like you do alr
Sorry again, but my ISP will not fix their mail server unless I follow every
damn step such as emailing the list again AFTER I did "detect and repair" in
MS Outlook. Freaking ISPs! (I know I used to work for two of them!)
Regards,
David
-
Here's hoping somebody's still answering questions this close to Christmas
:)
I have a form that takes place over 3 pages, with prev and next buttons for
the user to navigate around with. The buttons call their own "action" in my
dispatchaction, which increments the page # and sends to the approp
Sorry guys, I'm not resending these messages, Netcom is (something wrong
with their server resending the same exact messages - headers seem to
indicate the very same message) doing it by themselves.
Regards,
David
-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent:
Hi
is there any way to escape html with bean:message?. The only way I
find to achieve this is:
1 - set a pageContext var with the bean:message value.
2 - use bean:write, wich escapes html.
I'd like to do this with a single tag. Something like
If it's not possible wich is the best practice?
Than
Jim,
I think I see your problem: The getDataSource() method is only available in
an Action, not in a Controller. You could mix the two and make your action
subclass a TilesAction. That would give you access to a merging of both
worlds: Action and Controller. For more details, you could read Til
Thanks for the tip. I did finally discover the message resource was
missing and the cause of the the excption in the JSP tag.
Thanks for the assistance.
> Your ActionMessage should contain the key to a message in some message
> resources, rather than the actual message itself. Something like...
I have problems compiling when I move code from an Action to a Tiles
Controller
The line that won't compile is,
DataSource dataSource = getDataSource(request, "userDB");
..and the error message is
RetrieveFormController.java:110: cannot find symbol
symbol : method getDataSource(javax.serv
http://wiki.apache.org/struts/StrutsTutorials - videos are free.
Tutorial builds from lab to lab and you build a full realistic DB
master/detail CRUD, w navigation, and most commonly used features. Check
out the video - 30 of them, one for each lab.
( ... as I move to new Sun Swing Extensions /J
Just carry the path of the file, not the image itself. When you submit
the form you can get at that information (I believe, if not just grab it
via JavaScript on the form submission and stick it in a hidden field).
Then, when yout next JSP executes, you have the path to the file and you
constr
Works good with firefox as well , seems like a damned good simple
solution to me.
Hey did you see Brady Hegberg's post for dynamic dropdown list's, I
reckon you'll like it as well,
also cross platform.
If you wanted to be a bit more ambitious you could also try implimenting
this:
http://develope
Hi All
Its very urgent for me.I am struck on this point at a very critical point of my
project.
I am using Validator framework of struts 1.1 In Validator.xml file for my mask
variable i am using regular
expression so as the string to accept alphanum+special char-.,-,",\s .nowI want
my regular ex
Your ActionMessage should contain the key to a message in some message
resources, rather than the actual message itself. Something like...
errors.add(ActionErrors.GLOBAL_MESSAGE, new ActionMessage(
"user.required" ) );
then define "user.required=User name is null" in your message resources.
change the below line of ur action file
String fileName2 = filePath+"/"+fileName;
to
String fileName2 = filePath+fileName;
- Original Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>; "'Jay Chandran'"
<[EMAIL PROTECTED]>
Sent: Saturday
1. From the jsp page select the image (image path) for uploading. Let the
preview button be a submit button .
function setHidValue()
{
document.frm.paramPassed.value="preview";
}
ie when u click the preview button a java script function is called, in
which we assign a value t
I get an error
"org.apache.jasper.compiler.CompileException: /upload/upload.jsp(32,4)
Attribute enctype invalid according to the specified TLD"
I am already using enctype in the But when I hard code the
value to system path e.g. c:\\test\\mages then it works but I dont want
this. As I need to up
include the below and check
- Original Message -
From: "uma.k" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Saturday, December 18, 2004 3:10 PM
Subject: file upload problem
> Hi,
> I am modifying the upload files given by struts and trying to uploa
Hi,
I am modifying the upload files given by struts and trying to upload the
file to server without the user entering any path.
I have modified the upload.jsp with
Its means I am trying to upload to the same context in which the jsp is
running (webapps/test/upload/images)
I have modified the Up
Thanks to this list I just found the StrutsTestCase package. I think its
a great tool. Testing my forms and actions OUTSIDE the container has
increased my velocity 10 fold.
But it seems that not many Struts people talk about this package (aside
from page 510 of J.B.'s book). Is there something
36 matches
Mail list logo