RE: Broken pipe problem

2004-03-01 Thread Abhishek Srivastava
This exception is harmless exception. You can also ignore it ... If you want
to. It doesn't stop weblogic from processing requests.

Regards,
Abhishek.
-Original Message-
From: Ray [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 01, 2004 2:59 PM
To: Struts Users Mailing List
Subject: Re: Broken pipe problem

Thanks .. :-)

I'll read up and give it a try ...

--- [EMAIL PROTECTED] wrote:
 
 Hi this exception will occur in the following situation.
 
 1.  User uses the Stop, Back and forward button while the browser 
 waiting for a respond.
 2. He submits 1+ request to the server while the first request is on 
 the process.
 
 To avoid that struts has some token mechanism (tokenInValid(), 
 resetToken()) to implement. So that you can find out and filter the 
 user action.
 
 We implemented this, and we are able to reduce this exception, but not 
 completely
 
 Thanks
 Mohamed Abdul Khaliq.M
 IT Specialist
 SDC2 - Chennai
 Ph 8272628 Ext 8098
 
 
 
 
  
   [EMAIL PROTECTED] 
 
  
   co.ukTo:  
 [EMAIL PROTECTED]  
  
cc:  
 
  
   02/29/2004 09:58
 Subject:  Broken pipe problem   

   PM
 
  
   Please respond to 
 
  
   Struts Users 
 
  
   Mailing List 
 
  
 
 
  
 
 
  
 
 
 
 
 Hi there ... :-)
 
 I was wondering if someone could help me with a 'broken pipe' error?
 
 Every so often, my Tomcat server throws out this error.
 


--
 
 2004-02-27 09:40:25 - Ctx(/letsco) : Broken pipe in
 R( /letsco + /editmail.jsp + null) -
 java.net.SocketException: Broken pipe
 at
 java.net.SocketOutputStream.socketWrite0(Native
 Method)
 at

java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at

java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at

org.apache.tomcat.modules.server.Ajp13.send(Ajp13.java:841)
 at

org.apache.tomcat.modules.server.Ajp13.doWrite(Ajp13.java:727)
 at

org.apache.tomcat.modules.server.Ajp13Response.doWrite(Ajp13Interceptor.java
:491)
 at

org.apache.tomcat.core.OutputBuffer.realWriteBytes(OutputBuffer.java:188)
 at

org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:360)
 at

org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:338)
 at

org.apache.tomcat.util.buf.IntermediateOutputStream.write(C2BConverter.java:
234)
 at

sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:334)
 at

sun.nio.cs.StreamEncoder$CharsetSE.implFlushBuffer(StreamEncoder.java:402)
 at

sun.nio.cs.StreamEncoder$CharsetSE.implFlush(StreamEncoder.java:406)
 at

sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:150)
 at

java.io.OutputStreamWriter.flush(OutputStreamWriter.java:213)
 at

org.apache.tomcat.util.buf.WriteConvertor.flush(C2BConverter.java:183)
 at

org.apache.tomcat.util.buf.C2BConverter.flushBuffer(C2BConverter.java:126)
 at

org.apache.tomcat.core.OutputBuffer.realWriteChars(OutputBuffer.java:337)
 at

org.apache.tomcat.util.buf.CharChunk.flushBuffer(CharChunk.java:388)
 at

org.apache.tomcat.core.OutputBuffer.flush(OutputBuffer.java:314)
 at

org.apache.tomcat.core.OutputBuffer.close(OutputBuffer.java:305)
 at

org.apache.tomcat.core.Response.finish(Response.java:271)
 at

org.apache.tomcat.modules.server.Ajp13Response.finish(Ajp13Interceptor.java:
483)
 at

org.apache.tomcat.core.ContextManager.service(ContextManager.java:838)
 at

org.apache.tomcat.modules.server.Ajp13Interceptor.processConnection(Ajp13Int
ercept
 or.java:341)
 at


Avoiding app server restarts while doing struts development

2004-03-01 Thread Abhishek Srivastava
Hello All,

I develop my apps on weblogic app server. When doing development on struts I
feel for every little operation (change in resource file, change in source
file, change config files) it requires me to either redeploy the app or to
restart the app server. 

I have tried to switch to the debug mode, but still the number of redeploys
or restarts have not reduced.

I find these very time-consuming. 

Has someone figured out a way in which they can do development without
redeployment at every single change? 

Regards,
Abhishek.


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



Bean:message in attribute causes non-matching extension tags error

2004-02-27 Thread Abhishek Srivastava
Hello All,

I am trying to have text from my property file appear into one of the
attributes of an html select element. The code which I have written is

html:select property=destinationType onchange=
javascript:fnLocationBlur(); fnChangeZoomImage()
onfocus=fnSetFocus('0');window.status ='bean:message
key=select.destination.type/'; return true  value =
'%=destinationType%' 
html:option value=citycity/html:option
  html:option value=statestate/html:option
  html:option value=countrycountry/html:option
/html:select

However when invoke the jsp I get an exception

/jsp/WcNoNc/Query.jsp(575): Non-matching extension tags //[ null; Line:
575]
probably occurred due to an error in /jsp/WcNoNc/Query.jsp line 575:
/html:select

What am I doing wrong? How can I get the text from my property file into one
of the html attributes?

Thanks for your help in advance.

Regards,
Abhishek.

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



[REPOST] Struts throws exception during load testing

2004-01-16 Thread Abhishek Srivastava
Hello All,

I had posted this yesterday, but didn't receive any response so far. This
error is coming more and more frequently when we increase the load on
struts. Worst thing is that the stack trace shows that this error is not
originated from any of my source. It seems to be an error being thrown by
struts.

The error is coming only during load testing. It doesn't come during a
single user testing.

I am using struts 1.1 on BEA weblogic 8.1 on HP-UX 11i.

Can anyone who is an expert on struts internals have a look at this and tell
me what is going wrong?

Thanks for your help in advance.[Sorry for reposting this... But since using
struts was my idea, now I am being questioned... And I have no clue about
why this error comes]

Here is the stack trace :

Jan 15, 2004 10:02:28 PM IST Error HTTP BEA-101020
[ServletContext(id=28318025,name=testWebApp,context-path=/testWebApp)]
Servlet failed with Exception java.lang.NullPointerException
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:305)
at
weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDis
patcherImpl.java:382)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:286)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso
r.java:274)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequ
estProcessor.java:320)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.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(W
ebAppServletContext.java:6310)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3622)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

Regards,
Abhishek.

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



Struts throws exception during load testing

2004-01-15 Thread Abhishek Srivastava
Hello All,

My application works fine when I test it with my browser. But if I run load
test on it (25 parallel users) I start getting this exception periodically.

However in the stack trace I cannot see any of my code. Why is the struts
code generating this exception? That too only under minor loaded conditions?

I am using struts 1.1 on BEA weblogic 8.1

Thanks for your help in advance.

Here is the stack trace :

Jan 15, 2004 10:02:28 PM IST Error HTTP BEA-101020
[ServletContext(id=28318025,name=testWebApp,context-path=/web
samWebApp)] Servlet failed with Exception
java.lang.NullPointerException
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:1053)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:387)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:305)
at
weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDis
patcherImpl.java:382)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:286)
at
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:10
69)
at
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcesso
r.java:274)
at
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProces
sor.java:455)
at
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequ
estProcessor.java:320)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.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(W
ebAppServletContext.java:6310)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3622)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2569)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

Regards,
Abhishek.

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



Mandatory use of form rather than request object

2004-01-12 Thread Abhishek Srivastava
Hello All,

I did some code reviews recently for my project being done on struts.

I found that most people still do a request.getAttribute(NAME) kind of
code even when the name is a property of the form object and is available in
the form object.

My question is should the use of form be mandatory. If yes, how it can be
enforced. Is there quick way I can remove all the params/attributes from the
request object once the corresponding values have been set in the form
object?

Thanks in advance for your advise.

Regards,
Abhishek.

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



RE: Commons validation framework and struts

2003-12-14 Thread Abhishek Srivastava
Hello Robert,

Yes. I have also defined the validator plugin in my struts-config.xml file.
I am attaching my example code here. Please tell me why it is not working.

Thanks for your help and patience.

Regards,
Abhishek.

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 8:21 PM
To: Struts Users Mailing List
Subject: RE: Commons validation framework and struts

Your field names aren't the same.

operator1 != operand1
operator2 != operand2

They must be the same or validation on those fields won't occur.

robert

 -Original Message-
 From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 12, 2003 9:35 AM
 To: [EMAIL PROTECTED]
 Subject: Commons validation framework and struts


 Hello All,

 I am trying to learn the new validation framework provided with struts 
 1.1 and am facing a few problems.

 I have a form object which I have derived from ValidatorForm class. In 
 this form I have fields like operator1, operator2. I have created a 
 file called validation.xml where I have made entries like

 form-validation
 formset
   form name='calcForm'
   field name='operand1' depends='required'
   /field
   field name='operand2' depends='required'
   /field
   /form
 /formset
 /form-validation

 The entry for action in my struts config is

 action path='/calc'
   type='com.abhi.CalcAction'
   scope='request'
   name='calcForm'
   parameter='action'
   input='/calc.jsp'
   validate='true'
   forward name='success2' path='/calc.jsp' /
 /action

 form-bean
 name=calcForm
 type=com.abhi.CalcForm
 /

 The application is working fine. Except that when I leave the fields
 operator1 or operator2 empty then no error is reported.

 Is there some step which I have missed out? Please help me out.

 Regards,
 Abhishek.

 -
 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: Commons validation framework and struts

2003-12-13 Thread Abhishek Srivastava
Hello Ben,

I am not using Dynamic forms. I have defined my own form object which
derives from ValidatorForm. Are you saying that I must switch to dynamic
forms if I want to use the validator framework? Or define my own validtors?

One thing which I couldn't find in the validation framework was how to do
validation only for a specific value. In my example I have operand1,
operand2 and operator. If the operand2 is 0 and the operator is /, then I
would like to check this and raise an error division by 0 not allowed for
other operators 0 is allowed for operand2. 

Actually with this prototype I was trying to find out how useful the
validation framework is.

Also, last time when I worked on struts the validation logic was put inside
the form class itself. Is that still allowed? 

I also have some concerns regarding the use of the XML based validation
framework. For my application, validation can get very complex. If I try to
do everything via XML then the XML will get bloated and perhaps more complex
than the java code.

I would need advise from people who have used this framework for complex
data validation to confirm whether it can easily be achieved and whether the
xml code is easily understandable.

Regards,
Abhishek.









 

-Original Message-
From: Ben Anderson [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 8:21 PM
To: [EMAIL PROTECTED]
Subject: RE: Commons validation framework and struts

You need to decide if you want to use Struts validation or define your own
class.  You're example below is inconsistent:

If you want to use Struts validation(which you probably do):
struts-config.xml
---
form-bean name=calcForm 
type=org.apache.struts.validator.DynaValidatorForm
form-property name=operand1 type=java.lang.String/
form-property name=operand2 type=java.lang.String/
/form-bean

If you are writing your own validation class, you'll want something along
these lines:
validation.xml

validator name=requiredArray
   classname=com.paychex.validator.CustomFieldChecks
   method=validateRequiredArray
   methodParams=java.lang.Object,
 
org.apache.commons.validator.ValidatorAction,
 org.apache.commons.validator.Field,
 org.apache.struts.action.ActionErrors,
 javax.servlet.http.HttpServletRequest
   msg=errors.requiredArray/

You could also implement DynaValidatorActionForm if you want to validate per
action rather than per form.

hth,
Ben


From: Abhishek Srivastava [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Commons validation framework and struts
Date: Fri, 12 Dec 2003 20:04:36 +0530

Hello All,

I am trying to learn the new validation framework provided with struts 
1.1 and am facing a few problems.

I have a form object which I have derived from ValidatorForm class. In 
this form I have fields like operator1, operator2. I have created a 
file called validation.xml where I have made entries like

form-validation
 formset
   form name='calcForm'
   field name='operand1' depends='required'
   /field
   field name='operand2' depends='required'
   /field
   /form
 /formset
/form-validation

The entry for action in my struts config is

 action path='/calc'
   type='com.abhi.CalcAction'
   scope='request'
   name='calcForm'
   parameter='action'
   input='/calc.jsp'
   validate='true'
   forward name='success2' path='/calc.jsp' /
 /action

 form-bean
 name=calcForm
 type=com.abhi.CalcForm
 /

The application is working fine. Except that when I leave the fields
operator1 or operator2 empty then no error is reported.

Is there some step which I have missed out? Please help me out.

Regards,
Abhishek.

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


_
Cell phone 'switch' rules are taking effect - find out more here. 
http://special.msn.com/msnbc/consumeradvocate.armx


-
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: Commons validation framework and struts

2003-12-13 Thread Abhishek Srivastava
Hello Robert,

Thanks for your reply.

It's a typo in my email. My form has fields operand1, operand2 and operator.
I have defined the same in the validation.xml still the validation does not
occur.

Please tell me what am I going wrong.

Regards,
Abhishek.
 

-Original Message-
From: Robert Taylor [mailto:[EMAIL PROTECTED] 
Sent: Friday, December 12, 2003 8:21 PM
To: Struts Users Mailing List
Subject: RE: Commons validation framework and struts

Your field names aren't the same.

operator1 != operand1
operator2 != operand2

They must be the same or validation on those fields won't occur.

robert

 -Original Message-
 From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]
 Sent: Friday, December 12, 2003 9:35 AM
 To: [EMAIL PROTECTED]
 Subject: Commons validation framework and struts


 Hello All,

 I am trying to learn the new validation framework provided with struts 
 1.1 and am facing a few problems.

 I have a form object which I have derived from ValidatorForm class. In 
 this form I have fields like operator1, operator2. I have created a 
 file called validation.xml where I have made entries like

 form-validation
 formset
   form name='calcForm'
   field name='operand1' depends='required'
   /field
   field name='operand2' depends='required'
   /field
   /form
 /formset
 /form-validation

 The entry for action in my struts config is

 action path='/calc'
   type='com.abhi.CalcAction'
   scope='request'
   name='calcForm'
   parameter='action'
   input='/calc.jsp'
   validate='true'
   forward name='success2' path='/calc.jsp' /
 /action

 form-bean
 name=calcForm
 type=com.abhi.CalcForm
 /

 The application is working fine. Except that when I leave the fields
 operator1 or operator2 empty then no error is reported.

 Is there some step which I have missed out? Please help me out.

 Regards,
 Abhishek.

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



Commons validation framework and struts

2003-12-12 Thread Abhishek Srivastava
Hello All,

I am trying to learn the new validation framework provided with struts 1.1
and am facing a few problems.

I have a form object which I have derived from ValidatorForm class. In this
form I have fields like operator1, operator2. I have created a file called
validation.xml where I have made entries like 

form-validation
formset
form name='calcForm'
field name='operand1' depends='required'
/field
field name='operand2' depends='required'
/field
/form
/formset
/form-validation

The entry for action in my struts config is 

action path='/calc' 
type='com.abhi.CalcAction' 
scope='request'
name='calcForm'
parameter='action'
input='/calc.jsp'
validate='true'
forward name='success2' path='/calc.jsp' /
/action

form-bean
name=calcForm
type=com.abhi.CalcForm
/

The application is working fine. Except that when I leave the fields
operator1 or operator2 empty then no error is reported.

Is there some step which I have missed out? Please help me out.

Regards,
Abhishek.

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



Re: Struts Actions are Singletons?

2002-04-24 Thread Abhishek Srivastava

And to make it thread safe I have use synchronize blocks of code which can
cause all the requests to get queued up. (Java has lock per object,
therefore if my code had 2 synchronized blocks, then the 2nd block would
lock up even when the first one is being executed.)
Isn't this bad for performance?

regards,
Abhishek.
- Original Message -
From: Nelson, Laird [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, April 24, 2002 6:27 PM
Subject: RE: Struts Actions are Singletons?


  -Original Message-
  From: abhishek srivastava [mailto:[EMAIL PROTECTED]]
  Are the Action classes that we write for Struts Singletons?
  or are they
  created and destroyed per request.


http://jakarta.apache.org/struts/doc-1.0.2/userGuide/building_controller.htm
 l#action_classes

 Excerpt:
   The controller servlet creates only one instance of your Action class,
 and uses it for all requests. Thus, you need to code your Action class so
 that it operates correctly in a multi-threaded environment, just as you
must
 code a servlet's service() method safely.

 Cheers,
 Laird

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



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




Struts with WAP+HTML projects

2002-04-19 Thread abhishek srivastava

Hello All,

Apologies for posting this again. If you had replied to my question could 
you please re-send your post to my email address directly 
([EMAIL PROTECTED]). Because of my mistake in seting up rules for my mail 
client all mails from this mailing list were getting deleted.

--
I am working on a project which is for a portal which serves to HTML and WAP
clients. This project is developed using a home grown MVC model + jsp + XSL
So one jsp serves many types of clients by looking up the header sent by the
device and applying the right XSL file .. thus creating WML or HTML output
depending upon what the client device type is. The application logic remains
the same no matter what the client device is.
We are having lot of problems with our home grown MVC framework and want to
use struts ... from all the initial examples it appears that struts is used
only for jsp pages serving HTML output.
How can I use struts in a multi channel (WAP, HTML, PDA) portal like ours? I
don't want to write a new jsp per device type. the jsp and action classes
should remain the same only the XSL changes per device type.
I would appreciate your help, also please share your experience about using
struts in a WML+HTML project.

regards,
Abhishek.

---


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




Struts with WAP+HTML projects

2002-04-18 Thread Abhishek Srivastava

Hello All,

I am working on a project which is for a portal which serves to HTML and WAP
clients. This project is developed using a home grown MVC model + jsp + XSL
So one jsp serves many types of clients by looking up the header sent by the
device and applying the right XSL file .. thus creating WML or HTML output
depending upon what the client device type is. The application logic remains
the same no matter what the client device is.
We are having lot of problems with our home grown MVC framework and want to
use struts ... from all the initial examples it appears that struts is used
only for jsp pages serving HTML output.
How can I use struts in a multi channel (WAP, HTML, PDA) portal like ours? I
don't want to write a new jsp per device type. the jsp and action classes
should remain the same only the XSL changes per device type.
I would appreciate your help, also please share your experience about using
struts in a WML+HTML project.
regards,
Abhishek.

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




Action an overkill ??

2001-12-05 Thread Abhishek Srivastava

Hello All,

I render a table through my jsp page. The user can sort the table by
clicking on each of the column headers. When the user clicks on the column
header, an Action is invoked and the data that is used to render the table
is sorted accordingly and placed back into the session. Now the control is
forwarded to the jsp that renders the table with sorted data/

I have got some feedback that using Action for things like sorting a table
is an overkill. what is suggested that each table column should point to a
jsp which should use a custom tag library to sort the table.

I am unable to decide which approach to take and why.

Can someone help me on this.

regards,
Abhishek.


A ship in harbor is safe, but that is not what ships are built for.
John A. Shedd

* * Abhishek Srivastava
***  /_  __ *** Hewlett-Packard - Solutions Organization
**  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
***/*** phone +91 80 2251554 Extn:1532
* * mailto:[EMAIL PROTECTED]


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




RE: Action an overkill ??

2001-12-05 Thread Abhishek Srivastava

Thanks for your reply,

There is a debate in my team these days on the use of Jsp Tags versus
Actions.

Some jsp developers feel that ejbs should be accessed via tag libraries,
databases should be accessed via tag libraries and for simple rendering
things like sorting a table jsp tag libraries should be used. While others
like to use Actions for all the things mentioned above.

Is there a document somewhere which describes what tasks are better suited
for actions and what tasks are better suited for tag libraries.

Technically, things mentioned above can be done easily by either as action
or as jsp tags.But I want to make a consistent decision through out the
application.

regards,
Abhishek.


A ship in harbor is safe, but that is not what ships are built for.
John A. Shedd

* * Abhishek Srivastava
***  /_  __ *** Hewlett-Packard - Solutions Organization
**  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
***/*** phone +91 80 2251554 Extn:1532
* * mailto:[EMAIL PROTECTED]

 -Original Message-
 From: Alexander Jesse [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 05, 2001 4:05 PM
 To: struts-user
 Subject: RE: Action an overkill ??


 Hi,

 going through the action hides the
 presentation-implementation from the user's eyes.

 For example, the user will only see .../do/showTable (or
 .../showTable.do) in
 the browser's address line and therefor not be able to
 bookmark the jsp-file, when
 you use an action.

 The action also allows you to change more implementation
 details without having
 to change the presentation (JSP-file)...

 I advocate strict use of actions in every case...
 = NEVER use a jsp-link, ALWAYS use an action

 just my two cents...
 Alexander Jesse

 -Original Message-
 From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 05, 2001 10:54 AM
 To: Struts-User (E-mail)
 Subject: Action an overkill ??


 Hello All,

 I render a table through my jsp page. The user can sort the table by
 clicking on each of the column headers. When the user clicks
 on the column
 header, an Action is invoked and the data that is used to
 render the table
 is sorted accordingly and placed back into the session. Now
 the control is
 forwarded to the jsp that renders the table with sorted data/

 I have got some feedback that using Action for things like
 sorting a table
 is an overkill. what is suggested that each table column
 should point to a
 jsp which should use a custom tag library to sort the table.

 I am unable to decide which approach to take and why.

 Can someone help me on this.

 regards,
 Abhishek.


 A ship in harbor is safe, but that is not what ships are built for.
 John A. Shedd

 * * Abhishek Srivastava
 ***  /_  __ *** Hewlett-Packard - Solutions Organization
 **  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
 ***/*** phone +91 80 2251554 Extn:1532
 * * mailto:[EMAIL PROTECTED]


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

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



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




RE: Action an overkill ??

2001-12-05 Thread Abhishek Srivastava

Ted's Catalog was useful in this regard as it clearly say no linking to
jsps so no more sorting a table by jsp as it leads to a jsp making a
hyperlink to itself rather than an action.

Wish I could find something on the access of Ejbs via jsp-tags vs. Actions
also.

The feeling here is that use of Tag libraries is not mixing jsp code with
business logic. instead it is regarded as a way or creating reusable code
across jsp pages without mixing java with jsp code. which also appears to be
true for Actions.
The only issue seems to be which one should be used as a standard.

Thanks a lot for your reply and help.

regards,
Abhishek.

A ship in harbor is safe, but that is not what ships are built for.
John A. Shedd

* * Abhishek Srivastava
***  /_  __ *** Hewlett-Packard - Solutions Organization
**  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
***/*** phone +91 80 2251554 Extn:1532
* * mailto:[EMAIL PROTECTED]

 -Original Message-
 From: Alexander Jesse [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 05, 2001 4:47 PM
 To: struts-user
 Subject: RE: Action an overkill ??


 You're welcome...

 Documents...
 - The archtectural papers for Struts (and other web-frameworks)
 - Ted's Catalog
 - the javaworld-article (have no url ready...) on Model 2
 - Jason Hunters ranting against JSP
 - common sense (at least for a huge number of
 web-application programmers)
 all dictate never to mix JSP with business-logic.

 I think it boils down to: Do I want to have a separation of
 concerns as
 mandated by OO-style and the MVC-pattern, or do I want to
 have the least possible
 number of components?

 Following the MVC-style (one of the Struts-goodies) mandates
 the use of
 action and a restricted use of business-logic-custom tags.

 hope this helps
 Alexander Jesse

 -Original Message-
 From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 05, 2001 11:53 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Action an overkill ??


 Thanks for your reply,

 There is a debate in my team these days on the use of Jsp Tags versus
 Actions.

 Some jsp developers feel that ejbs should be accessed via
 tag libraries,
 databases should be accessed via tag libraries and for
 simple rendering
 things like sorting a table jsp tag libraries should be
 used. While others
 like to use Actions for all the things mentioned above.

 Is there a document somewhere which describes what tasks are
 better suited
 for actions and what tasks are better suited for tag libraries.

 Technically, things mentioned above can be done easily by
 either as action
 or as jsp tags.But I want to make a consistent decision
 through out the
 application.

 regards,
 Abhishek.


 A ship in harbor is safe, but that is not what ships are built for.
 John A. Shedd

 * * Abhishek Srivastava
 ***  /_  __ *** Hewlett-Packard - Solutions Organization
 **  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
 ***/*** phone +91 80 2251554 Extn:1532
 * * mailto:[EMAIL PROTECTED]

  -Original Message-
  From: Alexander Jesse [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 05, 2001 4:05 PM
  To: struts-user
  Subject: RE: Action an overkill ??
 
 
  Hi,
 
  going through the action hides the
  presentation-implementation from the user's eyes.
 
  For example, the user will only see .../do/showTable (or
  .../showTable.do) in
  the browser's address line and therefor not be able to
  bookmark the jsp-file, when
  you use an action.
 
  The action also allows you to change more implementation
  details without having
  to change the presentation (JSP-file)...
 
  I advocate strict use of actions in every case...
  = NEVER use a jsp-link, ALWAYS use an action
 
  just my two cents...
  Alexander Jesse
 
  -Original Message-
  From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, December 05, 2001 10:54 AM
  To: Struts-User (E-mail)
  Subject: Action an overkill ??
 
 
  Hello All,
 
  I render a table through my jsp page. The user can sort
 the table by
  clicking on each of the column headers. When the user clicks
  on the column
  header, an Action is invoked and the data that is used to
  render the table
  is sorted accordingly and placed back into the session. Now
  the control is
  forwarded to the jsp that renders the table with sorted data/
 
  I have got some feedback that using Action for things like
  sorting a table
  is an overkill. what is suggested that each table column
  should point to a
  jsp which should use a custom tag library to sort the table.
 
  I am unable to decide which approach to take and why.
 
  Can someone help me on this.
 
  regards,
  Abhishek.
 
 
  A ship in harbor is safe, but that is not what ships are
 built for.
  John A. Shedd
 
  * * Abhishek Srivastava

How to get ActionForm as input

2001-11-30 Thread Abhishek Srivastava

Hello All,

I have a html:form this form can be used to create, read, update and
delete a record from a ejb service.

Since one form can have only one html:submit / button, I have created all
four of these operations as hyperlinks.

Now when I click on these links My Action does get executed, but nothing of
ActionForm is populated. The reason I guess is that I have not done a
Form-submit

How can I have the ActionForm populated? I tried giving the input attribute
to the actionmapping in struts.config but that did not help.


Is it possible that I can have multiple html:submit buttons each pointing
to a different action. that way also I can solve my problem.
Else there should be some way to populate the Form even when a form.submit
was not done.

Please help.

regards,
Abhishek.


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




Usage to Table with struts

2001-11-26 Thread Abhishek Srivastava

Hello All,

I have 2 questions regarding the display of a html table when using struts.

1. Is there a table tag library with struts. currently I am rendering the
table my means of a scriptlet.
something like

%
Collection col = (Collection) session.getAttribute(list);
for(Interator i = col.iterator(); i.hasNext();) {
%
tr
td /td
/tr
%

}
%

Is this the correct way of rendering a table with struts (I wish not to use
scriptlets as far as possible.)

2. I want to let the user sort the table also, based on each column.
The question is that do I have to write a separate action class for each
sort?
is there a simpler way of giving the user the ability to sort the table
based
on each column of the table.

Thanks in advance for your help.

regards,
Abhishek.


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




Action does not get executed

2001-11-23 Thread Abhishek Srivastava

Hello All,

I have a menu, in which I put the a hyperlink to a jsp. When this jsp is
displayed, some of the fields should have data pre-populated in it. This
data which is used to pre-populate the form is fetched from ejbs.

Now, I have written a struts Form class and a struts Action class and made
correct entries in struts-config.xml. But when I click on the link and the
jsp page is displayed then all values are null, because the Action never got
executed.

Is it that struts classes like ActionForm and Action are executed only when
I do a POST from a FORM element? when I initially load my jsp there is no
form, just a click on the menu to bring up the html.

How can I pre-populate the data.

one approach is that I write a simple java bean that fetched the data from
ejb and use this bean in my jsp directly. But i want that only Action
classes should make contact with ejbs for consistency sake.

please help.

regards,
Abhishek.


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




RE: Action does not get executed

2001-11-23 Thread Abhishek Srivastava

Thank you Gitangali for your reply.

I removed the input attribute from the action element.

My menu points towards my jsp.
html:link href='/jsp/applist.jsp'applications list/html:link

if I click on it, the my action does not get executed. and the no values are
prefilled when the jsp comes up.

Now, If I write a dummy jsp called applistdummy.jsp
here I have just one html form that

html:form action=/AppList
  table border=1 width=60% align=center
tr
  td align=center
html:submitsubmit/html:submit
  /td
  td align=center
html:resetreset/html:reset
  /td
/tr
  /table


now if I click submit, my action does get executed it forwards the control
to /jsp/applist.jsp and it does come up with all the prepopulated data.

Problem is that I do not want to have dummy html forms do get my main form
with some pre filled data.

Is it possible to pre-fil the form just by clicking on the menu and not
having a dummy form in between?

Thank you so much for your help.

regards,
Abhishek.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, July 23, 1999 2:11 PM
 To: Struts Users Mailing List; [EMAIL PROTECTED]
 Subject: Re: Action does not get executed




 hi,
 To prepopulate the data,u need to call the Action class
 first,which will get the
 data from EJB , and redirect to the jsp.This jsp will  read
 the values from bean
 and show them.For doing this,in struts-config.xml, you
 shouldn't use input
 attribute of the action tag,becoz first Action class needs to run.
 Hope it helps.
 regards,
 gitanjali.



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




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




RE: Action does not get executed

2001-11-23 Thread Abhishek Srivastava

YAHHOOO  IT WORKS!!

Thank you Gitangali for your help.
I really appreciate it.

regards,
Abhishek.

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]]
 Sent: Friday, July 23, 1999 6:04 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Action does not get executed
 
 
 
 
 suppose following is ur entry in struts-config.xml file :
 
 action path=/SaveData
  type=SaveDataAction
  name=userForm
  scope=session
   validate=false
forward name=success  path=/form.jsp/
   /action
 
 And in web.xml , if u have mapped ActionServlet to *.do  
 then, the link for
 SaveDataAction will be SaveData.do.
 So the link will be like this:
 
 html:link
 href='/SaveData.do'App list/html:link
 
 
 
 
 
 
 
 
 
 
 Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 
 11:11:35 PM
 
 Please respond to [EMAIL PROTECTED]
   
   
   
   To:  Gitanjali Singh/Satyam@Satyam  
   
   cc: 
   
   
   
   Subject  RE: Action does not get executed   
   :   
   
 
 
 
 
 
 
 
 Ahh I am still missing it
 
 I tried to configure my menu the 2 ways but both gave errors
 
 1. I put the class of the Action in the href
 html:link
 href='/my-app/WEB-INF/classes/com/abhi/html/apps/action/AppLi
 stAction.class'
 App list
 /html:linkbr/
 
 Resutl is that the tomcat says that it cannot find the class file.
 
 2. Put the Action (same as what I put in the action of the 
 dummy form).
 
 html:link href='/AppList'App List/html:linkbr/
 
 now tomcat says that the requested resource is not available.
 
 
 On success condition I do forward the control to my jsp and 
 this works fine
 so long as I come via the dummy form.
 
 From the menu it stops to work.
 
 Thanks a lot for your help.
 
 regards,
 Abhishek.
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 23, 1999 5:20 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: RE: Action does not get executed
 
 
 
 
  To remove the dummy jsp page,u need to point to the action
  class directly
  instead of the jsp page and on success of this action
  forward ur request to the
  jsp page.
 
  regards,
  gitanjali.
 
 
 
 
 
 
 
  Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001
  10:43:57 PM
 
  Please respond to Struts Users Mailing List
  [EMAIL PROTECTED];
  Please respond to [EMAIL PROTECTED]
 
 
 
To:  'Struts Users Mailing List'
 [EMAIL PROTECTED]
 
cc:  (bcc: Gitanjali Singh/Satyam)
 
 
 
Subject  RE: Action does not get executed
:
 
 
 
 
 
 
 
 
  Thank you Gitangali for your reply.
 
  I removed the input attribute from the action element.
 
  My menu points towards my jsp.
  html:link href='/jsp/applist.jsp'applications list/html:link
 
  if I click on it, the my action does not get executed. and
  the no values are
  prefilled when the jsp comes up.
 
  Now, If I write a dummy jsp called applistdummy.jsp
  here I have just one html form that
 
  html:form action=/AppList
table border=1 width=60% align=center
  tr
td align=center
  html:submitsubmit/html:submit
/td
td align=center
  html:resetreset/html:reset
/td
  /tr
/table
 
 
  now if I click submit, my action does get executed it
  forwards the control
  to /jsp/applist.jsp and it does come up with all the
  prepopulated data.
 
  Problem is that I do not want to have dummy html forms do
  get my main form
  with some pre filled data.
 
  Is it possible to pre-fil the form just by clicking on the
  menu and not
  having a dummy form in between?
 
  Thank you so much for your help.
 
  regards,
  Abhishek.
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Friday, July 23, 1999 2:11 PM
   To: Struts Users Mailing List; [EMAIL PROTECTED]
   Subject: Re: Action does not get executed
  
  
  
  
   hi,
   To prepopulate the data,u need to call the Action class
   first,which will get the
   data from EJB , and redirect to the jsp.This jsp will  read
   the values from bean
   and show them.For doing this,in struts-config.xml, you
   shouldn't use input
   attribute of the action tag,becoz first Action class 
 needs to run.
   Hope it helps.
   regards

RE: Action does not get executed

2001-11-23 Thread Abhishek Srivastava

Ahh I am still missing it
 
 I tried to configure my menu the 2 ways but both gave errors
 
 1. I put the class of the Action in the href
 html:link 
 href='/my-app/WEB-INF/classes/com/abhi/html/apps/action/AppLi
 stAction.class'App list
 /html:linkbr/
 
 Resutl is that the tomcat says that it cannot find the class file.
 
 2. Put the Action (same as what I put in the action of the 
 dummy form).
 
 html:link href='/AppList'App List/html:linkbr/
 
 now tomcat says that the requested resource is not available.
 
 
 On success condition I do forward the control to my jsp and 
 this works fine so long as I come via the dummy form. 
 
 From the menu it stops to work.
 
 Thanks a lot for your help.
 
 regards,
 Abhishek.
 
  -Original Message-
  From: [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]
  Sent: Friday, July 23, 1999 5:20 PM
  To: Struts Users Mailing List; [EMAIL PROTECTED]
  Subject: RE: Action does not get executed
  
  
  
  
  To remove the dummy jsp page,u need to point to the action 
  class directly
  instead of the jsp page and on success of this action 
  forward ur request to the
  jsp page.
  
  regards,
  gitanjali.
  
  
  
  
  
  
  
  Abhishek Srivastava [EMAIL PROTECTED] on 11/23/2001 
  10:43:57 PM
  
  Please respond to Struts Users Mailing List 
  [EMAIL PROTECTED];
  Please respond to [EMAIL PROTECTED]



To:  'Struts Users Mailing List'  
 [EMAIL PROTECTED]   

cc:  (bcc: Gitanjali Singh/Satyam)  



Subject  RE: Action does not get executed   
:   

  
  
  
  
  
  
  
  Thank you Gitangali for your reply.
  
  I removed the input attribute from the action element.
  
  My menu points towards my jsp.
  html:link href='/jsp/applist.jsp'applications list/html:link
  
  if I click on it, the my action does not get executed. and 
  the no values are
  prefilled when the jsp comes up.
  
  Now, If I write a dummy jsp called applistdummy.jsp
  here I have just one html form that
  
  html:form action=/AppList
table border=1 width=60% align=center
  tr
td align=center
  html:submitsubmit/html:submit
/td
td align=center
  html:resetreset/html:reset
/td
  /tr
/table
  
  
  now if I click submit, my action does get executed it 
  forwards the control
  to /jsp/applist.jsp and it does come up with all the 
  prepopulated data.
  
  Problem is that I do not want to have dummy html forms do 
  get my main form
  with some pre filled data.
  
  Is it possible to pre-fil the form just by clicking on the 
  menu and not
  having a dummy form in between?
  
  Thank you so much for your help.
  
  regards,
  Abhishek.
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Friday, July 23, 1999 2:11 PM
   To: Struts Users Mailing List; [EMAIL PROTECTED]
   Subject: Re: Action does not get executed
  
  
  
  
   hi,
   To prepopulate the data,u need to call the Action class
   first,which will get the
   data from EJB , and redirect to the jsp.This jsp will  read
   the values from bean
   and show them.For doing this,in struts-config.xml, you
   shouldn't use input
   attribute of the action tag,becoz first Action class 
 needs to run.
   Hope it helps.
   regards,
   gitanjali.
  
  
  
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
  
  
  
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]






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




list boxes and struts

2001-11-13 Thread Abhishek Srivastava

Hello All,

Apologies for the re-post. I am trying to implement something which is
trivial.
but I am stuck very badly !!

I want to have a drop down list box in my form. I don't know which data type
should I use in my Form bean corresponding to this html form element
(Collection ??)

let me assume that I am using collection. let me say that in my action class
I put 3 elements in that collection. (Pizza, Burger, Coke).


how do I auto-select say index no 2 of the collection in the list box?


Please do reply .. I am badly stuck. If someone has an example code sample
then it will be great !!

regards,
Abhishek.


A ship in harbor is safe, but that is not what ships are built for.
John A. Shedd

* * Abhishek Srivastava
***  /_  __ *** Hewlett-Packard - Solutions Organization
**  / / /_/  ** 19 Cunningham Road. Bangalore -560052.
***/*** phone +91 80 2251554 Extn:1532
* * mailto:[EMAIL PROTECTED]


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




Form class contacting an Ejb

2001-11-12 Thread Abhishek Srivastava

hello all,

I have a form, in which some of the fields should be populated by default
when the form is displayed to the user.

These values are available from an ejb.

Is it OK, if I have an class which derives from ActionForm to contact an ejb
and get default values? or should i keep these classes only for validation
and create another Action class to contact Ejbs.

thanks for your help.

regards,
Abhishek.


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




List boxes and Form classes

2001-11-12 Thread Abhishek Srivastava

Hello All,

Another new-bie question.

I have a html form that has a drop down box. When writing the Form object
for this html form what should be the data type of the property which
represents this field of the html-form?

should it be a string or a collection type like ArrayList.(as the drop down
has many options to choose from).

Also, how do i indicate which value should be selected by default. Since
struts would populate the value of the html forms with what is there inside
the form bean.

Any help would be greatly appreciated.

regards,
Abhishek.


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




newbie got struck with error!!

2001-10-28 Thread Abhishek Srivastava

Hello all,

I tried my first action mapping sample today and I am facing the following
problem.

-
java.lang.NoSuchMethodException
at java.lang.Class.getMethod0(Native Method)
at java.lang.Class.getMethod(Class.java:888)
at org.apache.struts.digester.SetNextRule.end(SetNextRule.java:156)
at org.apache.struts.digester.Digester.endElement(Digester.java:409)
at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java
:347)
at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLVa
lidator.java:1480)
at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumen
tScanner.java:1809)
---

I have copied the struts.jar into the web-inf/lib directory.

Attached is a zip file with the code of my application. I would very greatly
appreciate any help.

regards,
Abhishek.

 test.zip

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