how to read request attribute

2003-11-12 Thread Garg Raman \(SDinc\)
Hi,
can anyone tell me I want to show value of my

request.setAttribute("varName",varName);

in my jsp page created in struts,
do we have any method to show the value wihtout using jsp tags
<%=request.getAttr. %>
I want to show it in "

Re: File upload problem with Struts 1.1

2003-11-12 Thread Garg Raman \(SDinc\)
Hi Connor,

 Thanks for your reply. We have the commons-upload.jar in the lib of our
appliction directory and as well the struts.jar.

We also have set the Controller size to 2MB which is quite nice for any
file.

If you want to see the error coming itself we can pass on the URL for our
development server


Any other suggestion will be appreciated .

Looking forward to hear from you.


Cheers
Raman Garg
- Original Message -
From: "Caoilte O'Connor" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 12, 2003 3:42 PM
Subject: Re: File upload problem with Struts 1.1


> have you got the commons-upload jar in your lib dir? you
> need that as well as the struts jars.
>
> Also check your controller (in struts-config) has something
> like this (though i think it's optional actually),
>
>maxFileSize="300K" />
>
>
>
> c
>
>
> On Wednesday 12 November 2003 08:18, Raman Garg wrote:
> > Hi,
> >
> >  We are getting error while file uploading using struts
> > 1.1. We have a demo code for file uploading which
> > demostrates the file uploading using struts. When we run
> > there application code works fine but  when we submit the
> > form by setting enctype for the form it throws the
> > following error. (Remember we are not doing anything in
> > the action or in the form just getteer and setters) so
> > issue is with enctype settings. It may use some internal
> > class while sending data using enctype. Please advise us
> > what to do.
> >
> > We downloaded the sample file uploading code from :
> > http://forum.exadel.com/viewtopic.php?t=120
> >
> > But according to me the problem can be with setting of
> > enctype.
> >
> > follwoing is the  code for our form
> >
> >  > enctype="multipart/form-data">
> >
> > 
> >
> > 
> > 
> > 
> >
> >
> >
> > java.lang.NoSuchMethodError:
> > org.apache.commons.fileupload.FileUpload.setSizeMax (I)V
> > at
> > org.apache.struts.upload.CommonsMultipartRequestHandler.h
> >andleRequest (CommonsMultipartRequestHandler.java:219)
> > at
> > org.apache.struts.util.RequestUtils.populate(RequestUtils
> >.java:1055) at
> > org.apache.struts.action.RequestProcessor.processPopulate
> > (RequestProcessor.java:798)
> > at
> > org.apache.struts.action.RequestProcessor.process
> > (RequestProcessor.java:254)
> > at org.apache.struts.action.ActionServlet.process
> > (ActionServlet.java:1422)
> > at
> > org.apache.struts.action.ActionServlet.doPost(ActionServl
> >et.java:523) at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:7
> >60) at
> > com.tavant.lg.controller.servlet.LoanGeniusFrontControlle
> >rServlet.service
> > (LoanGeniusFrontControllerServlet.java:81)
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:8
> >53) at
> > weblogic.servlet.internal.ServletStubImpl$ServletInvocati
> >onAction.run (ServletStubImpl.java:1053)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > (ServletStubImpl.java:387)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > (ServletStubImpl.java:305)
> > at
> > weblogic.servlet.internal.WebAppServletContext$ServletInv
> >ocationAction.run (WebAppServletContext.java:6291)
> > at
> > weblogic.security.acl.internal.AuthenticatedSubject.doAs
> > (AuthenticatedSubject.java:317)
> > at
> > weblogic.security.service.SecurityManager.runAs
> > (SecurityManager.java:97)
> > at
> > weblogic.servlet.internal.WebAppServletContext.invokeServ
> >let (WebAppServletContext.java:3575)
> > at
> > weblogic.servlet.internal.ServletRequestImpl.execute
> > (ServletRequestImpl.java:2573)
> > at
> > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:
> >178) at
> > weblogic.kernel.ExecuteThread.run(ExecuteThread.java:151)
> >
> > ==
> >
> >
> > Any Suggestion or help will be highly appreciated.
> >
> >
> > Best Regards
> > Raman Garg
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: validation

2003-11-12 Thread Garg Raman \(SDinc\)
public ActionErrors validate(ActionMapping mapping,
HttpServletRequest request)
   {

   ActionErrors errors = new ActionErrors();
if((checkbox!=null)){
   if((text1==null) || (text1.equals(""))){
   errors.add("text1", new ActionError("error.text1.required"));}
}

 return errors;
   }


 Hope this may help you


Cheers
Raman Garg  , Gary
[EMAIL PROTECTED]
[EMAIL PROTECTED]




- Original Message -
From: "sairam manda" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 12, 2003 3:14 PM
Subject: validation


> Hello Sir,
> I am new to struts .I have a question in validating a form . My form has a
> checkbox and few textfields corresponding to the checkbox  ie I want to
> validate  these textfeilds only if the checkbox is checked .
> Can anybody guide me how I can do this using requiredIf validation.
> regards
> sairam
>
> _
> Express your Digital Self. Win fabulous prizes.
> http://www.msn.co.in/DigitalSelf/ Enter this cool contest.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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