File upload problem with Struts 1.1

2003-11-12 Thread Raman Garg
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

html:form action=/ImageUploadSubmit enctype=multipart/form-data

html:file property=fileName/

br
html:submit value=Upload/
/html:form



java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax
(I)V
at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
(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(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at 
com.tavant.lg.controller.servlet.LoanGeniusFrontControllerServlet.service
(LoanGeniusFrontControllerServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.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$ServletInvocationAction.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.invokeServlet
(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

Validator and Javascript

2003-11-12 Thread Sezmillenium
Hi,
I have a problem with javascript client-side. I have two forms in one jsp page. But, I 
include html:javascript tag for everyone.This is the code:
script language=Javascript1.1 src=staticJavascript.jsp/script

html:javascript formName=SaludoForm dynamicJavascript=true 
staticJavascript=false / 

html:javascript formName=UserInfoForm dynamicJavascript=true 
staticJavascript=false/

With form SaludoForm I don't have any problem. But, UserInfoForm don't validate 
the data in the client-side and send the request to server and this response with a 
error (It's OK!). 

Why isn't the second form validate in client-side???

RE: Accessing application scope in Action.execute()

2003-11-12 Thread Geert Van Landeghem
The Action class contains the protected ActionServlet servlet variable
through which each subclass can access the servlet context.

A good approach to accessing session and application objects is by 
extending the Action class (I've got this from O'Reilly's Programming
Jakarta Struts)

By extending this class all your action classes inherit these common
methods (getSessionObject, getApplicationObject, ...)

abstract public class EnterpriseBaseAction extends Action {
  /**
   * Retrieve a session object based on the request and the attribute name.
   */
  protected Object getSessionObject(HttpServletRequest req,
String attrName) {
Object sessionObj = null;
HttpSession session = req.getSession(false);
if ( session != null ){
   sessionObj = session.getAttribute(attrName);
}
return sessionObj;
  }

  /**
   * Retrieve an object from the application scope by its name. This is
   * a convience method.
   */
  protected Object getApplicationObject(String attrName) {
return servlet.getServletContext().getAttribute(attrName);
  }

  public boolean isLoggedIn( HttpServletRequest request ){
UserContainer container = getUserContainer(request);
if ( container.getUserView() != null ){
   return true;
}else{
  return false;
}
  }

  /**
   * Return the instance of the ApplicationContainer object.
   */
  protected ApplicationContainer getApplicationContainer() {
return 
(ApplicationContainer)getApplicationObject(IConstants.APPLICATION_CONTAINER_KEY);
  }

  /**
   * Retrieve the UserContainer for the user tier to the request.
   */
  protected UserContainer getUserContainer(HttpServletRequest request) {

UserContainer userContainer = (UserContainer)getSessionObject(request, 
IConstants.USER_CONTAINER_KEY);

// Create a UserContainer for the user if it doesn't exist already
if(userContainer == null) {
  userContainer = new UserContainer();
  userContainer.setLocale(request.getLocale());
  HttpSession session = request.getSession(true);
  session.setAttribute(IConstants.USER_CONTAINER_KEY, userContainer);
}

return userContainer;
  }
}


-Original Message-
From: Looser [mailto:[EMAIL PROTECTED]
Sent: maandag 10 november 2003 16:03
To: struts Mailinglist
Subject: Accessing application scope in Action.execute()


Hi,

is there any chance to access objects in application scope in my action 
classes ?

I have to override the .execute(ActionMapping mapping,ActionForm 
form,HttpServletRequest request,HttpServletResponse response) method but 
none of these parameters give me access to application scope like 
'getServletContext().getAttribute(myAttribute)' would do.

Which is the best practise to store objects in application scope and 
retrieve them back in my ActionClasses ?

Thx for your answers...


-
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: URGENT: struts random tag

2003-11-12 Thread Ajay Patil
Hi Mohan,

I am out of touch with Struts. But, I think you should make
a property in your Form class, and assign it the random value there.

Other quick and dirty way is to simply use:

%
  String random1 = ; // Java code to create random number.
  out.println(html:hidden  value= + random1 + );
%

If you insist to generate the random string in JSP, then you might
have to write code like above. 

There is also some bean:define stuff where you define a bean and
then use it but I dont remember the syntax.

My 2 paise,
:-) Ajay

Hi All
I am using the struts random tag like this

rand:string id=random1 charset=all length=20 /
html:hidden property=keycode
jsp:getProperty name=random1 property=random / /html:hidden

I am trying to generate a random string and add this to the user
attributes in the database. But somehow the random String does not show
and only an empty String appears in place of the 20 character random
string.
Please help me if any one used it before.

--Thank you
Mohan




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



Re: Rephrased: MysqlDataSource problem?

2003-11-12 Thread Max Cooper
1. Here is at least one problem, fix this first:
 java.lang.ClassNotFoundException: pu.strutsapp.actionform.LogonForm
Perhaps the package structure does not match the structure in
WEB-INF/classes?

2. You need the other jars that come with Struts in your WEB-INF/lib
directory.

3. There are some HTML errors here:
   th align=rightUsername:/th
   th align=rightPassword:/th

-Max

- Original Message - 
From: todd thorner [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 11, 2003 7:52 PM
Subject: Rephrased: MysqlDataSource problem?


 ...because my webapp only started punking out once I tried to add my first
data-source element, I've rephrased this post (even though I'm not sure
that it's the data source where I'm going wrong).
 --

 - Original Message -

 DATE: Mon, 10 Nov 2003 05:29:59
 From: todd thorner [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc:

 Hi,

 I'm having some (newbie) problems with my Struts-based webapp running on
Tomcat 4.1.x

 Something is going wrong when I try to access the first jsp page that has
a form.  One thing I have tried to add recently to my webapp's functionality
is a data-source (I had been using straight JDBC), so I'm wondering if
someone could clarify to me if that's where I'm making a mistake (I'm
especially concerned about the url parameters I'm trying to use).

 The following are the relevant stack trace and/or log files that I could
find:

 -

 Nov 10, 2003 4:22:57 AM org.apache.struts.util.RequestUtils
createActionForm
 SEVERE: Error creating form bean of class
pu.strutsapp.actionform.LogonForm
 java.lang.ClassNotFoundException: pu.strutsapp.actionform.LogonForm
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1444)
 at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1289)
 at
org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
 ...etc.
 at java.lang.Thread.run(Thread.java:534)
 Nov 10, 2003 4:22:57 AM org.apache.jk.server.JkCoyoteHandler action
 INFO: RESET


 2003-11-10 04:22:57 ApplicationDispatcher[/porturla] Servlet.service() for
servlet jsp threw exception
 org.apache.jasper.JasperException: Exception creating bean of class
pu.strutsapp.actionform.LogonForm: {1}
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
 at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
 ...etc.
 - Root Cause -
 javax.servlet.ServletException: Exception creating bean of class
pu.strutsapp.actionform.LogonForm: {1}
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)


 2003-11-10 04:22:57 ApplicationDispatcher[/porturla] Servlet.service() for
servlet action threw exception
 org.apache.jasper.JasperException: Exception creating bean of class
pu.strutsapp.actionform.LogonForm: {1}
 at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54)
 at java.lang.Thread.run(Thread.java:534)
 ...etc.
 - Root Cause -
 javax.servlet.ServletException: Exception creating bean of class
pu.strutsapp.actionform.LogonForm: {1}
 at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533)
 at org.apache.jsp.Logon_jsp._jspService(Logon_jsp.java:90)

 -


 The Logon jsp page that tries to create the LogonForm bean looks like
this (the relevant parts):

 html:form action=/LogonSubmit_FromMainPage focus=emailAddress
   table border=0 width=100%
 tr
   th align=rightUsername:/th
   td align=lefthtml:text property=emailAddress size=50//td
 /tr
 tr
   th align=rightPassword:/th
   td align=lefthtml:password property=password size=50//td
 /tr
 tr
   td align=righthtml:submit//td
   td align=lefthtml:reset//td
 /tr
   /table
 /html:form

 -

 My webapp's web.xml file looks like this (the relevant parts):

 resource-ref
   description
 Resource reference to a com.mysql.jdbc.jdbc2.optional.MysqlDataSource
 instance that may be used for data access for the porturla domain,
 preconfigured to connect to the appropriate MySql server.
   /description
   res-ref-name
 jdbc/porturla
   /res-ref-name
   res-type
 com.mysql.jdbc.jdbc2.optional.MysqlDataSource
   /res-type
   res-auth
 Container
   /res-auth
 /resource-ref

 resource-ref
   description
 Resource reference to a factory for javax.mail.Session
 instances that may be used for sending electronic mail
 messages, preconfigured to connect to the appropriate
 SMTP server.
   /description
   res-ref-name
 mail/Session
   /res-ref-name
   res-type
 javax.mail.Session
   /res-type
   res-auth
 Container
   /res-auth
 /resource-ref

 -

 My struts-config.xml file looks like this (the relevant parts):

 

WG: Problem with html:options - tag

2003-11-12 Thread Peter Friesleben
I’m receiving this error using Tomcat 4.1 and Struts 1.0

„javax.servlet.ServletException: No getter method available for property
vendors for bean under name null” 

I’m using the html:options tag this way:

html:select name=someForm property=vendorID
   html:options name=someForm property=vendorsIndex
labelProperty=vendors/
/html:select

Since formbean „SomeForm“ is reused from another context it is
explicitly initialized and set to the session in the ActionClass defined
in the html:form  tag of this JSP.

Funny thing is if I’m doing bean:write name=someForm
property=vendors / in the same JSP I see the complete list of
vendors.

Any suggestions?


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



Re: ResourceBundle not available in ActionForm

2003-11-12 Thread Caroline Lauferon
you have to specify which bundle has to be used. if you don't, Struts tries
to use the resources registered under key org.apache.struts.action.MESSAGE,
and there is none.
so you have to specify:  html:errors bundle=errors/ by example

hope it helps.
Caroline


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



validatro framewrok and nested vector property

2003-11-12 Thread sumeet sharma
Hi ,
  I have to validate on a nested date property.The date will be coming from a object 
which is present in my form and this object in turn has a vector of objects. Now for 
each of these objects I need to perform validation on its date property . Can I do 
this using the struts validator framework ? Any inputs on this 

Thanx in advance,

cheers,
Sumeet :)




validation

2003-11-12 Thread sairam manda
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]


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]



Re: validation

2003-11-12 Thread sairam manda
Hello Sir,

Thank you for the reply but Iam looking  to use  t he  
requiredIf validator .

regards
sairam
From: Garg Raman \(SDinc\) [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: validation Date: Wed, 12 Nov 2003 15:23:50 +0530
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]
_
Find your first love. Rekindle past joys! http://www.batchmates.com/msn.asp 
Get in touch with batchmates.

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


Utter Newbie Question

2003-11-12 Thread Joe Hertz

I'm making using struts for more or less than first time.

I read the FAQ on how to handle logins to an application and I'm left with 
one question:

Why stop a storing a Boolean in the session to determine logged-inness? 

Why not just store the (validated) User object in the session and check for 
it's presence? That way, if it's there, one can utilize the data in the User 
object for whatever sordid little purpose said developer comes up with.

Is this a good idea?

If so, how do I go about doing this in the view? (I told you I was a newbie!).

I mean using bean:write tags of the User object seems straightforward 
enough, but what about the List of Children objects that is part of 
the User object?

TIA

-Joe

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



Re: ResourceBundle not available in ActionForm

2003-11-12 Thread Dominique Kraus-Ahma
Hi Caroline,

thanks. But how can i specify what bundle to use in the ActionForm class?

snippet
if( ( null == this.accountname ) || ( 1  this.accountname.length() ) )
errors.add( accountname, new ActionError(
errors.login.noaccountname ) );
/snippet

Dominique


Caroline Lauferon [EMAIL PROTECTED] schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
 you have to specify which bundle has to be used. if you don't, Struts
tries
 to use the resources registered under key
org.apache.struts.action.MESSAGE,
 and there is none.
 so you have to specify:  html:errors bundle=errors/ by example

 hope it helps.
 Caroline




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



Re: File upload problem with Struts 1.1

2003-11-12 Thread Caoilte O'Connor
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),

  controller
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

 html:form action=/ImageUploadSubmit
 enctype=multipart/form-data

 html:file property=fileName/

 br
 html:submit value=Upload/
 /html:form



 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]



Re: ResourceBundle not available in ActionForm

2003-11-12 Thread Caroline Lauferon
I think you can't but i think the error appears on display, doesn't it? 

Caroline

 Hi Caroline,
 
 thanks. But how can i specify what bundle to use in the ActionForm class?
 
 snippet
 if( ( null == this.accountname ) || ( 1  this.accountname.length() ) )
 errors.add( accountname, new ActionError(
 errors.login.noaccountname ) );
 /snippet
 
 Dominique
 
 
 Caroline Lauferon [EMAIL PROTECTED] schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]
  you have to specify which bundle has to be used. if you don't, Struts
 tries
  to use the resources registered under key
 org.apache.struts.action.MESSAGE,
  and there is none.
  so you have to specify:  html:errors bundle=errors/ by example
 
  hope it helps.
  Caroline
 
 
 
 
 -
 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: XML importing :

2003-11-12 Thread Caoilte O'Connor
if you're using it on a small scale (or for unit testing 
like me) then dbunit (www.dbunit.org) is a great tool that 
integrates with ant very well.

c

On Tuesday 11 November 2003 13:54, [EMAIL PROTECTED] 
wrote:
 Sorry for a unrelated question, but is there a easy way
 of taking xml data and importing it into a relational
 database some like


 person
   nameMike/name
 /person

 gets translated as

 insert into user values (Mike)

 etc..

 Mike





 *
*** The information in this message is
 confidential and may be legally privileged. It is
 intended solely for the addressee; access to this email
 by anyone else is unauthorised.

 If you are not the intended recipient: (1) you are kindly
 requested to return a copy of this message to the sender
 indicating that you have received it in error, and to
 destroy the received copy; and (2) any disclosure or
 distribution of this message, as well as any action taken
 or omitted to be taken in reliance on its content, is
 prohibited and may be unlawful.
 *
***


 -
 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: 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),

   controller
 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
 
  html:form action=/ImageUploadSubmit
  enctype=multipart/form-data
 
  html:file property=fileName/
 
  br
  html:submit value=Upload/
  /html:form
 
 
 
  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]



MySql NoClassDefFoundError

2003-11-12 Thread Ajay Kalidindi
Hi

below are the 4 entries that I tried seperately and every time I got :
java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource

What I am using?

Redhat 9
Apache 2.0.48
Tomcat 4.1.29
mysql 3.23.58

Please help me thru this.

Regards

Ajay Kalidindi


struts-config.xml segments that I tried follow:

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config


AW: MySql NoClassDefFoundError

2003-11-12 Thread Otto, Frank
Hi,

You need the struts-legacy.jar.

Regards,

Frank

-Ursprüngliche Nachricht-
Von: Ajay Kalidindi [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 12. November 2003 11:16
An: [EMAIL PROTECTED]
Betreff: MySql NoClassDefFoundError


Hi

below are the 4 entries that I tried seperately and every time I got :
java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource

What I am using?

Redhat 9
Apache 2.0.48
Tomcat 4.1.29
mysql 3.23.58

Please help me thru this.

Regards

Ajay Kalidindi


struts-config.xml segments that I tried follow:

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

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



Dynamic bean in a result list

2003-11-12 Thread Ovidiu EFTIMIE
Hi,
I have a jsp page where I must diplay a list of results like this
logic:present  name=DOCUMENTS
logic :iterate id='laliste' name='DOCUMENTS'

   tr

   tdbean :write name='liste' property='author'/td

   tdbean :write name='liste' property='title'/td

   tdbean :write name='liste' property='domain'/td

   /tr

/logic :iterate

   /logic:present

/logic :present

DOCUMENTS is an Array List which contains JavaBeans. The thing is that I want to
use a dynamic JavaBean, so I could have an ArrayList of objects like this
public class DynamicOT implements Serializable{

private HashMap property;


public DynamicOT(){

property = new HashMap();

}

public void setProperty(String nm, String val){

property.put(nm,val);

}

public String getProperty(String nm){

String str = (String) property.get(nm);

return str;

}

}

But then how could I retrive them in my jsp page ?
Using
 tdbean :write name=liste property=property('author')/td
would be enough?

Has anyone an idee of how I could do this ?

Thanx in advance,
Ovidiu


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



RE: MySql NoClassDefFoundError

2003-11-12 Thread Ajay Kalidindi
Hi Frank,

I downloaded the legacy.jar and there is no problem now.

Tomorrow night I am going to test the connectivity itself.

Thanks

Regards

Ajay Kalidindi

-Original Message-
From: Otto, Frank [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 2:20 AM
To: 'Struts Users Mailing List'
Subject: AW: MySql NoClassDefFoundError


Hi,

You need the struts-legacy.jar.

Regards,

Frank

-Ursprüngliche Nachricht-
Von: Ajay Kalidindi [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 12. November 2003 11:16
An: [EMAIL PROTECTED]
Betreff: MySql NoClassDefFoundError


Hi

below are the 4 entries that I tried seperately and every time I got :
java.lang.NoClassDefFoundError: org/apache/struts/legacy/GenericDataSource

What I am using?

Redhat 9
Apache 2.0.48
Tomcat 4.1.29
mysql 3.23.58

Please help me thru this.

Regards

Ajay Kalidindi


struts-config.xml segments that I tried follow:

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url
value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source type=org.apache.commons.dbcp.BasicDataSource
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url
value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=org.gjt.mm.mysql.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url
value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

struts-config
 data-sources
   data-source
 set-property property=autoCommit value=false/
 set-property property=description value=Mysql Contacts/
 set-property property=driverClass value=com.mysql.jdbc.Driver/
 set-property property=maxCount value=5/
 set-property property=minCount value=1/
 set-property property=password value=sel123/
 set-property property=url
value=jdbc:mysql://localhost:3306/contacts/
 set-property property=user value=seluser/
   /data-source
 /data-sources
/struts-config

-
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: File upload problem with Struts 1.1

2003-11-12 Thread Caoilte O'Connor
hi,
are you using a struts nightly build? it appears that might 
require a different version of commons-upload (cvs 
probably).

c



On Wednesday 12 November 2003 11:20, Garg Raman \(SDinc\) 
wrote:
 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),
 
controller
  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
  
   html:form action=/ImageUploadSubmit
   enctype=multipart/form-data
  
   html:file property=fileName/
  
   br
   html:submit value=Upload/
   /html:form
  
  
  
   java.lang.NoSuchMethodError:
   org.apache.commons.fileupload.FileUpload.setSizeMax
   (I)V at
   org.apache.struts.upload.CommonsMultipartRequestHandl
  er.h andleRequest
   (CommonsMultipartRequestHandler.java:219) at
   org.apache.struts.util.RequestUtils.populate(RequestU
  tils .java:1055) at
   org.apache.struts.action.RequestProcessor.processPopu
  late (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(ActionS
  ervl et.java:523) at
   javax.servlet.http.HttpServlet.service(HttpServlet.ja
  va:7 60) at
   com.tavant.lg.controller.servlet.LoanGeniusFrontContr
  olle rServlet.service
   (LoanGeniusFrontControllerServlet.java:81)
   at
   javax.servlet.http.HttpServlet.service(HttpServlet.ja
  va:8 53) at
   weblogic.servlet.internal.ServletStubImpl$ServletInvo
  cati onAction.run (ServletStubImpl.java:1053)
   at
   weblogic.servlet.internal.ServletStubImpl.invokeServl
  et (ServletStubImpl.java:387)
   at
   weblogic.servlet.internal.ServletStubImpl.invokeServl
  et (ServletStubImpl.java:305)
   at
   weblogic.servlet.internal.WebAppServletContext$Servle
  tInv ocationAction.run
   (WebAppServletContext.java:6291) at
   weblogic.security.acl.internal.AuthenticatedSubject.d
  oAs (AuthenticatedSubject.java:317)
   at
   weblogic.security.service.SecurityManager.runAs
   (SecurityManager.java:97)
   at
   weblogic.servlet.internal.WebAppServletContext.invoke
  Serv let (WebAppServletContext.java:3575)
   at
   weblogic.servlet.internal.ServletRequestImpl.execute
   (ServletRequestImpl.java:2573)
   at
   weblogic.kernel.ExecuteThread.execute(ExecuteThread.j
  ava: 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]


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



Re: Dynamic bean in a result list

2003-11-12 Thread Ovidiu EFTIMIE
Ok,
I've found the answer : Mapped properties
http://jakarta.apache.org/struts/faqs/indexedprops.html


- Original Message - 
From: Ovidiu EFTIMIE [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 11:47 AM
Subject: Dynamic bean in a result list


 Hi,
 I have a jsp page where I must diplay a list of results like this
 logic:present  name=DOCUMENTS
 logic :iterate id='laliste' name='DOCUMENTS'

tr

tdbean :write name='liste' property='author'/td

tdbean :write name='liste' property='title'/td

tdbean :write name='liste' property='domain'/td

/tr

 /logic :iterate

/logic:present

 /logic :present

 DOCUMENTS is an Array List which contains JavaBeans. The thing is that I want
to
 use a dynamic JavaBean, so I could have an ArrayList of objects like this
 public class DynamicOT implements Serializable{

 private HashMap property;


 public DynamicOT(){

 property = new HashMap();

 }

 public void setProperty(String nm, String val){

 property.put(nm,val);

 }

 public String getProperty(String nm){

 String str = (String) property.get(nm);

 return str;

 }

 }

 But then how could I retrive them in my jsp page ?
 Using
  tdbean :write name=liste property=property('author')/td
 would be enough?

 Has anyone an idee of how I could do this ?

 Thanx in advance,
 Ovidiu


 -
 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]



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 html:link tag what will be value of
paramId=id,  paramProperty paramName??
I have want a link like
Edit.do?id=5






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



Re: Re: validation

2003-11-12 Thread sumeet sharma

Hi ,
This link is useful for u

http://jakarta.apache.org/struts/faqs/newbie.html#requiredif


...Regards,
Sumeet
On Wed, 12 Nov 2003 sairam manda wrote :

Hello Sir,

Thank you for the reply but Iam looking  to use  t he  requiredIf 
validator .

regards
sairam

 From: Garg Raman \(SDinc\) [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: validation Date: Wed, 12 Nov 2003 15:23:50 +0530

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]


_
Find your first love. Rekindle past joys! http://www.batchmates.com/msn.asp Get in 
touch with batchmates.


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





ActionError.

2003-11-12 Thread deepaksawdekar
Hi All, 
Please help me how to do this. I want to create a instance of ActionError, but i don't 
want to the messages to be taken from applicationresource.properties file. 
I have to give some other message which will be hard coded. 

sample code
I want some thing like this,

err = new ActionError(deepak);
Errors = new ActionError(000, err);

Where deepak is not a key in applicationResource.properties file. 



Thanks and Regards
Deepak.

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



Re: ActionError.

2003-11-12 Thread Ovidiu EFTIMIE
In your default application.properties file you have errors.detail = {0} so
using this, you can have
new ActionError(errors.detail,deepak);
And the message shown will be deepak

Ovidiu



- Original Message - 
From: deepaksawdekar [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 12:44 PM
Subject: ActionError.


Hi All,
Please help me how to do this. I want to create a instance of ActionError, but i
don't want to the messages to be taken from applicationresource.properties file.
I have to give some other message which will be hard coded.

sample code
I want some thing like this,

err = new ActionError(deepak);
Errors = new ActionError(000, err);

Where deepak is not a key in applicationResource.properties file.



Thanks and Regards
Deepak.

-
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: Problem with html:options - tag

2003-11-12 Thread Nimish Chourey , Tidel Park - Chennai
Probably .. The form tag has the action , which is linked to some different
form .

Ie say you have form tag like this 
html:form action=/A method=POST

And in struts config , the action is mapped to some form say form name B ,
then your html options tag should be like 

html:options name=B property=vendorsIndex
labelProperty=vendors/ 

In case of bean write , it wont look up for the form mapped to the action ..
Hence that works ..

Check this thing ..

Nimish




-Original Message-
From: Peter Friesleben [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: WG: Problem with html:options - tag


I'm receiving this error using Tomcat 4.1 and Struts 1.0

javax.servlet.ServletException: No getter method available for property
vendors for bean under name null 

I'm using the html:options tag this way:

html:select name=someForm property=vendorID
   html:options name=someForm property=vendorsIndex
labelProperty=vendors/ /html:select

Since formbean SomeForm is reused from another context it is explicitly
initialized and set to the session in the ActionClass defined in the
html:form  tag of this JSP.

Funny thing is if I'm doing bean:write name=someForm property=vendors
/ in the same JSP I see the complete list of vendors.

Any suggestions?


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


xdoclet strutsconfigxml thingy

2003-11-12 Thread Caoilte O'Connor
Does anyone who uses XDoclet know how to make it generate 
struts-config sub-app config files?

I've been looking at it and can't work out whether it's 
covered.

c


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



Re: xdoclet strutsconfigxml thingy

2003-11-12 Thread harm
Yes it is quitte easy:

In build.xml
target name=xdoclet.web
 
taskdef 
name=webdoclet 
classname=xdoclet.modules.web.WebDocletTask
classpathref=xdoclet.classpath
/
 
webdoclet 
destdir=${resources.dir}/manager/WEB-INF 
mergedir=${xdoclet.merge.dir}/manager
 

fileset dir=${classes.dir}/manager includes=
**/*Action.java/
fileset dir=${classes.dir}/manager includes=
**/*Form.java/
fileset dir=${classes.dir}/manager includes=
**/*Servlet.java/

deploymentdescriptor 
servletspec=${servlet.spec.version}
distributable=false 
sessiontimeout=240

taglib
uri=struts-bean
location=/WEB-INF/struts-bean.tld
/
taglib
uri=struts-html
location=/WEB-INF/struts-html.tld
/
taglib
uri=struts-logic
location=/WEB-INF/struts-logic.tld
/
taglib
uri=struts-nested
location=/WEB-INF/struts-nested.tld
/
taglib
uri=struts-tiles
location=/WEB-INF/struts-tiles.tld
/
taglib
uri=sitemesh-decorator
location=/WEB-INF/sitemesh-decorator.tld
/
taglib
uri=sitemesh-page
location=/WEB-INF/sitemesh-page.tld
/
taglib
uri=http://jakarta.apache.org/taglibs/jstl/core;
location=/WEB-INF/c.tld
/
taglib
uri=http://jakarta.apache.org/taglibs/jstl/fmt;
location=/WEB-INF/fmt.tld
/
 
/deploymentdescriptor
 
strutsconfigxml version=1.1/
 
/webdoclet
/target


In your Java files:

* @struts.action
 *  name=changeStateForm
 *  path=/change_state
 *  scope=request
 *  validate=false
 * @struts.action-forward
 *  name=success
 *  path=/main.jsp
 * @struts.action-exception
 *  key=advertisement.doesnt.exists.exception
 *  
type=nl.informatiefabriek.om.exception.advertisement.AdvertisementDoesNotExistException
 *  path=/error.jsp
 *  scope=request
 * @struts.action-exception
 *  key=relation.doesnt.exists.exception
 *  
type=nl.informatiefabriek.om.exception.relation.RelationDoesNotExistsException
 *  path=/error.jsp
 *  scope=request
 */
public class ChangeStateAction extends BaseAction {
// your class
}

Good luck,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands




Caoilte O'Connor [EMAIL PROTECTED] 
11/12/2003 01:11 PM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]


To
Struts Users Mailing List [EMAIL PROTECTED]
cc

Subject
xdoclet strutsconfigxml thingy






Does anyone who uses XDoclet know how to make it generate 
struts-config sub-app config files?

I've been looking at it and can't work out whether it's 
covered.

c


-
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: Utter Newbie Question

2003-11-12 Thread Arne Brutschy
Wednesday, November 12, 2003, 11:03:15 AM, you wrote:
JH Why stop a storing a Boolean in the session to determine logged-inness?

JH Why not just store the (validated) User object in the session and check for
JH it's presence? That way, if it's there, one can utilize the data in the User
JH object for whatever sordid little purpose said developer comes up with.

That excactly what I'm doing. At the login, the business logic checks
if the credentials supplied were right. If so, the user object will be
stored in the session. In that way, I can easily access all the user's
properties without doing a lookup all the time. You might run into
memory problems if you have a lot of simultanous logged in users
and/or big user objects. But that not the case for me. Additionally,
I'm storing a list of the users group membership in the session. So I
can do fast permission checks based on this list (always doing a
lookup for every groups is expensive).


JH I mean using bean:write tags of the User object seems straightforward
JH enough, but what about the List of Children objects that is part of
JH the User object?

I don't really understand. I'm using code like this to access the
user object:

c:choose
  %-- check if the users object is stored in the session--%
  c:when test=${empty sessionScope.user}
%-- it's not, present a you're not logged in message --%
span id=errorbean:message key=login.header.unauthd//spanbr
  /c:when

  %-- the user is logged in --%
  c:otherwise
%-- present a welcome message like Welcome, John Doe. --%
bean:message key=login.header.welcome/, ${sessionScope.user.name}.

%-- display the logout form --%
html:form action=login.do
  html:hidden property=dispatch value=logout/
  %-- the requested page parameter is used to return to this page 
after logout --%
  html:hidden property=requestedPage 
value=${pageContext.request.servletPath}/
  html:submitbean:message key=login.button.logout//html:submit
/html:form
  /c:otherwise
/c:choose

As you can see, I read and display the user's name with
${sessionScope.user.name}.

But I have to warn you, I'm a struts newbie too.. :)

Regards,
Arne Brutschy


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



Re: xdoclet strutsconfigxml thingy

2003-11-12 Thread Mark Lowe
I had to use the destdir attribute

strutsconfigxml version=1.1 destdir=${build.dir}/WEB-INF /

On 12 Nov 2003, at 12:23, [EMAIL PROTECTED] wrote:

Yes it is quitte easy:

In build.xml
target name=xdoclet.web
taskdef
name=webdoclet
classname=xdoclet.modules.web.WebDocletTask
classpathref=xdoclet.classpath
/
webdoclet
destdir=${resources.dir}/manager/WEB-INF
mergedir=${xdoclet.merge.dir}/manager

fileset dir=${classes.dir}/manager includes=
**/*Action.java/
fileset dir=${classes.dir}/manager includes=
**/*Form.java/
fileset dir=${classes.dir}/manager includes=
**/*Servlet.java/
deploymentdescriptor
servletspec=${servlet.spec.version}
distributable=false
sessiontimeout=240

taglib
uri=struts-bean
location=/WEB-INF/struts-bean.tld
/
taglib
uri=struts-html
location=/WEB-INF/struts-html.tld
/
taglib
uri=struts-logic
location=/WEB-INF/struts-logic.tld
/
taglib
uri=struts-nested
location=/WEB-INF/struts-nested.tld
/
taglib
uri=struts-tiles
location=/WEB-INF/struts-tiles.tld
/
taglib
uri=sitemesh-decorator
location=/WEB-INF/sitemesh-decorator.tld
/
taglib
uri=sitemesh-page
location=/WEB-INF/sitemesh-page.tld
/
taglib
 
uri=http://jakarta.apache.org/taglibs/jstl/core;
location=/WEB-INF/c.tld
/
taglib
 
uri=http://jakarta.apache.org/taglibs/jstl/fmt;
location=/WEB-INF/fmt.tld
/

/deploymentdescriptor

strutsconfigxml version=1.1/

/webdoclet
/target
In your Java files:

* @struts.action
 *  name=changeStateForm
 *  path=/change_state
 *  scope=request
 *  validate=false
 * @struts.action-forward
 *  name=success
 *  path=/main.jsp
 * @struts.action-exception
 *  key=advertisement.doesnt.exists.exception
 *
type=nl.informatiefabriek.om.exception.advertisement.AdvertisementDoes 
NotExistException
 *  path=/error.jsp
 *  scope=request
 * @struts.action-exception
 *  key=relation.doesnt.exists.exception
 *
type=nl.informatiefabriek.om.exception.relation.RelationDoesNotExistsE 
xception
 *  path=/error.jsp
 *  scope=request
 */
public class ChangeStateAction extends BaseAction {
// your class
}

Good luck,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands


Caoilte O'Connor [EMAIL PROTECTED]
11/12/2003 01:11 PM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]
To
Struts Users Mailing List [EMAIL PROTECTED]
cc
Subject
xdoclet strutsconfigxml thingy




Does anyone who uses XDoclet know how to make it generate
struts-config sub-app config files?
I've been looking at it and can't work out whether it's
covered.
c

-
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]


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


Re: xdoclet strutsconfigxml thingy

2003-11-12 Thread Caoilte O'Connor
ok. i have something similar enough.



But which bit in that specifies that you have a subapp, ie

struts-config-XXX.xml

instead of,

struts-config.xml


and do you put the subapp xml merge files in a sub dir of 
the root merge dir? or specify them as a separate merge dir 
in another webdoclet invocation.

cheers

c


On Wednesday 12 November 2003 13:23, 
[EMAIL PROTECTED] wrote:
 Yes it is quitte easy:

 In build.xml
 target name=xdoclet.web

 taskdef
 name=webdoclet

 classname=xdoclet.modules.web.WebDocletTask
 classpathref=xdoclet.classpath /

 webdoclet

 destdir=${resources.dir}/manager/WEB-INF
 mergedir=${xdoclet.merge.dir}/manager


 fileset dir=${classes.dir}/manager
 includes= **/*Action.java/
 fileset dir=${classes.dir}/manager
 includes= **/*Form.java/
 fileset dir=${classes.dir}/manager
 includes= **/*Servlet.java/

 deploymentdescriptor

 servletspec=${servlet.spec.version}
 distributable=false
 sessiontimeout=240

 taglib
 uri=struts-bean
 location=/WEB-INF/struts-bean.tld
 /
 taglib
 uri=struts-html
 location=/WEB-INF/struts-html.tld
 /
 taglib
 uri=struts-logic
 location=/WEB-INF/struts-logic.tld
 /
 taglib
 uri=struts-nested
 location=/WEB-INF/struts-nested.tld
 /
 taglib
 uri=struts-tiles
 location=/WEB-INF/struts-tiles.tld
 /
 taglib
 uri=sitemesh-decorator

 location=/WEB-INF/sitemesh-decorator.tld /
 taglib
 uri=sitemesh-page
 location=/WEB-INF/sitemesh-page.tld
 /
 taglib

 uri=http://jakarta.apache.org/taglibs/jstl/core;
 location=/WEB-INF/c.tld /
 taglib

 uri=http://jakarta.apache.org/taglibs/jstl/fmt;
 location=/WEB-INF/fmt.tld /

 /deploymentdescriptor

 strutsconfigxml version=1.1/

 /webdoclet
 /target


 In your Java files:

 * @struts.action
  *  name=changeStateForm
  *  path=/change_state
  *  scope=request
  *  validate=false
  * @struts.action-forward
  *  name=success
  *  path=/main.jsp
  * @struts.action-exception
  * 
 key=advertisement.doesnt.exists.exception *
 type=nl.informatiefabriek.om.exception.advertisement.Adv
ertisementDoesNotExistException * 
 path=/error.jsp
  *  scope=request
  * @struts.action-exception
  *  key=relation.doesnt.exists.exception
  *
 type=nl.informatiefabriek.om.exception.relation.Relation
DoesNotExistsException *  path=/error.jsp
  *  scope=request
  */
 public class ChangeStateAction extends BaseAction {
 // your class
 }

 Good luck,

 Regards,

 Harm de Laat
 Informatiefabriek
 The Netherlands




 Caoilte O'Connor [EMAIL PROTECTED]
 11/12/2003 01:11 PM
 Please respond to
 Struts Users Mailing List
 [EMAIL PROTECTED]


 To
 Struts Users Mailing List
 [EMAIL PROTECTED] cc

 Subject
 xdoclet strutsconfigxml thingy






 Does anyone who uses XDoclet know how to make it generate
 struts-config sub-app config files?

 I've been looking at it and can't work out whether it's
 covered.

 c


 -
 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]


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



AW: Problem with html:options - tag

2003-11-12 Thread Peter Friesleben
Thanks for the hint Nimish. That`s how it is usually done. My problem is
slightly different. I want to use another form than the one which is
mapped to the action in the struts config. So if action A is mapped to
form B in the struts config, I want my options tag to retrieve values
from form C. Otherwise I would have to rewrite in B some attributes
which are exist already in C and I don`t want to do that. (Neither would
I like to delegate). 

I supposed it is possible to get a reference to any bean which is set to
the session by tbe name attribute of the options tag. But maybe this is
not the case for the html tags, though it works fine with the bean write
tag.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Im Auftrag von Nimish Chourey , Tidel Park - Chennai
Gesendet: Mittwoch, 12. November 2003 13:10
An: Struts Users Mailing List
Betreff: RE: Problem with html:options - tag

Probably .. The form tag has the action , which is linked to some
different
form .

Ie say you have form tag like this 
html:form action=/A method=POST

And in struts config , the action is mapped to some form say form name B
,
then your html options tag should be like 

html:options name=B property=vendorsIndex
labelProperty=vendors/ 

In case of bean write , it wont look up for the form mapped to the
action ..
Hence that works ..

Check this thing ..

Nimish




-Original Message-
From: Peter Friesleben [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 1:52 PM
To: [EMAIL PROTECTED]
Subject: WG: Problem with html:options - tag


I'm receiving this error using Tomcat 4.1 and Struts 1.0

javax.servlet.ServletException: No getter method available for property
vendors for bean under name null 

I'm using the html:options tag this way:

html:select name=someForm property=vendorID
   html:options name=someForm property=vendorsIndex
labelProperty=vendors/ /html:select

Since formbean SomeForm is reused from another context it is
explicitly
initialized and set to the session in the ActionClass defined in the
html:form  tag of this JSP.

Funny thing is if I'm doing bean:write name=someForm
property=vendors
/ in the same JSP I see the complete list of vendors.

Any suggestions?


-
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]



who want to join xmoon project ?

2003-11-12 Thread Mario
It's an opensource project that speed up your development time.

http://www.xmoon.it http://www.xmoon.it/ 

 

contact me.

 

 

 



Apply an Xslt to the struts-config.xml

2003-11-12 Thread Adrien GEYMOND
Hello all,

I am looking for a nice presentation of the struts-config.xml. I want to
apply a Xslt file on the struts-config.xml in order to have a well displayed
view of my struts-config. the result format should be HTML, SVG or 

Does somedy have already seen something like that ? Is there a tool,
somebody has already developped an Xsl for doing that ?


Today, i've found on google a Xslt which  examines the struts-config.xml and
looks for inconsistencies and reports the errors.
http://www.aida2.org/ndpsoftware.com/downloads-xsl-struts.php

thanks for advance ...

adrien


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



Re: fmt:message, fmt:setLocale and struts

2003-11-12 Thread Adam Hardy
Presumably the Jakarta Taglibs developers and the Struts people are 
going to centralize on the Commons-Resources package at some point in 
the future, in which case the divergence will disappear?

On 11/11/2003 08:31 PM Kris Schneider wrote:
The JSTL algorithm will only use the root resource (your
ApplicationResources.properties) as a last resort. It will walk through the set
of locales returned by ServletRequest.getLocales and try to find a match. If it
can't, JSTL implements the concept of a fallback locale that it will attempt to
match. If a match is still not found, only then will the root resource get
loaded. So, if your set of locales is:
en
de
And you've got the following resources:

ApplicationResources.properties
ApplicationResources_de.properties
Then JSTL will find a match for de and use it. If you add the resource:

ApplicationResources_en.properties

Then it'll match en first. If you just make the en resource an empty file,
it'll pick up all the entries from the root. Kooky, huh? If you're using a
Servlet 2.3 container, why not use a Filter to keep the Struts and JSTL locales
in sync? Something like this might work (untested):
import javax.servlet.jsp.jstl.core.Config;
...
HttpSession session = request.getSession(true);
Locale locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
if (locale == null) {
  locale = request.getLocale();
}
Config.set(session, Config.FMT_LOCALE, locale);
Quoting Adam Hardy [EMAIL PROTECTED]:


Struts and JSTL seem to have different algorithms to establish the 
locale to use.

I have JSPs which use fmt:message for titles, labels, comments etc and 
I have also just started to program a page which will include an 
underlying language page to incorporate big paragraphs of localized text.

I thought I would use the struts locale setting in my session for this, 
but then I found that with my current browser settings, struts has 
chosen EN but JSTL has chosen DE.

I have EN as my first locale preference in my browser, followed by DE, 
being in Germany.

In my app I have a default ApplicationResources.properties and just now 
to create a test, I copied it to ApplicationResources_de.properties.

Bug or feature, logically expected or are Struts and JSTL purposefully 
diverging?

Adam

PS if I rename ApplicationResources to ApplicationResources_en then JSTL 
and Struts agree again, on EN.

PPS I can work-around with this:
c:set var=localeKey
  %=org.apache.struts.Globals.LOCALE_KEY %
/c:set
fmt:setLocale value=${sessionScope[localeKey]}/
to make JSTL follow Struts.


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


Re: Apply an Xslt to the struts-config.xml

2003-11-12 Thread Nick Heudecker
Adrien,

StrutsDoc, my project, does this.  You can check it out at:
http://struts.sf.net/strutsdoc

Feel free to contact me with questions or comments.

On Wed, Nov 12, 2003 at 02:41:22PM +0100, Adrien GEYMOND wrote:
 Hello all,
 
 I am looking for a nice presentation of the struts-config.xml. I want to
 apply a Xslt file on the struts-config.xml in order to have a well displayed
 view of my struts-config. the result format should be HTML, SVG or 
 
 Does somedy have already seen something like that ? Is there a tool,
 somebody has already developped an Xsl for doing that ?
 
 
 Today, i've found on google a Xslt which  examines the struts-config.xml and
 looks for inconsistencies and reports the errors.
 http://www.aida2.org/ndpsoftware.com/downloads-xsl-struts.php
 
 thanks for advance ...
 
 adrien
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Nick Heudecker
SystemMobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com

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



RE: validation

2003-11-12 Thread Ramadoss Chinnakuzhandai

field property=txtField1 depends=requiredif
arg0 key=form.txtField1/
var
var-namefield[0]/var-name
var-valuecheckBox/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valueon/var-value
/var  
/field 
field property=txtFieldn depends=requiredif
arg0 key=form.txtFieldn/
var
var-namefield[0]/var-name
var-valuecheckBox/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valueon/var-value
/var  
/field 
 
Hope this help you... :)
-Ram



-Original Message-
From: sairam manda [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 4:44 AM
To: [EMAIL PROTECTED]
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]



Re: Apply an Xslt to the struts-config.xml

2003-11-12 Thread Stephan Wiesner
Attached is a simple XSL file you can use. You might want to adapt it to 
display different Informations, though.

Stephan

Nick Heudecker wrote:

Adrien,

StrutsDoc, my project, does this.  You can check it out at:
http://struts.sf.net/strutsdoc
Feel free to contact me with questions or comments.

On Wed, Nov 12, 2003 at 02:41:22PM +0100, Adrien GEYMOND wrote:

Hello all,

I am looking for a nice presentation of the struts-config.xml. I want to
apply a Xslt file on the struts-config.xml in order to have a well displayed
view of my struts-config. the result format should be HTML, SVG or 
Does somedy have already seen something like that ? Is there a tool,
somebody has already developped an Xsl for doing that ?

Today, i've found on google a Xslt which  examines the struts-config.xml and
looks for inconsistencies and reports the errors.
http://www.aida2.org/ndpsoftware.com/downloads-xsl-struts.php
thanks for advance ...

adrien

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


?xml version=1.0 encoding=ISO-8859-1?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

xsl:output method=html /

xsl:variable name=server select='http://127.0.0.1:8080/crs'/

!-- Head *** --
xsl:template match=struts-config

html
   head
  titleStruts Forward Definitionen/title
  meta http-equiv=content-type content=text/html; charset=ISO-8859-1 /
   /head
   body
   xsl:apply-templates select=*/
  /body/html
/xsl:template

xsl:template match=*
/xsl:template

xsl:template match=//global-forwards
   h2Forwards/h2
   table border=1
   trthLink/ththDatei/th/tr
   xsl:apply-templates select=*/
   /table br / br /
/xsl:template

xsl:template match=forward
  tr
 tdxsl:value-of select=@name //td
 td  
  axsl:attribute name=hrefxsl:value-of 
  select=$server/xsl:value-of 
  select=@path //xsl:attribute
  xsl:value-of select=@path /
  /a
 /td
 /tr
/xsl:template


!-- ** --

xsl:template match=//form-beans
   h2Form-Beans/h2
   table border=1
   trthName/ththKlasse/th/tr
   xsl:apply-templates select=*/
   /table br / br /
/xsl:template

xsl:template match=form-bean
  tr
 tdxsl:value-of select=@name //td
 td xsl:value-of select=@type //td 
 /tr
/xsl:template




!-- ** --

xsl:template match=//action-mappings
   h2Action-Mappings/h2
   table border=1
   trthName/ththPfad/th/tr
   xsl:apply-templates select=*/
   /table br / br /
/xsl:template

xsl:template match=action
  tr
 tdxsl:value-of select=@name //td
 td xsl:value-of select=@path /:
 table border=0
	xsl:apply-templates select=*/ 
 /table
 /td 
 /tr
/xsl:template


xsl:template match=action/forward
  trtdxsl:value-of select=@name //td
  td ==gt; 
  axsl:attribute name=hrefxsl:value-of 
  select=$server/xsl:value-of 
  select=@path //xsl:attribute
  xsl:value-of select=@path /
  /a  

  /td/tr
/xsl:template

/xsl:stylesheet

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

Re: Hello World gone wrong

2003-11-12 Thread Adam Hardy
On 11/12/2003 02:50 AM Richard Morris wrote:
Adam,

The struts.jar is located in the /WEB-INF/lib folder.  I know the struts.jar
file is working because I can use the html tags (i.e. html:html,
html:base/, etc.) without error.
I just don't know what the problem could be.  I am sure it is something
stupid but with such a simple application, you think it would be noticeable.
Anyway, thanks for the help.
If you send me the app in a JAR file and the server.xml I'll try it out 
on my machine if you like.

Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Two actionForm in the same Action

2003-11-12 Thread Zakaria khabot
Hi,
How to call two ActionForm in the same Action.
I have wrote : 
EnregisterForm enregForm = (EnregisterForm) form;
and also 
RechForm rechForm = (RechForm) form;
but I received an Exception.
How to do.
thanks.


 
Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]
 


Re: how to read request attribute

2003-11-12 Thread Stack Buffer
hi,
 
you can try the  following JSTL tags, which can be used with the Struts-el library
 
c:out value=expression default=expression escapeXml=boolean/
 
c:set var=name scope=scope value=expression

if thats what ur looking for 

Garg Raman (SDinc) [EMAIL PROTECTED] wrote:
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

I want to show it in paramId=id, paramProperty paramName??
I have want a link like
Edit.do?id=5






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



-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: validation

2003-11-12 Thread MANCHIKALAP, KRISHNA (SBCSI)
sairam,
If u r using struts 1.1 then u can find a zip file called
struts-example.zip else download the struts 1.1

Unzip the file  u can find an example on validating ur form at 
struts-example\WEB-INF\src\java\examples\validator


-- Kri$hn@
-
*: bus: [EMAIL PROTECTED]   *: +1 (314) 331 - 9897
*: per:  [EMAIL PROTECTED]  *: +1 (925) 864 - 0012


-Original Message-
From: sairam manda [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 3:57 AM
To: [EMAIL PROTECTED]
Subject: Re: validation



Hello Sir,

Thank you for the reply but Iam looking  to use  t he  
requiredIf validator .

regards
sairam

From: Garg Raman \(SDinc\) [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: validation Date: Wed, 12 Nov 2003 15:23:50 +0530

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]


_
Find your first love. Rekindle past joys! http://www.batchmates.com/msn.asp 
Get in touch with batchmates.


-
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: who want to join xmoon project ?

2003-11-12 Thread Stack Buffer

Hi,
I just read your mail on the struts, I checked the link u provided, but I will still 
like to know more about the project, it sounds very appealling to be able to reduce 
development time and I would like to join ur project if possible.
 
Edward

Mario [EMAIL PROTECTED] wrote:
It's an opensource project that speed up your development time.

http://www.xmoon.it 



contact me.









-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Where is Struts 1.0.2 distribution???

2003-11-12 Thread Anthony Leonard
Maybe I'm missing something but I can't find Struts 1.0.2 binaries or source
anywhere... Has it been de-supported?

I've been working fine with Struts 1.0.1 all year. Now using Tiles, but have
fallen over a bug which was fixed in Struts 1.0.2 according to the release notes
(below), but all the download links to it on jakarta.apache.org have been
updated and Struts 1.0.2 isn't anywhere!

http://jakarta.apache.org/struts/userGuide/release-notes-1.0.2.html
(see last line)

I really need to find it - any help much appreciated.

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



Re: Dynamic Image from DB to JSP

2003-11-12 Thread Marc AMIR-TAHMASSEB
Dear Hubert and David,
thanks for your help. Finaly i did like this :
in my jsp  a create a image tag as : 
img src=loadImage.do?id=%=Integer.toString(image.getId())% 

loadImage.do create first a Java Temporary File (File.createTempFile) 
containing the bytes of the image comming from the DB. Then it generates 
a document with the appropriate content type (that i stored before)  
and i push the image bytes[] to the response like this :

response.setContentType(image/pjpeg);
response.setHeader(Content-Disposition, filename=+img.getName());
response.setHeader(Cache-Control, no-cache);
response.setContentLength((int)img.length());
OutputStream ou = response.getOutputStream();
FileInputStream in = new FileInputStream(img);
byte[] buffer = new byte[(int)img.length()];
in.read(buffer);
ou.write(buffer);
ou.flush();
ou.close();
in.close();
img.delete();
img.deleteOnExit();
Regards,
Marc
David Friedman wrote:

Marc,

That's a tricky one I've planned for but haven't started yet.  My research
showed the html:img tag should be used with a path.  That path can invoke an
action (direct, not tiled) that sets the content-type to the right type of
image then tosses out the binary stream. So, it should be something like
this:
html:write get a URL such as /images.do?id=555 or
http://somehost/images.do?id=555;.  Then your map an action for /images
to set the content type, open the database, and print the binary stream
appropriately.  Sounds a bit list an advertising program, almost. :)
If something else works for you, please let me know as this is type of image
display is on my to-do list.
Regards,
David
 



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


Re: xdoclet strutsconfigxml thingy

2003-11-12 Thread harm
You can easily set the destination directory for your struts-config.xml.

So you can have many different sub-apps...

Regards,

Harm de Laat
Informatiefabriek
The Netherlands




Caoilte O'Connor [EMAIL PROTECTED] 
11/12/2003 01:55 PM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
Re: xdoclet strutsconfigxml thingy






ok. i have something similar enough.



But which bit in that specifies that you have a subapp, ie

struts-config-XXX.xml

instead of,

struts-config.xml


and do you put the subapp xml merge files in a sub dir of 
the root merge dir? or specify them as a separate merge dir 
in another webdoclet invocation.

cheers

c


On Wednesday 12 November 2003 13:23, 
[EMAIL PROTECTED] wrote:
 Yes it is quitte easy:

 In build.xml
 target name=xdoclet.web

 taskdef
 name=webdoclet
 
 classname=xdoclet.modules.web.WebDocletTask
 classpathref=xdoclet.classpath /

 webdoclet
 
 destdir=${resources.dir}/manager/WEB-INF
 mergedir=${xdoclet.merge.dir}/manager


 fileset dir=${classes.dir}/manager
 includes= **/*Action.java/
 fileset dir=${classes.dir}/manager
 includes= **/*Form.java/
 fileset dir=${classes.dir}/manager
 includes= **/*Servlet.java/

 deploymentdescriptor
 
 servletspec=${servlet.spec.version}
 distributable=false
 sessiontimeout=240

 taglib
 uri=struts-bean
 location=/WEB-INF/struts-bean.tld
 /
 taglib
 uri=struts-html
 location=/WEB-INF/struts-html.tld
 /
 taglib
 uri=struts-logic
 location=/WEB-INF/struts-logic.tld
 /
 taglib
 uri=struts-nested
 location=/WEB-INF/struts-nested.tld
 /
 taglib
 uri=struts-tiles
 location=/WEB-INF/struts-tiles.tld
 /
 taglib
 uri=sitemesh-decorator
 
 location=/WEB-INF/sitemesh-decorator.tld /
 taglib
 uri=sitemesh-page
 location=/WEB-INF/sitemesh-page.tld
 /
 taglib
 
 uri=http://jakarta.apache.org/taglibs/jstl/core;
 location=/WEB-INF/c.tld /
 taglib
 
 uri=http://jakarta.apache.org/taglibs/jstl/fmt;
 location=/WEB-INF/fmt.tld /

 /deploymentdescriptor

 strutsconfigxml version=1.1/

 /webdoclet
 /target


 In your Java files:

 * @struts.action
  *  name=changeStateForm
  *  path=/change_state
  *  scope=request
  *  validate=false
  * @struts.action-forward
  *  name=success
  *  path=/main.jsp
  * @struts.action-exception
  * 
 key=advertisement.doesnt.exists.exception *
 type=nl.informatiefabriek.om.exception.advertisement.Adv
ertisementDoesNotExistException * 
 path=/error.jsp
  *  scope=request
  * @struts.action-exception
  *  key=relation.doesnt.exists.exception
  *
 type=nl.informatiefabriek.om.exception.relation.Relation
DoesNotExistsException *  path=/error.jsp
  *  scope=request
  */
 public class ChangeStateAction extends BaseAction {
 // your class
 }

 Good luck,

 Regards,

 Harm de Laat
 Informatiefabriek
 The Netherlands




 Caoilte O'Connor [EMAIL PROTECTED]
 11/12/2003 01:11 PM
 Please respond to
 Struts Users Mailing List
 [EMAIL PROTECTED]


 To
 Struts Users Mailing List
 [EMAIL PROTECTED] cc

 Subject
 xdoclet strutsconfigxml thingy






 Does anyone who uses XDoclet know how to make it generate
 struts-config sub-app config files?

 I've been looking at it and can't work out whether it's
 covered.

 c


 -
 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]


-
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: Where is Struts 1.0.2 distribution???

2003-11-12 Thread David Liles
I believe on the jakarta struts site there is a link to archived downloads...
 
try this:  http://archive.apache.org/dist/jakarta/struts/

-Original Message- 
From: Anthony Leonard [mailto:[EMAIL PROTECTED] 
Sent: Wed 11/12/2003 8:58 AM 
To: [EMAIL PROTECTED] 
Cc: 
Subject: Where is Struts 1.0.2 distribution???



Maybe I'm missing something but I can't find Struts 1.0.2 binaries or source
anywhere... Has it been de-supported?

I've been working fine with Struts 1.0.1 all year. Now using Tiles, but have
fallen over a bug which was fixed in Struts 1.0.2 according to the release 
notes
(below), but all the download links to it on jakarta.apache.org have been
updated and Struts 1.0.2 isn't anywhere!

http://jakarta.apache.org/struts/userGuide/release-notes-1.0.2.html
(see last line)

I really need to find it - any help much appreciated.

-
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]

commons upload FileItem objects?

2003-11-12 Thread Matt Pease
Hi all -

  I'm putting together a webapp that'll do lots of file-uploading.  The
commons Fileupload package has a nifty little API that'll let you write
an uploaded file directly.  According to their docs, 
http://jakarta.apache.org/commons/fileupload/using.html, it'll actually
move the file rather than copying it.


  But I can't seem to get at a FileItem object using struts' upload 
implementation.  Strange thing is that Struts' FormFile objects
seem to have FileItem objects wrapped -- but in a private field.  

  Is there a way to get at the wrapped FileItem? or some other way to
be able to use that great FileItem.write method in Struts?

Thanks very much-
Matt

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



Re: fmt:message, fmt:setLocale and struts

2003-11-12 Thread Kris Schneider
No idea about that. The JSTL algorithm is defined in Chapter 8 of the JSTL spec
(1.0  1.1), so that's probably not changing in the near future. I haven't
looked at commons-resources too deeply so I can't comment on whether that will
help. The key concepts with JSTL seem to be an ordered list of preferred locales
(ServletRequest.getLocales) and a fallback locale combined with deferred loading
of the root resource. I don't think commons-resources currently embraces that
approach (not that it couldn't).

Quoting Adam Hardy [EMAIL PROTECTED]:

 Presumably the Jakarta Taglibs developers and the Struts people are 
 going to centralize on the Commons-Resources package at some point in 
 the future, in which case the divergence will disappear?
 
 On 11/11/2003 08:31 PM Kris Schneider wrote:
  The JSTL algorithm will only use the root resource (your
  ApplicationResources.properties) as a last resort. It will walk through the
 set
  of locales returned by ServletRequest.getLocales and try to find a match.
 If it
  can't, JSTL implements the concept of a fallback locale that it will
 attempt to
  match. If a match is still not found, only then will the root resource
 get
  loaded. So, if your set of locales is:
  
  en
  de
  
  And you've got the following resources:
  
  ApplicationResources.properties
  ApplicationResources_de.properties
  
  Then JSTL will find a match for de and use it. If you add the resource:
  
  ApplicationResources_en.properties
  
  Then it'll match en first. If you just make the en resource an empty
 file,
  it'll pick up all the entries from the root. Kooky, huh? If you're using
 a
  Servlet 2.3 container, why not use a Filter to keep the Struts and JSTL
 locales
  in sync? Something like this might work (untested):
  
  import javax.servlet.jsp.jstl.core.Config;
  ...
  HttpSession session = request.getSession(true);
  Locale locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);
  if (locale == null) {
locale = request.getLocale();
  }
  Config.set(session, Config.FMT_LOCALE, locale);
  
  Quoting Adam Hardy [EMAIL PROTECTED]:
  
  
 Struts and JSTL seem to have different algorithms to establish the 
 locale to use.
 
 I have JSPs which use fmt:message for titles, labels, comments etc and 
 I have also just started to program a page which will include an 
 underlying language page to incorporate big paragraphs of localized text.
 
 I thought I would use the struts locale setting in my session for this, 
 but then I found that with my current browser settings, struts has 
 chosen EN but JSTL has chosen DE.
 
 I have EN as my first locale preference in my browser, followed by DE, 
 being in Germany.
 
 In my app I have a default ApplicationResources.properties and just now 
 to create a test, I copied it to ApplicationResources_de.properties.
 
 Bug or feature, logically expected or are Struts and JSTL purposefully 
 diverging?
 
 
 Adam
 
 PS if I rename ApplicationResources to ApplicationResources_en then JSTL 
 and Struts agree again, on EN.
 
 PPS I can work-around with this:
 c:set var=localeKey
%=org.apache.struts.Globals.LOCALE_KEY %
 /c:set
 fmt:setLocale value=${sessionScope[localeKey]}/
 
 to make JSTL follow Struts.

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

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



Re: Where is Struts 1.0.2 distribution???

2003-11-12 Thread Anthony Leonard
Thanks David - just found it.

http://archive.apache.org/dist/jakarta/struts/old/release/v1.0.2/

Got spooked by all the legacy links pointing to the wrong places - and no help
on the mailing lists. Maybe this'll help others find it... 


David Liles wrote:
 
 I believe on the jakarta struts site there is a link to archived downloads...
 
 try this:  http://archive.apache.org/dist/jakarta/struts/
 
 -Original Message-
 From: Anthony Leonard [mailto:[EMAIL PROTECTED]
 Sent: Wed 11/12/2003 8:58 AM
 To: [EMAIL PROTECTED]
 Cc:
 Subject: Where is Struts 1.0.2 distribution???
 
 
 
 Maybe I'm missing something but I can't find Struts 1.0.2 binaries or source
 anywhere... Has it been de-supported?
 
 I've been working fine with Struts 1.0.1 all year. Now using Tiles, but have
 fallen over a bug which was fixed in Struts 1.0.2 according to the release 
 notes
 (below), but all the download links to it on jakarta.apache.org have been
 updated and Struts 1.0.2 isn't anywhere!
 
 http://jakarta.apache.org/struts/userGuide/release-notes-1.0.2.html
 (see last line)
 
 I really need to find it - any help much appreciated.
 
 -
 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]

--
Anthony Leonard
ITaCS Applications
University of Sunderland
email: [EMAIL PROTECTED]
phone: 3167 (ext: 0191 515 3167)

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



Validation using mask

2003-11-12 Thread Ramadoss Chinnakuzhandai
Sorry for posting my prev question again...

In my form I'm validating a TextField hostname in order to accept only 
^[0-9a-zA-Z-\.]*$ in its input value using mask pattern in validation.xml.

field property=hostname depends=required,mask,minlength,maxlength
arg0 key=form.hostname/
arg1 key=${var:minlength} name=minlength resource=false/
arg2 key=${var:maxlength} name=maxlength resource=false/
msg name=mask key=errors.hostname.invalid/
var
var-namemaxlength/var-name
var-value63/var-value
/var
var
var-nameminlength/var-name
var-value1/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field

The problem is that it DOES NOT accepting . character as part its input value.



The same time I tested the same pattern for different TextField called ccID on the 
other page and I found it accepting . character as part of its input value

field property=ccID depends=requiredif,mask
arg0 key=form.creditcard.cid/
msg name=mask key=errors.hostname.invalid/
var
var-namefield[0]/var-name
var-valueccNoID/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valuefalse/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field   

I'm just wondering why it does accepting the first field and why it does not for the 
second field?

Please correct me where I'm going wrong or do I hv to modify the mask pattern in such 
a way that it accepts . character...??

-Ram


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



RE: Dynamic Image from DB to JSP

2003-11-12 Thread David Friedman
Marc,

If you have performance problems, here is a suggestion:

Keep an index in your application scope that has the totals (since
load-time) of how many times each item has been displayed.  Then, keep
copies of the top 50 on-disk.  That way, if the image is one of your top-50,
you don't need the database but can simply open the disk file and read/print
it for speed on your most-used ones and only remove the temp files you made
for the less frequently used ones.

Regards,
David

-Original Message-
From: Marc AMIR-TAHMASSEB [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 9:59 AM
To: Struts Users Mailing List
Subject: Re: Dynamic Image from DB to JSP


Dear Hubert and David,
thanks for your help. Finaly i did like this :

in my jsp  a create a image tag as :
img src=loadImage.do?id=%=Integer.toString(image.getId())% 

loadImage.do create first a Java Temporary File (File.createTempFile)
containing the bytes of the image comming from the DB. Then it generates
a document with the appropriate content type (that i stored before)
and i push the image bytes[] to the response like this :

response.setContentType(image/pjpeg);
response.setHeader(Content-Disposition, filename=+img.getName());
response.setHeader(Cache-Control, no-cache);
response.setContentLength((int)img.length());

OutputStream ou = response.getOutputStream();
FileInputStream in = new FileInputStream(img);
byte[] buffer = new byte[(int)img.length()];
in.read(buffer);
ou.write(buffer);
ou.flush();
ou.close();
in.close();
img.delete();
img.deleteOnExit();

Regards,
Marc

David Friedman wrote:

Marc,

That's a tricky one I've planned for but haven't started yet.  My research
showed the html:img tag should be used with a path.  That path can invoke
an
action (direct, not tiled) that sets the content-type to the right type of
image then tosses out the binary stream. So, it should be something like
this:

html:write get a URL such as /images.do?id=555 or
http://somehost/images.do?id=555;.  Then your map an action for /images
to set the content type, open the database, and print the binary stream
appropriately.  Sounds a bit list an advertising program, almost. :)

If something else works for you, please let me know as this is type of
image
display is on my to-do list.

Regards,
David




-
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]



Direct Call of some Actions within another Action ?

2003-11-12 Thread Gleichmann, Mario
Dear Community,

is it possible to call one or more Actions within another Action (let's say
a 'Composite-Action') ?

I want to call a certain Method of a collection of Actions in a row (let's
say i want to call update-methods within some DispatchActions and then do
the rest of the work in the Composite-Action, depending of the results of
the called update-Methods).

The calls should happen inside the execute-method of another action (the
'Composite-Action' - particularly i dont be able to use the standard
mechanism of an action-chain (by forwarding from one action to another
action) because the Composite-Action should keep control e.g. of the order
of the calls).

How can i get a reference to an instance of the actions i want to call? Is
there some way to use the RequestController or is there any Factory or
ProviderClass i am allowed to use in order to get these References (i am
sure it is not a good idea to instantiate the Actions by myself :o))?

... or is this approach completely wrong and there is some better way to
solve this problem (maybe extend the RequestController or use a plug-in) ???

Thanks for your help in advance !!! :o)

Mario Gleichmann

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



Re: Dynamic Image from DB to JSP

2003-11-12 Thread Marc AMIR-TAHMASSEB
ok,
Fortunatly i have no performance problem and theres no more than 30 
images that are small (100x100 - 2Ko)...
But i will probably do what you said...
thanks,

Marc

David Friedman wrote:

Marc,

If you have performance problems, here is a suggestion:

Keep an index in your application scope that has the totals (since
load-time) of how many times each item has been displayed.  Then, keep
copies of the top 50 on-disk.  That way, if the image is one of your top-50,
you don't need the database but can simply open the disk file and read/print
it for speed on your most-used ones and only remove the temp files you made
for the less frequently used ones.
Regards,
David
-Original Message-
From: Marc AMIR-TAHMASSEB [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 9:59 AM
To: Struts Users Mailing List
Subject: Re: Dynamic Image from DB to JSP
Dear Hubert and David,
thanks for your help. Finaly i did like this :
in my jsp  a create a image tag as :
img src=loadImage.do?id=%=Integer.toString(image.getId())% 
loadImage.do create first a Java Temporary File (File.createTempFile)
containing the bytes of the image comming from the DB. Then it generates
a document with the appropriate content type (that i stored before)
and i push the image bytes[] to the response like this :
response.setContentType(image/pjpeg);
response.setHeader(Content-Disposition, filename=+img.getName());
response.setHeader(Cache-Control, no-cache);
response.setContentLength((int)img.length());
OutputStream ou = response.getOutputStream();
FileInputStream in = new FileInputStream(img);
byte[] buffer = new byte[(int)img.length()];
in.read(buffer);
ou.write(buffer);
ou.flush();
ou.close();
in.close();
img.delete();
img.deleteOnExit();
Regards,
Marc
David Friedman wrote:

 

Marc,

That's a tricky one I've planned for but haven't started yet.  My research
showed the html:img tag should be used with a path.  That path can invoke
   

an
 

action (direct, not tiled) that sets the content-type to the right type of
image then tosses out the binary stream. So, it should be something like
this:
html:write get a URL such as /images.do?id=555 or
http://somehost/images.do?id=555;.  Then your map an action for /images
to set the content type, open the database, and print the binary stream
appropriately.  Sounds a bit list an advertising program, almost. :)
If something else works for you, please let me know as this is type of
   

image
 

display is on my to-do list.

Regards,
David
   



-
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]
 



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


Null DynaActionForm

2003-11-12 Thread Sumit S.
Hi,
   How do I create a new instance of a DynaActionForm when the form passed to my 
Action.execute() method is null ?

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception 
{
try
{
DynaActionForm userForm = null;
if (null != form)
{
userForm = (DynaActionForm) form;
System.out.println(IT IS NOT NULL);
}
else
  { 
/*NEED TO CREATE A NEW INSTANCE HERE*/
  System.out.println(IT IS NULL);
  }




RE: PDF File Display in JSP-Struts

2003-11-12 Thread David Gagnon
It's not the Internet Explorer problem with pdf ?  Check
http://xml.apache.org/fop/servlets.html#ie

Let me know ... I can give clue on how I solved it.

/David

-Message d'origine-
De : Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
Envoyé : 10 novembre, 2003 07:55
À : Struts Users Mailing List
Cc : WebSphere User Group Tech Q  A Forum
Objet : PDF File Display in JSP-Struts



Hi All,
 I want to display one PDF file in my websphere struts framework. when i do
it without struts (only servlets ) it works but when i use JSP along with
struts it does not work. it does not read binary data properly... Is there
any body to help me out


regards  thankx in advace...
Abhijeet Mahalkar


-
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: Two actionForm in the same Action

2003-11-12 Thread Fedor Smirnoff
Hi,

You can do something like this:

HttpSession session = request.getSession();
RechForm rechForm =(RechForm)session.getAttribute(rechForm);

Hope it helps

Fedor

-Original Message-
From: Zakaria khabot [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 12, 2002 6:39 AM
To: struts-user
Subject: Two actionForm in the same Action

Hi,
How to call two ActionForm in the same Action.
I have wrote : 
EnregisterForm enregForm = (EnregisterForm) form;
and also 
RechForm rechForm = (RechForm) form;
but I received an Exception.
How to do.
thanks.


 
Zakaria KHABOT
Ingénieur d'état Réseaux informatiques
MFIE/CGED
Tel : +212 62 46 10 29
E_mail : [EMAIL PROTECTED]
 



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



RE: PDF File Display in JSP-Struts

2003-11-12 Thread Larry Meadors
Are you using the jsp writer, or the servlet output stream? 

JSP writer assumes char data and totally borks the pdf. 

SOS assumes binary data.

Larry

===
Hi All,
 I want to display one PDF file in my websphere struts framework. when i
do
it without struts (only servlets ) it works but when i use JSP along
with
struts it does not work. it does not read binary data properly... Is
there
any body to help me out

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



RE: PDF File Display in JSP-Struts

2003-11-12 Thread Jarrod M. Lugo
It may be an issue with using white space inside your jsp.  I normally do
something like this (using a custom fo to pdf bean)...  (note: everything up
to, and including, the c:set var=junkWhiteSpace is on one line)


%@ page contentType=application/pdf %%@ taglib prefix=c
uri=http://java.sun.com/jstl/core; %c:import var=blahFo
url=/test/blah.fo /c:set var=junkWhiteSpace

jsp:useBean id=foToPdf scope=page class=com...FoToPdf /

c:set target=${foToPdf} property=inputFo value=${blahFo} /

/c:setc:out value=${foToPdf.pdf} escapeXml=false /

Regards,
Jarrod Lugo


-Original Message-
From: David Gagnon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 1:24 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: PDF File Display in JSP-Struts


It's not the Internet Explorer problem with pdf ?  Check
http://xml.apache.org/fop/servlets.html#ie

Let me know ... I can give clue on how I solved it.

/David

-Message d'origine-
De : Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
Envoyé : 10 novembre, 2003 07:55
À : Struts Users Mailing List
Cc : WebSphere User Group Tech Q  A Forum
Objet : PDF File Display in JSP-Struts



Hi All,
 I want to display one PDF file in my websphere struts framework. when i do
it without struts (only servlets ) it works but when i use JSP along with
struts it does not work. it does not read binary data properly... Is there
any body to help me out


regards  thankx in advace...
Abhijeet Mahalkar


-
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: Null DynaActionForm

2003-11-12 Thread Matt Pease
Probably you aren't properly setting up the dynaActionForm in
your struts-config.xml file.

matt


-Original Message-
From: Sumit S. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 12:55 PM
To: [EMAIL PROTECTED]
Subject: Null DynaActionForm


Hi,
   How do I create a new instance of a DynaActionForm when the form passed
to my Action.execute() method is null ?

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception
{
try
{
DynaActionForm userForm = null;
if (null != form)
{
userForm = (DynaActionForm) form;
System.out.println(IT IS NOT NULL);
}
else
  {
/*NEED TO CREATE A NEW INSTANCE HERE*/
  System.out.println(IT IS NULL);
  }




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



RE: Null DynaActionForm

2003-11-12 Thread Yee, Richard K,,DMDCWEST
Sumit,
If your form parameter is null, it indicates that there is an error in your
configuration of struts-config.xml. When things are configured correctly,
form should never be null.

-Richard


-Original Message-
From: Sumit S. [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 9:55 AM
To: [EMAIL PROTECTED]
Subject: Null DynaActionForm


Hi,
   How do I create a new instance of a DynaActionForm when the form passed
to my Action.execute() method is null ?

public ActionForward execute(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
throws Exception 
{
try
{
DynaActionForm userForm = null;
if (null != form)
{
userForm = (DynaActionForm) form;
System.out.println(IT IS NOT NULL);
}
else
  { 
/*NEED TO CREATE A NEW INSTANCE HERE*/
  System.out.println(IT IS NULL);
  }



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



Re: File upload problem with Struts 1.1

2003-11-12 Thread Martin Cooper
This usually happens when you have your jars in the wrong place and your
container also includes (a different version of) FileUpload. Make sure that
the Commons FileUpload jar file, as well as the Struts jar file and other
Commons jar files, are in your WEB-INF/lib directory, and not in a
container-specific lib directory.

--
Martin Cooper


Raman Garg [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
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

html:form action=/ImageUploadSubmit enctype=multipart/form-data

html:file property=fileName/

br
html:submit value=Upload/
/html:form



java.lang.NoSuchMethodError:
org.apache.commons.fileupload.FileUpload.setSizeMax
(I)V
at
org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest
(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(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
com.tavant.lg.controller.servlet.LoanGeniusFrontControllerServlet.service
(LoanGeniusFrontControllerServlet.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.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$ServletInvocationAction.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.invokeServlet
(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]



RE: Validation using mask

2003-11-12 Thread Ramadoss Chinnakuzhandai
Any suggestions or ideas for the below mail would be greatly appreciated.

Tnx in advance,

-Ram


-Original Message-
From: Ramadoss Chinnakuzhandai 
Sent: Wednesday, November 12, 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Validation using mask


Sorry for posting my prev question again...

In my form I'm validating a TextField hostname in order to accept only 
^[0-9a-zA-Z-\.]*$ in its input value using mask pattern in validation.xml.

field property=hostname depends=required,mask,minlength,maxlength
arg0 key=form.hostname/
arg1 key=${var:minlength} name=minlength resource=false/
arg2 key=${var:maxlength} name=maxlength resource=false/
msg name=mask key=errors.hostname.invalid/
var
var-namemaxlength/var-name
var-value63/var-value
/var
var
var-nameminlength/var-name
var-value1/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field

The problem is that it DOES NOT accepting . character as part its input value.



The same time I tested the same pattern for different TextField called ccID on the 
other page and I found it accepting . character as part of its input value

field property=ccID depends=requiredif,mask
arg0 key=form.creditcard.cid/
msg name=mask key=errors.hostname.invalid/
var
var-namefield[0]/var-name
var-valueccNoID/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valuefalse/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field   

I'm just wondering why it does accepting the first field and why it does not for the 
second field?

Please correct me where I'm going wrong or do I hv to modify the mask pattern in such 
a way that it accepts . character...??

-Ram


-
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: PDF File Display in JSP-Struts

2003-11-12 Thread Larry Meadors
Why would you ever do this? This looks like a complete and total kludge.

If you are sending back binary data (application/pdf), just do it from the action 
class using the response.getOutputStream() and return null from the execute method.

Advantages: 
 - you already have everything you need right there
 - you eliminate the entry in struts-config
 - you eliminate a useless jsp
 - you can specify any content type (not just one per jsp)
 - you get better exception handling
 - the list could go on and on...

Larry

 [EMAIL PROTECTED] 11/12/03 11:43 AM 
It may be an issue with using white space inside your jsp.  I normally do
something like this (using a custom fo to pdf bean)...  (note: everything up
to, and including, the c:set var=junkWhiteSpace is on one line)


%@ page contentType=application/pdf %%@ taglib prefix=c
uri=http://java.sun.com/jstl/core; %c:import var=blahFo
url=/test/blah.fo /c:set var=junkWhiteSpace

jsp:useBean id=foToPdf scope=page class=com...FoToPdf /

c:set target=${foToPdf} property=inputFo value=${blahFo} /

/c:setc:out value=${foToPdf.pdf} escapeXml=false /

Regards,
Jarrod Lugo


-Original Message-
From: David Gagnon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 1:24 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: PDF File Display in JSP-Struts


It's not the Internet Explorer problem with pdf ?  Check
http://xml.apache.org/fop/servlets.html#ie

Let me know ... I can give clue on how I solved it.

/David

-Message d'origine-
De : Abhijeet Mahalkar [mailto:[EMAIL PROTECTED]
Envoyé : 10 novembre, 2003 07:55
À : Struts Users Mailing List
Cc : WebSphere User Group Tech Q  A Forum
Objet : PDF File Display in JSP-Struts



Hi All,
 I want to display one PDF file in my websphere struts framework. when i do
it without struts (only servlets ) it works but when i use JSP along with
struts it does not work. it does not read binary data properly... Is there
any body to help me out


regards  thankx in advace...
Abhijeet Mahalkar


-
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]



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



RE: Validation using mask

2003-11-12 Thread Saul Q Yuan
Try take out the - before \., ie. Use:

^[0-9a-zA-Z\.]*$

Saul



-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 3:09 PM
To: Struts Users Mailing List
Subject: RE: Validation using mask

Any suggestions or ideas for the below mail would be greatly
appreciated.

Tnx in advance,

-Ram


-Original Message-
From: Ramadoss Chinnakuzhandai 
Sent: Wednesday, November 12, 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Validation using mask


Sorry for posting my prev question again...

In my form I'm validating a TextField hostname in order to accept only
^[0-9a-zA-Z-\.]*$ in its input value using mask pattern in
validation.xml.

field property=hostname depends=required,mask,minlength,maxlength
arg0 key=form.hostname/
arg1 key=${var:minlength} name=minlength resource=false/
arg2 key=${var:maxlength} name=maxlength resource=false/
msg name=mask key=errors.hostname.invalid/
var
var-namemaxlength/var-name
var-value63/var-value
/var
var
var-nameminlength/var-name
var-value1/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field

The problem is that it DOES NOT accepting . character as part its input
value.



The same time I tested the same pattern for different TextField called
ccID on the other page and I found it accepting . character as part of
its input value

field property=ccID depends=requiredif,mask
arg0 key=form.creditcard.cid/
msg name=mask key=errors.hostname.invalid/
var
var-namefield[0]/var-name
var-valueccNoID/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valuefalse/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field   

I'm just wondering why it does accepting the first field and why it does
not for the second field?

Please correct me where I'm going wrong or do I hv to modify the mask
pattern in such a way that it accepts . character...??

-Ram


-
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]


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



RE: PDF File Display in JSP-Struts

2003-11-12 Thread Craig R. McClanahan
Quoting Larry Meadors [EMAIL PROTECTED]:

 Why would you ever do this? This looks like a complete and total kludge.
 
 If you are sending back binary data (application/pdf), just do it from the
 action class using the response.getOutputStream() and return null from the
 execute method.
 
 Advantages: 
  - you already have everything you need right there
  - you eliminate the entry in struts-config
  - you eliminate a useless jsp
  - you can specify any content type (not just one per jsp)
  - you get better exception handling
  - the list could go on and on...
 

There's actually a much more fundamental reason than all of the above (which are
true nonetheless) -- JSP pages are not allowed to create binary output.  They
never call response.getOutputStream().

 Larry
 

Craig


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



RE: Validation using mask

2003-11-12 Thread Ramadoss Chinnakuzhandai
sure Saul...let me test it and update you :)

-Ram


-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:20 PM
To: 'Struts Users Mailing List'
Subject: RE: Validation using mask


Try take out the - before \., ie. Use:

^[0-9a-zA-Z\.]*$


Saul



-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 3:09 PM
To: Struts Users Mailing List
Subject: RE: Validation using mask

Any suggestions or ideas for the below mail would be greatly
appreciated.

Tnx in advance,

-Ram


-Original Message-
From: Ramadoss Chinnakuzhandai 
Sent: Wednesday, November 12, 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Validation using mask


Sorry for posting my prev question again...

In my form I'm validating a TextField hostname in order to accept only
^[0-9a-zA-Z-\.]*$ in its input value using mask pattern in
validation.xml.

field property=hostname depends=required,mask,minlength,maxlength
arg0 key=form.hostname/
arg1 key=${var:minlength} name=minlength resource=false/
arg2 key=${var:maxlength} name=maxlength resource=false/
msg name=mask key=errors.hostname.invalid/
var
var-namemaxlength/var-name
var-value63/var-value
/var
var
var-nameminlength/var-name
var-value1/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field

The problem is that it DOES NOT accepting . character as part its input
value.



The same time I tested the same pattern for different TextField called
ccID on the other page and I found it accepting . character as part of
its input value

field property=ccID depends=requiredif,mask
arg0 key=form.creditcard.cid/
msg name=mask key=errors.hostname.invalid/
var
var-namefield[0]/var-name
var-valueccNoID/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valuefalse/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field   

I'm just wondering why it does accepting the first field and why it does
not for the second field?

Please correct me where I'm going wrong or do I hv to modify the mask
pattern in such a way that it accepts . character...??

-Ram


-
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]


-
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]



Connect close the DB connection in Form Action

2003-11-12 Thread Zhou, Qin (Eric)
I have the following code in my Form file. The methods retrieve data from access DB to 
populated the two drop down boxes. But con.close() generates 'General error' 
exception? Any help is appreciated.


/**
 * Return a list of week ending date
 * @return  ArrayList   List of week ending date
 */

private static ArrayList getWeekEndingDateList()
{
Connection con = null;
statement stmt = null;
ResultSet rs = null;
ArrayList weekEndingDate = new ArrayList();

try {
//Register driver:
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con = DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL statements to the 
database:
stmt = con.createStatement();
   
String sql = select * from Weeks order by Wk_Ending;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String weekNum = rs.getString(Wk_Num);
String wkEndingDate = rs.getString(Wk_Ending);
//System.out.println(Week Num =  + weekNum);
//System.out.println(wkEndingDate =  + wkEndingDate);

weekEndingDate.add(new LabelValueBean(wkEndingDate, 
wkEndingDate));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
//Close the connection:
try {
if (rs != null) rs.close();
if (stmt != null) stmt.close();
if (con != null) con.close();

} catch (SQLException e) {
System.out.println(e.toString()); 
}
}


return weekEndingDate;
}


/**
 * Return a list of work category
 * @return  ArrayList   List of work category
 */

private static ArrayList getWorkCategoryList()
{
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
ArrayList workCategory = new ArrayList();

try {
//Register driver:
Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con = DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL statements to the 
database:
stmt = con.createStatement();
   
String sql = select * from workCategory;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String categoryNum = rs.getString(Cat_Num);
String workCategories = rs.getString(Category);
//System.out.println(Category Num =  + categoryNum);
//System.out.println(work category =  + 
workCategories);

workCategory.add(new LabelValueBean(workCategories, 
workCategories));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
//Close the connection:
try {
if (rs != null) rs.close();
if (stmt != null) stmt.close();
if (con != null) con.close();

} catch (SQLException e) {
System.out.println(e.toString()); 
}
}


return workCategory;
}


RE: Connect close the DB connection in Form Action

2003-11-12 Thread Yee, Richard K,,DMDCWEST
Eric,
It is generally not recommended to use the JDBC-ODBC bridge driver. There
are several bugs in the driver and it doesn't perform as well as a type 4
driver. What DB are you using? Also, you don't have to register the driver
every time. Put the Class.forName call in a static initializer or somewhere
else that will only get called once. It's also a better practice to use a
pooled DataSource.

Regards,

Richard

-Original Message-
From: Zhou, Qin (Eric) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 12:36 PM
To: 'Struts Users Mailing List'
Subject: Connect close the DB connection in Form Action


I have the following code in my Form file. The methods retrieve data from
access DB to populated the two drop down boxes. But con.close() generates
'General error' exception? Any help is appreciated.


/**
 * Return a list of week ending date
 * @return  ArrayList   List of week ending date
 */

private static ArrayList getWeekEndingDateList()
{
Connection con = null;
statement stmt = null;
ResultSet rs = null;
ArrayList weekEndingDate = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from Weeks order by
Wk_Ending;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String weekNum = rs.getString(Wk_Num);
String wkEndingDate =
rs.getString(Wk_Ending);
//System.out.println(Week Num =  +
weekNum);
//System.out.println(wkEndingDate =  +
wkEndingDate);

weekEndingDate.add(new
LabelValueBean(wkEndingDate, wkEndingDate));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
//Close the connection:
try {
if (rs != null) rs.close();
if (stmt != null)
stmt.close();
if (con != null)
con.close();

} catch (SQLException e) {
System.out.println(e.toString()); 
}
}


return weekEndingDate;
}


/**
 * Return a list of work category
 * @return  ArrayList   List of work category
 */

private static ArrayList getWorkCategoryList()
{
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
ArrayList workCategory = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from workCategory;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String categoryNum =
rs.getString(Cat_Num);
String workCategories =
rs.getString(Category);
//System.out.println(Category Num =  +
categoryNum);
//System.out.println(work category =  +
workCategories);

workCategory.add(new
LabelValueBean(workCategories, workCategories));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
   

How to Turn off Struts logging?

2003-11-12 Thread Gerald_Beattie
Help make it stop.

Can struts logging be turned off?
If so how?

Can it be integrated with Log4j so the logging level can be set by a 
properties file?



RE: Validation using mask

2003-11-12 Thread Ramadoss Chinnakuzhandai
sorry Saul I tried that as well but again it does not accepting .

Any idea/suggestion would be appreciated.
-Ram


-Original Message-
From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:20 PM
To: 'Struts Users Mailing List'
Subject: RE: Validation using mask


Try take out the - before \., ie. Use:

^[0-9a-zA-Z\.]*$

Saul



-Original Message-
From: Ramadoss Chinnakuzhandai [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 3:09 PM
To: Struts Users Mailing List
Subject: RE: Validation using mask

Any suggestions or ideas for the below mail would be greatly
appreciated.

Tnx in advance,

-Ram


-Original Message-
From: Ramadoss Chinnakuzhandai 
Sent: Wednesday, November 12, 2003 10:18 AM
To: [EMAIL PROTECTED]
Subject: Validation using mask


Sorry for posting my prev question again...

In my form I'm validating a TextField hostname in order to accept only
^[0-9a-zA-Z-\.]*$ in its input value using mask pattern in
validation.xml.

field property=hostname depends=required,mask,minlength,maxlength
arg0 key=form.hostname/
arg1 key=${var:minlength} name=minlength resource=false/
arg2 key=${var:maxlength} name=maxlength resource=false/
msg name=mask key=errors.hostname.invalid/
var
var-namemaxlength/var-name
var-value63/var-value
/var
var
var-nameminlength/var-name
var-value1/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field

The problem is that it DOES NOT accepting . character as part its input
value.



The same time I tested the same pattern for different TextField called
ccID on the other page and I found it accepting . character as part of
its input value

field property=ccID depends=requiredif,mask
arg0 key=form.creditcard.cid/
msg name=mask key=errors.hostname.invalid/
var
var-namefield[0]/var-name
var-valueccNoID/var-value
/var
var
var-namefieldTest[0]/var-name
var-valueEQUAL/var-value
/var
var
var-namefieldValue[0]/var-name
var-valuefalse/var-value
/var
var
var-namemask/var-name
var-value^[0-9a-zA-Z-\.]*$/var-value
/var
/field   

I'm just wondering why it does accepting the first field and why it does
not for the second field?

Please correct me where I'm going wrong or do I hv to modify the mask
pattern in such a way that it accepts . character...??

-Ram


-
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]


-
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: How to Turn off Struts logging?

2003-11-12 Thread Yee, Richard K,,DMDCWEST
Set the debug parameter in the web.xml file to 0. Search the archives, this
question has been asked many times already.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 1:44 PM
To: Struts Users Mailing List
Subject: How to Turn off Struts logging?


Help make it stop.

Can struts logging be turned off?
If so how?

Can it be integrated with Log4j so the logging level can be set by a 
properties file?


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



Need a RegExp mask for: all charactors except for \, / and ?

2003-11-12 Thread Kevin Wang





Thanks in advance!



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



RE: How to Turn off Struts logging?

2003-11-12 Thread Gerald_Beattie
Can someone point me to the archives?

Thanks





Yee, Richard K,,DMDCWEST [EMAIL PROTECTED]
11/12/2003 04:46 PM
Please respond to Struts Users Mailing List

 
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
cc: 
Subject:RE: How to Turn off Struts logging?


Set the debug parameter in the web.xml file to 0. Search the archives, 
this
question has been asked many times already.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 1:44 PM
To: Struts Users Mailing List
Subject: How to Turn off Struts logging?


Help make it stop.

Can struts logging be turned off?
If so how?

Can it be integrated with Log4j so the logging level can be set by a 
properties file?


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





Re: Can't see my ActionForm in Action or any Context

2003-11-12 Thread Hubert Rabago
Peter: You sent it only to my email but I got a delivery failure when I replied
to yours.  I'm sending this to the mailing list so others might benefit from it,
or may correct me if I'm wrong (though it works for me).

You can do the following:
1. Create a new ActionForm in your Action
2. Populate it with data
3. Set a session or request attribute using the form name you're using 
in your
struts config for that ActionForm

So...
if in your struts-config you have
 form-bean name=myForm type=com.me.MyFormBean
 ...
 action path=/showMyForm .../
 action path=/submitMyForm name=myForm scope=request .../

inside your showMyForm Action you can
  public ActionForward execute(...) throws Exception {
  ...
  MyFormBean mfb = new MyFormBean();  // initialize as desired
  request.setAttribute(myForm,mfb); // or session if you use that scope
  ...
  }


--- [EMAIL PROTECTED] wrote:
 First, Thanks for your reply, Hubert!
 To the Question: I understood the theme very similar, like you
 described. But i got to init the form with data and it would be more
 easy to do it in a action before and not on a page. That's my 
problem.
 :o)
 Greetings, Peter
 
 Hubert Rabago schrieb im Newsbeitrag
 news:[EMAIL PROTECTED]...  Peter 
-
 that's is how it's supposed to run. The form is available to the 
Action
  it was submitted to, carrying with it the values typed in by the 
user.
   --- Peter Klassen wrote:   Hi all,   can't see my ActionForm 
in
 my Action, which triggers the Forward to the Page   with the
 ActionForm. I also don't see the Form in any Context on the Page. I  

 just get the Form on the next Action, forwarded by the form on the 
page.
   I've played with the configuration already, but with no effort. 
Any
 ideas? thx, Peter__ 
 


__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



Re: PDF File Display in JSP-Struts

2003-11-12 Thread Christian Bollmeyer
Am Mittwoch, 12. November 2003 21:31 schrieb Craig R. McClanahan:
 Quoting Larry Meadors [EMAIL PROTECTED]:
  Why would you ever do this? This looks like a complete and total
  kludge.
 
  If you are sending back binary data (application/pdf), just do it
  from the action class using the response.getOutputStream() and
  return null from the execute method.
 
  Advantages:
   - you already have everything you need right there
   - you eliminate the entry in struts-config
   - you eliminate a useless jsp
   - you can specify any content type (not just one per jsp)
   - you get better exception handling
   - the list could go on and on...

 There's actually a much more fundamental reason than all of the above
 (which are true nonetheless) -- JSP pages are not allowed to create
 binary output.  They never call response.getOutputStream().

That's how it's meant to be, and JSPs themselves don't, but you
can always shed in a scriptlet to make them behave otherwise.
 I've seen people doing just ridiculous things with JSPs, some
of them routinely putting a % at the top and a % at the end,
and then went on happily putting everything imaginable in-bet-
ween, usually with lengthy %@ page import=[xy] % state-
ments on top. Won't support Mark Galbreath on this matter,
so if there may be a grain of truth in his direction, I'm still
just telling from my personal experiences, limited to a
single case, thankfully. But never underestimate human
ingenuity ;-)

  Larry

 Craig

-- Chris.


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



Re: PDF File Display in JSP-Struts

2003-11-12 Thread Larry Meadors
 [EMAIL PROTECTED] 11/12/03 3:14 PM 
Am Mittwoch, 12. November 2003 21:31 schrieb Craig R. McClanahan:
 Quoting Larry Meadors [EMAIL PROTECTED]:
  Why would you ever do this? This looks like a complete and total
  kludge.
 
  If you are sending back binary data (application/pdf), just do it
  from the action class using the response.getOutputStream() and
  return null from the execute method.
 
  Advantages:
   - you already have everything you need right there
   - you eliminate the entry in struts-config
   - you eliminate a useless jsp
   - you can specify any content type (not just one per jsp)
   - you get better exception handling
   - the list could go on and on...

 There's actually a much more fundamental reason than all of the above
 (which are true nonetheless) -- JSP pages are not allowed to create
 binary output.  They never call response.getOutputStream().

That's how it's meant to be, and JSPs themselves don't, but you
can always shed in a scriptlet to make them behave otherwise.

But that is the point - Why would you?

It is like using a screwdriver as a hammer because you like
screwdrivers.

 I've seen people doing just ridiculous things with JSPs, some
of them routinely putting a % at the top and a % at the end,
and then went on happily putting everything imaginable in-bet-
ween, usually with lengthy %@ page import=[xy] % state-
ments on top. Won't support Mark Galbreath on this matter,
so if there may be a grain of truth in his direction, I'm still
just telling from my personal experiences, limited to a
single case, thankfully. But never underestimate human
ingenuity ;-)

Heheh, you will sometimes see stupidity coming disguised as ingenuity -
beware!

Larry


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



RE: Need a RegExp mask for: all charactors except for \, / and ?

2003-11-12 Thread Saul Q Yuan
Try this,

^[\\|\/|\?] 

or (^[\\|\/|\?])* for 0 or more matches


Saul


-Original Message-
From: Kevin Wang [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 4:54 PM
To: Struts Users Mailing List
Subject: Need a RegExp mask for: all charactors except for \, / and
?






Thanks in advance!



-
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]



DynaAction differences?

2003-11-12 Thread Nathan Maves
What is the difference between these three

DynaActionForm

DynaValidatorForm
DynaValidatorActionForm
I assume that the first does no validation. But I can not find any docs 
on how to use the second two.

nathan

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


Re: How to Turn off Struts logging?

2003-11-12 Thread atta-ur rehman
http://www.mail-archive.com/[EMAIL PROTECTED]/
- Original Message - 
From: [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 1:59 PM
Subject: RE: How to Turn off Struts logging?


 Can someone point me to the archives?

 Thanks





 Yee, Richard K,,DMDCWEST [EMAIL PROTECTED]
 11/12/2003 04:46 PM
 Please respond to Struts Users Mailing List


 To: 'Struts Users Mailing List'
[EMAIL PROTECTED]
 cc:
 Subject:RE: How to Turn off Struts logging?


 Set the debug parameter in the web.xml file to 0. Search the archives,
 this
 question has been asked many times already.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, November 12, 2003 1:44 PM
 To: Struts Users Mailing List
 Subject: How to Turn off Struts logging?


 Help make it stop.

 Can struts logging be turned off?
 If so how?

 Can it be integrated with Log4j so the logging level can be set by a
 properties file?


 -
 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: Need a RegExp mask for: all charactors except for \, / and ?

2003-11-12 Thread Daniel Lipofsky

Do this
[^\\/?]  (one char)
[^\\/?]* (zero or more chars)

Also if in a java string don't forget to escape
the backslashes again like
[^/?]*

- Dan

 From: Saul Q Yuan [mailto:[EMAIL PROTECTED]
 
 Try this,
 
 ^[\\|\/|\?] 
 
 or (^[\\|\/|\?])* for 0 or more matches
 

 From: Kevin Wang [mailto:[EMAIL PROTECTED] 
 Subject: Need a RegExp mask for: all charactors except for 
 \, / and
 ?

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



RE: Connect close the DB connection in Form Action

2003-11-12 Thread Zhou, Qin (Eric)
Richard

I am not experienced with DB access. Which driver do you suggest? I am reading from 
ACCESS. Can you provide some sample code for initilizing the driver. 

Thanks

Eric Zhou

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Connect close the DB connection in Form Action


Eric,
It is generally not recommended to use the JDBC-ODBC bridge driver. There
are several bugs in the driver and it doesn't perform as well as a type 4
driver. What DB are you using? Also, you don't have to register the driver
every time. Put the Class.forName call in a static initializer or somewhere
else that will only get called once. It's also a better practice to use a
pooled DataSource.

Regards,

Richard

-Original Message-
From: Zhou, Qin (Eric) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 12:36 PM
To: 'Struts Users Mailing List'
Subject: Connect close the DB connection in Form Action


I have the following code in my Form file. The methods retrieve data from
access DB to populated the two drop down boxes. But con.close() generates
'General error' exception? Any help is appreciated.


/**
 * Return a list of week ending date
 * @return  ArrayList   List of week ending date
 */

private static ArrayList getWeekEndingDateList()
{
Connection con = null;
statement stmt = null;
ResultSet rs = null;
ArrayList weekEndingDate = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from Weeks order by
Wk_Ending;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String weekNum = rs.getString(Wk_Num);
String wkEndingDate =
rs.getString(Wk_Ending);
//System.out.println(Week Num =  +
weekNum);
//System.out.println(wkEndingDate =  +
wkEndingDate);

weekEndingDate.add(new
LabelValueBean(wkEndingDate, wkEndingDate));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
//Close the connection:
try {
if (rs != null) rs.close();
if (stmt != null)
stmt.close();
if (con != null)
con.close();

} catch (SQLException e) {
System.out.println(e.toString()); 
}
}


return weekEndingDate;
}


/**
 * Return a list of work category
 * @return  ArrayList   List of work category
 */

private static ArrayList getWorkCategoryList()
{
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
ArrayList workCategory = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from workCategory;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String categoryNum =
rs.getString(Cat_Num);
String workCategories =
rs.getString(Category);
//System.out.println(Category Num =  +
categoryNum);
//System.out.println(work 

RE: Need a RegExp mask for: all charactors except for \, / and ?

2003-11-12 Thread Kevin Wang




Thanks Dan.

It's for an input field for user's name that can't have /,\ or ? in
it. I use it in Strut's validation.xml

So it should be [^\\/?]* then?

Kevin



   
  
  Daniel Lipofsky
  
  [EMAIL PROTECTED]To:   Struts Users Mailing List 
[EMAIL PROTECTED]  
  icsnet.comcc:   
  
 Subject:  RE: Need a RegExp mask for: 
all charactors except for \, / and ?
  11/12/2003 04:45 PM  
  
  Please respond to
  
  Struts Users
  
  Mailing List
  
   
  





Do this
[^\\/?]  (one char)
[^\\/?]* (zero or more chars)

Also if in a java string don't forget to escape
the backslashes again like
[^/?]*

- Dan

 From: Saul Q Yuan [mailto:[EMAIL PROTECTED]

 Try this,

 ^[\\|\/|\?]

 or (^[\\|\/|\?])* for 0 or more matches


 From: Kevin Wang [mailto:[EMAIL PROTECTED]
 Subject: Need a RegExp mask for: all charactors except for
 \, / and
 ?

-
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]



chaining actions

2003-11-12 Thread Yury Rabiankou
Hello everybody,

I cannot understand the following passage from Ted Husted's Struts in
Action (p.228):

If you forward from one Action to another Action... the ActionForm
bean is reset, repopulated, and revalidated, and, if all goes well,
passed to the second Action

How can the same ActionForm bean be passed to the second Action, if the
second Action could have a different ActionForm bean type
(different subclass of ActionForm used for the second Action).

Generally, I was under impression that ActionForms are always created
anew for each Action execute() call. I don't get it, in what cases an ActionForm is
reused and when reset() method could be called?

Thank you!

-- 
Best regards,
 Yury  mailto:[EMAIL PROTECTED]


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



OT: RE: Connect close the DB connection in Form Action

2003-11-12 Thread Yee, Richard K,,DMDCWEST
Eric,
I'd suggest switching to MySQL or PostgresSQL databases. There are Type 4
drivers available for both. Is this a commercial site or just for
development purposes? What application server are you using?

-Richard


-Original Message-
From: Zhou, Qin (Eric) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 2:54 PM
To: 'Struts Users Mailing List'
Subject: RE: Connect close the DB connection in Form Action


Richard

I am not experienced with DB access. Which driver do you suggest? I am
reading from ACCESS. Can you provide some sample code for initilizing the
driver. 

Thanks

Eric Zhou

-Original Message-
From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Connect close the DB connection in Form Action


Eric,
It is generally not recommended to use the JDBC-ODBC bridge driver. There
are several bugs in the driver and it doesn't perform as well as a type 4
driver. What DB are you using? Also, you don't have to register the driver
every time. Put the Class.forName call in a static initializer or somewhere
else that will only get called once. It's also a better practice to use a
pooled DataSource.

Regards,

Richard

-Original Message-
From: Zhou, Qin (Eric) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 12:36 PM
To: 'Struts Users Mailing List'
Subject: Connect close the DB connection in Form Action


I have the following code in my Form file. The methods retrieve data from
access DB to populated the two drop down boxes. But con.close() generates
'General error' exception? Any help is appreciated.


/**
 * Return a list of week ending date
 * @return  ArrayList   List of week ending date
 */

private static ArrayList getWeekEndingDateList()
{
Connection con = null;
statement stmt = null;
ResultSet rs = null;
ArrayList weekEndingDate = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from Weeks order by
Wk_Ending;
;   
rs = stmt.executeQuery(sql);

System.out.println(SQL =  + sql);

while (rs.next()) {

String weekNum = rs.getString(Wk_Num);
String wkEndingDate =
rs.getString(Wk_Ending);
//System.out.println(Week Num =  +
weekNum);
//System.out.println(wkEndingDate =  +
wkEndingDate);

weekEndingDate.add(new
LabelValueBean(wkEndingDate, wkEndingDate));

}

} catch(Exception e) 
{ 
System.out.println(e.toString()); 
}
finally {
//Close the connection:
try {
if (rs != null) rs.close();
if (stmt != null)
stmt.close();
if (con != null)
con.close();

} catch (SQLException e) {
System.out.println(e.toString()); 
}
}


return weekEndingDate;
}


/**
 * Return a list of work category
 * @return  ArrayList   List of work category
 */

private static ArrayList getWorkCategoryList()
{
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
ArrayList workCategory = new ArrayList();

try {
//Register driver:

Class.forName(sun.jdbc.odbc.JdbcOdbcDriver).newInstance(); 
//Establish a connection to given database URL:
con =
DriverManager.getConnection(jdbc:odbc:Timesheet,,);
//Create a Statement object for sending SQL
statements to the database:
stmt = con.createStatement();
   
String sql = select * from workCategory;
;   
rs = 

XML via POST as only entry point for web application

2003-11-12 Thread Jesse Clark
I've spent several days searching the archives and the web looking for
information and haven't been able to find a clear solution for my problem.
So, I am going to outline what it is I need to do, identify the problems and
the possible solutions I have been able to come up with, and see if anyone
else out there has implemented this sort of thing or if anyone has any ideas
about the best way to go about it. I apologize in advance for how long
winded this post is.

Here is what I am trying to do:

I am building a web app that will use Flash as the front end. The entry
point for the web application needs to be an action that the Flash movie
will be posting XML data to. I would like to have some way of keeping track
of the session but I could work around that by having login information sent
each of the 2 times that the Flash movie needs to communicate to the server.

So far, I have an action, logon.do, that receives the post from the Flash
movie, gets the XML data out of the request body, parses it, and passes the
data on to a business logic bean that validates the username and password.
Logon.do will then forward to a jsp that will generate the XML for the
response to the Flash movie. The Flash movie will then present the end user
with some forms, validate all the data and build an XML document that will
be posted back to another action (processXml.do). After processXml.do
validates and stores the data, it will generate an XML document containing
success/fail and/or error information.

Here are the problems:

- I would like logon.do to be the default entry point to my web application.
However, I understand that there is no way to set the welcome-file to an
action. I've tried using both logic:redirect and logic:forward in an
index.jsp that is mapped as the welcome-file in my web.xml. The problem here
is I want to send a post to http://myserver/myapp/ and have it forwarded to
logon.do with the original post data intact. Neither of these forwarding
methods seem to maintain the body of the original request.

I have never used filters but I looked into them a little bit and it seems
like there might be a way to set up a filter that mapped to all requests for
/ and checked the request body for the required data, and forwarded to
logon.do. Has anyone done anything similar to this with filters? If so can
you point me to resources to learn how to do it myself? And, if so, are
filters the best solution for this problem or are there better practices?

The only other way that I can see around it is to ensure that all the client
Flash applications post directly to logon.do, have index.jsp forward to
logon.do, and logon.do return an error page if no XML data is found in the
body of the request.

- The second problem involves tracking the session. Flash's
XML.sendAndLoad() method isn't HTTP aware and there aren't any methods for
setting header info for the request. So, how to track the session id?  Could
I get the session id from the session that was created in the intial call to
logon.do and then send that id back to the flash movie in the xml response,
then have the flash movie include the session id in the post to
processXml.do which would parse the XML retrieve the correct session id and
then retrieve the session some how? - is there a way to look up a session by
id now that HttpSessionContext is deprecated?

Thanks in advance for taking the time to read this and thanks in advance for
any help you might provide,

-j



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



How to Mask input fields?

2003-11-12 Thread Vicky
Hello Group,
I am looking for code example to mask input fields in Java(using Swing) for Date, 
decimals and few other types. Any pointers/examples will be appreciated.
 
Thanks,
Vicky


-
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

Re: chaining actions

2003-11-12 Thread Manish Singla
It's true.

In case you have coarse grained ActionForm which is used by BOTH actions 
 in that case reset() will be called twice as request will go from 
RequestProcessor both times.

Theoretically, in case you have DIFFERENT ActionForms for BOTH actions 
in that case  reset() will be called for respective ActionForms.

Request parameters to set values in ActionForm will be available in both 
actions.

Thanks
Manish Singla
Yury Rabiankou wrote:
Hello everybody,

I cannot understand the following passage from Ted Husted's Struts in
Action (p.228):
If you forward from one Action to another Action... the ActionForm
bean is reset, repopulated, and revalidated, and, if all goes well,
passed to the second Action
How can the same ActionForm bean be passed to the second Action, if the
second Action could have a different ActionForm bean type
(different subclass of ActionForm used for the second Action).
Generally, I was under impression that ActionForms are always created
anew for each Action execute() call. I don't get it, in what cases an ActionForm is
reused and when reset() method could be called?
Thank you!



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


Re: PDF File Display in JSP-Struts

2003-11-12 Thread Craig R. McClanahan
Quoting Christian Bollmeyer [EMAIL PROTECTED]:

 Am Mittwoch, 12. November 2003 21:31 schrieb Craig R. McClanahan:
  Quoting Larry Meadors [EMAIL PROTECTED]:
   Why would you ever do this? This looks like a complete and total
   kludge.
  
   If you are sending back binary data (application/pdf), just do it
   from the action class using the response.getOutputStream() and
   return null from the execute method.
  
   Advantages:
- you already have everything you need right there
- you eliminate the entry in struts-config
- you eliminate a useless jsp
- you can specify any content type (not just one per jsp)
- you get better exception handling
- the list could go on and on...
 
  There's actually a much more fundamental reason than all of the above
  (which are true nonetheless) -- JSP pages are not allowed to create
  binary output.  They never call response.getOutputStream().
 
 That's how it's meant to be, and JSPs themselves don't, but you
 can always shed in a scriptlet to make them behave otherwise.

You might get lucky on some containers, but you can be assured that writing
binary output from a scriptlet is not guaranteed to be portable.  Indeed,
you're more likely to cause an IllegalStateException, because the servlet
container won't let you call getWriter() and getOutputStream() on the same
response.

  I've seen people doing just ridiculous things with JSPs, some
 of them routinely putting a % at the top and a % at the end,
 and then went on happily putting everything imaginable in-bet-
 ween, usually with lengthy %@ page import=[xy] % state-
 ments on top. Won't support Mark Galbreath on this matter,
 so if there may be a grain of truth in his direction, I'm still
 just telling from my personal experiences, limited to a
 single case, thankfully. But never underestimate human
 ingenuity ;-)
 

s/ingenuity/foolishness/

:-)

I remember in the pre-Struts days of someone on the JSP Interest mailing list
talking about the fact that they had a 5000 line JSP page that implemented the
entire app (complete with creating different forms and processing the results)
-- all in a single page.  And he was *proud* of it!


   Larry
 
  Craig
 
 -- Chris.
 

Craig


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



Show validation error messages next to the corresponding input fields

2003-11-12 Thread Kevin Wang




Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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



RE: Show validation error messages next to the corresponding inpu t fields

2003-11-12 Thread Ghanakota, Vishu
use the errors tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to an
entry in ResourceBundle. errors tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-Original Message-
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


MMS firstam.com made the following
 annotations on 11/12/2003 06:26:48 PM
--
THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE 
USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR 
PRIVILEGED INFORMATION.  IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR 
RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, 
DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE 
THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS 
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM.
==


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



RE: Show validation error messages next to the corresponding inpu t fields

2003-11-12 Thread Kevin Wang




Thanks Vishu,

But my question is that how to put the error messages in the location next
to their input fields. Something like this:


User name: (input box for user name)

First name: (input box for first name)

*Error: Last name can't be empty.
Last name:(input box for last name)


*Error: invalid credit card number.
Credit Card Number (input box for credit card number)

..

Thanks,
kevin



   

  Ghanakota,  

  Vishu   To:   'Struts Users Mailing List' 
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:
 
  stam.comSubject:  RE: Show validation error 
messages next to the corresponding inpu t fields
   

  11/12/2003 08:26 

  PM   

  Please respond to

  Struts Users

  Mailing List

   





use the errors tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to
an
entry in ResourceBundle. errors tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-Original Message-
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


MMS firstam.com made the following
 annotations on 11/12/2003 06:26:48 PM
--

THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS
MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM.
==



-
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: Show validation error messages next to the corresponding inpu t fields

2003-11-12 Thread David Liles
Try this...

tr
tdbean:message key=logon.jsp.username /:/td
tdhtml:text property=username size=15 maxlength=15 //td
/tr
tr
tdhtml:errors property=username //td
/tr

-Original Message-
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 8:39 PM
To: Struts Users Mailing List
Subject: RE: Show validation error messages next to the corresponding
inpu t fields






Thanks Vishu,

But my question is that how to put the error messages in the location next
to their input fields. Something like this:


User name: (input box for user name)

First name: (input box for first name)

*Error: Last name can't be empty.
Last name:(input box for last name)


*Error: invalid credit card number.
Credit Card Number (input box for credit card number)

..

Thanks,
kevin



   

  Ghanakota,  

  Vishu   To:   'Struts Users Mailing List' 
[EMAIL PROTECTED]
  [EMAIL PROTECTED]cc:
 
  stam.comSubject:  RE: Show validation error 
messages next to the corresponding inpu t fields
   

  11/12/2003 08:26 

  PM   

  Please respond to

  Struts Users

  Mailing List

   





use the errors tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to
an
entry in ResourceBundle. errors tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-Original Message-
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


MMS firstam.com made the following
 annotations on 11/12/2003 06:26:48 PM
--

THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS
MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM.
==



-
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]


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



CSS and Struts

2003-11-12 Thread Ipsita
Hi,

I have an application which I want to change to a struts application. All
the jsps have css applied. How do I apply the same css if I use 

html:text property=/ 

instead of 

input type=text name= class=

Where do I put the css?

Thanks in advance

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

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



RE: CSS and Struts

2003-11-12 Thread Manjunath Bhat

html:text property= styleClass=... /

-Original Message-
From: Ipsita [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 13, 2003 9:16 AM
To: Struts Users Mailing List; Struts Users Mailing List
Subject: CSS and Struts

Hi,

I have an application which I want to change to a struts application.
All
the jsps have css applied. How do I apply the same css if I use 

html:text property=/ 

instead of 

input type=text name= class=

Where do I put the css?

Thanks in advance

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

-
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: CSS and Struts

2003-11-12 Thread Ipsita
Thanks a lot!

- Ipsita


On Thu, 13 Nov 2003 09:18:18 +0530, Manjunath Bhat [EMAIL PROTECTED]
said:
 
 html:text property= styleClass=... /
 
 -Original Message-
 From: Ipsita [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, November 13, 2003 9:16 AM
 To: Struts Users Mailing List; Struts Users Mailing List
 Subject: CSS and Struts
 
 Hi,
 
 I have an application which I want to change to a struts application.
 All
 the jsps have css applied. How do I apply the same css if I use 
 
 html:text property=/ 
 
 instead of 
 
 input type=text name= class=
 
 Where do I put the css?
 
 Thanks in advance
 
 -- 
 http://www.fastmail.fm - A fast, anti-spam email service.
 
 -
 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]
 

-- 
http://www.fastmail.fm - Sent 0.02 seconds ago

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



fix itarate problem

2003-11-12 Thread hari_s
Hi everyone..
 
Is it possible to fix the row that iterate with  logic:iterate , I
already use length property but it's work when the data is more than
value that we set.
And my problem is , I only have 2 data and I want to display 6 row ..
 
 Thank you for the answer..
 


RE: how to read request attribute

2003-11-12 Thread Manjunath Bhat

If the varName is an instance of a bean then you can try 
bean:write name= varName  property=username/ where username is
member of the bean

-Original Message-
From: Garg Raman (SDinc) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 12, 2003 5:02 PM
To: Struts Users Mailing List
Subject: how to read request attribute

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 html:link tag what will be value of
paramId=id,  paramProperty paramName??
I have want a link like
Edit.do?id=5






-
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]



  1   2   >