RE: Help with framesets

2003-11-04 Thread Jose Ramon Diaz

 I think the frames&Struts question is a bit more complicated. I write here
what I told in another message several days ago. (nobody tells me what they
think... so I continue posting it... :) if you use frames, please tell me
what you think)
 Imagine if one action may load the same frame set but you have to  load
hundred of different pages inside each frame.

> We use Frames in our application. We have had this problem a we use
different approach.
 We suppose the form data is ONLY needed for the action, so the action
executes and change the model as needed. The action decides which is the
next page, and if it can have frames it sets a variable "next" in session,
which indicates what the frames that must be loades in this way:

 Every frame in frameset is redirected to an special action frames.do with
two parameters: the place where the frame is loaded and the "next" variable.
For example:


">
">


  And we have implemented the frames.do action to know which JSP must be
loaded, with parameters position and next. In fact, the page that must be
loaded is written in struts-config.xml in this way:

   
  
  c



So the frames.do makes a forward to the String created with "position+next"
(the two parameter of frames.do) and we can establish the JSP in the xml
file...

   Regards

 Jose R. Diaz


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



Re: Error when using Java Version 1.3.1_09

2003-11-04 Thread Dirk Markert
Hello Sashi,

  

***

SR> Hi

SR> The following code which is used to iterate works fine when using Java
SR> Version 1.3.1_07, but when we started to use 1.3.1_09 , we get an
SR> error.

Seems like a problem of your jdk 1.3.1_09. Struts 1.1 works with
1.3.1.

SR> We are using Struts 1.1 final release libraries.

SR> I am pasting the code we used and also the error message. Are there any
SR> deprecated methods used by Struts tags which are not compatable with
SR> Java 1.31._07.

SR> 
Try inserting here something like the following to check your getter
exists:

   <%=(ClassOfProviderForm)addProviderForm).getAssocSBList()%>

If it does exist I would really assume a jdk error. Then try changing
the name of your property. Maybe it has to do with capitalization of
'assocSBList'. Try assocSbList.

SR>  property="assocSBList" indexId="i" >
SR> 
SR> >
SR>  >
SR> 
SR> 
SR> 

SR> Error msg when using Java Version 1.3.1_09

SR> No getter method for assocSBList in addProviderForm
SR> ..


SR> Thanks


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



Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 


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



Re: validation not working

2003-11-04 Thread Rajat Pandit
as far as i know, the ActionServlet wont direct to the Action class 
until the ActionForm returns a null in the validate() method.
got any better idea?

Yoganarasimha G wrote:
u need to have failure return path in the  tag.
like 



so when there is a error it will be forwarded to page1.jsp

-yoga
-Original Message-
From: Rajat Pandit [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 11:40 AM
To: [EMAIL PROTECTED]
Subject: validation not working
hello all,
i have a form, which inputs a number of units. the problem is that in 
case of a validation error. the page does not return back to the form. 
and just stops.
the following are the extract of my validation method and 
struts-config.xml file.

if anyone could point out somethng i am missing. i am now closing to 
banging my head on the desk now!!.



 
 type="com.hedging.admin.productmanagement.updateProduct"
 name="addStateForm"
 validate="true"
 scope="request"
 input="/pages/layouts/updateProductForm.jsp">
 
 
 



public ActionErrors validate (ActionMapping mapping,
  HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
 if ((this.getNoOfStates() < 0) || (this.getNoOfStates() > 100))
System.err.println("---> Error occured!!!");
errors.add("noOfStates",
new ActionError("errors.toManyStates"));
}
return errors;
}


--

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


Re: validation not working

2003-11-04 Thread Dirk Markert
Hello,

  

***

RP> hello all,
RP> i have a form, which inputs a number of units. the problem is that in 
RP> case of a validation error. the page does not return back to the form.
You want to return to updateProductForm.jsp? Does this jsp depend on
beans stored in request scope?
RP> and just stops.
What do you mean by "just stops"?

RP> the following are the extract of my validation method and 
RP> struts-config.xml file.

RP> if anyone could point out somethng i am missing. i am now closing to 
RP> banging my head on the desk now!!.

RP> 

RP>type="com.hedging.admin.productmanagement.updateProduct"
RP>  name="addStateForm"
RP>  validate="true"
RP>  scope="request"
RP>  input="/pages/layouts/updateProductForm.jsp">
RP>  
RP>   path="/pages/layouts/updateProductForm.jsp" />
RP>  
RP> 


RP> 
RP> public ActionErrors validate (ActionMapping mapping,
RP>   HttpServletRequest request) {
RP> ActionErrors errors = new ActionErrors();
RP>  if ((this.getNoOfStates() < 0) || (this.getNoOfStates() > 100))
RP> System.err.println("---> Error occured!!!");
RP> errors.add("noOfStates",
RP> new ActionError("errors.toManyStates"));
RP> }
RP> return errors;
RP> }

RP> 




Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 


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



RE: Indexed Array List Properties (Repost)

2003-11-04 Thread shirishchandra.sakhare
getForumGroup will be right..Actually u can name the property whatEver you want..I 
mean you can call it even getXyz..The only important point is when you use the struts 
tags, the property attribute should be the name of the getter method minus the get..So 
in your case it will be forumGroup or xyz if you have followed my sugestion :-))

HTH.

regards,
Shirish

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 12:12 AM
To: Struts Mailing List
Subject: Indexed Array List Properties (Repost)


So I've been doing Indexed Arraylist Properties for awhile now but when I
tried to add some more to my form I'm a little miffed.  Here's the array
List code in my form:

private ArrayList forumGroups = new ArrayList();

now its a request scoped form, so I know I need a method that looks like
this:

public ForumGroupLine getForumGroup(int index) {

while (index >= this.forumGroups.size())

this.forumGroups.add(new ForumGroupLine());

return (ForumGroupLine) this.forumGroups.get(index);

}



However I can't figure out what to name it!  is the method supposed to be
named getForumGroup?  How does struts determine what to call to just get a
singular item from an array list?  On my other stuff my Arraylist was named
roles and my method for getting a single one was just getRole..

Thanks in advance,

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]



Application objects

2003-11-04 Thread Mathieu Grimault
Hi all, 
I would like to display the number of users connected (number of session) to my 
application. Is there a way to do this ?

Another question, Can we implements code in the session class (by extending the 
class) and can we store/access/ modify objects in the ServletContext during the 
execution of the application (not during initialisation) ?

thx for help. Mathieu.

validation.xml

2003-11-04 Thread Rajat Pandit
hello,
i am looking for some documentation on the validation(Client end) for 
struts. there are so many of them, date, creditcard etc, and i am still 
using my own regex for making them work. i would be glad if someone 
could give me pointers for tutorials/documentation etc.
thanks
--

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


validation stuff

2003-11-04 Thread Rajat Pandit
hello,
more on validation. in case there is a simpel form for which i want to 
implement validation. is there someway i can keep the jscript in a js 
and let only the dynamic part of the js to be loaded. keeping this in 
the js file would ensure that the browser can cache it and use it later.
moreover it seems like an overkill, if you actually required just one 
method and u have 10 methods tagging along with it?

can someone shed some light on this?
thanks

--
Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


Re: validation not working

2003-11-04 Thread Rajat Pandit


Dirk Markert wrote:

Hello,

  

***

RP> hello all,
RP> i have a form, which inputs a number of units. the problem is that in 
RP> case of a validation error. the page does not return back to the form.
You want to return to updateProductForm.jsp? Does this jsp depend on
beans stored in request scope?
yes itdoes depend on a bean stored in the request scope. the actual 
problem thati forsee is that that it is possible the validation and 
calling the executing the Action.execute() despite the fact that there 
where error in the ActionForm.


RP> and just stops.
What do you mean by "just stops"?
calls nothing because the in case of an invalid input there is no 
corresponding action in the Action.execute() and also its not supposed 
to be the case as the ActionForm acts like a firewall and wouldnt let it 
pass to the Action unless the ActionForm.validate() returns a null. 
: (i guess u can see how sad i am)

RP> the following are the extract of my validation method and 
RP> struts-config.xml file.

RP> if anyone could point out somethng i am missing. i am now closing to 
RP> banging my head on the desk now!!.

RP> 

RP>  
RP>  type="com.hedging.admin.productmanagement.updateProduct"
RP>  name="addStateForm"
RP>  validate="true"
RP>  scope="request"
RP>  input="/pages/layouts/updateProductForm.jsp">
RP>  
RP>   path="/pages/layouts/updateProductForm.jsp" />
RP>  
RP> 

RP> 
RP> public ActionErrors validate (ActionMapping mapping,
RP>   HttpServletRequest request) {
RP> ActionErrors errors = new ActionErrors();
RP>  if ((this.getNoOfStates() < 0) || (this.getNoOfStates() > 100))
RP> System.err.println("---> Error occured!!!");
RP> errors.add("noOfStates",
RP> new ActionError("errors.toManyStates"));
RP> }
RP> return errors;
RP> }
RP> 



Regards,
Dirk
+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 

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

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


Re[2]: validation not working

2003-11-04 Thread Dirk Markert
Hello Rajat,

  

***



RP> Dirk Markert wrote:

>> Hello,
>> 
>>   
>> 
>> ***
>> 
>> RP> hello all,
>> RP> i have a form, which inputs a number of units. the problem is that in 
>> RP> case of a validation error. the page does not return back to the form.
>> You want to return to updateProductForm.jsp? Does this jsp depend on
>> beans stored in request scope?

RP> yes itdoes depend on a bean stored in the request scope.
Then in you have to use an action as the input attribute of your
action mapping, ie not input="/pages/layouts/updateProductForm.jsp"
but something like input="/prepareUpdateForm.do". In this action prepare your
request and forward to your jsp.
RP> the actual 
RP> problem thati forsee is that that it is possible the validation and 
RP> calling the executing the Action.execute() despite the fact that there 
RP> where error in the ActionForm.


>> RP> and just stops.
>> What do you mean by "just stops"?
RP> calls nothing because the in case of an invalid input there is no 
RP> corresponding action in the Action.execute() and also its not supposed 
RP> to be the case as the ActionForm acts like a firewall and wouldnt let it 
RP> pass to the Action unless the ActionForm.validate() returns a null. 
RP> : (i guess u can see how sad i am)

>> 
>> RP> the following are the extract of my validation method and 
>> RP> struts-config.xml file.
>> 
>> RP> if anyone could point out somethng i am missing. i am now closing to 
>> RP> banging my head on the desk now!!.
>> 
>> RP> 
>> 
>> RP>  > RP>  type="com.hedging.admin.productmanagement.updateProduct"
>> RP>  name="addStateForm"
>> RP>  validate="true"
>> RP>  scope="request"
>> RP>  input="/pages/layouts/updateProductForm.jsp">
>> RP>  
>> RP>  > RP> path="/pages/layouts/updateProductForm.jsp" />
>> RP>  
>> RP> 
>> 
>> 
>> RP> 
>> RP> public ActionErrors validate (ActionMapping mapping,
>> RP>   HttpServletRequest request) {
>> RP> ActionErrors errors = new ActionErrors();
>> RP>  if ((this.getNoOfStates() < 0) || (this.getNoOfStates() > 100))
>> RP> System.err.println("---> Error occured!!!");
>> RP> errors.add("noOfStates",
>> RP> new ActionError("errors.toManyStates"));
>> RP> }
>> RP> return errors;
>> RP> }
>> 
>> RP> 
>> 
>> 
>> 
>> 
>> Regards,
>> Dirk
>> 
>> +--- Quality leads ---+
>> | Dirk Markert [EMAIL PROTECTED] |
>> | Dr. Markert Softwaretechnik AG  |
>> | Joseph-von-Fraunhofer-Str. 20   |
>> | 44227 Dortmund  |
>> +-->>> to success! <<-+ 
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 




Regards,
Dirk

+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 


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



Struts form submission using POST

2003-11-04 Thread chinmay . r . parikh
How to submit a form to an external web link (not part of the current
web application)?

 

In struts action, all links are interpreted relative to web context and
therefore "forward" object specified in 

struts-config does not work.

 

e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{

 

ActionForward forward =
mapping.findForward("constructionPage");

}

 

// Strtus-config:

 

http://www.externalformprocessor.com"/>

 

Web context:  myapplication

 

URL in  tag of the struts-config is evaluated as
"/myapplication/http://www.externalformprocessor.com"; which 

obviously is not a valid URL.

 

 

One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.

 

Does any one know any alternative approach to submit forms to external
sites using POST?

 

Any suggestion will be appreciated.



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.


RE: Deploying struts application on iplanet 6.0 or 4.0

2003-11-04 Thread alok . garg

Hello James,
I have dowloaded the iplanet 6.0 service pack 4.0 (web server) but I am
still unable to deploy the struts application can anybody tell me what all
jars I need to keep in the classpath??



Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


   
  
  "James Mitchell" 
  
  <[EMAIL PROTECTED] To:  "'Struts Users Mailing 
List'" <[EMAIL PROTECTED]>   
  e.org>   cc:  (bcc: alok.garg/Polaris)   
  
   Subject: RE: Deploying struts 
application on iplanet 6.0 or 4.0   
  11/01/03 02:43   
  
  AM   
  
  Please respond   
  
  to "Struts Users 
  
  Mailing List"
  
   
  
   
  




You will need to upgrade to 6.1.  If I were you, I wouldn't waste my
time trying anything less.

If your customer/boss says they can't or won't, tell them that they will
spend more time trying to "make" it work then they ever would have if
they had just upgraded...trust me!



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 31, 2003 4:06 PM
> To: Struts Users Mailing List
> Subject: RE: Deploying struts application on iplanet 6.0 or 4.0
>
>
>
> I want to deploy my Struts application which is running in Tomcat in
> iplanet server version 6.0. with no service packs
>
> Alok Garg
> Polaris Software Lab Ltd.
> ( + 91 - 022 - 28290019 Ext. # 1308 )
>
>
>
>
>   "James Mitchell"
>
>   <[EMAIL PROTECTED] To:
> "'Struts Users Mailing List'"
> <[EMAIL PROTECTED]>
>   e.org>   cc:  (bcc:
> alok.garg/Polaris)
>Subject: RE:
> Deploying struts application on iplanet 6.0 or 4.0
>   11/01/03 12:40
>
>   AM
>
>   Please respond
>
>   to "Struts Users
>
>   Mailing List"
>
>
>
>
>
>
>
>
>
> You're welcome in advance.  Now, what's your question?
>
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017 (c)
> 770.822.3359 (h)
> AIM:jmitchtx
>
>
>
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 31, 2003 1:01 PM
> > To: [EMAIL PROTECTED]
> > Subject: Deploying struts application on iplanet 6.0 or 4.0
> >
> >
> > Hello ,
> > I want to deploy the struts application on iplanet 6.0 or 4.0.
> >
> > Thanking you in advance...
> >
> > Alok Garg
> > Polaris Software Lab Ltd.
> > ( + 91 - 022 - 28290019 Ext. # 1308 )
> >
> >
> >
>
>
> -
> 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]






This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

RE: Struts form submission using POST

2003-11-04 Thread Andrew Hill
What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client side
forward (redirect). Ive never tried this with a POST rather than a GET, but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore "forward" object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward("constructionPage");

}



// Strtus-config:



http://www.externalformprocessor.com"/>



Web context:  myapplication



URL in  tag of the struts-config is evaluated as
"/myapplication/http://www.externalformprocessor.com"; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.


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



Servlets 2.4

2003-11-04 Thread Christian Bollmeyer
Hi,

just read the following article from OTN:

http://otn.oracle.com/oramag/oracle/03-nov/o63dev_jsp.html

which basically gives an overview on the new features of
JSP 2.0/Servlets 2.4. I stumbled over this passage:

"This release supports only HTTP 1.1, so Servlet 2.4
applications won't be able to serve HTTP 1.0 clients."

Now, what's that supposed to mean - no backward
compatibility? Can somebody possibly shed some
more light on this?

-- Chris.

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



problem

2003-11-04 Thread sairam manda
Hello Sir
I am new to struts .  I am using DynaForm .I get  
java.lang.NullPointerException I  do not know the problem .Please some body 
help me with this.I attached
submit .jsp ,struts-config.xml and SubmitAction.java .
regards
sairam

_
Pinjar is a classic! Check out the making of this film. 
http://server1.msn.co.in/sp03/Pinjar/index.asp Simply click here!


Send.zip
Description: Zip archive
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Struts form submission using POST

2003-11-04 Thread chinmay . r . parikh

I am submitting a form to external site (no form processing is involved
at the client side).  All parameters that need to be passed to external
site are hidden variables on the page.

I am not sure how to use 'action' attribute of the page.  In the past I
have attempted to use  with "action" but the problem remains
the same as URL is context/application relative (as specified in the
struts doc)and therefore external links are not valid URLs.

What I have tried is that "collate" all parameters and submit the page
using normal html form (and not using the struts framework) but I want
to stick to struts framework throughout my application.

Server side processing (option b in your reply) works only with GET as
you can append query string parameters and then using
request.sendRedirectTo("http://abc.com ?&selectedName="); but this
exposes security risk.

Any further suggestions.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2003 09:48
To: Struts Users Mailing List
Subject: RE: Struts form submission using POST

What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward
outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the
action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do
this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client
side
forward (redirect). Ive never tried this with a POST rather than a GET,
but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore "forward" object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward("constructionPage");

}



// Strtus-config:



http://www.externalformprocessor.com"/>



Web context:  myapplication



URL in  tag of the struts-config is evaluated as
"/myapplication/http://www.externalformprocessor.com"; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the
original.  Any other use of the email by you is prohibited.


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



RE: problem

2003-11-04 Thread Andrew Hill
Im not familiar with dynaforms myself so cant be of much help, but to get a
better response from list members you will want to add a bit more info to
your email about where you are getting the exception, and to include the
stacktrace.

Using a meaningful subject line for your email will also improve your
chances of it getting a response.

Take a look at:
http://www.catb.org/~esr/faqs/smart-questions.html


ooo hang on:

in your struts-config.xml you have:

type="de/dkfz/ibios/workflow.SubmitAction"

which should be:

type="de.dkfz.ibios.workflow.SubmitAction"

(the type attribute takes a fully qualified classname rather than a
filepath)

hth
Andrew


-Original Message-
From: sairam manda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 18:29
To: [EMAIL PROTECTED]
Subject: problem


Hello Sir
I am new to struts .  I am using DynaForm .I get
java.lang.NullPointerException I  do not know the problem .Please some body
help me with this.I attached
submit .jsp ,struts-config.xml and SubmitAction.java .
regards
sairam

_
Pinjar is a classic! Check out the making of this film.
http://server1.msn.co.in/sp03/Pinjar/index.asp Simply click here!


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



RE: Struts form submission using POST

2003-11-04 Thread shirishchandra.sakhare
Use struts tags for everything except for the form tag...The in the action attribute 
you can give the url to external site..

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 11:35 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Struts form submission using POST



I am submitting a form to external site (no form processing is involved
at the client side).  All parameters that need to be passed to external
site are hidden variables on the page.

I am not sure how to use 'action' attribute of the page.  In the past I
have attempted to use  with "action" but the problem remains
the same as URL is context/application relative (as specified in the
struts doc)and therefore external links are not valid URLs.

What I have tried is that "collate" all parameters and submit the page
using normal html form (and not using the struts framework) but I want
to stick to struts framework throughout my application.

Server side processing (option b in your reply) works only with GET as
you can append query string parameters and then using
request.sendRedirectTo("http://abc.com ?&selectedName="); but this
exposes security risk.

Any further suggestions.


-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: 04 November 2003 09:48
To: Struts Users Mailing List
Subject: RE: Struts form submission using POST

What are you actually trying to do here?
a.) Have the browser directly submit the form somewhere else
 - or -
b.) have the browser submit to *your app* first and then and forward
outside
from the action?

if(a)
then your execute code is irrelevant as you wont be going through the
action
on submit - What you need is to have the 'action' attribute of the pages
form tag point at the external site. (Not quite sure how you would do
this
using the struts tags as Im not familiar enough with their syntax)

if(b)
You cant do this using a server side forward. It would require a client
side
forward (redirect). Ive never tried this with a POST rather than a GET,
but
Im assuming that since your asking about it it doesnt work?


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 17:35
To: [EMAIL PROTECTED]
Subject: Struts form submission using POST


How to submit a form to an external web link (not part of the current
web application)?



In struts action, all links are interpreted relative to web context and
therefore "forward" object specified in

struts-config does not work.



e.g.

public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)

{



ActionForward forward =
mapping.findForward("constructionPage");

}



// Strtus-config:



http://www.externalformprocessor.com"/>



Web context:  myapplication



URL in  tag of the struts-config is evaluated as
"/myapplication/http://www.externalformprocessor.com"; which

obviously is not a valid URL.





One approach is to append all form parameters as query string in URL and
use response.sendRedirectTo(...) method of HTTPServeletRequest class

but this is not desirable for security reasons.



Does any one know any alternative approach to submit forms to external
sites using POST?



Any suggestion will be appreciated.



This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the
original.  Any other use of the email by you is prohibited.


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



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in error, 
please notify the sender immediately and delete the original.  Any other use of the 
email by you is prohibited.

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



I get a blank page

2003-11-04 Thread sairam manda
Hello Sir,
I get blank page when I execute my submit.jsp . I have  a simple strut 
application with a DynaForm  and actionclass and a submit.jsp . I do not 
understand the problem because I just get a blank page  .Please somebody 
help me with this problem.

I attached my submit.jsp struts.config.xml and my Action.java .Please 
somebody help me with this probllem.
regards
sairam

_
Nutrition is in! Junk food is out! 
http://server1.msn.co.in/features/fabmall/ Be a part of the microwave 
revolution.


Send.zip
Description: Zip archive
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: I get a blank page

2003-11-04 Thread Mark Lowe
what do you mean by "execute my (your) submit.jsp" ?

I could be wrong, but looks like you're trying to be a bit of a picasso  
with your property names.



On Tuesday, November 4, 2003, at 10:50 AM, sairam manda wrote:

Hello Sir,
I get blank page when I execute my submit.jsp . I have  a simple strut  
application with a DynaForm  and actionclass and a submit.jsp . I do  
not understand the problem because I just get a blank page  .Please  
somebody help me with this problem.

I attached my submit.jsp struts.config.xml and my Action.java .Please  
somebody help me with this probllem.
regards
sairam

_
Nutrition is in! Junk food is out!  
http://server1.msn.co.in/features/fabmall/ Be a part of the microwave  
revolution.
- 

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]


Deployment issues with iws 6.0 service pack 4.

2003-11-04 Thread alok . garg
Hello,
When deploying the struts application in the iplanet web server 6.0 service
pack 4 we are getting the following error:

JSP: JSP1x compiler threw exception
org.apache.jasper.compiler.CompileException:
C:/iPlanet/Servers/docs/gistruts/jsp/login.jsp(0,0) Unable to open
taglibrary /WEB-INF/struts-html.tld : Could not locate TLD
/WEB-INF/struts-html.tld
  at
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:715)
  at
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:110)
  at
org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1096)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1061)
  at org.apache.jasper.compiler.Parser.parse(Parser.java:1057)
  at org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
  at
com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:252)
  at
com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
  at
com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:427)

Any solutions ??


Alok Garg
Polaris Software Lab Ltd.
( + 91 - 022 - 28290019 Ext. # 1308 )


This e-Mail may contain proprietary and confidential information and is sent for the 
intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you 
are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, 
copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment 
other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

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

Re: I get a blank page

2003-11-04 Thread sairam manda
Hello Sir,
I mean If I  type  http://localhost.8080/struts-parameters/submit.jsp  this  
as url in my browser
I just get a blank page.


From: Mark Lowe <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Re: I get a blank page  Date: Tue, 4 Nov 2003 11:09:22 +
what do you mean by "execute my (your) submit.jsp" ?

I could be wrong, but looks like you're trying to be a bit of a picasso  
with your property names.



On Tuesday, November 4, 2003, at 10:50 AM, sairam manda wrote:

Hello Sir,
I get blank page when I execute my submit.jsp . I have  a simple strut  
application with a DynaForm  and actionclass and a submit.jsp . I do  not 
understand the problem because I just get a blank page  .Please  somebody 
help me with this problem.

I attached my submit.jsp struts.config.xml and my Action.java .Please  
somebody help me with this probllem.
regards
sairam

_
Nutrition is in! Junk food is out!  
http://server1.msn.co.in/features/fabmall/ Be a part of the microwave  
revolution.
- 

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]
_
MSN Hotmail now on your Mobile phone. 
http://server1.msn.co.in/sp03/mobilesms/ Click here.

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


RE: I get a blank page

2003-11-04 Thread Andrew Hill
shouldnt that be:
http://localhost:8080/struts-parameters/submit.jsp
?

-Original Message-
From: sairam manda [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 4 November 2003 19:16
To: [EMAIL PROTECTED]
Subject: Re: I get a blank page


Hello Sir,
I mean If I  type  http://localhost.8080/struts-parameters/submit.jsp  this
as url in my browser
I just get a blank page.


>From: Mark Lowe <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: Re: I get a blank page  Date: Tue, 4 Nov 2003 11:09:22 +
>
>what do you mean by "execute my (your) submit.jsp" ?
>
>I could be wrong, but looks like you're trying to be a bit of a picasso
>with your property names.
>
>
>
>On Tuesday, November 4, 2003, at 10:50 AM, sairam manda wrote:
>
>>Hello Sir,
>>I get blank page when I execute my submit.jsp . I have  a simple strut
>>application with a DynaForm  and actionclass and a submit.jsp . I do  not
>>understand the problem because I just get a blank page  .Please  somebody
>>help me with this problem.
>>
>>
>>I attached my submit.jsp struts.config.xml and my Action.java .Please
>>somebody help me with this probllem.
>>regards
>>sairam
>>
>>_
>>Nutrition is in! Junk food is out!
>>http://server1.msn.co.in/features/fabmall/ Be a part of the microwave
>>revolution.
>>-
>>
>>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]
>

_
MSN Hotmail now on your Mobile phone.
http://server1.msn.co.in/sp03/mobilesms/ Click here.


-
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: 2 problems with and whilst including results of action in page and behind firewall with NAT.

2003-11-04 Thread Fred Bloggs
Kris

Thank you for your prompt response.  I have now tried
all your suggestions but unfortunately they do not
work.

When I tried 


  
  ...

And then used it in the page:



When I access the site from outside the firewall I
still get the “Exception opening resource” and the
external IP address is shown in the URL.  And yet the
rest of the site works, and when I access the action
directly in my browser it displays the page correctly.
(btw it complains if I did not use the id parameter)

I then tried your next suggestion of using JSTL

<%@ taglib prefix="c
uri="http://java.sun.com/jstl/core"; %>
...


It throws an exception of
“javax.servlet.ServletException: Cannot forward after
response has been committed” -The same as for a
 wrote:
> #2 first. Try using 
> instead. You'll have to add a
> global forward to your struts config file, like:
> 
> 
>path="/getmostrecentnews.do"/>
>   ...
> 
> 
> And then use it in a page like:
> 
> 
> 
> You don't need to use the "id" attribute unless you
> really want to store the
> included response in a variable. Try that first and
> see if #1 is still a problem
> (although I seem to remember there might actually be
> a bug with encoding).
> 
> Another alternative would be to try JSTL (JSP 1.2):
> 
> <%@ taglib prefix="c
> uri="http://java.sun.com/jstl/core"; %>
> ...
> 
> 
> The  tag also supports a "charEncoding"
> attribute that you can try if
> it doesn't work without it.
> 
> Quoting Fred Bloggs <[EMAIL PROTECTED]>:
> 
> > Dear All,
> > 
> > I'm relatively new to Struts and have come across
> two
> > problems that have completely confused me.
> > 
> > I am using Struts 1.1, Tomcat 4.1.27. 
> > 
> > Problem 1:
> > 
> > I have an action that produces the most recent
> "news"
> > and displays it on separate page.  However I want
> to
> > include those news as well on some of my other
> pages. 
> > I use the template tags to get and put the various
> > pages together (I haven't tried Tiles yet, I want
> to
> > keep it simple).
> > 
> > So my topical.jsp contains a table with the
> following
> > row:
> > 
> > ...
> > 
> > 
> >  id="GetMostRecentNews"
> > page="/getmostrecentnews.do"/>
> >  name="GetMostRecentNews"
> > filter="false"/>
> > 
> > 
> > ...
> > 
> > All my pages use the UTF-8  charset thus I use the
> > following at the start of every jsp page:
> > 
> > <%@ page contentType="text/html; charset=UTF-8" %>
> > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> > prefix="bean"%>
> > ... plus other taglib definitions.
> > 
> > When I invoke the /getmostrecentnews.do directly
> using
> > a browser, everything is diasplayed correctly. 
> The
> > correct charset is used.
> > 
> > Now when I do the  (as
> > shown above), the page is included in the main
> page,
> > but the charset is incorrect and thus some
> characters
> > are incorrectly displayed.
> > 
> > I do not use the locale setting since the content
> and
> > thus charset is locale independent.
> > 
> > I use templates to do my header, footer, sidebar
> etc. 
> > The above table is in the main "content" of my
> > template.
> > 
> > I tried changing my template to have another
> "news"
> > section and did a put (with a matching get) as
> > follows: 
> > 
> >  > content='/getmostrecentnews.do' />
> > 
> > I get a "javax.servlet.ServletException: Cannot
> > forward after response has been committed".
> > 
> > I also tried using  "The
> > Struts User Guide"
> >
>
http://jakarta.apache.org/struts/userGuide/building_view.html,
> > but I just get an exception
> > "javax.servlet.ServletException: Cannot forward
> after
> > response has been committed".
> > 
> > I have not yet ported my application to Tiles so I
> > don't know if using Tiles instead of Templates
> will
> > solve my problem.
> > 
> > I would be grateful for any pointers.
> > 
> > Problem 2:
> > 
> > My site is behind a firewall that does NAT.  The
> site
> > works, except for the jsp pages where I do:
> > 
> > 
> > 
> >  id="GetMostRecentNews"
> > page="/getmostrecentnews.do"/>
> >  name="GetMostRecentNews"
> > filter="false"/>
> > 
> > 
> > 
> > It appears that the  > /getmostrecentnews.do to an absolute URL. 
> However,
> > since I am behind a NAT firewall (doing port
> > forwarding) I get an exception saying that
> "Exception
> > opening resource" since the absolute URL contains
> the
> > external IP and not the NATed IP address of the
> tomcat
> > server.
> > 
> > I tried  in all the jsp pages, but
> that
> > does not seem to help.
> > 
> > Is there anyway to tell the  use
> > an absolute address but a relative address to the
> > application or context?
> > 
> > I would be grateful for any help or pointers.
> > 
> > Thank you in advance.
> 
> -- 
> Kris Schneider 
> D.O.Tech   
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For ad

Help Req on Iterate Tag using HashMap

2003-11-04 Thread Shakti
Hi All,
I am keeping some table data in a HashMap .
My Table is in this form :
UID #EMP Details
   -Date of joining
   -Date of birth
   -Misc Detail

Now i am creating an EMPDetails bean and storing the bean in a hash map with UID # as 
the key.

Can anyone plz tell me how to show the data in a tabular form in jsp using iterate tag 
. I am unable to make out as how to 
iterate the EMPDetails bean which i am getting as value .

Thanks & Regards,
Shakti

Re: Servlets 2.4

2003-11-04 Thread Kris Schneider
My reading of the 2.4 spec is that HTTP/1.1 support is *required*, not that it's
the only version supported. Hang on, here's the quote from section SRV.1.2 What
is a Servlet Container?

The required versions of the HTTP specification that a container must implement
are HTTP/1.0 and HTTP/1.1.

Quoting Christian Bollmeyer <[EMAIL PROTECTED]>:

> Hi,
> 
> just read the following article from OTN:
> 
> http://otn.oracle.com/oramag/oracle/03-nov/o63dev_jsp.html
> 
> which basically gives an overview on the new features of
> JSP 2.0/Servlets 2.4. I stumbled over this passage:
> 
> "This release supports only HTTP 1.1, so Servlet 2.4
> applications won't be able to serve HTTP 1.0 clients."
> 
> Now, what's that supposed to mean - no backward
> compatibility? Can somebody possibly shed some
> more light on this?
> 
> -- Chris.

-- 
Kris Schneider 
D.O.Tech   

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



jboss-tomcat 3.2.2

2003-11-04 Thread tcs 777
hi all,

in my struts-forms i've links to style-sheets, images, etc.

these links refer to the root, because this is where the corresponding 
actions are mapped to.

in jboss i get the folowing error:

<..>[Engine] StandardHost[localhost]: MAPPING configuration error for 
request URI /styles/style.css

this seems to be that the link cannot be relative to the configured struts 
action.

anybody has some thought how i can deal with this problem?

t i a

_
MSN Zoeken, voor duidelijke zoekresultaten! http://search.msn.nl
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: 2 problems with and whilst including results of action in page and behind firewall with NAT.

2003-11-04 Thread Kris Schneider
Are you using a  tag anywhere in the JSP, or a scriptlet that
effectively performs a RequestDispatcher.forward?

On a side note, I'd recommend ditching the template tags in favor of the more
basic  or Tiles. For Struts 1.1, the template stuff has been
deprecated.

Quoting Fred Bloggs <[EMAIL PROTECTED]>:

> Kris
> 
> Thank you for your prompt response.  I have now tried
> all your suggestions but unfortunately they do not
> work.
> 
> When I tried 
> 
> 
>path="/getmostrecentnews.do"/>
>   ...
> 
> And then used it in the page:
> 
>  forward="mostRecentNews"/>
> 
> When I access the site from outside the firewall I
> still get the “Exception opening resource” and the
> external IP address is shown in the URL.  And yet the
> rest of the site works, and when I access the action
> directly in my browser it displays the page correctly.
> (btw it complains if I did not use the id parameter)
> 
> I then tried your next suggestion of using JSTL
> 
> <%@ taglib prefix="c
> uri="http://java.sun.com/jstl/core"; %>
> ...
> 
> 
> It throws an exception of
> “javax.servlet.ServletException: Cannot forward after
> response has been committed” -The same as for a
>  
> Any further help will be greatly appreciated.
> 
> Thanks
> 
> Fred
> 
> --- Kris Schneider <[EMAIL PROTECTED]> wrote:
> > #2 first. Try using 
> > instead. You'll have to add a
> > global forward to your struts config file, like:
> > 
> > 
> >> path="/getmostrecentnews.do"/>
> >   ...
> > 
> > 
> > And then use it in a page like:
> > 
> > 
> > 
> > You don't need to use the "id" attribute unless you
> > really want to store the
> > included response in a variable. Try that first and
> > see if #1 is still a problem
> > (although I seem to remember there might actually be
> > a bug with encoding).
> > 
> > Another alternative would be to try JSTL (JSP 1.2):
> > 
> > <%@ taglib prefix="c
> > uri="http://java.sun.com/jstl/core"; %>
> > ...
> > 
> > 
> > The  tag also supports a "charEncoding"
> > attribute that you can try if
> > it doesn't work without it.
> > 
> > Quoting Fred Bloggs <[EMAIL PROTECTED]>:
> > 
> > > Dear All,
> > > 
> > > I'm relatively new to Struts and have come across
> > two
> > > problems that have completely confused me.
> > > 
> > > I am using Struts 1.1, Tomcat 4.1.27. 
> > > 
> > > Problem 1:
> > > 
> > > I have an action that produces the most recent
> > "news"
> > > and displays it on separate page.  However I want
> > to
> > > include those news as well on some of my other
> > pages. 
> > > I use the template tags to get and put the various
> > > pages together (I haven't tried Tiles yet, I want
> > to
> > > keep it simple).
> > > 
> > > So my topical.jsp contains a table with the
> > following
> > > row:
> > > 
> > > ...
> > > 
> > > 
> > >  > id="GetMostRecentNews"
> > > page="/getmostrecentnews.do"/>
> > >  > name="GetMostRecentNews"
> > > filter="false"/>
> > > 
> > > 
> > > ...
> > > 
> > > All my pages use the UTF-8  charset thus I use the
> > > following at the start of every jsp page:
> > > 
> > > <%@ page contentType="text/html; charset=UTF-8" %>
> > > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > prefix="bean"%>
> > > ... plus other taglib definitions.
> > > 
> > > When I invoke the /getmostrecentnews.do directly
> > using
> > > a browser, everything is diasplayed correctly. 
> > The
> > > correct charset is used.
> > > 
> > > Now when I do the  > (as
> > > shown above), the page is included in the main
> > page,
> > > but the charset is incorrect and thus some
> > characters
> > > are incorrectly displayed.
> > > 
> > > I do not use the locale setting since the content
> > and
> > > thus charset is locale independent.
> > > 
> > > I use templates to do my header, footer, sidebar
> > etc. 
> > > The above table is in the main "content" of my
> > > template.
> > > 
> > > I tried changing my template to have another
> > "news"
> > > section and did a put (with a matching get) as
> > > follows: 
> > > 
> > >  > > content='/getmostrecentnews.do' />
> > > 
> > > I get a "javax.servlet.ServletException: Cannot
> > > forward after response has been committed".
> > > 
> > > I also tried using  > "The
> > > Struts User Guide"
> > >
> >
> http://jakarta.apache.org/struts/userGuide/building_view.html,
> > > but I just get an exception
> > > "javax.servlet.ServletException: Cannot forward
> > after
> > > response has been committed".
> > > 
> > > I have not yet ported my application to Tiles so I
> > > don't know if using Tiles instead of Templates
> > will
> > > solve my problem.
> > > 
> > > I would be grateful for any pointers.
> > > 
> > > Problem 2:
> > > 
> > > My site is behind a firewall that does NAT.  The
> > site
> > > works, except for the jsp pages where I do:
> > > 
> > > 
> > > 
> > >  > id="GetMostRecentNews"
> > > page="/getmostrecentnews.do"/>
> > >  > name="GetMostRecentNews"
> > > filter="false"/>
> > > 
> >

Re: Servlets 2.4

2003-11-04 Thread Christian Bollmeyer

- Original Message -
From: "Kris Schneider" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 1:48 PM
Subject: Re: Servlets 2.4


> My reading of the 2.4 spec is that HTTP/1.1 support is *required*, not
that it's
> the only version supported. Hang on, here's the quote from section SRV.1.2
What
> is a Servlet Container?
>
> The required versions of the HTTP specification that a container must
implement
> are HTTP/1.0 and HTTP/1.1.

Yes, that's my understanding too, but the OTN article explicitly says
otherwise
twice without any obvious reason. Now, as there's only the Proposed Final
Draft
3 around, I wonder if they might have changed something in the meantime.

-- Chris.

> Quoting Christian Bollmeyer <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > just read the following article from OTN:
> >
> > http://otn.oracle.com/oramag/oracle/03-nov/o63dev_jsp.html
> >
> > which basically gives an overview on the new features of
> > JSP 2.0/Servlets 2.4. I stumbled over this passage:
> >
> > "This release supports only HTTP 1.1, so Servlet 2.4
> > applications won't be able to serve HTTP 1.0 clients."
> >
> > Now, what's that supposed to mean - no backward
> > compatibility? Can somebody possibly shed some
> > more light on this?
> >
> > -- Chris.
>
> --
> Kris Schneider 
> D.O.Tech   
>
> -
> 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 not working

2003-11-04 Thread Rajat Pandit
hello dirk,
thanks a lot man!, i couldnt though follow ur advice, sinci i also had 
to pass argument to the action. which is not possible in the 
but i got the idea, it was becoz of the bean which iwas in the request 
scope. i fixed it by saving it in the session scope.
now just got one more question. i somehow feel very guilty when is save 
objects in the session scope. is there someone i can ensure that they 
are effectively removed from the scope by the container itself. but any 
programatic tips u might want to add?
thanks anyways man!!
rajatp

Dirk Markert wrote:
Hello Rajat,

  

***



RP> Dirk Markert wrote:


Hello,

 

***

RP> hello all,
RP> i have a form, which inputs a number of units. the problem is that in 
RP> case of a validation error. the page does not return back to the form.
You want to return to updateProductForm.jsp? Does this jsp depend on
beans stored in request scope?


RP> yes itdoes depend on a bean stored in the request scope.
Then in you have to use an action as the input attribute of your
action mapping, ie not input="/pages/layouts/updateProductForm.jsp"
but something like input="/prepareUpdateForm.do". In this action prepare your
request and forward to your jsp.
RP> the actual 
RP> problem thati forsee is that that it is possible the validation and 
RP> calling the executing the Action.execute() despite the fact that there 
RP> where error in the ActionForm.



RP> and just stops.
What do you mean by "just stops"?
RP> calls nothing because the in case of an invalid input there is no 
RP> corresponding action in the Action.execute() and also its not supposed 
RP> to be the case as the ActionForm acts like a firewall and wouldnt let it 
RP> pass to the Action unless the ActionForm.validate() returns a null. 
RP> : (i guess u can see how sad i am)


RP> the following are the extract of my validation method and 
RP> struts-config.xml file.

RP> if anyone could point out somethng i am missing. i am now closing to 
RP> banging my head on the desk now!!.

RP> 

RP>  
RP>  type="com.hedging.admin.productmanagement.updateProduct"
RP>  name="addStateForm"
RP>  validate="true"
RP>  scope="request"
RP>  input="/pages/layouts/updateProductForm.jsp">
RP>  
RP>   path="/pages/layouts/updateProductForm.jsp" />
RP>  
RP> 

RP> 
RP> public ActionErrors validate (ActionMapping mapping,
RP>   HttpServletRequest request) {
RP> ActionErrors errors = new ActionErrors();
RP>  if ((this.getNoOfStates() < 0) || (this.getNoOfStates() > 100))
RP> System.err.println("---> Error occured!!!");
RP> errors.add("noOfStates",
RP> new ActionError("errors.toManyStates"));
RP> }
RP> return errors;
RP> }
RP> 



Regards,
Dirk
+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 

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




Regards,
Dirk
+--- Quality leads ---+
| Dirk Markert [EMAIL PROTECTED] |
| Dr. Markert Softwaretechnik AG  |
| Joseph-von-Fraunhofer-Str. 20   |
| 44227 Dortmund  |
+-->>> to success! <<-+ 

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

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]


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


Re: Help Req on Iterate Tag using HashMap

2003-11-04 Thread Sashi Ravipati
Hi

This is how we iterate in a jsp page





 




where addProviderForm is the Struts Form bean and assocSBList is the
ArrayList defined in the form bean.

Hope this helps.

Thanks

>>> [EMAIL PROTECTED] 11/4/2003 6:43:27 AM >>>
Hi All,
I am keeping some table data in a HashMap .
My Table is in this form :
UID #EMP Details
   -Date of joining
   -Date of birth
   -Misc Detail

Now i am creating an EMPDetails bean and storing the bean in a hash map
with UID # as the key.

Can anyone plz tell me how to show the data in a tabular form in jsp
using iterate tag . I am unable to make out as how to 
iterate the EMPDetails bean which i am getting as value .

Thanks & Regards,
Shakti

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



Re: 2 problems with and whilst including results of action in page and behind firewall with NAT.

2003-11-04 Thread Fred Bloggs
Kris

I am not using any  tags anywhere.  The
only logic tags I use are .

As for the side note: I was thinking of moving to
Tiles very soon but I did not want confuse myself
further by introducing additional changes.  I.e. I
have not used Tiles before.
(I am currently reading Chap 11 (Developing with
Tiles) of Ted Husted's book.  In section 11.1.1 he
mentions "A dynamic include folds the output of the
included page into the original page." he is talking
about  wrote:
> Are you using a  tag anywhere in the
> JSP, or a scriptlet that
> effectively performs a RequestDispatcher.forward?
> 
> On a side note, I'd recommend ditching the template
> tags in favor of the more
> basic  or Tiles. For Struts 1.1, the
> template stuff has been
> deprecated.
> 
> Quoting Fred Bloggs <[EMAIL PROTECTED]>:
> 
> > Kris
> > 
> > Thank you for your prompt response.  I have now
> tried
> > all your suggestions but unfortunately they do not
> > work.
> > 
> > When I tried 
> > 
> > 
> >> path="/getmostrecentnews.do"/>
> >   ...
> > 
> > And then used it in the page:
> > 
> >  > forward="mostRecentNews"/>
> > 
> > When I access the site from outside the firewall I
> > still get the "Exception opening resource" and the
> > external IP address is shown in the URL.  And yet
> the
> > rest of the site works, and when I access the
> action
> > directly in my browser it displays the page
> correctly.
> > (btw it complains if I did not use the id
> parameter)
> > 
> > I then tried your next suggestion of using JSTL
> > 
> > <%@ taglib prefix="c
> > uri="http://java.sun.com/jstl/core"; %>
> > ...
> > 
> > 
> > It throws an exception of
> > "javax.servlet.ServletException: Cannot forward
> after
> > response has been committed" -The same as for a
> >  > 
> > Any further help will be greatly appreciated.
> > 
> > Thanks
> > 
> > Fred
> > 
> > --- Kris Schneider <[EMAIL PROTECTED]> wrote:
> > > #2 first. Try using  forward="..."/>
> > > instead. You'll have to add a
> > > global forward to your struts config file, like:
> > > 
> > > 
> > >> > path="/getmostrecentnews.do"/>
> > >   ...
> > > 
> > > 
> > > And then use it in a page like:
> > > 
> > > 
> > > 
> > > You don't need to use the "id" attribute unless
> you
> > > really want to store the
> > > included response in a variable. Try that first
> and
> > > see if #1 is still a problem
> > > (although I seem to remember there might
> actually be
> > > a bug with encoding).
> > > 
> > > Another alternative would be to try JSTL (JSP
> 1.2):
> > > 
> > > <%@ taglib prefix="c
> > > uri="http://java.sun.com/jstl/core"; %>
> > > ...
> > > 
> > > 
> > > The  tag also supports a
> "charEncoding"
> > > attribute that you can try if
> > > it doesn't work without it.
> > > 
> > > Quoting Fred Bloggs <[EMAIL PROTECTED]>:
> > > 
> > > > Dear All,
> > > > 
> > > > I'm relatively new to Struts and have come
> across
> > > two
> > > > problems that have completely confused me.
> > > > 
> > > > I am using Struts 1.1, Tomcat 4.1.27. 
> > > > 
> > > > Problem 1:
> > > > 
> > > > I have an action that produces the most recent
> > > "news"
> > > > and displays it on separate page.  However I
> want
> > > to
> > > > include those news as well on some of my other
> > > pages. 
> > > > I use the template tags to get and put the
> various
> > > > pages together (I haven't tried Tiles yet, I
> want
> > > to
> > > > keep it simple).
> > > > 
> > > > So my topical.jsp contains a table with the
> > > following
> > > > row:
> > > > 
> > > > ...
> > > > 
> > > > 
> > > >  > > id="GetMostRecentNews"
> > > > page="/getmostrecentnews.do"/>
> > > >  > > name="GetMostRecentNews"
> > > > filter="false"/>
> > > > 
> > > > 
> > > > ...
> > > > 
> > > > All my pages use the UTF-8  charset thus I use
> the
> > > > following at the start of every jsp page:
> > > > 
> > > > <%@ page contentType="text/html;
> charset=UTF-8" %>
> > > > <%@ taglib uri="/WEB-INF/struts-bean.tld"
> > > > prefix="bean"%>
> > > > ... plus other taglib definitions.
> > > > 
> > > > When I invoke the /getmostrecentnews.do
> directly
> > > using
> > > > a browser, everything is diasplayed correctly.
> 
> > > The
> > > > correct charset is used.
> > > > 
> > > > Now when I do the   > > (as
> > > > shown above), the page is included in the main
> > > page,
> > > > but the charset is incorrect and thus some
> > > characters
> > > > are incorrectly displayed.
> > > > 
> > > > I do not use the locale setting since the
> content
> > > and
> > > > thus charset is locale independent.
> > > > 
> > > > I use templates to do my header, footer,
> sidebar
> > > etc. 
> > > > The above table is in the main "content" of my
> > > > template.
> > > > 
> > > > I tried changing my template to have another
> > > "news"
> > > > section and did a put (with a matching get) as
> > > > follows: 
> > > > 
> > > >  > > > content='/getmostrecentnews.do' />
> > > > 
> > > > I get a "javax.servlet.ServletException:
> Cannot
> > >

Tag Map on Struts

2003-11-04 Thread Mauricio T. Ferraz
How a use this (for the link)tag on struts to:



http://www.teste.com.br"; 
target="_blank">

http://www.teste2/index.htm"; 
target="_blank">

http://www.teste3.com"; target="_blank">



And how I use a Image on the td of the table, for example, I Can leave that???



I starting in the Struts now, tanks!!!

Mauricio


Help: Simple Dynaform + String Collection + JSP + populate (Repost)

2003-11-04 Thread Henry Voyer
Hi  everyone

I have a really simple case that I just cant solve.

I have
A simple class
public class user
{
private Collection emails  = new ArrayList();
private String name;
public Collection getEmails()
…
Public void setEmails (Collection emails) // String Collection as 
[EMAIL PROTECTED]  …

public void setName(String name)
…
public String getName()
…
}
Now I have mapped to it a dynaform in struts config


   
   


My question are :

1- how to show it in the jsp for a form input?
2- Will the BeanUtils.copyProperties(user, form); work?


For testing the input and population, i have tried the following jsp

  
   
 
   
   
   

I don’t have the result that I need with this.. but nevertheless I populate 
my form.

But I have a exception in the Action when trying to copy the properties 
using BeanUtils.copyProperties

Can anyone give me a hint or help me to solve this simple thing.

Thanks a lot

Regards and happy halloween

henry

_
The new MSN 8: smart spam protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail  
http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca

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


Re: sending object with query. (Repost)

2003-11-04 Thread Henry Voyer
Hi everyone



This is something I want to achieve in my app.



I know that u can receive objects via URL using something like this



   URL url = new URL(notificationServiceURL + parameter);



   ObjectInputStream is = new ObjectInputStream(url.openStream());



   Map hash = (Map) is.readObject();



   return hash;





Now I haven’t have time to do it. But I think is possible that u can open

The url stream and do something like

url.openConnection().getInputStream()



and play with it.



As I said I haven’t tried to finish this. But if u do before me please me 
tell me.

Otherwise il contact you as soon as I have a valid solution



If u need more information on what to do in the other end don’t hesitate to 
contact me.



Regards



Henry

_
Add photos to your e-mail with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/photos&pgmarket=en-ca&RU=http%3a%2f%2fjoin.msn.com%2f%3fpage%3dmisc%2fspecialoffers%26pgmarket%3den-ca

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


RE: Deploying struts application on iplanet 6.0 or 4.0

2003-11-04 Thread James Mitchell
That's because 6.0 != 6.1



--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017 (c)
770.822.3359 (h)
AIM:jmitchtx




> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 04, 2003 4:51 AM
> To: Struts Users Mailing List
> Subject: RE: Deploying struts application on iplanet 6.0 or 4.0
> 
> 
> 
> Hello James,
> I have dowloaded the iplanet 6.0 service pack 4.0 (web 
> server) but I am
> still unable to deploy the struts application can anybody 
> tell me what all
> jars I need to keep in the classpath??
> 
> 
> 
> Alok Garg
> Polaris Software Lab Ltd.
> ( + 91 - 022 - 28290019 Ext. # 1308 )
> 
> 
>   
>
>   "James Mitchell"
>
>   <[EMAIL PROTECTED] To:  
> "'Struts Users Mailing List'" 
> <[EMAIL PROTECTED]>   
>   e.org>   cc:  (bcc: 
> alok.garg/Polaris) 
>Subject: RE: 
> Deploying struts application on iplanet 6.0 or 4.0   
>   11/01/03 02:43  
>
>   AM  
>
>   Please respond  
>
>   to "Struts Users
>
>   Mailing List"   
>
>   
>
>   
>
> 
> 
> 
> 
> You will need to upgrade to 6.1.  If I were you, I wouldn't waste my
> time trying anything less.
> 
> If your customer/boss says they can't or won't, tell them 
> that they will
> spend more time trying to "make" it work then they ever would have if
> they had just upgraded...trust me!
> 
> 
> 
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017 (c)
> 770.822.3359 (h)
> AIM:jmitchtx
> 
> 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Friday, October 31, 2003 4:06 PM
> > To: Struts Users Mailing List
> > Subject: RE: Deploying struts application on iplanet 6.0 or 4.0
> >
> >
> >
> > I want to deploy my Struts application which is running in Tomcat in
> > iplanet server version 6.0. with no service packs
> >
> > Alok Garg
> > Polaris Software Lab Ltd.
> > ( + 91 - 022 - 28290019 Ext. # 1308 )
> >
> >
> >
> >
> >   "James Mitchell"
> >
> >   <[EMAIL PROTECTED] To:
> > "'Struts Users Mailing List'"
> > <[EMAIL PROTECTED]>
> >   e.org>   cc:  (bcc:
> > alok.garg/Polaris)
> >Subject: RE:
> > Deploying struts application on iplanet 6.0 or 4.0
> >   11/01/03 12:40
> >
> >   AM
> >
> >   Please respond
> >
> >   to "Struts Users
> >
> >   Mailing List"
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > You're welcome in advance.  Now, what's your question?
> >
> >
> >
> > --
> > James Mitchell
> > Software Engineer / Struts Evangelist
> > http://www.struts-atlanta.org
> > 678.910.8017 (c)
> > 770.822.3359 (h)
> > AIM:jmitchtx
> >
> >
> >
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, October 31, 2003 1:01 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Deploying struts application on iplanet 6.0 or 4.0
> > >
> > >
> > > Hello ,
> > > I want to deploy the struts application on iplanet 6.0 or 4.0.
> > >
> > > Thanking you in advance...
> > >
> > > Alok Garg
> > > Polaris Software Lab Ltd.
> > > ( + 91 - 022 - 28290019 Ext. # 1308 )
> > >
> > >
> > >
> >
> >
> > 
> -
> > 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:select tag calling set method in form

2003-11-04 Thread damian_bradicich




Is this the correct functionallity of struts??

if you have a multiple selection list box, and everything is deselected,
the setter method in the form object is not getting called.

It only gets called if there are 1 or more entries in the list box selected
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| |   damian_bradicich@|
| |   stchome.com  |
| ||
| |   10/30/2003 10:44 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |To:  "Struts Users Mailing List" <[EMAIL PROTECTED]>
 |
  |cc: 
  |
  |Subject: Problem with html:select tag calling set method in form
  |
  
>--|








I have a jsp that creates a select tag w/ size = 2 and multiple also true,
which gives me a list box w/ multi selection.

So, I open up the page, and I see all the data fine, I select a couple of
items in the list box and save, everything is great, my setter in the form
is getting called.  However, if i deselect all entries in the list box, and
save, the setter method in the form is not being called, has anyone else
noticed this?  If so, does anyone have a workaround?
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Web Site: www.stchome.com
"Advancing Public Health Core Capacities While Leveraging the Resources of
a Community"
___


-
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:select tag calling set method in form

2003-11-04 Thread shirishchandra.sakhare
This looke like correct to me.Because if you do not select anything, that also means 
that there wont be any value sent for that request parameter.And so the setter will 
not be called.

You can runa  simple check.Check by calling request.getParameter if any parameter with 
the name for the select box is being sent in request.I am sure you wont find any...

HTH.

regards,
Shirish

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 3:21 PM
To: Struts Users Mailing List
Subject: Re: Problem with html:select tag calling set method in form






Is this the correct functionallity of struts??

if you have a multiple selection list box, and everything is deselected,
the setter method in the form object is not getting called.

It only gets called if there are 1 or more entries in the list box selected
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| |   damian_bradicich@|
| |   stchome.com  |
| ||
| |   10/30/2003 10:44 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>
  
>--|
  |
  |
  |To:  "Struts Users Mailing List" <[EMAIL PROTECTED]>
 |
  |cc: 
  |
  |Subject: Problem with html:select tag calling set method in form
  |
  
>--|








I have a jsp that creates a select tag w/ size = 2 and multiple also true,
which gives me a list box w/ multi selection.

So, I open up the page, and I see all the data fine, I select a couple of
items in the list box and save, everything is great, my setter in the form
is getting called.  However, if i deselect all entries in the list box, and
save, the setter method in the form is not being called, has anyone else
noticed this?  If so, does anyone have a workaround?
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Web Site: www.stchome.com
"Advancing Public Health Core Capacities While Leveraging the Resources of
a Community"
___


-
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: Populating Web Forms After Validation Errors

2003-11-04 Thread Susan Bradeen

Hi Joe,
This question is popular, and you can find a number of threads regarding
repopulation after form validation in the archives. See below for some
comments.

On 11/03/2003 08:13:34 PM Joe Krause wrote:

> I have a web form that includes several dropdown menus that must be
> populated dynamically from a database. I am using an Action called
> EditUserAction to setup the appropriate name value pairs for the dropdown
> menus. I am building the name value pairs as simple String arrays which I
> place in the request scope:
>
> request.setAttribute("startPageValues", startPageLabels);
>
> request.setAttribute("startPageLabels", startPageValues);
>
> When the action is complete it forwards processing to a JSP page which
> displays the form: /WEB-INF/jsp/editUser.jsp. In this JSP I have the
> following STRUT tag:
>
> 
>
>  />
>
> 
>

So, here your JSP has been displayed. The request is finished, and your
request attributes are no longer available.


> The form submits to the STRUTS controller and is configured to use an
Action
> called ProcessEditUserAction. This all works perfectly and without a
hitch.
>
>
>
> If I program the FormBean that these series of pages are using to
validate
> the user submitted code - when there is an error, the FormBean is being
sent
> to the /WEB-INF/jsp/editUser.jsp page without the name/value array pairs
> being generated. This then causes some problems. How do I architecturally
> handle this? My struts-config.xml file is pointing to
> "/WEB-INF/jsp/editUser.jsp" as the input mapping. Should that be
different?
> If I do the validation in the FormBean, it seems like I can't get flow of
> control back to an Action? Am I missing something?
>

One approach is to put your arrays into session attributes instead of
request attributes. Then they will be available after the request has
expired.

Although you didn't mention it, saving your arrays as properties of the
(request scoped) ActionForm won't work either. Upon submit of your JSP,
only the form input (and hidden) variables are passed on for further
processing. So another solution is to change your mapping input attribute
to point to EditUserAction, which will set up the JSP/request again.
Depending on your setup action, this may or may not work.

You can also validate in your ProcessEditUserAction instead. You need to
set validate=false in the action mapping, then in the process action use
something to the affect of:

form.validate(mapping, request);
if (!errors.isEmpty());
saveErrors(request, errors);
// populate your request attributes again here.
return new ActionForward(mapping.getInput());

the mapping.getInput() will go back to your JSP with the user input values,
but now the request attributes are available again to display.

Hope this helps,
Susan

>
>
> Thanks!!!
>
>
>
> Joe Krause
>
>



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



nested iterate

2003-11-04 Thread struts
Hi all,

Question:
I've two collections in the session. A collection salesGroup and a collection 
salesPeople. salesGroup contains groupId and groupName. salesPeople contains 
salesUserName and salesGroupId (FK). How can i display all salesGroups and all 
salesUsers in it
Like
Salesgroup1
saleswoman1
salesmen2 
...
Salesgroup2
...

Thanks  !


Re: nested iterate

2003-11-04 Thread David Graham
Here's how you can display the groups using the JSTL

http://java.sun.com/products/jsp/jstl/





That should get you started.

David


--- struts <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> Question:
> I've two collections in the session. A collection salesGroup and a
> collection salesPeople. salesGroup contains groupId and groupName.
> salesPeople contains salesUserName and salesGroupId (FK). How can i
> display all salesGroups and all salesUsers in it
> Like
> Salesgroup1
> saleswoman1
> salesmen2 
> ...
> Salesgroup2
> ...
> 
> Thanks  !
> 


__
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: [OT] Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread ZYD

I found something at http://www.postgresql.org/docs/7.3/static/jdbc-datasource.html

Your suggestion is similar to what Struts In Action suggests, on page 125:

If your database management system provides its own DataSource that can be
used with Struts, you should consider using that implementation instead.


- Original Message - 
From: "David Graham" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, November 03, 2003 3:10 AM
Subject: [OT] Re: What's the best choice for connection pooling with Struts and 
PostgreSQL


> 
> --- ZYD <[EMAIL PROTECTED]> wrote:
> > Dear all,
> > 
> > I'm writing my Struts application using PostgreSQL as the backend
> > database. Could you give me some advice on choosing the connection
> > pooling framework/methods?
> > 
> > I wrote my own connection pooling classes, but if there are some good
> > frameworks from jakarta, it definitely worth a  try.
> 
> Postgres provides its own implementation of the DataSource interface.  You
> can find it here:
> 
> http://jdbc.postgresql.org/
> 
> David
> 
> > 
> > Any response is greatly appreciated.
> > 
> > bruce
> 

RE: Problem with html:select tag calling set method in form

2003-11-04 Thread damian_bradicich




I was thinking that was the case, but was hoping otherwise, I'll have to
come up w/ a javascript solution.

thx for the help Shirish
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| | |
| ||
| |   11/04/2003 09:35 AM  |
| |   Please respond to|
| |   "Struts Users Mailing|
| |   List"|
| ||
|-+>
  
>--|
  |
  |
  |To:  <[EMAIL PROTECTED]>
 |
  |cc: 
  |
  |Subject: RE: Problem with html:select tag calling set method in form
  |
  
>--|




This looke like correct to me.Because if you do not select anything, that
also means that there wont be any value sent for that request parameter.And
so the setter will not be called.

You can runa  simple check.Check by calling request.getParameter if any
parameter with the name for the select box is being sent in request.I am
sure you wont find any...

HTH.

regards,
Shirish

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 3:21 PM
To: Struts Users Mailing List
Subject: Re: Problem with html:select tag calling set method in form






Is this the correct functionallity of struts??

if you have a multiple selection list box, and everything is deselected,
the setter method in the form object is not getting called.

It only gets called if there are 1 or more entries in the list box selected
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| |   damian_bradicich@|
| |   stchome.com  |
| ||
| |   10/30/2003 10:44 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>

>--|

  |
|
  |To:  "Struts Users Mailing List"
<[EMAIL PROTECTED]>
|
  |cc:
|
  |Subject: Problem with html:select tag calling set method in form
|

>--|









I have a jsp that creates a select tag w/ size = 2 and multiple also true,
which gives me a list box w/ multi selection.

So, I open up the page, and I see all the data fine, I select a couple of
items in the list box and save, everything is great, my setter in the form
is getting called.  However, if i deselect all entries in the list box, and
save, the setter method in the form is not being called, has anyone else
noticed this?  If so, does anyone have a workaround?
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Web Site: www.stchome.com
"Advancing Public Health Core Capacities While Leveraging the Resources of
a Community"
___


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

Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread ZYD
I tried to use Tomcat's datasource pool via JNDI, but things not going well.

I got the following exception when I tried to get connection:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
' for connect URL 'null', cause:
java.lang.NullPointerException
at java.util.StringTokenizer.(StringTokenizer.java:146)
at org.postgresql.Driver.parseURL(Driver.java:251)
at org.postgresql.Driver.acceptsURL(Driver.java:159)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:743)
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at cpool.struts.action.LogonAction.testJNDI(LogonAction.java:185)
at cpool.struts.action.LogonAction.execute(LogonAction.java:60)



In struts-config.xml, I added the following:

   
 
 
 
 
 
 
 
 
   

In server.xml:


  
  
username
cpool
  
  
password

  
  
driverClassName
org.postgresql.Driver
  
  
url
jdbc:postgresql:cpool
  
  
maxActive
8
  
  
maxIdle
4
  
 

Then, I wrote the following method in an Action to test the connection:

public void testJNDI()
 {
  try
  {
   Context initCtx = new InitialContext();
   Context envCtx = (Context)initCtx.lookup("java:comp/env");
   if (envCtx != null)
   {
TTools.consolePrint("LogonAction", "envCtx", envCtx.toString());
   }
   //DataSource ds = (DataSource)envCtx.lookup("jdbc/CPool");
   DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/CPool");

   Connection conn = ds.getConnection();
   if (conn != null)
   {
TTools.consolePrint(conn, "Conn", conn.toString());
   }
   conn.close();
  }
  catch (NamingException e)
  {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
  catch (SQLException e)
  {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
 }

Does this problem sounds familiar to you ? 
Please give some advice on this, thanks in advance.

bruce

- Original Message - 
From: "Vic Cekvenich" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 03, 2003 3:18 AM
Subject: Re: What's the best choice for connection pooling with Struts and PostgreSQL


> 1. It is a good practice to use the containers data source pool via 
> JNDI. Application servers like Tomcat, Resin, OrionServer, etc all 
> provide a "service" to the web app of a connection pool. You should not 
> code one, but use one.
> Ex:
> Context ctx = new InitialContext();
> DataSource ds = (DataSource) ctx.lookup("java:comp/env/mypool");
> conn = ds.getConnection();
> 
> And you configure the pool in the container. Ex in Resin 3.03:
> 
>  mypool
>  
> bpuser
>  changeme
>  3.3.3.3
> dbname
>  
>  3
>  
> The idea here is that you deploy same web app to staging or production, 
> without changing the app.
> 
> 2. You do not need to do #1 above either. Just like you use Struts and 
> not code to servlets, you should not code to JDBC. You should use a DAO, 
> such as iBatis.com (SQL based and my favorite) or Hibrenate.
> Ex in iBatis:
> List _resList;
> _sqlMap.startTransaction();
> _resList = _sqlMap.executeQueryForList("xmlNamedSQLquerry");
> 
> And you have a List of results. The JNDI, pool open and close it done 
> for you, you just work on your result list (that you can pass on to 
> display tag for example)
> 
> J2EE designed real nice and you should leverage it, not fight it.
> 
> hth,
> 
> 
> 
> ZYD wrote:
> > Dear all,
> > 
> > I'm writing my Struts application using PostgreSQL as the backend database. Could 
> > you give me some advice on choosing the connection pooling framework/methods?
> > 
> > I wrote my own connection pooling classes, but if there are some good frameworks 
> > from jakarta, it definitely worth a  try.
> > 
> > Any response is greatly appreciated.
> > 
> > bruce
> > 
> 
> -- 
> Victor Cekvenich,
> Struts Instructor
> (215) 321-9146
> 
> Advanced Struts Training
>  Server Side Java
> training with Rich UI, mentoring, designs, samples and project recovery
> in North East.
> Simple best practice basic Portal, a Struts CMS, Membership, Forums,
> Shopping and Credit processing,  software, ready
> to develop/customize; requires a db to run.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Re: Application objects

2003-11-04 Thread Ruth, Brice
The Tomcat manager application can show how many active sessions a 
particular application has, so I imagine its possible - probably depends 
on the particular container.

I'm not sure about extending the session class, I imagine so, though I 
wouldn't know where you would indicate that *your* session 
implementation should be used over the default implementation - maybe 
someone else can pick up this one.

Finally, yes - you should be able to store things in "application" scope 
from anywhere in the application (init, Struts Action, separate servlet, 
or JSP). Within a JSP, the jsp:useBean tag with a 'scope' attribute of 
"application" will store the bean created in application scope (which is 
what ServletContext is).

Mathieu Grimault wrote:

Hi all, 
   I would like to display the number of users connected (number of session) to my application. Is there a way to do this ?

   Another question, Can we implements code in the session class (by extending the class) and can we store/access/ modify objects in the ServletContext during the execution of the application (not during initialisation) ?

thx for help. Mathieu.
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


???

2003-11-04 Thread Mauricio T. Ferraz
Whats the diference between:

My Page

and

My Page

Thanks!!!

Re: ???

2003-11-04 Thread Ruth, Brice
the "action" attribute has to reflect an action-mapping that is defined 
in your struts config file. the "page" attribute should start with a '/' 
and will output in HTML the correct URL to the resource, based on the 
web-app that you're running - its purpose is to allow module-relative 
naming of your resources.

Check out the Struts-HTML taglib reference here:

http://jakarta.apache.org/struts/userGuide/dev_html.html

Mauricio T. Ferraz wrote:

Whats the diference between:

My Page

and

My Page

Thanks!!!
 

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


OT: Formatting Negative Numbers

2003-11-04 Thread Menke, John
I have asked this question on the TagLib list with no luck.  

Hoping this is not too annoying asking here :)

I have a requirement in my application that states that negative numbers
should be formatted in parenthesis in red without the negative sign.  

Is there any way to do this in JSTL without coding it with  and
???  

If not I'm thinking my best option would be to write my own taglib.
Comments would be appreciated.

-jm

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



RE: Problem with html:select tag calling set method in form

2003-11-04 Thread shirishchandra.sakhare
what is it you are trying to do?I mean why the setter should be caled when nothing is 
selected?

Just curious :-))

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 4:41 PM
To: Struts Users Mailing List
Subject: RE: Problem with html:select tag calling set method in form






I was thinking that was the case, but was hoping otherwise, I'll have to
come up w/ a javascript solution.

thx for the help Shirish
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| | |
| ||
| |   11/04/2003 09:35 AM  |
| |   Please respond to|
| |   "Struts Users Mailing|
| |   List"|
| ||
|-+>
  
>--|
  |
  |
  |To:  <[EMAIL PROTECTED]>
 |
  |cc: 
  |
  |Subject: RE: Problem with html:select tag calling set method in form
  |
  
>--|




This looke like correct to me.Because if you do not select anything, that
also means that there wont be any value sent for that request parameter.And
so the setter will not be called.

You can runa  simple check.Check by calling request.getParameter if any
parameter with the name for the select box is being sent in request.I am
sure you wont find any...

HTH.

regards,
Shirish

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 3:21 PM
To: Struts Users Mailing List
Subject: Re: Problem with html:select tag calling set method in form






Is this the correct functionallity of struts??

if you have a multiple selection list box, and everything is deselected,
the setter method in the form object is not getting called.

It only gets called if there are 1 or more entries in the list box selected
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| |   damian_bradicich@|
| |   stchome.com  |
| ||
| |   10/30/2003 10:44 |
| |   AM   |
| |   Please respond to|
| |   "Struts Users|
| |   Mailing List"|
| ||
|-+>

>--|

  |
|
  |To:  "Struts Users Mailing List"
<[EMAIL PROTECTED]>
|
  |cc:
|
  |Subject: Problem with html:select tag calling set method in form
|

>--|









I have a jsp that creates a select tag w/ size = 2 and multiple also true,
which gives me a list box w/ multi selection.

So, I open up the page, and I see all the data fine, I select a couple of
items in the list box and save, everything is great, my setter in the form
is getting called.  However, if i deselect all entries in the list box, and
save, the setter method in the form is not being called, has anyone else
noticed this?  If so, does anyone have a workaround?
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Web Site: www.stchome.com
"Advancing Public Health Core Capacities While Leveraging the Resources of
a Community"
___


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

Re: OT: Formatting Negative Numbers

2003-11-04 Thread Ruth, Brice
I believe a taglib to do this has already been written, check here:

http://www.servletsuite.com/servlets/numtag.htm

Google's your friend :)

Menke, John wrote:

I have asked this question on the TagLib list with no luck.  

Hoping this is not too annoying asking here :)

I have a requirement in my application that states that negative numbers
should be formatted in parenthesis in red without the negative sign.  

Is there any way to do this in JSTL without coding it with  and
???  

If not I'm thinking my best option would be to write my own taglib.
Comments would be appreciated.
-jm

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

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


jsp error

2003-11-04 Thread Rajat Pandit
http://www.mail-archive.com/[EMAIL PROTECTED]/msg48219.html
pls have a look at this, i am facing a similar problem. can someone pls 
help me with this?

--

Rajat Pandit | [EMAIL PROTECTED]
+91 612 3117606
[ Developer and Part Time Human Being]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Working with UTF-8 and problems with German Umlauts

2003-11-04 Thread Jim Theodoridis
I had the same problem in Greeks
The first steep is to follow the instructions below

http://www.anassina.com/struts/i18n

( If the page dos not displays tell me to send u via email )

The second step, if u use a database, to retrieve data to work on UTF-8
so database driver must support it.

for mySQL below 4.x use

String dbURL =
"jdbc:mysql://localhost/YellowPages?useUnicode=true&characterEncoding=UTF-8"
;

i hope to help u

- Original Message -
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 12:31 AM
Subject: Re: Working with UTF-8 and problems with German Umlauts


> On 11/03/2003 09:43 PM Zsolt Koppany wrote:
> > I have problems with German Umlauts when I enter the code below to my
jsp
> > pages. The problem is when I for example I forget to fill a required
field
> > and the previous values are restored after validation.
> >
> > How can I fix that?
> >
> > I use tomcat-4.1.24 with struts-1.1.
> >
> >
> > <%@ page contentType="text/html; charset=UTF-8" %>
> >
> > <%request.setCharacterEncoding("UTF8");%>
>
> Hi Zsolt,
> you are setting your character encoding way too late in the game. By the
> point you set it in the JSP as you show above, Struts has already read
> the request parameters into your form.
>
> A common method of setting the character encoding for struts is using a
> filter, so the request is character-encoded before struts gets to see it.
>
> 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]
>
>



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



Struts, Tomcat And Performance

2003-11-04 Thread Jonathan Holloway
Does anybody have any information, case studies or figures they can share on the 
performance of struts under tomcat.  

Whats the maximum number of simultaneous users that can be supported by a single 
tomcat instance running struts?  I've got up to around 40-60 but need to increase this 
to more like 150-200 simultaneous users.  

Any help would be greatly appreciated.

Thanks,
Jon.



Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com

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



RE: Application objects

2003-11-04 Thread David Friedman
Mathieu and Ruth,

If you want read-only access to session information like that, here are some
taglibs around I saw last month (but never used) that might fit your needs:

http://www.servletsuite.com/servlets/sesstag.htm

And

http://www.servletsuite.com/servlets/sessadmtag.htm


-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 11:01 AM
To: Struts Users Mailing List
Subject: Re: Application objects


The Tomcat manager application can show how many active sessions a
particular application has, so I imagine its possible - probably depends
on the particular container.

I'm not sure about extending the session class, I imagine so, though I
wouldn't know where you would indicate that *your* session
implementation should be used over the default implementation - maybe
someone else can pick up this one.

Finally, yes - you should be able to store things in "application" scope
from anywhere in the application (init, Struts Action, separate servlet,
or JSP). Within a JSP, the jsp:useBean tag with a 'scope' attribute of
"application" will store the bean created in application scope (which is
what ServletContext is).

Mathieu Grimault wrote:

>Hi all,
>I would like to display the number of users connected (number of
session) to my application. Is there a way to do this ?
>
>Another question, Can we implements code in the session class (by
extending the class) and can we store/access/ modify objects in the
ServletContext during the execution of the application (not during
initialisation) ?
>
>thx for help. Mathieu.
>
>

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



-
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: why jstl does not work rightly

2003-11-04 Thread Karr, David
Ok, let's see.

Are you sure you have a valid "taglib" directive in your JSP page (not
in the web.xml)?  Do a "view source" on the generated page to make sure
you don't have " -Original Message-
> From: javen fang [mailto:[EMAIL PROTECTED] 
> 
> hi, all
> 
> 
> 
> USER is a user session
> 
>  can work,and prints myname
>  can not work, and prints   ${USER.username}
> 
> Because of the output  ${USER.username}  , my config
> about JSTL may be right. and now , why it does not
> work rightly 
> 
> my container is tomcat 5.0

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



Re: OT: Formatting Negative Numbers

2003-11-04 Thread Kris Schneider
Check the JavaDoc for java.text.DecimalFormat. A format pattern can contain an
optional negative subpattern. Once your pattern's defined, you can use JSTL's 
 (or Struts' ) to format the output.

Quoting "Menke, John" <[EMAIL PROTECTED]>:

> I have asked this question on the TagLib list with no luck.  
> 
> Hoping this is not too annoying asking here :)
> 
> I have a requirement in my application that states that negative numbers
> should be formatted in parenthesis in red without the negative sign.  
> 
> Is there any way to do this in JSTL without coding it with  and
> ???  
> 
> If not I'm thinking my best option would be to write my own taglib.
> Comments would be appreciated.
> 
> -jm

-- 
Kris Schneider 
D.O.Tech   

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



RE: Problem with html:select tag calling set method in form

2003-11-04 Thread damian_bradicich




We have a couple of pages which use the same form (advanced and basic
search), so the reset method can't be used to clear the fields (as you
would for any normal pages).

I was hoping that the setter would be called to reset the field, so I am
putting javascript in to null out the field in the form so that the changes
will be saved properly
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| | |
| ||
| |   11/04/2003 11:09 AM  |
| |   Please respond to|
| |   "Struts Users Mailing|
| |   List"|
| ||
|-+>
  
>--|
  |
  |
  |To:  <[EMAIL PROTECTED]>
 |
  |cc: 
  |
  |Subject: RE: Problem with html:select tag calling set method in form
  |
  
>--|




what is it you are trying to do?I mean why the setter should be caled when
nothing is selected?

Just curious :-))

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 4:41 PM
To: Struts Users Mailing List
Subject: RE: Problem with html:select tag calling set method in form






I was thinking that was the case, but was hoping otherwise, I'll have to
come up w/ a javascript solution.

thx for the help Shirish
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| | |
| ||
| |   11/04/2003 09:35 AM  |
| |   Please respond to|
| |   "Struts Users Mailing|
| |   List"|
| ||
|-+>

>--|

  |
|
  |To:  <[EMAIL PROTECTED]>
|
  |cc:
|
  |Subject: RE: Problem with html:select tag calling set method in
form  |

>--|





This looke like correct to me.Because if you do not select anything, that
also means that there wont be any value sent for that request parameter.And
so the setter will not be called.

You can runa  simple check.Check by calling request.getParameter if any
parameter with the name for the select box is being sent in request.I am
sure you wont find any...

HTH.

regards,
Shirish

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 3:21 PM
To: Struts Users Mailing List
Subject: Re: Problem with html:select tag calling set method in form






Is this the correct functionallity of struts??

if you have a multiple selection list box, and everything is deselected,
the setter method in the form object is not getting called.

It only gets called if there are 1 or more entries in the list box selected
___
Damian Bradicich
Software Developer
Scientific Technologies Corporation
Tel: (603) 471-4712
Email: [EMAIL PROTECTED]
Web Site: www.stchome.com
"Advancing Public Health Through Information Technology"
___


|-+>
| |   damian_bradicich@|
| |   stchome.com  |
| ||
| |   10/30/2003 10:44 |
| |   AM   |
| |   Please respond 

Re: Struts, Tomcat And Performance

2003-11-04 Thread Vic Cekvenich
You are of by a few orders of magnitude (2,000 to 4,000 concurrent is 
what I get using j:Rockit VM)

A nice thing about layered MVC architecture is that you can stress test 
a layer, the Model layer for example. I use OpenSTA + DBMonster to 
simulate. I use JaMon to monitor live app., so I know what to stress.

Should you need to change improve the Model, I *HOPE* you coded DAO via 
an interface, that would make it easy to change. I use iBatis DB layer 
and a fast DB, writing stored procs when needed.

(Lesson for others, create a DAO interface)

hth,

Jonathan Holloway wrote:
Does anybody have any information, case studies or figures they can share on the performance of struts under tomcat.  

Whats the maximum number of simultaneous users that can be supported by a single tomcat instance running struts?  I've got up to around 40-60 but need to increase this to more like 150-200 simultaneous users.  

Any help would be greatly appreciated.

Thanks,
Jon.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com
--
Victor Cekvenich,
Struts Instructor
(215) 321-9146
Advanced Struts Training
 Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing,  software, ready
to develop/customize; requires a db to run.


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


Re: ???

2003-11-04 Thread Mauricio T. Ferraz
Thanks for help, Ruth, Brice

[]´s
Mauricio

- Original Message -
From: "Ruth, Brice" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 2:07 PM
Subject: Re:  ???


> the "action" attribute has to reflect an action-mapping that is defined
> in your struts config file. the "page" attribute should start with a '/'
> and will output in HTML the correct URL to the resource, based on the
> web-app that you're running - its purpose is to allow module-relative
> naming of your resources.
>
> Check out the Struts-HTML taglib reference here:
>
> http://jakarta.apache.org/struts/userGuide/dev_html.html
>
> Mauricio T. Ferraz wrote:
>
> >Whats the diference between:
> >
> >My Page
> >
> >and
> >
> >My Page
> >
> >Thanks!!!
> >
> >
>
> --
> Brice D. Ruth
> Sr. IT Analyst
> Fiskars Brands, Inc.
>
>
>
> -
> 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: Application objects

2003-11-04 Thread Yansheng Lin
This is what I did:

implements javax.servlet.http.HttpSessionListener

This way you don't get tied up with Struts.


-Original Message-
From: David Friedman [mailto:[EMAIL PROTECTED] 
Sent: November 4, 2003 9:24 AM
To: Struts Users Mailing List
Subject: RE: Application objects


Mathieu and Ruth,

If you want read-only access to session information like that, here are some
taglibs around I saw last month (but never used) that might fit your needs:

http://www.servletsuite.com/servlets/sesstag.htm

And

http://www.servletsuite.com/servlets/sessadmtag.htm


-Original Message-
From: Ruth, Brice [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 11:01 AM
To: Struts Users Mailing List
Subject: Re: Application objects


The Tomcat manager application can show how many active sessions a
particular application has, so I imagine its possible - probably depends
on the particular container.

I'm not sure about extending the session class, I imagine so, though I
wouldn't know where you would indicate that *your* session
implementation should be used over the default implementation - maybe
someone else can pick up this one.

Finally, yes - you should be able to store things in "application" scope
from anywhere in the application (init, Struts Action, separate servlet,
or JSP). Within a JSP, the jsp:useBean tag with a 'scope' attribute of
"application" will store the bean created in application scope (which is
what ServletContext is).

Mathieu Grimault wrote:

>Hi all,
>I would like to display the number of users connected (number of
session) to my application. Is there a way to do this ?
>
>Another question, Can we implements code in the session class (by
extending the class) and can we store/access/ modify objects in the
ServletContext during the execution of the application (not during
initialisation) ?
>
>thx for help. Mathieu.
>
>

--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.



-
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: Struts, Tomcat And Performance

2003-11-04 Thread Brice Ruth
Hey, Vic -

I'm looking to do some stress testing of our site before we deploy, can 
you recommend any good reference books/sites to get started in this area?

Brice

Vic Cekvenich wrote:

You are of by a few orders of magnitude (2,000 to 4,000 concurrent is 
what I get using j:Rockit VM)

A nice thing about layered MVC architecture is that you can stress 
test a layer, the Model layer for example. I use OpenSTA + DBMonster 
to simulate. I use JaMon to monitor live app., so I know what to stress.

Should you need to change improve the Model, I *HOPE* you coded DAO 
via an interface, that would make it easy to change. I use iBatis DB 
layer and a fast DB, writing stored procs when needed.

(Lesson for others, create a DAO interface)

hth,

Jonathan Holloway wrote:

Does anybody have any information, case studies or figures they can 
share on the performance of struts under tomcat. 
Whats the maximum number of simultaneous users that can be supported 
by a single tomcat instance running struts?  I've got up to around 
40-60 but need to increase this to more like 150-200 simultaneous 
users. 
Any help would be greatly appreciated.

Thanks,
Jon.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com


--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


[OT] Simple poll and shoutbox apps compatible with Struts?

2003-11-04 Thread jbaker
Hi:

I'd appreciate any pointers to a simple 1-question poll app and/or a 
shoutbox app that are compatible with struts.  There are zillions of these 
in php and asp, but I haven't been able to find any that are java-based. 
It wouldn't be a big task to build either of these from scratch, or port 
them, but I'd hate to reinvent the wheel if it's already been done.  I've 
got enough other things on the to-do list.

Thanks,

Joe Baker
Amnesty International USA
amnestyusa.org


RE: Beginner Struts

2003-11-04 Thread Ramadoss Chinnakuzhandai


-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2003 5:26 PM
To: Struts Users Mailing List
Subject: Re: Beginner Struts


Ramadoss Chinnakuzhandai wrote:

> Can anybody suggest which is the best book for beginner to
> understand Struts1.1 in a easy approach...?

Programming Jakarta Struts
by Chuck Cavaness

http://www.amazon.com/exec/obidos/tg/detail/-/0596003285/qid=1067898114/sr=8-2/ref=sr_8_2/102-1084108-9634561?v=glance&n=507846

(a search through the mailing list archives
http://www.mail-archive.com/struts-user%40jakarta.apache.org/  also
reveals a lot on this topic).



-- 
Rick


-
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: Debug output

2003-11-04 Thread Micael
Look in WEB-INF/classes.

At 02:06 PM 11/3/2003, you wrote:
How do I adjust the logging level of struts?

I am getting way too many DEBUG messages..

Peter

--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


Re: What's the best choice for connection pooling with Struts and PostgreSQL

2003-11-04 Thread Paul Thomas
On 04/11/2003 02:43 ZYD wrote:
I tried to use Tomcat's datasource pool via JNDI, but things not going
well.
I got the following exception when I tried to get connection:

org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of
class '
' for connect URL 'null', cause:
java.lang.NullPointerException
at java.util.StringTokenizer.(StringTokenizer.java:146)
at org.postgresql.Driver.parseURL(Driver.java:251)
at org.postgresql.Driver.acceptsURL(Driver.java:159)
at java.sql.DriverManager.getDriver(DriverManager.java:232)
at 
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
rce.java:743)
at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
.java:518)
at cpool.struts.action.LogonAction.testJNDI(LogonAction.java:185)
at cpool.struts.action.LogonAction.execute(LogonAction.java:60)



In struts-config.xml, I added the following:

   
 
 
 
 
 
 
 
 
   
In server.xml:


  
  
username
cpool
  
  
password

  
  
driverClassName
org.postgresql.Driver
  
  
url
jdbc:postgresql:cpool
  
  
maxActive
8
  
  
maxIdle
4
  
 
Then, I wrote the following method in an Action to test the connection:

public void testJNDI()
 {
  try
  {
   Context initCtx = new InitialContext();
   Context envCtx = (Context)initCtx.lookup("java:comp/env");
   if (envCtx != null)
   {
TTools.consolePrint("LogonAction", "envCtx", envCtx.toString());
   }
   //DataSource ds = (DataSource)envCtx.lookup("jdbc/CPool");
   DataSource ds =
(DataSource)initCtx.lookup("java:comp/env/jdbc/CPool");
   Connection conn = ds.getConnection();
   if (conn != null)
   {
TTools.consolePrint(conn, "Conn", conn.toString());
   }
   conn.close();
  }
  catch (NamingException e)
  {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
  catch (SQLException e)
  {
   // TODO Auto-generated catch block
   e.printStackTrace();
  }
 }
Does this problem sounds familiar to you ?
Please give some advice on this, thanks in advance.
You're mising the factory parameter from your server.xml ResourceParams 
section. BTW, you don't need that stuff in your struts config file if 
you're using JNDI.

--
Paul Thomas
+--+-+
| Thomas Micro Systems Limited | Software Solutions for the Smaller 
Business |
| Computer Consultants | 
http://www.thomas-micro-systems-ltd.co.uk   |
+--+-+

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


RE: Debug output

2003-11-04 Thread Norr, Peter
Does anyone have more detail on how to adjust the logging level in struts?

Peter


-Original Message-
From: Micael [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 2:10 PM
To: Struts Users Mailing List
Subject: Re: Debug output


Look in WEB-INF/classes.

At 02:06 PM 11/3/2003, you wrote:
>How do I adjust the logging level of struts?
>
>I am getting way too many DEBUG messages..
>
>Peter
>
>---
>---
>This message is intended only for the personal and confidential use of the
>designated recipient(s) named above.  If you are not the intended recipient
of
>this message you are hereby notified that any review, dissemination,
>distribution or copying of this message is strictly prohibited.  This
>communication is for information purposes only and should not be regarded
as
>an offer to sell or as a solicitation of an offer to buy any financial
>product, an official confirmation of any transaction, or as an official
>statement of Lehman Brothers.  Email transmission cannot be guaranteed to
be
>secure or error-free.  Therefore, we do not represent that this information
is
>complete or accurate and it should not be relied upon as such.  All
>information is subject to change without notice.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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



--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


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



RE: Debug output

2003-11-04 Thread Yee, Richard K,,DMDCWEST
Peter,
Try setting the debug parameter for the action servlet in the web.xml file
to 0. Also, if you use Log4j, you can set the logging level of
org.apache.struts to something higher than DEBUG.

-Richard


-Original Message-
From: Norr, Peter [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 11:15 AM
To: 'Struts Users Mailing List'
Subject: RE: Debug output


Does anyone have more detail on how to adjust the logging level in struts?

Peter


-Original Message-
From: Micael [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 2:10 PM
To: Struts Users Mailing List
Subject: Re: Debug output


Look in WEB-INF/classes.

At 02:06 PM 11/3/2003, you wrote:
>How do I adjust the logging level of struts?
>
>I am getting way too many DEBUG messages..
>
>Peter
>
>---
>---
>This message is intended only for the personal and confidential use of 
>the designated recipient(s) named above.  If you are not the intended 
>recipient
of
>this message you are hereby notified that any review, dissemination, 
>distribution or copying of this message is strictly prohibited.  This 
>communication is for information purposes only and should not be 
>regarded
as
>an offer to sell or as a solicitation of an offer to buy any financial 
>product, an official confirmation of any transaction, or as an official 
>statement of Lehman Brothers.  Email transmission cannot be guaranteed 
>to
be
>secure or error-free.  Therefore, we do not represent that this 
>information
is
>complete or accurate and it should not be relied upon as such.  All 
>information is subject to change without notice.
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]



LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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




--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.


-
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: Struts, Tomcat And Performance

2003-11-04 Thread Vic Cekvenich
OpenSTA
Read the great step by step tutorial that comes with it.
Brice Ruth wrote:
Hey, Vic -

I'm looking to do some stress testing of our site before we deploy, can 
you recommend any good reference books/sites to get started in this area?

Brice

Vic Cekvenich wrote:

You are of by a few orders of magnitude (2,000 to 4,000 concurrent is 
what I get using j:Rockit VM)

A nice thing about layered MVC architecture is that you can stress 
test a layer, the Model layer for example. I use OpenSTA + DBMonster 
to simulate. I use JaMon to monitor live app., so I know what to stress.

Should you need to change improve the Model, I *HOPE* you coded DAO 
via an interface, that would make it easy to change. I use iBatis DB 
layer and a fast DB, writing stored procs when needed.

(Lesson for others, create a DAO interface)

hth,

Jonathan Holloway wrote:

Does anybody have any information, case studies or figures they can 
share on the performance of struts under tomcat. Whats the maximum 
number of simultaneous users that can be supported by a single tomcat 
instance running struts?  I've got up to around 40-60 but need to 
increase this to more like 150-200 simultaneous users. Any help would 
be greatly appreciated.

Thanks,
Jon.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com




--
Victor Cekvenich,
Struts Instructor
(215) 321-9146
Advanced Struts Training
 Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing,  software, ready
to develop/customize; requires a db to run.


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


Re: Struts, Tomcat And Performance

2003-11-04 Thread Brice Ruth
From the homepage:

... OpenSTA is designed to be used by [snip] technically proficient 
individuals. ...

Yikes! That's a tall order :)

Vic Cekvenich wrote:

OpenSTA
Read the great step by step tutorial that comes with it.
Brice Ruth wrote:

Hey, Vic -

I'm looking to do some stress testing of our site before we deploy, 
can you recommend any good reference books/sites to get started in 
this area?

Brice

Vic Cekvenich wrote:

You are of by a few orders of magnitude (2,000 to 4,000 concurrent 
is what I get using j:Rockit VM)

A nice thing about layered MVC architecture is that you can stress 
test a layer, the Model layer for example. I use OpenSTA + DBMonster 
to simulate. I use JaMon to monitor live app., so I know what to 
stress.

Should you need to change improve the Model, I *HOPE* you coded DAO 
via an interface, that would make it easy to change. I use iBatis DB 
layer and a fast DB, writing stored procs when needed.

(Lesson for others, create a DAO interface)

hth,

Jonathan Holloway wrote:

Does anybody have any information, case studies or figures they can 
share on the performance of struts under tomcat. Whats the maximum 
number of simultaneous users that can be supported by a single 
tomcat instance running struts?  I've got up to around 40-60 but 
need to increase this to more like 150-200 simultaneous users. Any 
help would be greatly appreciated.

Thanks,
Jon.


Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com






--
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.


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


Struts Best Practices

2003-11-04 Thread Manish Singla
I am looking for resources (links/books/suggestions) for Struts best 
practices.

We are migrating a huge WEB app from (40% struts & 60% in 4 other MVC 
frameworks) to 100% struts.
We want to document/standardize as our team is at 5 different geographic 
locations.

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


Re: Debug output

2003-11-04 Thread Manish Singla
Following link may answer your problem

http://jakarta.apache.org/struts/userGuide/configuration.html#config_logging

Thanks
Manish
Norr, Peter wrote:
Does anyone have more detail on how to adjust the logging level in struts?

Peter

-Original Message-
From: Micael [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 2:10 PM
To: Struts Users Mailing List
Subject: Re: Debug output

Look in WEB-INF/classes.

At 02:06 PM 11/3/2003, you wrote:

How do I adjust the logging level of struts?

I am getting way too many DEBUG messages..

Peter

---
---
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient
of

this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded
as

an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to
be

secure or error-free.  Therefore, we do not represent that this information
is

complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




LEGAL NOTICE

This electronic mail  transmission and any accompanying documents contain 
information belonging to the sender which may be confidential and legally 
privileged.  This information is intended only for the use of the 
individual or entity to whom this electronic mail transmission was sent as 
indicated above. If you are not the intended recipient, any disclosure, 
copying, distribution, or action taken in reliance on the contents of the 
information contained in this transmission is strictly prohibited.  If you 
have received this transmission in error, please delete the message.  Thank 
you  



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


--
This message is intended only for the personal and confidential use of the
designated recipient(s) named above.  If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited.  This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers.  Email transmission cannot be guaranteed to be
secure or error-free.  Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such.  All
information is subject to change without notice.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionMessage key location

2003-11-04 Thread Manish Singla
Hope this helps







Lukas Bradley wrote:
Hi all,

Is there any way to have an ActionMessage key/value pair defined in a
property file other than the default


location?  It seems to be the only place my errors and messages can be
found.
Lukas







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


--
Thanks
Manish Singla
x73166
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


struts and filters

2003-11-04 Thread jeff
will struts work with filters ?
i am using filters now, and want to start using struts.


thanks,

jeff


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



Re: Struts Best Practices

2003-11-04 Thread Vic Cekvenich
iBatis.com Petstore 3 is a good place to start.
I also try to make basicportal.sf.net a bP (best Practice) that build on 
above example.
As far as books I am writing my 2nd Struts book (first one was out 
in 2001) that happens to be titled "best practice Struts" but the draft 
of it is only for my students. If you are desperate, we can work 
something out.

I am sure Expreso people say something similar, like we are open source 
Struts example also and we have "best practice". And Ted has stated on 
this list words to the effect: "what is a good practice in some 
enviroments, might not be a good practice in other enviroments, there 
fore the concept of best practice is not a best practice". Hope I got it 
right Ted.

Manish Singla wrote:
I am looking for resources (links/books/suggestions) for Struts best 
practices.

We are migrating a huge WEB app from (40% struts & 60% in 4 other MVC 
frameworks) to 100% struts.
We want to document/standardize as our team is at 5 different geographic 
locations.

Thanks
Manish Singla
--
Victor Cekvenich,
Struts Instructor
(215) 321-9146
Advanced Struts Training
 Server Side Java
training with Rich UI, mentoring, designs, samples and project recovery
in North East.
Simple best practice basic Portal, a Struts CMS, Membership, Forums,
Shopping and Credit processing,  software, ready
to develop/customize; requires a db to run.


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


Re: struts and filters

2003-11-04 Thread atta-ur rehman
sure, it will!
- Original Message - 
From: "jeff" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 1:37 PM
Subject: struts and filters


> will struts work with filters ?
> i am using filters now, and want to start using struts.
> 
> 
> thanks,
> 
> jeff
> 
> 
> -
> 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: struts and filters

2003-11-04 Thread Vic Cekvenich
jeff wrote:

will struts work with filters ?

Yes.

.V



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


Re: struts and filters

2003-11-04 Thread David Graham

--- jeff <[EMAIL PROTECTED]> wrote:
> will struts work with filters ?
> i am using filters now, and want to start using struts.

The two topics are not really related.  You can use one without the other
or together.  

David

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


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



html:text - Only ActionForm

2003-11-04 Thread Giovani Salvador
Hi all.
Does the html:text tag work only with action form? For example, can an action class 
put an object in the request and the html:text tag obtain this object and its 
properties or this tag only works in conjunction with action form?

Thanks in advance

Giovani Salvador
Procergs



RE: html:text - Only ActionForm

2003-11-04 Thread David Friedman
It works with beans in you have imported into your JSP page using the
'name=""' attribute.

name The attribute name of the bean whose properties are consulted when
rendering the current value of this input field. If not specified, the bean
associated with the form tag we are nested within is utilized. (RT EXPR)

See: http://jakarta.apache.org/struts/userGuide/struts-html.html#text

Remember, Documentation is your friend. :)

Regards,
David

-Original Message-
From: Giovani Salvador [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 04, 2003 6:18 PM
To: [EMAIL PROTECTED]
Subject: html:text - Only ActionForm


Hi all.
Does the html:text tag work only with action form? For example, can an
action class put an object in the request and the html:text tag obtain this
object and its properties or this tag only works in conjunction with action
form?

Thanks in advance

Giovani Salvador
Procergs



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



Re: html:text - Only ActionForm

2003-11-04 Thread Giovani Salvador
Thanks David...i know it´s my friend :)
I really did not see that.

Giovani Salvador
Procergs

- Original Message -
From: "David Friedman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, November 04, 2003 9:36 PM
Subject: RE: html:text - Only ActionForm


> It works with beans in you have imported into your JSP page using the
> 'name=""' attribute.
>
> name The attribute name of the bean whose properties are consulted when
> rendering the current value of this input field. If not specified, the
bean
> associated with the form tag we are nested within is utilized. (RT EXPR)
>
> See: http://jakarta.apache.org/struts/userGuide/struts-html.html#text
>
> Remember, Documentation is your friend. :)
>
> Regards,
> David
>
> -Original Message-
> From: Giovani Salvador [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 04, 2003 6:18 PM
> To: [EMAIL PROTECTED]
> Subject: html:text - Only ActionForm
>
>
> Hi all.
> Does the html:text tag work only with action form? For example, can an
> action class put an object in the request and the html:text tag obtain
this
> object and its properties or this tag only works in conjunction with
action
> form?
>
> Thanks in advance
>
> Giovani Salvador
> Procergs
>
>
>
> -
> 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]



Javascript question...

2003-11-04 Thread Jacob Wilson
Hi Folks...
One more javascript question...
 
I have a page that consists of date fields as select boxes... say optionDay, 
optionMonth, optionYear... I fill the selectboxes calling a javascript function... 
 
Now if I have values of day, month, year executing an action. How can I default those 
values in the select box??? I mean how can I make that particular option 'selected'??? 
I know we can do that by calling a funtion on the load event...
 
But, I don't want to do it that way as my body tag is generic across all pages...
I am trying something like this...
 

 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
 }

 
and in my html...
 
I say 
 

 generateMonth("optStartDtMonth",12);
 generateDay("optStartDtDay",05);  
 generateYear("optStartDtYear",2000);

 
I want to make 12, 05, 2000 selected on the load of the page... how do I do that???
 
I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
   s.options[i].selected = true; 
}
 
On the click of some thing it works -- if I put the code in the generate year or month 
or day, if fails to recognize the form element!!!
 
Any suggestions appreciated...
 
Thanks in advance...
-Jacob


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

RE: Javascript question...

2003-11-04 Thread Yee, Richard K,,DMDCWEST
Jacob,
Why are you doing this in JavaScript to begin with? Why don't you use the
struts html tags to display the select boxes and populate the options lists
from collections. You can then set attributes in your form bean and have
these fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...
 
I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 
 
Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...
 
But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...
 

 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
 }

 
and in my html...
 
I say 
 
  generateMonth("optStartDtMonth",12);
 generateDay("optStartDtDay",05);  
 generateYear("optStartDtYear",2000);

 
I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???
 
I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
   s.options[i].selected = true; 
}
 
On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!
 
Any suggestions appreciated...
 
Thanks in advance...
-Jacob


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

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



RE: Javascript question...

2003-11-04 Thread Jacob Wilson
unfortunately we aren't using Struts here... This is an requirement that comes across 
all pages -- thinking of making it more generic and Im trying this...

"Yee, Richard K,,DMDCWEST" <[EMAIL PROTECTED]> wrote:Jacob,
Why are you doing this in JavaScript to begin with? Why don't you use the
struts html tags to display the select boxes and populate the options lists
from collections. You can then set attributes in your form bean and have
these fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...

I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 

Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...

But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...


 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
  document.write('Day');
  for (var i=1;i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
  document.write('Mon');
  document.write('Jan');
  document.write('Feb');
  document.write('Mar');
  document.write('Apr');
  document.write('May');
  document.write('Jun');
  document.write('Jul');
  document.write('Aug');
  document.write('Sep');
  document.write('Oct');
  document.write('Nov');
  document.write('Dec');
  document.write('');
 }


and in my html...

I say 

  generateMonth("optStartDtMonth",12);
 generateDay("optStartDtDay",05);  
 generateYear("optStartDtYear",2000);


I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???

I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) {
s.options[i].selected = true; 
}

On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!

Any suggestions appreciated...

Thanks in advance...
-Jacob


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

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



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

RE: Javascript question...

2003-11-04 Thread Yee, Richard K,,DMDCWEST
Jacob,
You wrote: "unfortunately we aren't using Struts here..."?
If you aren't using Struts then
a) why are you asking this question on a Struts mailing list
b) What do you mean then when you write "Now if I have values of day, month,
year executing an action. How can I default those values in the select
box???"

Regards,

Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:44 PM
To: Struts Users Mailing List
Subject: RE: Javascript question... 


unfortunately we aren't using Struts here... This is an requirement that
comes across all pages -- thinking of making it more generic and Im trying
this...

"Yee, Richard K,,DMDCWEST" <[EMAIL PROTECTED]> wrote:Jacob, Why are you
doing this in JavaScript to begin with? Why don't you use the struts html
tags to display the select boxes and populate the options lists from
collections. You can then set attributes in your form bean and have these
fields be defaulted automatically.

-Richard


-Original Message-
From: Jacob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 04, 2003 4:06 PM
To: [EMAIL PROTECTED]
Subject: Javascript question... 


Hi Folks...
One more javascript question...

I have a page that consists of date fields as select boxes... say optionDay,
optionMonth, optionYear... I fill the selectboxes calling a javascript
function... 

Now if I have values of day, month, year executing an action. How can I
default those values in the select box??? I mean how can I make that
particular option 'selected'??? I know we can do that by calling a funtion
on the load event...

But, I don't want to do it that way as my body tag is generic across all
pages... I am trying something like this...


 function generateYear(optionName,defaultValue) {
  var s = document.forms[0].elements[optionName];
  var today = new Date();
  var year = today.getYear();
  document.write('');
  document.write('Year');
  for (var i=(year-4);i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateDay(optionName,defaultValue){
  document.write('');
  document.write('Day');
  for (var i=1;i   document.write('' + i+'');
  }
  document.write('');
 }

 function generateMonth(optionName,defaultValue){
  document.write('');
  document.write('Mon');
  document.write('Jan');
  document.write('Feb');
  document.write('Mar');
  document.write('Apr');
  document.write('May');
  document.write('Jun');
  document.write('Jul');
  document.write('Aug');
  document.write('Sep');
  document.write('Oct');
  document.write('Nov');
  document.write('Dec');
  document.write('');
 }


and in my html...

I say 

  generateMonth("optStartDtMonth",12);
 generateDay("optStartDtDay",05);  
 generateYear("optStartDtYear",2000);


I want to make 12, 05, 2000 selected on the load of the page... how do I do
that???

I am trying doing something like this...
var s = document.forms[0].elements[optionName];
if ( s.options[i].value == defaultValue) { s.options[i].selected = true; 
}

On the click of some thing it works -- if I put the code in the generate
year or month or day, if fails to recognize the form element!!!

Any suggestions appreciated...

Thanks in advance...
-Jacob


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

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



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

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



trying to switch web modules - help

2003-11-04 Thread Marcella Turner
Hi -

I've read the documentation but I must be missing something because I'm 
trying to switch web modules in my struts-config.xml in a local mapping as 
follows:




with NO luck - modulePathHere is a different module than my Struts 
application but is in the same EAR.

I've tried as a global forward too - and looked at SwichAction but was not 
sure how to implement.

Thanks in advance

_
Frustrated with dial-up? Get high-speed for as low as $26.95.  
https://broadband.msn.com (Prices may vary by service area.)

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


RE: Javascript question...

2003-11-04 Thread Jacob Wilson
Richard...
 
I find this list to be more user friendly in terms of responding to questions... Also, 
not that I do not use Struts at all... for this particular requirement of an old 
project under maintenance, I am trying to do this... I consider this to be very much 
knowledge sharing list and hence post questions whenever I have any... thanks is 
advance...
 
Now, getting back to your question... this is the code...
 

 function generateYear(optionName,defaultValue) {
  var today = new Date();
  var year = today.getYear();
  document.write('');
 }