RE: Checkbox Arrays

2001-05-11 Thread Dudley [EMAIL PROTECTED]

yes please,, please share

-Original Message-
From: Jeff Trent [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 9:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Checkbox Arrays


I don't know if this is the right thread.  But I just got multibox working
in my app (including preservation of checkbox entries between forwards).
Let me share with you what I have to see if this helps:

in Jsp: (cleanSolutionAreaTypes in an Application-scoped Vector)
tr
td align=left
Solutions Area*
/td
td align=left
logic:iterate id=solutionAreaType name=cleanSolutionAreaTypes
html:multibox property=solutionAreaTypes
bean:write name=solutionAreaType property=id/
/html:multibox
bean:write name=solutionAreaType property=name/br
/logic:iterate
/td
/tr

in Form:
protected String[] solutionAreaTypes = new String[0];

public String[] getSolutionAreaTypes()
{
return solutionAreaTypes;
}

public void setSolutionAreaTypes(String[] solutionAreaTypes)
{
this.solutionAreaTypes = solutionAreaTypes;
}

What was causing me some exceptions was this.  I originally used another
application-scoped vector called solutionAreaTypes for other purposes
(like drop-down lists).  That Vector contains an entry that has a null ID
value (eg. name = --specify-- value=).  This was causing Struts to throw
a non-intuitive exception.  I then created another Vector without this entry
in it and everything seems to work fine now.  Of course I've only gotten it
to work about 15 minutes ago so I'll let you know later if it really works
;-)

- jeff

- Original Message -
From: Peter Alfors [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, May 10, 2001 2:01 PM
Subject: Re: Checkbox Arrays


 Try pulling the bean value out into a script variable.
 Taglibs cannot be nested within another taglib as an attribute.


 Tony Karas wrote:

  Yeah - I'm looking at that.  My problem now is how to get the value for
each
  checkbox.  My bean has an id property - so I have tried this kind of
  thing:
 
  logic:iterate id=retailer name=retailerForm property=retailers
  tr
  tdhtml:checkbox name=retailer property=delete
value=bean:write
  name=retailer property=id///td
  tdbean:write name=retailer property=id//td
  tdhtml:text name=retailer property=name//td
  /tr
  /logic:iterate
 
  But it doesn't like having the bean:write embedded there.  Am I missing
  something obvious?
 
  Many thanks
  Tony
 
  From: Peter Alfors [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Checkbox Arrays
  Date: Thu, 10 May 2001 11:09:18 -0500
  
  Im not sure how the ActionForm changes things, but without an
actionform
  your
  could do this
  
  Each checkbox can have the same name, but a different value.
  When the form is submitted, the checkboxes that have been checked are
in
  the
  request.
  You can use the request.getParameterValues(checkBoxName) to retrieve
a
  string
  array of the values for the checked boxes.
  
  HTH,
   Pete
  
  Tony Karas wrote:
  
Can anyone help with this?
   
I have an array of checkboxes in my ActionForm represented by
   
boolean[] delete;
   
and I have a setter function
   
public void setDelete( boolean[] values )
{
delete = values;
}
   
The problem is that I have only checkboxes that are checked get sent
  back -
so if one checkbox is checked all I get is an array of length 1.
  Therefore,
it is not possible for me to determine which checkbox has been
checked.
   
In the documentation it tells me to use reset() in ActionForm to
  initialise
the values - but this will only work with single checkboxes and not
  arrays.
   
I think I'm stuck.  Is there anyway I can determine which checkbox
has
  been
checked - maybe I can get the value to differ for each checkbox.
Will
  look
in to that.
   
Cheers
Tony
   peter.alfors.vcf 
 
 
_
  Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.




possibility of default action?

2001-05-11 Thread iain-gordon

Is it possible to specify a default action for forms that? Say the only
behaviour I need is that the parameters in the Form object are populated and
validated.

Possible? Desirable?





Get free email and a permanent address at http://www.netaddress.com/?N=1



RE: Quick Iterate Question - DefaultTableModel

2001-05-11 Thread Richard Murray

I've just tried using a DefaultTableModel and succeeded nesting the iterate
tag.  

JSP is as follows:

%-- Generate table data by nesting the iterate tag --%
struts_logic:iterate id=rows name=jobMonitorForm property=model
scope=page
tr
struts_logic:iterate id=element name=rows

tdstruts_bean:write name=element//td
/struts_logic:iterate
/tr
/struts_logic:iterate

The property 'model' is a DefaultTableModel in my ActionForm
'jobMonitorForm' with getter as follows

public DefaultTableModel getModel()
{
return model;
}

Richard.

-Original Message-
From: Assenza, Chris [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 5:56 PM
To: '[EMAIL PROTECTED]'
Subject: Quick Iterate Question - DefaultTableModel


Here's a quick one - anyone use or modify iterate to support iterations
through a DefaultTableModel. Since it's just a vector of vectors we tried
nesting iterate tags, but to no avail. Anyone already done this or do I need
to code it myself if I want it (hehe)? :)

Chris


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at [EMAIL PROTECTED]

This footnote also confirms that this email message has been swept by
for the presence of computer viruses.

http://www.qspgroup.com
**



Problem with tag

2001-05-11 Thread Laurent Cornelis

Hi,

I'm new to struts and I have a little problem with the tag library :

In an iterate tag body, I want to write a link to an anchor of the page.

I wrote this code :

logic:iterate id=faq name=faqList type=be.dummy.faq.bean.FAQBean/
p
 html:link page=/listFAQ.do anchor=bean:write name=faq
property=id/
  bean:write name=faq property=question/
 /html:link
/p
/logic:iterate


But I have this error :

org.apache.jasper.compiler.ParseException:
C:\jakarta-tomcat-3.2\webapps\dummy\listfaq.jsp(16,60) Attribute faq has no
value

If I write this :

logic:iterate id=faq name=faqList type=be.actel.faq.bean.FAQBean/
p
 html:link page=/listFAQ.do anchor=1
  bean:write name=faq property=question/
 /html:link
/p
/logic:iterate

It's working :

p
 a href=http://localhost:8080/dummy/listFAQ.do#1;Is this working ?/a
/p



So how must I do to make it work ? I don't understand the error ...

Thanks

Laurent CORNELIS

PS : Sorry for my very bad english ...




RE: Checkbox Arrays

2001-05-11 Thread Tony Karas

Ah sorry Hal - thanks for your perseverance - I was assuming, mistakenly, 
that multibox was something else.  I'll take a look at this - cheers.

Tony


From: Deadman, Hal [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Checkbox Arrays
Date: Thu, 10 May 2001 12:20:58 -0400

I posted this same response to your Posting Collections question yesterday.
Here it is again. If you use the html:multibox, you can get back an array 
of
key values instead of an array of booleans. They key values can be Longs,
Strings, whatever, as long as it uniquely identifies the row that you want
to know was checked. If you haven't used multibox, it generates an html
checkbox. The array that will be set in your form will only contain the key
values for the rows that were checked.

Here is the post from yesterday:

I think I am doing the same thing that you want to do using the
html:multibox. When the form is submitted you get an array of the ids that
are checked and then you can go delete them.

in the jsp form (where restaurant id is a key for the item being deleted):
logic:iterate id=restaurant name=favoriterestaurants
...
   html:multibox property=favoriteRestaurantRemoveList
   bean:write property=restaurantId name=restaurant/
   /html:multibox
...
/logic:iterate


in the form class:
 private Long favoriteRestaurantRemoveList[] = new Long[0];

 public Long[] getFavoriteRestaurantRemoveList() {
 return (this.favoriteRestaurantRemoveList);
 }

 public void setFavoriteRestaurantRemoveList(Long
favoriteRestaurantRemoveList[]) {
 this.favoriteRestaurantRemoveList = favoriteRestaurantRemoveList;
 }

I am not sure if initializing the array to new Long[0] is necessary,
probably not.

  -Original Message-
  From: Tony Karas [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 10, 2001 11:52 AM
  To: Struts User
  Subject: Checkbox Arrays
 
 
  Can anyone help with this?
 
  I have an array of checkboxes in my ActionForm represented by
 
  boolean[] delete;
 
  and I have a setter function
 
  public void setDelete( boolean[] values )
  {
  delete = values;
  }
 
  The problem is that I have only checkboxes that are checked
  get sent back -
  so if one checkbox is checked all I get is an array of length
  1.  Therefore,
  it is not possible for me to determine which checkbox has
  been checked.
 
  In the documentation it tells me to use reset() in ActionForm
  to initialise
  the values - but this will only work with single checkboxes
  and not arrays.
 
  I think I'm stuck.  Is there anyway I can determine which
  checkbox has been
  checked - maybe I can get the value to differ for each
  checkbox.  Will look
  in to that.
 
  Cheers
  Tony
 

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: Checkbox Arrays

2001-05-11 Thread Tony Karas

I am amazed (and pleased) at your perseverance :-)


From: Deadman, Hal [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Checkbox Arrays
Date: Thu, 10 May 2001 13:35:12 -0400

Don't use the html:checkbox, use html:multibox and use bean:write in the
body of the tag. An html:multibox resolves to an HTML checkbox.

Hal

  -Original Message-
  From: Tony Karas [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 10, 2001 12:44 PM
  To: [EMAIL PROTECTED]
  Subject: Re: Checkbox Arrays
 
 
  Yeah - I'm looking at that.  My problem now is how to get the
  value for each
  checkbox.  My bean has an id property - so I have tried
  this kind of
  thing:
 
  logic:iterate id=retailer name=retailerForm property=retailers
  tr
  tdhtml:checkbox name=retailer property=delete
  value=bean:write
  name=retailer property=id///td
  tdbean:write name=retailer property=id//td
  tdhtml:text name=retailer property=name//td
  /tr
  /logic:iterate
 
  But it doesn't like having the bean:write embedded there.  Am
  I missing
  something obvious?
 
  Many thanks
  Tony
 
 
 
  From: Peter Alfors [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Re: Checkbox Arrays
  Date: Thu, 10 May 2001 11:09:18 -0500
  
  Im not sure how the ActionForm changes things, but without
  an actionform
  your
  could do this
  
  Each checkbox can have the same name, but a different value.
  When the form is submitted, the checkboxes that have been
  checked are in
  the
  request.
  You can use the request.getParameterValues(checkBoxName)
  to retrieve a
  string
  array of the values for the checked boxes.
  
  HTH,
   Pete
  
  Tony Karas wrote:
  
Can anyone help with this?
   
I have an array of checkboxes in my ActionForm represented by
   
boolean[] delete;
   
and I have a setter function
   
public void setDelete( boolean[] values )
{
delete = values;
}
   
The problem is that I have only checkboxes that are
  checked get sent
  back -
so if one checkbox is checked all I get is an array of length 1.
  Therefore,
it is not possible for me to determine which checkbox has
  been checked.
   
In the documentation it tells me to use reset() in ActionForm to
  initialise
the values - but this will only work with single
  checkboxes and not
  arrays.
   
I think I'm stuck.  Is there anyway I can determine which
  checkbox has
  been
checked - maybe I can get the value to differ for each
  checkbox.  Will
  look
in to that.
   
Cheers
Tony
   peter.alfors.vcf 
 
  __
  ___
  Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




RE: Posting Collections

2001-05-11 Thread Tony Karas

Thanks Niall.

I'm currently frustrated because I'm finding it hard to discover all the 
information I require.  Seems to be a general lack of documentation on 
struts usage, but it's a learning curve like anything else.

I like Struts in principle, and what it is trying to achieve, I just 
wondered if you considered it ready for building a large-scale project.  For 
example, this change that you have submitted is going to affect a lot of 
code.  So my options are to stick to my current solution without changing 
any of the Struts code, or modify the code so that it does what I want in 
the hope that the change will get propagated through to the next release.  
It doesn't feel like a good way to be working, but I take your point about 
Open Source, and I partly agree.

For the time being I'm going to persevere - and I look forward to seeing 
your custom tags so I don't have to hack around with the code every time a 
new version comes out.

Cheers ;-)

Tony


From: Niall Pemberton [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: RE: Posting Collections
Date: Thu, 10 May 2001 20:23:31 +0100

This issue applies to all form field tags, not just checkboxes.

Modifying struts tags is currently a pain, but I just subimitted a bugzilla
enhancement to re-factor the tags so that they are more granualar and make
it easier to override descrete bits such as generating the name attribute.
In principle the enhacement has been accepted and I hope to submit a patch
in the next few days. If it is accepted I will have a set of custom 
versions
of these tags for this behviour very soon and you won't have to start
hacking around with the code every time a new version comes out and anyone
will be welcome to them.

Addtionally this issue is all on the ToDo list for 1.1 and I'm sure it
will be sorted then.

I think struts is excellent, and I love open source because you can always
look inside to see what they've done. Of course it doesn't do everything 
yet
;-) but I can't see it getting anything but better. We have done quite a 
bit
of work customizing the ActionServlet and the way its been built is
excellent, making it really easy to add addtional behaviour (hopefully)
without having to hack around every time a new version comes out.

Niall

  -Original Message-
  From: Tony Karas [mailto:[EMAIL PROTECTED]]
  Sent: 10 May 2001 10:34
  To: [EMAIL PROTECTED]
  Subject: RE: Posting Collections
 
 
  Many thanks Niall, that clears things up for me.  Do you know if
  there is a
  reason why this is the behaviour for checkboxes?  Is this just with
  checkboxes or other tags as well?
 
  I don't really like the idea of modifying the struts code - the
  whole point
  of deciding to use it is for code reuse - I don't want to start hacking
  around with the code every time a new version comes out.
 
  Do you have an opinion on using Struts?  I've been using it for a
  couple of
  weeks now and have been struggling because of basic lack of
  information.  I
  get most of my training from this news group!  I'm wondering whether I
  should just jack it in and use something else.
 
  Cheers
  Tony
 
 
  From: Niall Pemberton [EMAIL PROTECTED]
  Reply-To: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: RE: Posting Collections
  Date: Wed, 9 May 2001 20:51:00 +0100
  
  The problem is the CheckBox tag currently sets the HTML name attribute 
to
  the property, so your JSP will produced something like this:
  
   input type=checkbox name=delete
  
  So all the checkbox fields will have the same name.
  
  In order for Struts to populate your Retailer bean with the delete 
values
  you need the generated HTML to look like this:
  
   input type=checkbox name=retailer[0].delete
   input type=checkbox name=retailer[1].delete etc etc.
  
  Struts would then use getRetailer(0).setDelete(boolean) to set the 
delete
  attributes correctly.
  
  Unfortunately there is no easy solution - many people resort to
  scriptlets
  to generate the name properly and there are quite a few messages in the
  archive about this.
  
  I created my own versions of Struts tags and changed them to generate 
the
  name correctly - I like that much better - no java in the view.
  
  Niall
  
-Original Message-
From: Tony Karas [mailto:[EMAIL PROTECTED]]
Sent: 09 May 2001 17:50
To: [EMAIL PROTECTED]
Subject: Posting Collections
   
   
Briefly, this is what I am trying to achieve:
   
- Retrieve a list of items from a database
- Display each item with a corresponding checkbox
- Display a Delete button - which when pressed deletes all
checked items.
   
Unfortunately, although I have managed to display the items 
correctly
  and
set the checkbox value using boolean values, when I do the form
submit - my
ActionForm properties do not get filled in.
   
This is the code I have:
   
My ActionForm looks like this:
   
public class 

Re: Problem with tag

2001-05-11 Thread Laurent Cornelis

I found a workaround, I wrote :

logic:iterate id=faq name=faqList type=be.dummy.faq.bean.FAQBean/
p
 html:link page='/listFAQ.do' anchor='%=
((FAQBean)pageContext.findAttribute(faq)).getId().toString() %'
  bean:write name=faq property=question/
 /html:link
/p
/logic:iterate

But I really don't like this solution ...

Any cleaner solution will be grealty appreciated !

- Original Message -
From: Laurent Cornelis [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 10:31 AM
Subject: Problem with tag


 Hi,

 I'm new to struts and I have a little problem with the tag library :

 In an iterate tag body, I want to write a link to an anchor of the page.

 I wrote this code :

 logic:iterate id=faq name=faqList type=be.dummy.faq.bean.FAQBean/
 p
  html:link page=/listFAQ.do anchor=bean:write name=faq
 property=id/
   bean:write name=faq property=question/
  /html:link
 /p
 /logic:iterate


 But I have this error :

 org.apache.jasper.compiler.ParseException:
 C:\jakarta-tomcat-3.2\webapps\dummy\listfaq.jsp(16,60) Attribute faq has
no
 value

 If I write this :

 logic:iterate id=faq name=faqList type=be.actel.faq.bean.FAQBean/
 p
  html:link page=/listFAQ.do anchor=1
   bean:write name=faq property=question/
  /html:link
 /p
 /logic:iterate

 It's working :

 p
  a href=http://localhost:8080/dummy/listFAQ.do#1;Is this working ?/a
 /p



 So how must I do to make it work ? I don't understand the error ...

 Thanks

 Laurent CORNELIS

 PS : Sorry for my very bad english ...






How can i execute the STRUTS examples in JavaWebServer?

2001-05-11 Thread Sudhir M




  Hello there, 
   
   Can any please tell me how can i 
  execute the Struts example in JavaWebServer?
  
  
  Sudhir
   


***Confidential Notice


This e-mail communication may contain information that is

confidential and privileged. The information is intended

to be for the use of the addressee only. If you are not the

named addressee you should not disseminate, distribute or

copy this e-mail: to do so could be a breach of confidence.


Kshema Technologies Ltd.,

# 33/1, Lalbagh Road, Bangalore 560027, INDIA. 

Tel: (91) 80- 2995114/5/6

Fax: (91) 80 2272933 


**


still fighting HTTP HTTPS problem

2001-05-11 Thread Michael Wilimsky

hello everyone...

i still couldn´t find a solution on how to switch from

let´s say http://localhost:myport/myapp/something.jsp to
https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
thesamepage.jsp

while retaining resp. cloning the content of my sessioncontext...

i am using the urlrewriting-method to manage my sessions

as far as my experience tells me i get two different sessionIDs for

http://localhost:myport/myapp/something.jsp
and the corresponding
https://localhost:mysecureport/myapp/something.jsp

how can i copy the sessioncontext to the secure side and vice versa?

michy




Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Jonathan Asbell

Mike.  Dude.  That IS the way to do it.
1) check to see if you ACTUALLY GET the 2 sessions (if you can get them, do
a session.toString() to see that they are not the same session indeed)
2) you should be sending the serialized data from the unsecure session into
the secured session:
if you are using an non visual jsp to process it would go something like
this
a) get the query string and hold it
b) get the data you want from the non-secure session, includeing the session
id and encode it
c) make an name value pair for the session stuff and dont forget to encode
the value (unsecure_session_contents=thedatayouareholdingfromthesession)
d) add the new name value pair to the query string you are holding
e) forward the whole shebang to the secure url you are going to.
f) on the secure side get the request and put the
request.getParameter(unsecure_session_contents) into the new Secure session.
g) do the same for the return trip, but remember when you return you have to
try to look up the session with the id you saved.  If its gone its because
you timed out.

- Original Message -
From: Michael Wilimsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 6:20 AM
Subject: still fighting HTTP HTTPS problem


 hello everyone...

 i still couldn´t find a solution on how to switch from

 let´s say http://localhost:myport/myapp/something.jsp to

https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
 thesamepage.jsp

 while retaining resp. cloning the content of my sessioncontext...

 i am using the urlrewriting-method to manage my sessions

 as far as my experience tells me i get two different sessionIDs for

 http://localhost:myport/myapp/something.jsp
 and the corresponding
 https://localhost:mysecureport/myapp/something.jsp

 how can i copy the sessioncontext to the secure side and vice versa?

 michy





AW: still fighting HTTP HTTPS problem

2001-05-11 Thread Rainer Alföldi

Hi Michael, hi Jonathan,

does it have to be that complicated?

We just put an apache in front of tomcat. period. tomcat doesn´t know what
ports the requests are coming from. all ssl stuff is handled by apache. no
problems. switching between https and http is totally transparent for tomcat
= struts = for our application.

Greetings


Rainer

-Ursprüngliche Nachricht-
Von: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 11. Mai 2001 13:36
An: [EMAIL PROTECTED]
Betreff: Re: still fighting HTTP HTTPS problem


Mike.  Dude.  That IS the way to do it.
1) check to see if you ACTUALLY GET the 2 sessions (if you can get them, do
a session.toString() to see that they are not the same session indeed)
2) you should be sending the serialized data from the unsecure session into
the secured session:
if you are using an non visual jsp to process it would go something like
this
a) get the query string and hold it
b) get the data you want from the non-secure session, includeing the session
id and encode it
c) make an name value pair for the session stuff and dont forget to encode
the value (unsecure_session_contents=thedatayouareholdingfromthesession)
d) add the new name value pair to the query string you are holding
e) forward the whole shebang to the secure url you are going to.
f) on the secure side get the request and put the
request.getParameter(unsecure_session_contents) into the new Secure session.
g) do the same for the return trip, but remember when you return you have to
try to look up the session with the id you saved.  If its gone its because
you timed out.

- Original Message -
From: Michael Wilimsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 6:20 AM
Subject: still fighting HTTP HTTPS problem


 hello everyone...

 i still couldn´t find a solution on how to switch from

 let´s say http://localhost:myport/myapp/something.jsp to

https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
 thesamepage.jsp

 while retaining resp. cloning the content of my sessioncontext...

 i am using the urlrewriting-method to manage my sessions

 as far as my experience tells me i get two different sessionIDs for

 http://localhost:myport/myapp/something.jsp
 and the corresponding
 https://localhost:mysecureport/myapp/something.jsp

 how can i copy the sessioncontext to the secure side and vice versa?

 michy





RE: still fighting HTTP HTTPS problem

2001-05-11 Thread Michael Wilimsky

well i am using a tomcat-standalone version... i know, that some webservers
like apache would do that task for me...

well jonathan... thanks... i´ll try it and get back to You if i have further
questions... alright?!

michy

-Original Message-
From: Rainer Alföldi [mailto:[EMAIL PROTECTED]]
Sent: Freitag, 11. Mai 2001 17:28
To: [EMAIL PROTECTED]; Jonathan Asbell
Subject: AW: still fighting HTTP HTTPS problem


Hi Michael, hi Jonathan,

does it have to be that complicated?

We just put an apache in front of tomcat. period. tomcat doesn´t know what
ports the requests are coming from. all ssl stuff is handled by apache. no
problems. switching between https and http is totally transparent for tomcat
= struts = for our application.

Greetings


Rainer

-Ursprüngliche Nachricht-
Von: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 11. Mai 2001 13:36
An: [EMAIL PROTECTED]
Betreff: Re: still fighting HTTP HTTPS problem


Mike.  Dude.  That IS the way to do it.
1) check to see if you ACTUALLY GET the 2 sessions (if you can get them, do
a session.toString() to see that they are not the same session indeed)
2) you should be sending the serialized data from the unsecure session into
the secured session:
if you are using an non visual jsp to process it would go something like
this
a) get the query string and hold it
b) get the data you want from the non-secure session, includeing the session
id and encode it
c) make an name value pair for the session stuff and dont forget to encode
the value (unsecure_session_contents=thedatayouareholdingfromthesession)
d) add the new name value pair to the query string you are holding
e) forward the whole shebang to the secure url you are going to.
f) on the secure side get the request and put the
request.getParameter(unsecure_session_contents) into the new Secure session.
g) do the same for the return trip, but remember when you return you have to
try to look up the session with the id you saved.  If its gone its because
you timed out.

- Original Message -
From: Michael Wilimsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 6:20 AM
Subject: still fighting HTTP HTTPS problem


 hello everyone...

 i still couldn´t find a solution on how to switch from

 let´s say http://localhost:myport/myapp/something.jsp to

https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
 thesamepage.jsp

 while retaining resp. cloning the content of my sessioncontext...

 i am using the urlrewriting-method to manage my sessions

 as far as my experience tells me i get two different sessionIDs for

 http://localhost:myport/myapp/something.jsp
 and the corresponding
 https://localhost:mysecureport/myapp/something.jsp

 how can i copy the sessioncontext to the secure side and vice versa?

 michy






RE: template flexability

2001-05-11 Thread Holman, Cal

Cedric Thanks - exactly what I am looking for.  Will Components be
incorporated into Struts formally?

Cal

-Original Message-
From: Cedric Dumoulin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 05:09
To: [EMAIL PROTECTED]
Subject: Re: template flexability


  Hi Cal,

  I don't know the reason why actual template implementation always turn
'true' the direct attribute when the body is used (David ?). Also, the
getDirect() method of PutTag doesn't take into account the real value of
'direct', just its presence ! Maybe this behavior need to be changed.

  Meanwhile, if you want to try your solution, you can use the
Components implementation in place of Templates. Components allow to use
direct='true' with the tag body. There is also other mechanisms that
could interest you.

  Cedric

Components sites :
  http://www.lifl.fr/~dumoulin/components/
  (mirror) : http://www.geocities.com/cedricdumoulin/components/



Holman, Cal wrote:

 Since using the template tag as follows is always direct=true how can
 you make the xxx in the template put=xxx variable.The reason for the
 substitution is to make the heading variable based on language or
 application- while still using the same template.Does anyone have a
 technique for changing the source page using the proprieties file??
 welcome.jsp

 template:insert template='/tableTemplate.jsp'

 template:put name='header' direct='false' bean:message
 key=heading.page / /template:put

 template:put name='title' direct='true' bean:message
 key=welcome.title / /template:put

 /template:insert

 Will not work since the body on a template:put is considered
 direct='true'

 welcome.jsp

 template:insert template='/tableTemplate.jsp'

 template:put name='header' content='bean:message key=heading.page
 /' /

 template:put name='title' direct='true' bean:message
 key=welcome.title / /template:put

 /template:insert

 Will not work because the inclosing bean:message is not expanded.

 The in the template is the get

 tableTemplate.jsp

 td valign=toptemplate:get name='header'//td

 Cal




filtering unwanted characters

2001-05-11 Thread Nanduri, Amarnath


Hi all,

 I might be posting this message in the wrong forum. My apologies if i
have offended anyone.

I am looking for some open source code that deals with filtering
technology. Basically i want to filter any unwanted characters from the user
input data. The user might try to pass in some SQL quesries or try to run
some shell scripts or put special characters which might be rejected by a
database (or even corrupt it). If no such open source code is available then
i want to write something like that. I was wondering if anyone has done some
thing like this in the past and if so, can they share their experiences ?
Also is there any place i can search for some 'searching algorithms' which i
plan to use as the backbone of my filters that i plan to implement. Thank
you very much.

p.s We are using struts bigtime to develop a huge internationalized project.
So far it didn't let us down.

cheers,
Amar..



nanduri can u help ??ApplicationResources.properties

2001-05-11 Thread Amit Jain


My weblogic is complaining of ApplicationResources.properties file not
found..
I copied it to the _tmp_war** directory manually and when i restart it
creates a new _tmp_war** directory..so can't help

any solutions please.

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 1:35 PM
To: '[EMAIL PROTECTED]'
Subject: filtering unwanted characters



Hi all,

 I might be posting this message in the wrong forum. My apologies if i
have offended anyone.

I am looking for some open source code that deals with filtering
technology. Basically i want to filter any unwanted characters from the user
input data. The user might try to pass in some SQL quesries or try to run
some shell scripts or put special characters which might be rejected by a
database (or even corrupt it). If no such open source code is available then
i want to write something like that. I was wondering if anyone has done some
thing like this in the past and if so, can they share their experiences ?
Also is there any place i can search for some 'searching algorithms' which i
plan to use as the backbone of my filters that i plan to implement. Thank
you very much.

p.s We are using struts bigtime to develop a huge internationalized project.
So far it didn't let us down.

cheers,
Amar..


Legal Disclaimer:-

Please be aware that messages sent over the Internet may not 
be secure and should not be seen as forming a legally binding
contract unless otherwise stated.




Passing request to a common action class from multiple forms

2001-05-11 Thread B Manikandan

Hi,
   I have a common Action class,which will receive request from multiple
forms.

This action class will then forward request to a common jsp and on
selection of a value from this jsp,the value has to be set in the input
form(which called the common action class).

Then,request has to be forwarded to the input form.

How to do this ?

Mani




RE: nanduri can u help ??ApplicationResources.properties

2001-05-11 Thread Nanduri, Amarnath

Hello Amit,

 In your web.xml file, when you declare the ActionServlet there is a
place where you specify the fully qualified path to the
ApplicationResource.properties file. Check that out. 

  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-nameapplication/param-name
  param-valuecom.agilquest.onboard.ApplicationResources/param-value
/init-param
..

Note : if your ApplicationResource.properties file is not in a package then
make sure that you put it under the classes directory. 

If you are using a war file for deployment make sure that you follow the
proper directory structure for creating a war file.

Any more questions give a shout. Also _tmp_war file should not be tampered
with cause weblogic creates a new one whenever you restart it.


cheers,
Amar..




-Original Message-
From: Amit Jain [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 9:07 AM
To: [EMAIL PROTECTED]
Subject: nanduri can u help ??ApplicationResources.properties



My weblogic is complaining of ApplicationResources.properties file not
found..
I copied it to the _tmp_war** directory manually and when i restart it
creates a new _tmp_war** directory..so can't help

any solutions please.

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 1:35 PM
To: '[EMAIL PROTECTED]'
Subject: filtering unwanted characters



Hi all,

 I might be posting this message in the wrong forum. My apologies if i
have offended anyone.

I am looking for some open source code that deals with filtering
technology. Basically i want to filter any unwanted characters from the user
input data. The user might try to pass in some SQL quesries or try to run
some shell scripts or put special characters which might be rejected by a
database (or even corrupt it). If no such open source code is available then
i want to write something like that. I was wondering if anyone has done some
thing like this in the past and if so, can they share their experiences ?
Also is there any place i can search for some 'searching algorithms' which i
plan to use as the backbone of my filters that i plan to implement. Thank
you very much.

p.s We are using struts bigtime to develop a huge internationalized project.
So far it didn't let us down.

cheers,
Amar..


Legal Disclaimer:-

Please be aware that messages sent over the Internet may not 
be secure and should not be seen as forming a legally binding
contract unless otherwise stated.



Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Jonathan

Sorry Mike.  I didnt intend to put you off.  I was just trying to re-enforce
that you were doing the correct thing.
Cheers

- Original Message -
From: Michael Wilimsky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 8:15 AM
Subject: RE: still fighting HTTP HTTPS problem


 well i am using a tomcat-standalone version... i know, that some
webservers
 like apache would do that task for me...

 well jonathan... thanks... i´ll try it and get back to You if i have
further
 questions... alright?!

 michy

 -Original Message-
 From: Rainer Alföldi [mailto:[EMAIL PROTECTED]]
 Sent: Freitag, 11. Mai 2001 17:28
 To: [EMAIL PROTECTED]; Jonathan Asbell
 Subject: AW: still fighting HTTP HTTPS problem


 Hi Michael, hi Jonathan,

 does it have to be that complicated?

 We just put an apache in front of tomcat. period. tomcat doesn´t know what
 ports the requests are coming from. all ssl stuff is handled by apache. no
 problems. switching between https and http is totally transparent for
tomcat
 = struts = for our application.

 Greetings


 Rainer

 -Ursprüngliche Nachricht-
 Von: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
 Gesendet: Freitag, 11. Mai 2001 13:36
 An: [EMAIL PROTECTED]
 Betreff: Re: still fighting HTTP HTTPS problem


 Mike.  Dude.  That IS the way to do it.
 1) check to see if you ACTUALLY GET the 2 sessions (if you can get them,
do
 a session.toString() to see that they are not the same session indeed)
 2) you should be sending the serialized data from the unsecure session
into
 the secured session:
 if you are using an non visual jsp to process it would go something like
 this
 a) get the query string and hold it
 b) get the data you want from the non-secure session, includeing the
session
 id and encode it
 c) make an name value pair for the session stuff and dont forget to encode
 the value (unsecure_session_contents=thedatayouareholdingfromthesession)
 d) add the new name value pair to the query string you are holding
 e) forward the whole shebang to the secure url you are going to.
 f) on the secure side get the request and put the
 request.getParameter(unsecure_session_contents) into the new Secure
session.
 g) do the same for the return trip, but remember when you return you have
to
 try to look up the session with the id you saved.  If its gone its because
 you timed out.

 - Original Message -
 From: Michael Wilimsky [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 11, 2001 6:20 AM
 Subject: still fighting HTTP HTTPS problem


  hello everyone...
 
  i still couldn´t find a solution on how to switch from
 
  let´s say http://localhost:myport/myapp/something.jsp to
 

https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
  thesamepage.jsp
 
  while retaining resp. cloning the content of my sessioncontext...
 
  i am using the urlrewriting-method to manage my sessions
 
  as far as my experience tells me i get two different sessionIDs for
 
  http://localhost:myport/myapp/something.jsp
  and the corresponding
  https://localhost:mysecureport/myapp/something.jsp
 
  how can i copy the sessioncontext to the secure side and vice versa?
 
  michy
 






RE: Passing request to a common action class from multiple forms

2001-05-11 Thread Nanduri, Amarnath

Can yo be more detailed ? All i gather sofar from your requirements is that
your company is planning to implement some spaghetti code (no offense meant)
using struts while everybody is trying to run away from it.


cheers,
Amar..


-Original Message-
From: B Manikandan [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 9:25 AM
To: struts
Subject: Passing request to a common action class from multiple forms


Hi,
   I have a common Action class,which will receive request from multiple
forms.

This action class will then forward request to a common jsp and on
selection of a value from this jsp,the value has to be set in the input
form(which called the common action class).

Then,request has to be forwarded to the input form.

How to do this ?

Mani



proliferation of action classes?

2001-05-11 Thread Young, Wayne


I'd like to validate a development approach. 

One of our developers is essentially creating two action classes for each
.jsp page / form. The second post action class always forwards to
another action.

Here's an example from a test struts-config.xml. 
!-- Get SF --
actionpath=/getsf
   type=com.mslv.webapp.sftester.action.GetSfAction
   name=sfForm
   scope=request
  forward name=successpath=/sftest.jsp/
/action
!-- Post SF  --
actionpath=/postsf
   type=com.mslv.webapp.sftester.action.GetSfAction2
   name=sfForm
   scope=request
  forward name=successpath=/process.do/
/action
!-- Display SF --
actionpath=/process
   type=com.mslv.webapp.sftester.action.GetSfAction3
   name=sfForm3
  scope=request
  forward name=successpath=/sftest2.jsp/
/action


And here's a scenario where I don't like the functionality with struts. 
Suppose:
o /getsf  /postsf both use sfForm.
o /process uses sfForm3.
o sfForm and sfForm3 both have a custAcctID field
o /sftest.jsp  /sftest2.jsp have html:text property=custAcctID/
o /getsf sets the custAcctID = 100
o /postsf sets the custAcctID = 200
Then
o when sftest2.jsp displays, the value of custAcctID is still 100.

I realize this is normal... the values get copied from the request to the
form. One workaround is to examine the forward, instantiate sfForm3, update
custAcctID, and make sfForm3 an attribute of the request. Then when
sftest2.jsp displays, it has the correct updated value for custAcctID. BUT
- this is a lot of extra work.

Questions:
1) Are there any other known issues or limitations of using an action to
forward to another action?
2) Could this always be accomplished with fewer, larger action classes? (an
equivalent pattern)
3) Any other comments?

Have a nice weekend. 

Thanks.

Wayne
[EMAIL PROTECTED]




Re: Passing request to a common action class from multiple forms

2001-05-11 Thread B Manikandan

   I have a domain.jsp which has a button on click of which action is forwarded
to an action class which displays cascade.jsp.
In cascade.jsp the objects displayed are same even though their values may
be different.User can select some values and these values have to be passed back
to input.jsp.
The reason for the common action class is because,the functionality is same
for all forms which have to call cascade.jsp.The variables to be selected from
cascade.jsp (oid and name) is always same,even though their values may be
different.

How to get input from different forms and pass it back to the callee form.

If it sounds spaghetti is there a better way of implementing it.

Mani



Nanduri, Amarnath wrote:

 Can yo be more detailed ? All i gather sofar from your requirements is that
 your company is planning to implement some spaghetti code (no offense meant)
 using struts while everybody is trying to run away from it.

 cheers,
 Amar..

 -Original Message-
 From: B Manikandan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 9:25 AM
 To: struts
 Subject: Passing request to a common action class from multiple forms

 Hi,
I have a common Action class,which will receive request from multiple
 forms.

 This action class will then forward request to a common jsp and on
 selection of a value from this jsp,the value has to be set in the input
 form(which called the common action class).

 Then,request has to be forwarded to the input form.

 How to do this ?

 Mani




Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)

2001-05-11 Thread Johan Compagner

Hi,

I use the token_key for transaction support.
But the value of the TOKEN_KEY = org.apache.struts.taglib.html.TOKEN

This is a very odd value to have as a hidden input field on your form.
Which is generated by the FormTag:
input type=hidden name=org.apache.struts.taglib.html.TOKEN
value=

Because you want to use that hidden field in some javascript:
function submitNextpage(themakey)
{
document.nextpage.org.apache.struts.taglib.html.TOKEN.value=themakey;
document.nextpage.submit();
}

You get a javascript error!
Because javascript sees all names between points as an object.

Please change the TOKEN_KEY value in TOKEN_KEY or something like that!!

Johan Compagner








Error handling with taglibs

2001-05-11 Thread Mike Prader



Hi all

My problem is, that I want to mark a textfield red 
and set the focus
to it after I checked the fields in my from the 
ActionClass derived class and I detected an
error in this input.
I want to use taglibs also.

Is there any possibility to do this in my from the 
ActionForm Class derived class, so that Struts will
automatically set this field to another colour and 
set the focus to it ?If not 
whatis
the best solution to mark theattribute in my 
from the ActionForm Class derived Class that this field
isn't ok ?

regards

mike


RE: Error handling with taglibs

2001-05-11 Thread Nanduri, Amarnath



You 
need to hack in...and do some dirty work on each jsp page...

You 
need to write your own html:error tag . Whenever there are some errors 
to be shown, you simply use some javascript to send focus to the first error 
field. Also in your jsp page (for evey text field) you might want to do 
something like an if,else condition.. If no error show plain, else 
show in red font with the error msg. Hope this helps.

cheers,
Amar..

  -Original Message-From: Mike Prader 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, May 11, 2001 10:13 
  AMTo: [EMAIL PROTECTED]Subject: Error 
  handling with taglibs
  Hi all
  
  My problem is, that I want to mark a textfield 
  red and set the focus
  to it after I checked the fields in my from the 
  ActionClass derived class and I detected an
  error in this input.
  I want to use taglibs also.
  
  Is there any possibility to do this in my from 
  the ActionForm Class derived class, so that Struts will
  automatically set this field to another colour 
  and set the focus to it ?If not 
  whatis
  the best solution to mark theattribute in 
  my from the ActionForm Class derived Class that this field
  isn't ok ?
  
  regards
  
  mike


Struts in Action!

2001-05-11 Thread Ted Husted

The Struts application framework is running an annual auction for a
public broadcasting station at 

 http://data.wxxi.org/wxxi-gavel/ 

The auction runs through next week, and the code will be released as
open source thereafter. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/



Re: filtering unwanted characters

2001-05-11 Thread Jonathan

try a sax parser

- Original Message -
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 8:35 AM
Subject: filtering unwanted characters



 Hi all,

  I might be posting this message in the wrong forum. My apologies if i
 have offended anyone.

 I am looking for some open source code that deals with filtering
 technology. Basically i want to filter any unwanted characters from the
user
 input data. The user might try to pass in some SQL quesries or try to run
 some shell scripts or put special characters which might be rejected by a
 database (or even corrupt it). If no such open source code is available
then
 i want to write something like that. I was wondering if anyone has done
some
 thing like this in the past and if so, can they share their experiences ?
 Also is there any place i can search for some 'searching algorithms' which
i
 plan to use as the backbone of my filters that i plan to implement. Thank
 you very much.

 p.s We are using struts bigtime to develop a huge internationalized
project.
 So far it didn't let us down.

 cheers,
 Amar..





Re: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)

2001-05-11 Thread David Winterfeldt

You can do this.

document.nextpage[org.apache.struts.taglib.html.TOKEN].value=themakey;

David

--- Johan Compagner [EMAIL PROTECTED] wrote:
 Hi,
 
 I use the token_key for transaction support.
 But the value of the TOKEN_KEY =
 org.apache.struts.taglib.html.TOKEN
 
 This is a very odd value to have as a hidden input
 field on your form.
 Which is generated by the FormTag:
 input type=hidden
 name=org.apache.struts.taglib.html.TOKEN
 value=
 
 Because you want to use that hidden field in some
 javascript:
 function submitNextpage(themakey)
 {
 

document.nextpage.org.apache.struts.taglib.html.TOKEN.value=themakey;
   document.nextpage.submit();
 }
 
 You get a javascript error!
 Because javascript sees all names between points as
 an object.
 
 Please change the TOKEN_KEY value in TOKEN_KEY or
 something like that!!
 
 Johan Compagner
 
 
 
 
 


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: filtering unwanted characters

2001-05-11 Thread Nanduri, Amarnath

I have to check each and every character send as input by the user...Will
SAX help me in this regard ?

cheers,
Amar..

-Original Message-
From: Jonathan [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 12:19 PM
To: [EMAIL PROTECTED]
Subject: Re: filtering unwanted characters


try a sax parser

- Original Message -
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 8:35 AM
Subject: filtering unwanted characters



 Hi all,

  I might be posting this message in the wrong forum. My apologies if i
 have offended anyone.

 I am looking for some open source code that deals with filtering
 technology. Basically i want to filter any unwanted characters from the
user
 input data. The user might try to pass in some SQL quesries or try to run
 some shell scripts or put special characters which might be rejected by a
 database (or even corrupt it). If no such open source code is available
then
 i want to write something like that. I was wondering if anyone has done
some
 thing like this in the past and if so, can they share their experiences ?
 Also is there any place i can search for some 'searching algorithms' which
i
 plan to use as the backbone of my filters that i plan to implement. Thank
 you very much.

 p.s We are using struts bigtime to develop a huge internationalized
project.
 So far it didn't let us down.

 cheers,
 Amar..




Global forwards, targets and frames

2001-05-11 Thread Kyle Robinson



Is there a way to 
specify the target of aglobal forward?
I have a global 
forward which I want to go to another frame. For instance in my action if 
everything works fine I want to return to the input page but if there is an 
error I want to go to another frame. Any thoughts?



Kyle 
Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 



Re: Error handling with taglibs

2001-05-11 Thread Tony Karas

I would suggest requesting a change to the current struts implementation.  I 
think this has been thought about because there is the facility to include 
the property that has caused the error.  I would also like to do something 
like this.

I suppose there would be at least two ways of going about it:

1) Make the ActionErrors component more accessible in the jsp page - so that 
some kind of logic tag could be used to generate either a normal html:text 
tag or an html:text error tag, or

2) Add an error attribute to the html:text tag (and others) that would 
render the text box differently if an error is associated with it.

These are my thoughts.

Cheers
Tony

From: Scott Walter [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: Error handling with taglibs
Date: Fri, 11 May 2001 08:02:18 -0700 (PDT)

I have thought about this myself, just a rough guess
but you could modify the struts input tags (such as
the textfield) to do:

1.  Search through the errors vector to see if it
applies to the current property
2.  Set background color to the text field to red or
something like that.

scott.
--- Mike Prader [EMAIL PROTECTED] wrote:
  Hi all
 
  My problem is, that I want to mark a textfield red
  and set the focus
  to it after I checked the fields in my from the
  Action Class derived class and I detected an
  error in this input.
  I want to use taglibs also.
 
  Is there any possibility to do this in my from the
  ActionForm Class derived class, so that Struts will
  automatically set this field to another colour and
  set the focus to it ? If not what is
  the best solution to mark the attribute in my from
  the ActionForm Class derived Class that this field
  isn't ok ?
 
  regards
 
  mike
 


=
~~~
Scott

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.




How can I use set-property property=foo value=123 / in struts-config.xml

2001-05-11 Thread David Holland

How can I use set-property property=foo value=123 / in
struts-config.xml ?

I want to use it in place of forward to store Action configuration info
(set-property is
specified in the dtd).

Tried to add getter  setter to Action descendant - but assignment by
introspection 
didn't seem to work. 

Looked at the source for ActionServlet, and the digester class does appear
to be doing something
with this property, although it looks like it is only looking for a single
instance in an action.

As far as I can tell, either it is not intended for general use or it is
broken.

Any thoughts?

David Holland
[EMAIL PROTECTED]




French article about Struts

2001-05-11 Thread Jean-Noel Ribette

Hi everybody,

I would like to inform you that I wrote with Didier Girard an article in French about 
Struts. It is available at
http://www.application-servers.com/articles/

Cheers,

Jean-Noël




RE: possibility of default action?

2001-05-11 Thread Anthony Martin

As I understand the current struts-config.xml, no.  You can associate any
number of forms to the same action, but I don't think that's what you're
asking.

That is to say, you can design a default action for forms, but you still
have to add each form to struts-config.xml even if they use the same action.

It'd be a nice feature, though it may break away slightly from Model II.  If
anyone knows if I'm wrong about there not being a way to specify a default
action, please correct me.  ;-)


Anthony

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 12:13 AM
To: [EMAIL PROTECTED]
Subject: possibility of default action?


Is it possible to specify a default action for forms that? Say the only
behaviour I need is that the parameters in the Form object are populated and
validated.

Possible? Desirable?





Get free email and a permanent address at http://www.netaddress.com/?N=1



RE: How can i execute the STRUTS examples in JavaWebServer?

2001-05-11 Thread Anthony Martin

I would be interested in knowing if anyone has done this.  I work with a
group that started with JWS, and their move to Tomcat doesn't seem to be
going very well.  I would still like to supply them with Struts objects, but
only to prove it can work in strange contexts like JWS.


Anthony

-Original Message-
From: Sudhir M [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 3:10 AM
To: [EMAIL PROTECTED]
Subject: How can i execute the STRUTS examples in JavaWebServer?
Importance: High


Hello there, 
  
Can any please tell me how can i execute the Struts example in
JavaWebServer?


Sudhir

***Confidential Notice


This e-mail communication may contain information that is
confidential and privileged. The information is intended
to be for the use of the addressee only. If you are not the
named addressee you should not disseminate, distribute or
copy this e-mail: to do so could be a breach of confidence.


Kshema Technologies Ltd.,
# 33/1, Lalbagh Road, Bangalore 560027, INDIA. 
Tel: (91) 80- 2995114/5/6
Fax: (91) 80 2272933 


**



Re: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)

2001-05-11 Thread Johan Compagner

It would be nicer to have a name for this that is a bit better suited for javascript!

johan

- Original Message - 
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 5:56 PM
Subject: Re: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)


 You can do this.
 
 document.nextpage[org.apache.struts.taglib.html.TOKEN].value=themakey;
 
 David
 
 --- Johan Compagner [EMAIL PROTECTED] wrote:
  Hi,
  
  I use the token_key for transaction support.
  But the value of the TOKEN_KEY =
  org.apache.struts.taglib.html.TOKEN
  
  This is a very odd value to have as a hidden input
  field on your form.
  Which is generated by the FormTag:
  input type=hidden
  name=org.apache.struts.taglib.html.TOKEN
  value=
  
  Because you want to use that hidden field in some
  javascript:
  function submitNextpage(themakey)
  {
  
 
 document.nextpage.org.apache.struts.taglib.html.TOKEN.value=themakey;
  document.nextpage.submit();
  }
  
  You get a javascript error!
  Because javascript sees all names between points as
  an object.
  
  Please change the TOKEN_KEY value in TOKEN_KEY or
  something like that!!
  
  Johan Compagner
  
  
  
  
  
 
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/




Re: ServletException: MultipartIterator

2001-05-11 Thread hunkpapa

The enctype is multipart/form-data
I use jakarta-struts-1.0-b1 from May 05


SCHACHTER,MICHAEL (HP-NewJersey,ex2) schrieb:

 Hunkpapa,

 Could you give me more information?  What's the enctype of your form?  What
 OS, Container, and Struts build are you using?

 -Original Message-
 From: hunkpapa [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 08, 2001 3:33 PM
 To: [EMAIL PROTECTED]
 Subject: ServletException: MultipartIterator

 Hi,
 when I start this program this message comes:
 action: Error in readForm: javax.servlet.ServletException:
 MultipartIterator: cannot retrieve boundary for multipart request
 What is the cause ?
 ...
  if(contentType!=null)
  {
   try
   {
servlet.log(MultipartIterator!!);
   MultipartIterator iterator = new MultipartIterator(request);
   MultipartElement element;
   while ((element =(MultipartElement) iterator.getNextElement())
 != null)
   {
servlet.log(element.getName()  +element.getName());
servlet.log(element.getFileName()  +element.getFileName());

servlet.log(element.getContentType() 
 +element.getContentType());
servlet.log(element.getData()  +element.getData());

   //do something with element
   }
   }
   catch(Throwable t)
   {
System.out.println(Error in readForm: +t.toString());
}
 }
 ..




struts and tomcat4 reload causes exception

2001-05-11 Thread Simon Wawra

Hi,

It sounds like this topic's been pretty exhaustively covered on the mailing 
list, but I haven't yet seen a solution to it, so sorry for dragging it up 
again.  I'm pretty sure I've read every message on the list on this topic...

I'm having seriously difficulty getting my webapp, which is based on struts 
to reload after I make changes to the source.

I initially started encountering errors with Tomcat 3.3, when I recompiled 
any of my classes the next request would generate an exception.  It would 
continue to generate exceptions until I completely restarted tomcat.  At 
least it seemed that Tomcat was properly detecting the changes though...

Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May (today's) 
build of Struts and I have exactly the same problem:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings

(see below for full stacktrace).  (I've also tried Tomcat 4 Beta 1 with 
Struts 1 Beta 1).

I'm pretty new to JSP and struts myself, but I am fairly sure that Struts 
itself is having problems reloading.  The errors are always from struts 
classes.  My app works perfectly until I change a class or 'force' a reload 
using Tomcat 4's manager feature.  Calling the reload feature of struts 
makes no difference either.

I'm fairly sure it's not my code, because I installed the struts-example 
app, and if I force a reload of that app (using tomcat manager again), I 
get the same kind of errors.  The index.jsp page crashes it with this message:

javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE

Surely the example app must work properly?  Perhaps I've just messed up the 
configuration?  Any tips that can help me would me most grateful (as well 
as saving my hair...)

Thanks in advance,

Simon.
---

Here's the stack trace:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings
 at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766)
 at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:200)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:254)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:194)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
 at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
 at java.lang.Thread.run(Thread.java:479)





---
TMC Technology  Management Consulting

+41 (0)22 365 4712
Mailto:[EMAIL PROTECTED]




Can some 1 help me

2001-05-11 Thread Vinod Shintre

okie just gettign started with STRUTS:

 follows the list of erros ;-)

okie im getting this error
--
/webapps/struts-blank/logon/login.jsp(3,0) Unable to load class
org.apache.struts.taglib.html.FormTag
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)

--
im using the strust latest BETA build
 all the directives to the struts-tag libs are set correctly

any help would be greately appreciated

vin






Re: filtering unwanted characters

2001-05-11 Thread Jonathan

In the callback that deals with characters you could add a reference to a
method that seeks the specific character you are trying to filter.  This is
just an idea, and may not be the best solution, but is is one possible
approach.  I actually made my own filter which works on a character by
character basis.  It examines characters that I've  identified and lets the
rest pass untouched.  For those that I identified, it either throws them out
or changes them into something else.  I did this because my company is a
publishing corporation which has to work with multi languages, funky unicode
publishing characters, all with xml.  I have to get rid of characters that
break the xml parser, and changes some characters into others


- Original Message -
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 12:50 PM
Subject: RE: filtering unwanted characters


 I have to check each and every character send as input by the user...Will
 SAX help me in this regard ?

 cheers,
 Amar..

 -Original Message-
 From: Jonathan [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 12:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: filtering unwanted characters


 try a sax parser

 - Original Message -
 From: Nanduri, Amarnath [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 11, 2001 8:35 AM
 Subject: filtering unwanted characters


 
  Hi all,
 
   I might be posting this message in the wrong forum. My apologies if
i
  have offended anyone.
 
  I am looking for some open source code that deals with filtering
  technology. Basically i want to filter any unwanted characters from the
 user
  input data. The user might try to pass in some SQL quesries or try to
run
  some shell scripts or put special characters which might be rejected by
a
  database (or even corrupt it). If no such open source code is available
 then
  i want to write something like that. I was wondering if anyone has done
 some
  thing like this in the past and if so, can they share their experiences
?
  Also is there any place i can search for some 'searching algorithms'
which
 i
  plan to use as the backbone of my filters that i plan to implement.
Thank
  you very much.
 
  p.s We are using struts bigtime to develop a huge internationalized
 project.
  So far it didn't let us down.
 
  cheers,
  Amar..
 





RE: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)

2001-05-11 Thread Nanduri, Amarnath

Its opensource. you can always modify it for your needs.

cheers,
Amar..

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 1:45 PM
To: [EMAIL PROTECTED]
Subject: Re: Constants.TOKEN_KEY value proposed change (doesn't work
with javascript!!)


It would be nicer to have a name for this that is a bit better suited for
javascript!

johan

- Original Message - 
From: David Winterfeldt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 5:56 PM
Subject: Re: Constants.TOKEN_KEY value proposed change (doesn't work with
javascript!!)


 You can do this.
 
 document.nextpage[org.apache.struts.taglib.html.TOKEN].value=themakey;
 
 David
 
 --- Johan Compagner [EMAIL PROTECTED] wrote:
  Hi,
  
  I use the token_key for transaction support.
  But the value of the TOKEN_KEY =
  org.apache.struts.taglib.html.TOKEN
  
  This is a very odd value to have as a hidden input
  field on your form.
  Which is generated by the FormTag:
  input type=hidden
  name=org.apache.struts.taglib.html.TOKEN
  value=
  
  Because you want to use that hidden field in some
  javascript:
  function submitNextpage(themakey)
  {
  
 
 document.nextpage.org.apache.struts.taglib.html.TOKEN.value=themakey;
  document.nextpage.submit();
  }
  
  You get a javascript error!
  Because javascript sees all names between points as
  an object.
  
  Please change the TOKEN_KEY value in TOKEN_KEY or
  something like that!!
  
  Johan Compagner
  
  
  
  
  
 
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/



Using value of one bean in a textarea?

2001-05-11 Thread Alex Colic

Hi, I have a bean whose value I can display via:

bean:write name=requisition property=requisitionLines.pcitem.name/

What I want to do is create a textarea and have the value of the defaulted
to the above name value.

My textarea has been created as follows:

html:textarea name=requisition property=requisitionLines.description
cols=20 rows=10

Could you please tell me how to set the value of that textare by default to
the above bean?

Thanks for any help.


Regards

Alex




RE: Checkbox Arrays - Internationalising them?!

2001-05-11 Thread dhay



Hal,

thanks for your input on multi-box - they are working great!

BUT...I need to get the bean:write internationalized - does anyone know if this
is possible?

ie I want to do a bean:message on the output from a bean:write...

I think this qu has been asked before, but I looked through the archives and
couldn't find it...

Thanks,

Dave





Deadman, Hal [EMAIL PROTECTED] on 05/10/2001
12:20:58 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: Checkbox Arrays



I posted this same response to your Posting Collections question yesterday.
Here it is again. If you use the html:multibox, you can get back an array of
key values instead of an array of booleans. They key values can be Longs,
Strings, whatever, as long as it uniquely identifies the row that you want
to know was checked. If you haven't used multibox, it generates an html
checkbox. The array that will be set in your form will only contain the key
values for the rows that were checked.

Here is the post from yesterday:

I think I am doing the same thing that you want to do using the
html:multibox. When the form is submitted you get an array of the ids that
are checked and then you can go delete them.

in the jsp form (where restaurant id is a key for the item being deleted):
logic:iterate id=restaurant name=favoriterestaurants
...
 html:multibox property=favoriteRestaurantRemoveList
  bean:write property=restaurantId name=restaurant/
 /html:multibox
...
/logic:iterate


in the form class:
private Long favoriteRestaurantRemoveList[] = new Long[0];

public Long[] getFavoriteRestaurantRemoveList() {
return (this.favoriteRestaurantRemoveList);
}

public void setFavoriteRestaurantRemoveList(Long
favoriteRestaurantRemoveList[]) {
this.favoriteRestaurantRemoveList = favoriteRestaurantRemoveList;
}

I am not sure if initializing the array to new Long[0] is necessary,
probably not.

 -Original Message-
 From: Tony Karas [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, May 10, 2001 11:52 AM
 To: Struts User
 Subject: Checkbox Arrays


 Can anyone help with this?

 I have an array of checkboxes in my ActionForm represented by

 boolean[] delete;

 and I have a setter function

 public void setDelete( boolean[] values )
 {
delete = values;
 }

 The problem is that I have only checkboxes that are checked
 get sent back -
 so if one checkbox is checked all I get is an array of length
 1.  Therefore,
 it is not possible for me to determine which checkbox has
 been checked.

 In the documentation it tells me to use reset() in ActionForm
 to initialise
 the values - but this will only work with single checkboxes
 and not arrays.

 I think I'm stuck.  Is there anyway I can determine which
 checkbox has been
 checked - maybe I can get the value to differ for each
 checkbox.  Will look
 in to that.

 Cheers
 Tony










Urgent help needed

2001-05-11 Thread Vinod Shintre

can some1 tell me why am i getting this error  possible solution
---
Internal Servlet Error:

org.apache.jasper.compiler.CompileException:
/home/vshintre/jakarta/jakarta-tomcat-3.2.1/webapps/struts-blank/login.jsp(3,2)
Unable to load class org.apache.struts.taglib.html.FormTag
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)

---

thanx in advance

vin






Re: struts and tomcat4 reload causes exception

2001-05-11 Thread Eric Rasmussen

I recently moved from Tomcat to Resin.  I experienced that problem with
Tomcat, but it does not happen in Resin.  Resin will not reload your classes
(or, at least, I don't know how to get it to), but will not throw that
Servlet Exception message either, merely continues as though the class files
did not change.

Therefore, I don't think that Struts is the cause.

- eric

- Original Message -
From: Simon Wawra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 10:50 AM
Subject: struts and tomcat4 reload causes exception


 Hi,

 It sounds like this topic's been pretty exhaustively covered on the
mailing
 list, but I haven't yet seen a solution to it, so sorry for dragging it up
 again.  I'm pretty sure I've read every message on the list on this
topic...

 I'm having seriously difficulty getting my webapp, which is based on
struts
 to reload after I make changes to the source.

 I initially started encountering errors with Tomcat 3.3, when I recompiled
 any of my classes the next request would generate an exception.  It would
 continue to generate exceptions until I completely restarted tomcat.  At
 least it seemed that Tomcat was properly detecting the changes though...

 Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May
(today's)
 build of Struts and I have exactly the same problem:

 A Servlet Exception Has Occurred
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings

 (see below for full stacktrace).  (I've also tried Tomcat 4 Beta 1 with
 Struts 1 Beta 1).

 I'm pretty new to JSP and struts myself, but I am fairly sure that Struts
 itself is having problems reloading.  The errors are always from struts
 classes.  My app works perfectly until I change a class or 'force' a
reload
 using Tomcat 4's manager feature.  Calling the reload feature of struts
 makes no difference either.

 I'm fairly sure it's not my code, because I installed the struts-example
 app, and if I force a reload of that app (using tomcat manager again), I
 get the same kind of errors.  The index.jsp page crashes it with this
message:

 javax.servlet.ServletException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE

 Surely the example app must work properly?  Perhaps I've just messed up
the
 configuration?  Any tips that can help me would me most grateful (as well
 as saving my hair...)

 Thanks in advance,

 Simon.
 ---

 Here's the stack trace:

 A Servlet Exception Has Occurred
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings
  at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766)
  at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
  at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)
  at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:200)
  at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
  at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
  at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
  at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:225)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
  at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
  at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
  at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
  at

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:163)
  at


Re: Can some 1 help me

2001-05-11 Thread David Winterfeldt

What servlet engine are you using?

Did the example or blank war run before you started
editing it?

Do you have the struts.jar in you main classpath
anywhere?  I can't be in the main classpath.  It must
only be in the /WEB-INF/lib directory.

David

--- Vinod Shintre [EMAIL PROTECTED] wrote:
 okie just gettign started with STRUTS:
 
  follows the list of erros ;-)
 
 okie im getting this error
 --
 /webapps/struts-blank/logon/login.jsp(3,0) Unable to
 load class
 org.apache.struts.taglib.html.FormTag
 at

org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)
 
 --
 im using the strust latest BETA build
  all the directives to the struts-tag libs are set
 correctly
 
 any help would be greately appreciated
 
 vin
 
 
 


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



Determining odd-even table rows

2001-05-11 Thread Bill Pfeiffer

I'm trying to figure out how to do a green-bar effect (different backround
colors for every other row of a table) with struts/jsp.  I am using a
tagified javax.sql.Rowset.  I can iterate through the rowset via my tags
(reworked jakarta DBTags).  The problem, more of a mental block, is how do I
alternate the backround colors of the html rows I am writing WITHOUT
resorting to scriptlets.  I have just added a tag to get the current row, so
I have that returing, but what do I do with it?

The logic tags in struts deal only with comparisons to constants.  I need to
do some math to determine whether the current row is odd/even so I can set
the backround.

Is it easier than this and I'm missing it?

My goal here is not to do any scriplets.  I'm putting together a set of tags
to help our web guy build pages using only tags.

Thanks for any help,

Bill Pfeiffer




RE: struts and tomcat4 reload causes exception

2001-05-11 Thread Anthony Martin

Keep your precious hair.  I'm pretty sure Struts and Tomcat are operating as
designed.

I noticed this when I first started working with Struts too, and it caused
me about thirty minutes of horrible pain and suffering until I realized that
restarting the server is required due to the nature of the framework.  To
me, it seems reasonable to restart Tomcat every time a class gets
recompiled.

I try to make sure my code is pretty solid before testing moving on to
testing.  I admit, after being a scripter for a few years (perl, later php),
I felt a little restricted by this.  But like any compiled language and even
when scripting, it's best to avoid the code-compile-test-repeat routine if
you can because ... it is bad.

When you say that you installed the struts-example, did you deploy the .war
like the manual suggests, or did you extract it manually?


Anthony

-Original Message-
From: Simon Wawra [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 10:50 AM
To: [EMAIL PROTECTED]
Subject: struts and tomcat4 reload causes exception


Hi,

It sounds like this topic's been pretty exhaustively covered on the mailing 
list, but I haven't yet seen a solution to it, so sorry for dragging it up 
again.  I'm pretty sure I've read every message on the list on this topic...

I'm having seriously difficulty getting my webapp, which is based on struts 
to reload after I make changes to the source.

I initially started encountering errors with Tomcat 3.3, when I recompiled 
any of my classes the next request would generate an exception.  It would 
continue to generate exceptions until I completely restarted tomcat.  At 
least it seemed that Tomcat was properly detecting the changes though...

Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May (today's) 
build of Struts and I have exactly the same problem:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings

(see below for full stacktrace).  (I've also tried Tomcat 4 Beta 1 with 
Struts 1 Beta 1).

I'm pretty new to JSP and struts myself, but I am fairly sure that Struts 
itself is having problems reloading.  The errors are always from struts 
classes.  My app works perfectly until I change a class or 'force' a reload 
using Tomcat 4's manager feature.  Calling the reload feature of struts 
makes no difference either.

I'm fairly sure it's not my code, because I installed the struts-example 
app, and if I force a reload of that app (using tomcat manager again), I 
get the same kind of errors.  The index.jsp page crashes it with this
message:

javax.servlet.ServletException: Cannot find message resources under key 
org.apache.struts.action.MESSAGE

Surely the example app must work properly?  Perhaps I've just messed up the 
configuration?  Any tips that can help me would me most grateful (as well 
as saving my hair...)

Thanks in advance,

Simon.
---

Here's the stack trace:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings
 at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766)
 at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:200)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:225)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at 

Re: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)

2001-05-11 Thread Johan Compagner

That i already have of course!
but it would be nice to have this in the basic. without altering Struts all the time 
when a new version arrives.

johan

- Original Message - 
From: Nanduri, Amarnath [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 8:14 PM
Subject: RE: Constants.TOKEN_KEY value proposed change (doesn't work with javascript!!)


 Its opensource. you can always modify it for your needs.
 
 cheers,
 Amar..
 
 -Original Message-
 From: Johan Compagner [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 1:45 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Constants.TOKEN_KEY value proposed change (doesn't work
 with javascript!!)
 
 
 It would be nicer to have a name for this that is a bit better suited for
 javascript!
 
 johan
 
 - Original Message - 
 From: David Winterfeldt [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 11, 2001 5:56 PM
 Subject: Re: Constants.TOKEN_KEY value proposed change (doesn't work with
 javascript!!)
 
 
  You can do this.
  
  document.nextpage[org.apache.struts.taglib.html.TOKEN].value=themakey;
  
  David
  
  --- Johan Compagner [EMAIL PROTECTED] wrote:
   Hi,
   
   I use the token_key for transaction support.
   But the value of the TOKEN_KEY =
   org.apache.struts.taglib.html.TOKEN
   
   This is a very odd value to have as a hidden input
   field on your form.
   Which is generated by the FormTag:
   input type=hidden
   name=org.apache.struts.taglib.html.TOKEN
   value=
   
   Because you want to use that hidden field in some
   javascript:
   function submitNextpage(themakey)
   {
   
  
  document.nextpage.org.apache.struts.taglib.html.TOKEN.value=themakey;
   document.nextpage.submit();
   }
   
   You get a javascript error!
   Because javascript sees all names between points as
   an object.
   
   Please change the TOKEN_KEY value in TOKEN_KEY or
   something like that!!
   
   Johan Compagner
   
   
   
   
   
  
  
  __
  Do You Yahoo!?
  Yahoo! Auctions - buy the things you want at great prices
  http://auctions.yahoo.com/




Accessing ServletContext from session object

2001-05-11 Thread Matthew Fowkes

I was wondering if anyone else has tried to access the ServletContext from
the session object.  I have written a class that implements
HttpSessionBindingListener so I can detect when a users session expires.
When the session expires, the valueUnbound method is called and is passed an
event.  From that event I can retrieve the users session object and this is
where the problem begins.  The only object I have is the users session
object, but I need to somehow get an attribute from the ServletContext to
mark that the user session has expired.  Has anyone on the list done this
before?

Thanks in advance.

Matt



RE: Using value of one bean in a textarea?

2001-05-11 Thread Anthony Martin

So you have a bean with a property value you want copied over to another
bean property?

Why not just pre-populated on the form?  Create a getter and setter for the
value and hit the Action first (go to the myForm.do url instead of
myForm.jsp) so that the perform method can populate form.


Anthony

-Original Message-
From: Alex Colic [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 11:27 AM
To: Struts
Subject: Using value of one bean in a textarea?


Hi, I have a bean whose value I can display via:

bean:write name=requisition property=requisitionLines.pcitem.name/

What I want to do is create a textarea and have the value of the defaulted
to the above name value.

My textarea has been created as follows:

html:textarea name=requisition property=requisitionLines.description
cols=20 rows=10

Could you please tell me how to set the value of that textare by default to
the above bean?

Thanks for any help.


Regards

Alex



RE: Checkbox Arrays - Internationalising them?!

2001-05-11 Thread Deadman, Hal

Do you want bean:message to be able to get the key from a bean method? It
doesn't do that now...

Since bean:write is printing the value of a bean property, your bean
property could use the MessageResources class to do the internationalization
in your bean method.

Inside an action you can get the MessageResource object and the Locale
object by calling these methods from the base Action class:

Locale locale = getLocale(request);
MessageResources messages = getResources();
messages.getMessage(locale,some.key,args));

where args is an optional String array.

I am not sure how easy it would be for you to pass the messages and locale
objects into your bean and use them there.

Hal


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 2:37 PM
 To: [EMAIL PROTECTED]
 Subject: RE: Checkbox Arrays - Internationalising them?!




 Hal,

 thanks for your input on multi-box - they are working great!

 BUT...I need to get the bean:write internationalized - does
 anyone know if this
 is possible?

 ie I want to do a bean:message on the output from a bean:write...

 I think this qu has been asked before, but I looked through
 the archives and
 couldn't find it...

 Thanks,

 Dave





 Deadman, Hal [EMAIL PROTECTED]
 on 05/10/2001
 12:20:58 PM

 Please respond to [EMAIL PROTECTED]

 To:   [EMAIL PROTECTED]
 cc:(bcc: David Hay/Lex/Lexmark)
 Subject:  RE: Checkbox Arrays



 I posted this same response to your Posting Collections
 question yesterday.
 Here it is again. If you use the html:multibox, you can get
 back an array of
 key values instead of an array of booleans. They key values
 can be Longs,
 Strings, whatever, as long as it uniquely identifies the row
 that you want
 to know was checked. If you haven't used multibox, it
 generates an html
 checkbox. The array that will be set in your form will only
 contain the key
 values for the rows that were checked.

 Here is the post from yesterday:

 I think I am doing the same thing that you want to do using the
 html:multibox. When the form is submitted you get an array of
 the ids that
 are checked and then you can go delete them.

 in the jsp form (where restaurant id is a key for the item
 being deleted):
 logic:iterate id=restaurant name=favoriterestaurants
 ...
  html:multibox property=favoriteRestaurantRemoveList
   bean:write property=restaurantId name=restaurant/
  /html:multibox
 ...
 /logic:iterate


 in the form class:
 private Long favoriteRestaurantRemoveList[] = new Long[0];

 public Long[] getFavoriteRestaurantRemoveList() {
 return (this.favoriteRestaurantRemoveList);
 }

 public void setFavoriteRestaurantRemoveList(Long
 favoriteRestaurantRemoveList[]) {
 this.favoriteRestaurantRemoveList =
 favoriteRestaurantRemoveList;
 }

 I am not sure if initializing the array to new Long[0] is necessary,
 probably not.

  -Original Message-
  From: Tony Karas [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, May 10, 2001 11:52 AM
  To: Struts User
  Subject: Checkbox Arrays
 
 
  Can anyone help with this?
 
  I have an array of checkboxes in my ActionForm represented by
 
  boolean[] delete;
 
  and I have a setter function
 
  public void setDelete( boolean[] values )
  {
 delete = values;
  }
 
  The problem is that I have only checkboxes that are checked
  get sent back -
  so if one checkbox is checked all I get is an array of length
  1.  Therefore,
  it is not possible for me to determine which checkbox has
  been checked.
 
  In the documentation it tells me to use reset() in ActionForm
  to initialise
  the values - but this will only work with single checkboxes
  and not arrays.
 
  I think I'm stuck.  Is there anyway I can determine which
  checkbox has been
  checked - maybe I can get the value to differ for each
  checkbox.  Will look
  in to that.
 
  Cheers
  Tony
 









RE: struts and tomcat4 reload causes exception

2001-05-11 Thread Jason Chaffee
Title: RE: struts and tomcat4 reload causes exception





Actually, Resin will reload your classes. In fact, it will compile your java files for you if they change as well.


-Original Message-
From: Eric Rasmussen [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 11:44 AM
To: [EMAIL PROTECTED]
Subject: Re: struts and tomcat4 reload causes exception



I recently moved from Tomcat to Resin. I experienced that problem with
Tomcat, but it does not happen in Resin. Resin will not reload your classes
(or, at least, I don't know how to get it to), but will not throw that
Servlet Exception message either, merely continues as though the class files
did not change.


Therefore, I don't think that Struts is the cause.


 - eric


- Original Message -
From: Simon Wawra [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 11, 2001 10:50 AM
Subject: struts and tomcat4 reload causes exception



 Hi,

 It sounds like this topic's been pretty exhaustively covered on the
mailing
 list, but I haven't yet seen a solution to it, so sorry for dragging it up
 again. I'm pretty sure I've read every message on the list on this
topic...

 I'm having seriously difficulty getting my webapp, which is based on
struts
 to reload after I make changes to the source.

 I initially started encountering errors with Tomcat 3.3, when I recompiled
 any of my classes the next request would generate an exception. It would
 continue to generate exceptions until I completely restarted tomcat. At
 least it seemed that Tomcat was properly detecting the changes though...

 Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May
(today's)
 build of Struts and I have exactly the same problem:

 A Servlet Exception Has Occurred
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings

 (see below for full stacktrace). (I've also tried Tomcat 4 Beta 1 with
 Struts 1 Beta 1).

 I'm pretty new to JSP and struts myself, but I am fairly sure that Struts
 itself is having problems reloading. The errors are always from struts
 classes. My app works perfectly until I change a class or 'force' a
reload
 using Tomcat 4's manager feature. Calling the reload feature of struts
 makes no difference either.

 I'm fairly sure it's not my code, because I installed the struts-example
 app, and if I force a reload of that app (using tomcat manager again), I
 get the same kind of errors. The index.jsp page crashes it with this
message:

 javax.servlet.ServletException: Cannot find message resources under key
 org.apache.struts.action.MESSAGE

 Surely the example app must work properly? Perhaps I've just messed up
the
 configuration? Any tips that can help me would me most grateful (as well
 as saving my hair...)

 Thanks in advance,

 Simon.
 ---

 Here's the stack trace:

 A Servlet Exception Has Occurred
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings
 at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766)
 at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)
 at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:200)
 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
 at

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
 at

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:225)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
 at

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164
)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
 at
 org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
 at

org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
64)
 at

org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
 at
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at


RE: How can I use set-property property=foo value=123 / in struts-config.xml

2001-05-11 Thread Hicks, James

You must extend the ActionMapping class to include the property you are
wanting to set.  Inside your action, just cast the ActionMapping object to
your custom mapping object.  Inside the deployment descriptor (web.xml), set
the init-param mapping to point to your custom mapping object.

--- start struts-config.xml ---
action ...
  set-property property=myProperty value=123/
  ..
/action
--- end struts-config.xml ---

--- start web.xml ---
  servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
  param-namemapping/param-name
  param-valueMyActionMapping/param-value
/init-param
  /servlet
--- end web.xml ---

--- start MyActionMapping.java ---
public class MyActionMapping extends ActionMapping {

protected String myProperty;

public void setMyProperty(String myProperty) {
this.myProperty = myProperty;
}

public String getMyProperty() {
return myProperty;
}
}
--- end MyActionMapping.java ---

--- start MyAction.java ---
public class MyAction extends Action {

public ActionForward perform(ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws ServletException {

/* Cast ActionMapping to MyActionMapping */
MyActionMapping myMapping = (MyActionMapping)mapping;

/* do custom processing here */

return mapping.findForward(success);
}
}
--- end MyAction.java ---



James Hicks

-Original Message-
From: David Holland [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 12:08 PM
To: '[EMAIL PROTECTED]'
Subject: How can I use set-property property=foo value=123 / in
struts-config.xml


How can I use set-property property=foo value=123 / in
struts-config.xml ?

I want to use it in place of forward to store Action configuration info
(set-property is
specified in the dtd).

Tried to add getter  setter to Action descendant - but assignment by
introspection 
didn't seem to work. 

Looked at the source for ActionServlet, and the digester class does appear
to be doing something
with this property, although it looks like it is only looking for a single
instance in an action.

As far as I can tell, either it is not intended for general use or it is
broken.

Any thoughts?

David Holland
[EMAIL PROTECTED]




Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Ted Husted

I'm using a standalone container, and I find that everything works
transparently (only one session) if I resort to hard coding the scheme.
Right now, I'm doing this in the Struts-config. 

forward name=standard 
path=http://data.wxxi.org/wxxi-gavel/register/logon.jsp/
forward name=secure   
path=https://data.wxxi.org/wxxi-gavel/register/logon.jsp/

which are called with code like this in the action

  String url = null;
  if (secureMode) {
  url = mapping.findForward(secure).getPath();
  ActionForward actionForward = new ActionForward(url,true);
  return (actionForward);
  }
  else return (mapping.findForward(standard));

where I'm tracking secureMode as a session attribute.

If they login or register in secure mode, I end the process with a [[
BIG LINK ]] that routes them back to the http scheme.

Messy, but it gets me through the day. 

I haven't had time to think about it, but it seems to me that we should
be able to work this into the custom tags. Struts is very good about
automagically converting the links when you switch schemes, so it seems
to me we should be able to force the tags to one scheme or the other,
when appropriate. 

Michael Wilimsky wrote:
 
 hello everyone...
 
 i still couldn´t find a solution on how to switch from
 
 let´s say http://localhost:myport/myapp/something.jsp to
 https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
 thesamepage.jsp
 
 while retaining resp. cloning the content of my sessioncontext...
 
 i am using the urlrewriting-method to manage my sessions
 
 as far as my experience tells me i get two different sessionIDs for
 
 http://localhost:myport/myapp/something.jsp
 and the corresponding
 https://localhost:mysecureport/myapp/something.jsp
 
 how can i copy the sessioncontext to the secure side and vice versa?
 
 michy



RE: Urgent help needed

2001-05-11 Thread Abraham Kang

Is struts.jar in your WEB-INF/lib directory?

--Abraham

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 11:46 AM
 To: [EMAIL PROTECTED]
 Subject: Urgent help needed
 
 
 can some1 tell me why am i getting this error  possible solution
 ---
 Internal Servlet Error:
 
 org.apache.jasper.compiler.CompileException:
 /home/vshintre/jakarta/jakarta-tomcat-3.2.1/webapps/struts-blank/l
 ogin.jsp(3,2)
 Unable to load class org.apache.struts.taglib.html.FormTag
 at
 org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerato
 r.java:129)
 
 ---
 
 thanx in advance
 
 vin
 
 
 
 



RE: Urgent help needed

2001-05-11 Thread Nanduri, Amarnath

Try this

  Keep the struts.jar file in the tomcat\lib directory and see it that
helps.



-Original Message-
From: Vinod Shintre [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 2:46 PM
To: [EMAIL PROTECTED]
Subject: Urgent help needed


can some1 tell me why am i getting this error  possible solution
---
Internal Servlet Error:

org.apache.jasper.compiler.CompileException:
/home/vshintre/jakarta/jakarta-tomcat-3.2.1/webapps/struts-blank/login.jsp(3
,2)
Unable to load class org.apache.struts.taglib.html.FormTag
at
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129
)

---

thanx in advance

vin





RE: Urgent help needed

2001-05-11 Thread Deadman, Hal

Where is your struts.jar located? Have you modified your classpath at all? I
am not sure if struts-blank.war is meant to actually run out of the box. It
may just be shell to get started with. Does struts-example.war work for you?

 -Original Message-
 From: Vinod Shintre [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 2:46 PM
 To: [EMAIL PROTECTED]
 Subject: Urgent help needed


 can some1 tell me why am i getting this error  possible solution
 ---
 Internal Servlet Error:

 org.apache.jasper.compiler.CompileException:
 /home/vshintre/jakarta/jakarta-tomcat-3.2.1/webapps/struts-bla
 nk/login.jsp(3,2)
 Unable to load class org.apache.struts.taglib.html.FormTag
 at
 org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGene
 rator.java:129)

 ---

 thanx in advance

 vin






Windows NT authentication for web site.

2001-05-11 Thread Sundaram Ramasamy


For my company web site, I want to use NT user name and password for
authentication.  to get the user name and password, I want to use html form.

Can any one help me on this. How I can implement this, any tips or samples
codes.


Thanks
Sundaram.




RE: How can I use set-property property=foo value=123 / in struts-config.xml

2001-05-11 Thread Niall Pemberton

I think you got the wrong end of the stick. The action elements in
struts-config relate to ActionMapping classes, not the Action class.

You need to sub-class the ActionMapping class and add your properties and
getters/setters to that class.

Then you need to add a init-param element for the ActionSrvlet to the
web.xml to tell it to use your custom ActionMapping class as follows:

  init-param
 param-namemapping/param-name
 param-valuecom.myPackage.myActionMapping/param-value
  /init-param

Then in your action class you need to cast the mapping object to your custom
class and then call the getter to retrieve the property values.

Niall

 -Original Message-
 From: David Holland [mailto:[EMAIL PROTECTED]]
 Sent: 11 May 2001 18:08
 To: '[EMAIL PROTECTED]'
 Subject: How can I use set-property property=foo value=123 / in
 struts-config.xml


 How can I use set-property property=foo value=123 / in
 struts-config.xml ?

 I want to use it in place of forward to store Action configuration info
 (set-property is
 specified in the dtd).

 Tried to add getter  setter to Action descendant - but assignment by
 introspection
 didn't seem to work.

 Looked at the source for ActionServlet, and the digester class does appear
 to be doing something
 with this property, although it looks like it is only looking for a single
 instance in an action.

 As far as I can tell, either it is not intended for general use or it is
 broken.

 Any thoughts?

 David Holland
 [EMAIL PROTECTED]






RE: Urgent help needed

2001-05-11 Thread Inder Sabharwal

Have you checked your classpath?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 11:46 AM
 To: [EMAIL PROTECTED]
 Subject: Urgent help needed
 
 
 can some1 tell me why am i getting this error  possible solution
 ---
 Internal Servlet Error:
 
 org.apache.jasper.compiler.CompileException:
 /home/vshintre/jakarta/jakarta-tomcat-3.2.1/webapps/struts-blank/l
 ogin.jsp(3,2)
 Unable to load class org.apache.struts.taglib.html.FormTag
 at
 org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerato
 r.java:129)
 
 ---
 
 thanx in advance
 
 vin
 
 
 



RE: struts and tomcat4 reload causes exception

2001-05-11 Thread Simon Wawra


It seems that things get into a mess when reloading happens, so I guess
Resin might also suffer from this problem if it were reloading the
classes...?
Jason, Is Resin a commercial or open-source product? Can you tell
us how to enable class reloading, as you describe?
Thanks,
Simon

At 01:05 PM 5/11/01 -0700, Jason Chaffee wrote:
Actually, Resin will
reload your classes. In fact, it will compile your java files for
you if they change as well. 
-Original Message- 
From: Eric Rasmussen
[mailto:[EMAIL PROTECTED]]

Sent: Friday, May 11, 2001 11:44 AM 
To: [EMAIL PROTECTED] 
Subject: Re: struts and tomcat4 reload causes
exception 
I recently moved from Tomcat to Resin. I experienced
that problem with 
Tomcat, but it does not happen in Resin. Resin will
not reload your classes 
(or, at least, I don't know how to get it to), but will not
throw that 
Servlet Exception message either, merely continues as though
the class files 
did not change. 
Therefore, I don't think that Struts is the cause.

 - eric 
- Original Message - 
From: Simon Wawra [EMAIL PROTECTED] 
To: [EMAIL PROTECTED] 
Sent: Friday, May 11, 2001 10:50 AM 
Subject: struts and tomcat4 reload causes exception 
 Hi, 
 
 It sounds like this topic's been pretty exhaustively covered on the 
mailing 
 list, but I haven't yet seen a solution to it, so sorry for dragging it up 
 again. I'm pretty sure I've read every message on the list on this 
topic... 
 
 I'm having seriously difficulty getting my webapp, which is based on 
struts 
 to reload after I make changes to the source. 
 
 I initially started encountering errors with Tomcat 3.3, when I recompiled 
 any of my classes the next request would generate an exception. It would 
 continue to generate exceptions until I completely restarted tomcat. At 
 least it seemed that Tomcat was properly detecting the changes though... 
 
 Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May 
(today's) 
 build of Struts and I have exactly the same problem: 
 
 A Servlet Exception Has Occurred 
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings 
 
 (see below for full stacktrace). (I've also tried Tomcat 4 Beta 1 with 
 Struts 1 Beta 1). 
 
 I'm pretty new to JSP and struts myself, but I am fairly sure that Struts 
 itself is having problems reloading. The errors are always from struts 
 classes. My app works perfectly until I change a class or 'force' a 
reload 
 using Tomcat 4's manager feature. Calling the reload feature of struts 
 makes no difference either. 
 
 I'm fairly sure it's not my code, because I installed the struts-example 
 app, and if I force a reload of that app (using tomcat manager again), I 
 get the same kind of errors. The index.jsp page crashes it with this 
message: 
 
 javax.servlet.ServletException: Cannot find message resources under key 
 org.apache.struts.action.MESSAGE 
 
 Surely the example app must work properly? Perhaps I've just messed up 
the 
 configuration? Any tips that can help me would me most grateful (as well 
 as saving my hair...) 
 
 Thanks in advance, 
 
 Simon. 
 --- 
 
 Here's the stack trace: 
 
 A Servlet Exception Has Occurred 
 java.lang.ClassCastException: org.apache.struts.action.ActionMappings 
 at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766) 
 at 
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481) 
 at org.apache.jsp.login_jsp._jspService(login_jsp.java:141) 
 at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja 
va:200) 
 at 
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) 
 at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453) 
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 at 
 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application 
FilterChain.java:254) 
 at 
 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh 
ain.java:194) 
 at 
 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja 
va:255) 
 at 
 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) 
 at 
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
 at 
 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja 
va:225) 
 at 
 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 
66) 
 at 
 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) 
 at 
 org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) 
 at 
 org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252) 
 at 
 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164 
) 
 at 
 

RE: struts and tomcat4 reload causes exception

2001-05-11 Thread Simon Wawra


Well, if that's the way it's designed, I guess I can live with it too, but 
it does seem a bit restrictive.

 From the messages I've read on Tomcat 4, it seems a LOT of effort has gone 
into making it reload classes when they're changed, so I don't really see 
the point of it, if we're going to resign to restarting the server anyway.

What's the point of the 'reload' function of the Tomcat 'manager'?  It 
doesn't do what (it seems to me) it should do, which is restart the app, 
just as if the server had been started afresh.

To answer your question, I just copied the WAR file into tomcat/webapps and 
let it be deployed automatically.  Does that make a difference?

Cheers,

Simon.

At 12:23 PM 5/11/01 -0700, Anthony Martin wrote:
Keep your precious hair.  I'm pretty sure Struts and Tomcat are operating as
designed.

I noticed this when I first started working with Struts too, and it caused
me about thirty minutes of horrible pain and suffering until I realized that
restarting the server is required due to the nature of the framework.  To
me, it seems reasonable to restart Tomcat every time a class gets
recompiled.

I try to make sure my code is pretty solid before testing moving on to
testing.  I admit, after being a scripter for a few years (perl, later php),
I felt a little restricted by this.  But like any compiled language and even
when scripting, it's best to avoid the code-compile-test-repeat routine if
you can because ... it is bad.

When you say that you installed the struts-example, did you deploy the .war
like the manual suggests, or did you extract it manually?


Anthony

-Original Message-
From: Simon Wawra [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 10:50 AM
To: [EMAIL PROTECTED]
Subject: struts and tomcat4 reload causes exception


Hi,

It sounds like this topic's been pretty exhaustively covered on the mailing
list, but I haven't yet seen a solution to it, so sorry for dragging it up
again.  I'm pretty sure I've read every message on the list on this topic...

I'm having seriously difficulty getting my webapp, which is based on struts
to reload after I make changes to the source.

I initially started encountering errors with Tomcat 3.3, when I recompiled
any of my classes the next request would generate an exception.  It would
continue to generate exceptions until I completely restarted tomcat.  At
least it seemed that Tomcat was properly detecting the changes though...

Now I'm running the just-released Tomcat 4 Beta 4, and the 11 May (today's)
build of Struts and I have exactly the same problem:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings

(see below for full stacktrace).  (I've also tried Tomcat 4 Beta 1 with
Struts 1 Beta 1).

I'm pretty new to JSP and struts myself, but I am fairly sure that Struts
itself is having problems reloading.  The errors are always from struts
classes.  My app works perfectly until I change a class or 'force' a reload
using Tomcat 4's manager feature.  Calling the reload feature of struts
makes no difference either.

I'm fairly sure it's not my code, because I installed the struts-example
app, and if I force a reload of that app (using tomcat manager again), I
get the same kind of errors.  The index.jsp page crashes it with this
message:

javax.servlet.ServletException: Cannot find message resources under key
org.apache.struts.action.MESSAGE

Surely the example app must work properly?  Perhaps I've just messed up the
configuration?  Any tips that can help me would me most grateful (as well
as saving my hair...)

Thanks in advance,

Simon.
---

Here's the stack trace:

A Servlet Exception Has Occurred
java.lang.ClassCastException: org.apache.struts.action.ActionMappings
  at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766)
  at
org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481)
  at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)
  at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
va:200)
  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379)
  at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:254)
  at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:194)
  at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:255)
  at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
66)
  at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
  at

Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Martin Cooper

Ted,

You can collapse your code down to this:

   return mapping.findForward(secureMode ? secure : standard);

by adding redirect=true to your secure forward definition in struts-config.

--
Martin Cooper


At 01:25 PM 5/11/01, Ted Husted wrote:
I'm using a standalone container, and I find that everything works
transparently (only one session) if I resort to hard coding the scheme.
Right now, I'm doing this in the Struts-config.

forward name=standard
path=http://data.wxxi.org/wxxi-gavel/register/logon.jsp/
forward name=secure
path=https://data.wxxi.org/wxxi-gavel/register/logon.jsp/

which are called with code like this in the action

   String url = null;
   if (secureMode) {
   url = mapping.findForward(secure).getPath();
   ActionForward actionForward = new ActionForward(url,true);
   return (actionForward);
   }
   else return (mapping.findForward(standard));

where I'm tracking secureMode as a session attribute.

If they login or register in secure mode, I end the process with a [[
BIG LINK ]] that routes them back to the http scheme.

Messy, but it gets me through the day.

I haven't had time to think about it, but it seems to me that we should
be able to work this into the custom tags. Struts is very good about
automagically converting the links when you switch schemes, so it seems
to me we should be able to force the tags to one scheme or the other,
when appropriate.

Michael Wilimsky wrote:
 
  hello everyone...
 
  i still couldn´t find a solution on how to switch from
 
  let´s say http://localhost:myport/myapp/something.jsp to
  
 https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
  thesamepage.jsp
 
  while retaining resp. cloning the content of my sessioncontext...
 
  i am using the urlrewriting-method to manage my sessions
 
  as far as my experience tells me i get two different sessionIDs for
 
  http://localhost:myport/myapp/something.jsp
  and the corresponding
  https://localhost:mysecureport/myapp/something.jsp
 
  how can i copy the sessioncontext to the secure side and vice versa?
 
  michy





RE: Windows NT authentication for web site.

2001-05-11 Thread Abraham Kang

Which app server are you using?  Most commercial app servers have a way of
plugging the
security realm to an NT domain.

--Abraham

 -Original Message-
 From: Sundaram Ramasamy [mailto:[EMAIL PROTECTED]]
 Sent: Friday, May 11, 2001 1:48 PM
 To: [EMAIL PROTECTED]
 Subject: Windows NT authentication for web site.



 For my company web site, I want to use NT user name and password for
 authentication.  to get the user name and password, I want to use
 html form.

 Can any one help me on this. How I can implement this, any tips or samples
 codes.


 Thanks
 Sundaram.






Re: Can some 1 help me

2001-05-11 Thread Vinod Shintre

hi ,
i got the error fixed ,i was mixing the struts.jar file with a deprecated tag
lib file struts-form.tld,
this scares me as if i have my stuff running with one build of struts I CAN'T
possibly run it with another ,
any suggestions on the same would be appreciated,
thanx in advance

vin




David Winterfeldt wrote:

 What servlet engine are you using?

 Did the example or blank war run before you started
 editing it?

 Do you have the struts.jar in you main classpath
 anywhere?  I can't be in the main classpath.  It must
 only be in the /WEB-INF/lib directory.

 David

 --- Vinod Shintre [EMAIL PROTECTED] wrote:
  okie just gettign started with STRUTS:
 
   follows the list of erros ;-)
 
  okie im getting this error
  --
  /webapps/struts-blank/logon/login.jsp(3,0) Unable to
  load class
  org.apache.struts.taglib.html.FormTag
  at
 
 org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:129)
 
  --
  im using the strust latest BETA build
   all the directives to the struts-tag libs are set
  correctly
 
  any help would be greately appreciated
 
  vin
 
 
 

 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.yahoo.com/




RE: struts and tomcat4 reload causes exception

2001-05-11 Thread Jason Chaffee



Resin 
is an open-source product and it is great! You will need to set your 
classpath id in resin.config, but other than that it will reload class and the 
deployment descriptor if there are any changes automatically. I never have 
to bounce it.

  -Original Message-From: Simon Wawra 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, May 11, 2001 2:20 
  PMTo: [EMAIL PROTECTED]; 
  '[EMAIL PROTECTED]'Subject: RE: struts and tomcat4 
  reload causes exceptionIt seems that things get into 
  a mess when reloading happens, so I guess Resin might also suffer from this 
  problem if it were reloading the classes...?Jason, Is Resin a 
  commercial or open-source product? Can you tell us how to enable class 
  reloading, as you describe?Thanks,SimonAt 01:05 PM 
  5/11/01 -0700, Jason Chaffee wrote:
  Actually, Resin will 
reload your classes. In fact, it will compile your java files for you 
if they change as well. -Original 
Message- From: Eric Rasmussen [mailto:[EMAIL PROTECTED]] 
Sent: Friday, May 11, 2001 11:44 AM To: [EMAIL PROTECTED] Subject: 
Re: struts and tomcat4 reload causes exception I 
recently moved from Tomcat to Resin. I experienced that problem 
with Tomcat, but it does not happen in Resin. 
Resin will not reload your classes (or, at least, I 
don't know how to get it to), but will not throw that Servlet Exception message either, merely continues as though the 
class files did not change. Therefore, I don't think that Struts is the cause. 
 - eric - Original Message - From: "Simon 
Wawra" [EMAIL PROTECTED] To: 
[EMAIL PROTECTED] Sent: Friday, 
May 11, 2001 10:50 AM Subject: struts and tomcat4 
reload causes exception  Hi, 
  It sounds like this 
topic's been pretty exhaustively covered on the mailing  list, but I haven't yet seen a 
solution to it, so sorry for dragging it up  
again. I'm pretty sure I've read every message on the list on 
this topic...  
 I'm having seriously difficulty getting my webapp, 
which is based on struts  to reload after I make changes to the source.   I initially started encountering 
errors with Tomcat 3.3, when I recompiled  any 
of my classes the next request would generate an exception. It 
would  continue to generate exceptions until I 
completely restarted tomcat. At  least it 
seemed that Tomcat was properly detecting the changes though... 
  Now I'm running the 
just-released Tomcat 4 Beta 4, and the 11 May (today's)  build of Struts and I have 
exactly the same problem:   A Servlet Exception Has Occurred  
java.lang.ClassCastException: org.apache.struts.action.ActionMappings 
  (see below for full 
stacktrace). (I've also tried Tomcat 4 Beta 1 with  Struts 1 Beta 1).   I'm pretty new to JSP and struts myself, but I am fairly sure 
that Struts  itself is having problems 
reloading. The errors are always from struts  classes. My app works perfectly until I change a class or 
'force' a reload  using 
Tomcat 4's manager feature. Calling the reload feature of 
struts  makes no difference either. 
  I'm fairly sure it's not 
my code, because I installed the struts-example  
app, and if I force a reload of that app (using tomcat manager again), 
I  get the same kind of errors. The 
index.jsp page crashes it with this message: 
  
javax.servlet.ServletException: Cannot find message resources under 
key  org.apache.struts.action.MESSAGE 
  Surely the example app 
must work properly? Perhaps I've just messed up the  configuration? Any tips that 
can help me would me most grateful (as well  as 
saving my hair...)   
Thanks in advance,   
Simon.  ---  
 Here's the stack trace:   A Servlet Exception Has 
Occurred  java.lang.ClassCastException: 
org.apache.struts.action.ActionMappings  at 
org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:766) 
 
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:481) 
 
at org.apache.jsp.login_jsp._jspService(login_jsp.java:141)  at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) 
 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 
at  org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja 
va:200)  at 
 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:379) 
 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:453) 
 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) 
 
at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application 
FilterChain.java:254)  at 
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh 
ain.java:194)  at 
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja 
va:255)  at 
 

Re: filtering unwanted characters

2001-05-11 Thread Ian Kallen [EMAIL PROTECTED]


Apache 2.0 supports input filters, how about writing one that cleans the
data input before mod_jk/mod_webapp can hand it off to Tomcat?

On Fri, 11 May 2001, Nanduri, Amarnath wrote:
 I am looking for some open source code that deals with filtering
 technology. Basically i want to filter any unwanted characters from the user
 input data. The user might try to pass in some SQL quesries or try to run
 some shell scripts or put special characters which might be rejected by a
 database (or even corrupt it). If no such open source code is available then
 i want to write something like that. I was wondering if anyone has done some

cheers,
-Ian

--
Ian Kallen [EMAIL PROTECTED] | AIM: iankallen




RE: Determining odd-even table rows

2001-05-11 Thread Niall Pemberton

I have a RowTag that does this, it generates tr elements and you can
specify either oddColor/evenColor attributes to generate bgcolor= attributes
or oddStyle/evenStyle parameters to generate class= attributes for CSS.

So the jsp looks like this:

  table
logic:iterate id=.. name=.. property=..
   util:row oddColor=#C0C0C0 evenColor=#FF
td./td
td./td
   /util:row
/logic:iterate
  /table

You can either specify both odd and even or just one of them.

I'll send it if you're interested.

Niall


 -Original Message-
 From: Bill Pfeiffer [mailto:[EMAIL PROTECTED]]
 Sent: 11 May 2001 20:08
 To: Struts-User
 Subject: Determining odd-even table rows


 I'm trying to figure out how to do a green-bar effect (different backround
 colors for every other row of a table) with struts/jsp.  I am using a
 tagified javax.sql.Rowset.  I can iterate through the rowset via my tags
 (reworked jakarta DBTags).  The problem, more of a mental block,
 is how do I
 alternate the backround colors of the html rows I am writing WITHOUT
 resorting to scriptlets.  I have just added a tag to get the
 current row, so
 I have that returing, but what do I do with it?

 The logic tags in struts deal only with comparisons to constants.
  I need to
 do some math to determine whether the current row is odd/even so I can set
 the backround.

 Is it easier than this and I'm missing it?

 My goal here is not to do any scriplets.  I'm putting together a
 set of tags
 to help our web guy build pages using only tags.

 Thanks for any help,

 Bill Pfeiffer






Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Ian Kallen [EMAIL PROTECTED]


Are you saying that an http request can be forwarded to an https
request?  That doesn't make sense; if the browser doesn't have an https
session setup, the server can do whatever it wants to resolve the request
translation.  You have to redirect to go from an http request to an https
request.

On Fri, 11 May 2001, Ted Husted wrote:
 I'm using a standalone container, and I find that everything works
 transparently (only one session) if I resort to hard coding the scheme.
 Right now, I'm doing this in the Struts-config. 
 
 forward name=standard 
 path=http://data.wxxi.org/wxxi-gavel/register/logon.jsp/
 forward name=secure   
 path=https://data.wxxi.org/wxxi-gavel/register/logon.jsp/
 
 which are called with code like this in the action
 
   String url = null;
   if (secureMode) {
   url = mapping.findForward(secure).getPath();
   ActionForward actionForward = new ActionForward(url,true);
   return (actionForward);
   }
   else return (mapping.findForward(standard));
 
 where I'm tracking secureMode as a session attribute.
 
 If they login or register in secure mode, I end the process with a [[
 BIG LINK ]] that routes them back to the http scheme.
 
 Messy, but it gets me through the day. 
 
 I haven't had time to think about it, but it seems to me that we should
 be able to work this into the custom tags. Struts is very good about
 automagically converting the links when you switch schemes, so it seems
 to me we should be able to force the tags to one scheme or the other,
 when appropriate. 
 
 Michael Wilimsky wrote:
  
  hello everyone...
  
  i still couldn´t find a solution on how to switch from
  
  let´s say http://localhost:myport/myapp/something.jsp to
  https://localhost:mysecureport/myapp/somethingelsethatneedstobesecure_oreven
  thesamepage.jsp
  
  while retaining resp. cloning the content of my sessioncontext...
  
  i am using the urlrewriting-method to manage my sessions
  
  as far as my experience tells me i get two different sessionIDs for
  
  http://localhost:myport/myapp/something.jsp
  and the corresponding
  https://localhost:mysecureport/myapp/something.jsp
  
  how can i copy the sessioncontext to the secure side and vice versa?
  
  michy
 

cheers,
-Ian

--
Ian Kallen [EMAIL PROTECTED] | AIM: iankallen




Re: still fighting HTTP HTTPS problem

2001-05-11 Thread Ted Husted

  ActionForward actionForward = new ActionForward(url,true);

The forward here is a bit of a misnomer. Using true forces a
redirect. 

Ian Kallen  wrote:
 
 Are you saying that an http request can be forwarded to an https
 request?  That doesn't make sense; if the browser doesn't have an https
 session setup, the server can do whatever it wants to resolve the request
 translation.  You have to redirect to go from an http request to an https
 request.



LinkTag broken in May 11 build

2001-05-11 Thread Vimal Kansal

Link tag seems to be broken. I have code snippet like
this :

logic:iterate id=tradingPartner
name=tradingPartnerList
type=com.netfish.dm.TradingPartnerInfo
  TR
 td class=fieldentry nowrap
html:link
page=/viewtradingpartner.do paramId=tpName
paramName=tradingPartner paramProperty=name
scope=request
   bean:write
name=tradingPartner property=name/
/html:link
 /td
 td class=fieldentry
logic:equal value=''
name=tradingPartner property=desc
/logic:equal
logic:notEqual value=''
name=tradingPartner property=desc 
   bean:write
name=tradingPartner property=desc/nbsp;
/logic:notEqual
 /td
 td class=fieldentry nowrap
logic:equal value=''
name=tradingPartner property=internalTPCode
nbsp;
/logic:equal
logic:notEqual value=''
name=tradingPartner property=internalTPCode
   bean:write
name=tradingPartner
property=internalTPCode/nbsp;
/logic:notEqual
 /td
 td class=fieldentry nowrap
logic:equal value=''
name=tradingPartner property=status
nbsp;
/logic:equal
logic:notEqual value=''
name=tradingPartner property=status
bean:write
name=tradingPartner property=status/nbsp;
/logic:notEqual
 /td
  /TR
   /logic:iterate


I get the following exception

at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:436)
at
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:479)
at
org.apache.struts.util.RequestUtils.computeParameters(RequestUtils.java:197)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:334)

__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/