How do you update the database with last user logon information?

2002-03-22 Thread Alex Paransky

I seem to have a small problem.  It's quite simple.  All I want to do is
update the database when a user logs on.  However, with the Servlet
authentication mechanism, there does not appear to be a way to execute a
process or a method after user is authenticated.

I am just wondering if Struts or other libraries have somehow implemented
something that can help me in this area.  Or how do other people do this?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/view.do?profileId=127


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Form Beans - Vector

2002-03-22 Thread Perpetua Cysne

Could someone please provide me with an example of Form Beans using a Vector
of objects? How do display it in a iterate tag?

The object is Passenger(firstName, lastName).

Thank you!

Perpetua


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Nested tag tutorial

2002-03-22 Thread Perpetua Cysne

Hello,
How do I get this tutorial?
Cheers,
Perpetua
- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 5:52 PM
Subject: Nested tag tutorial


>
> The nested tag tutorial created by Arron Bates simply rocks!I was kind
> of intimidated by nested tags until I took a few hours out of my day to go
> thru parts 1 and 2 of the tutorial.   Thanks to the way it was well laid
> out AND interesting, nested tags are no longer intimidating.Thanks to
> Arron on this one for a job well done.Can't recommend it enough.Is
> his tutorial easy to follow?   I'm a total idiot/moron and his tutorial
> made it easy to learn nested tags.
>
> Thanks Arron.
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Need some quick help

2002-03-22 Thread Daniel Jaffa

Sorry for this message i solved it myself  fixed it using javascript.  Tried 
to do it one way failed and found a nother cool way of doing it ie.

onclick="javascript:showall(this.form.counter.value)

i also added


This did what i wanted to do

Daniel Jaffa.

_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts Fast Track: J2EE/JSP Framework: Practical Application with Database Access and Struts Extension

2002-03-22 Thread Andrew H. Peterson

I purchased this book and was very, very disapointed in it.  It is not even
worth the paper it is written on.  Needless to say, I returned it.  Checkout
the reviews on Amazon and you'll see what I mean.

Andrew

-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 6:40 PM
To: [EMAIL PROTECTED]
Subject: Struts Fast Track: J2EE/JSP Framework: Practical Application
with Database Access and Struts Extension


Subject: Struts Fast Track: J2EE/JSP Framework: Practical Application with
Database Access and Struts Extension
From: "Nav Sandhu" <[EMAIL PROTECTED]>
 ===
This might be of some help.

Struts Fast Track: J2EE/JSP Framework: Practical Application with Database
Access and Struts Extension

http://www.amazon.com/exec/obidos/ASIN/0971661901/qid%3D1016818089/sr%3D1-2/
ref%3Dsr%5F1%5F2/002-8523198-7363226




--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Need some quick help

2002-03-22 Thread Daniel Jaffa

I need a quick question answered.

I have the following code

 
  
   
   
   






Update

   
  
 

what i would like to do is this




but i am getting the following error. Any sugestions.


unclosed string literal probably occurred due to an error in
/charges/Chargehistory.jsp line 41:





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Fast Track: J2EE/JSP Framework: Practical Application with Database Access and Struts Extension

2002-03-22 Thread @Basebeans.com

Subject: Struts Fast Track: J2EE/JSP Framework: Practical Application with Database 
Access and Struts Extension
From: "Nav Sandhu" <[EMAIL PROTECTED]>
 ===
This might be of some help.

Struts Fast Track: J2EE/JSP Framework: Practical Application with Database
Access and Struts Extension

http://www.amazon.com/exec/obidos/ASIN/0971661901/qid%3D1016818089/sr%3D1-2/
ref%3Dsr%5F1%5F2/002-8523198-7363226




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




reg Forward action

2002-03-22 Thread Kumari, Ramana


Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println("in ReferralLoginCompleteAction perform() ");
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println("before forwarding "+ dateReceived
+workerName+referralNumber);

request.setAttribute("dateReceived", dateReceived);
request.setAttribute("referralNumber",
referralNumber);
request.setAttribute("workerName", workerName);

  return (mapping.findForward("referral"));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows


  

  

  



  


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




reg Forward action

2002-03-22 Thread Kumari, Ramana


Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println("in ReferralLoginCompleteAction perform() ");
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println("before forwarding "+ dateReceived
+workerName+referralNumber);

request.setAttribute("dateReceived", dateReceived);
request.setAttribute("referralNumber",
referralNumber);
request.setAttribute("workerName", workerName);

  return (mapping.findForward("referral"));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows


  

  

  



  


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread theron . kousek


thanks,

this is great information




   

Gernot Koller  

 <[EMAIL PROTECTED]>  

 cc:   

03/22/02 Subject: Re: what is html:link equivelant 

01:47 PM   

Please 

respond to 

Struts Users   

Mailing List   

   

   




Well, you can specify the "style", "id", and "class" attributes with these
properties.

http://some.url.com"; style="color:green" styleId="mylink"
styleClass="myStyle">

should result in something like:

http://some.url.com"; style="color:green" id="mylink" class
="myStyle">

you're welcome,

gernot.

22.03.2002 21:12:21, [EMAIL PROTECTED] wrote:

>
>thanks...
>
>But for my next question though:
>
>Why does the documentation:
>http://jakarta.apache.org/struts/userGuide/struts-html.html#link
>
>mention the style and styleId and the styleClass properties?
>
>thanks,
>Theron
>
>




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




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread Gernot Koller

Well, you can specify the "style", "id", and "class" attributes with these properties.

http://some.url.com"; style="color:green" styleId="mylink" 
styleClass="myStyle">

should result in something like:

http://some.url.com"; style="color:green" id="mylink" class="myStyle">

you're welcome,

gernot.

22.03.2002 21:12:21, [EMAIL PROTECTED] wrote:

>
>thanks...
>
>But for my next question though:
>
>Why does the documentation:
>http://jakarta.apache.org/struts/userGuide/struts-html.html#link
>
>mention the style and styleId and the styleClass properties?
>
>thanks,
>Theron
>
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tiles question: Is it possible to insert a ComponentDefinition into a Tile context dynamically?

2002-03-22 Thread @Basebeans.com

Subject: Tiles question: Is it possible to insert a ComponentDefinition into a Tile 
context dynamically?
From: "Chris Cool" <[EMAIL PROTECTED]>
 ===
Hi,

I have a tile that reads items from a PutList list and then inserts each
item into the current page.







When the items in the list are tiles defined in my tileDefinitions.xml file,
the tiles are inserted into my JSP correctly. However, I want to dynamically
create a tile definition and insert it into the page context.

I am generating the ComponentDefinition in my tile controller and accessing
the "itemList" where I add the name of the dynamically generated definition:

/* get the item list and insert new tile def into it */

ArrayList itemList = (ArrayList)context.getAttribute("itemList");

if (itemList != null) {

HashMap map = new HashMap();

map.put("name", "newtarget");

map.put("link", "newtarget.do");


ComponentDefinition newItem =

new ComponentDefinition("new.item",

"/mytiles/simpleItem.jsp",

map);

DefinitionsUtil.setActionDefinition( request, breadCrumbItem );

itemList.add("new.item");

}

In my tile, the "itemList" contains the "new.item" entry, but it does not
appear to find the ComponentDefinition I created.

Thanks for you help.

Chris



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread Eddie Bush

Well, inside of your CSS, you make definitions for styles, correct?

If you begin a definition name with #, as in:

#myStyle { text-decoration: none }

then the 'name' (myStyle) is known as an 'Id'.  Therefore, if you wanted to
use this definition with a link, you would specify styleId='myStyle' in your
 tag.

Similarly, if you define a style as:

.myStyle { text-decoration: none }

then the name (myStyle again) is known as a class.  Therefore, if you wanted
to use this definition with a link, you would specify styleClass='myStyle'
in your  tag.

And, last but not least, there is the style attribute of the link tag.  This
is where you could hard-code a style for a given link (ie. not place it in
the css file but directly in the code).  By specifying
style='text-decoration: none' as an attribute to your link tag, you would
accomplish the same thing as the above two methods, but without the CSS
file.

HTH,

Eddie


- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 2:12 PM
Subject: Re: what is html:link equivelant


>
> thanks...
>
> But for my next question though:
>
> Why does the documentation:
> http://jakarta.apache.org/struts/userGuide/struts-html.html#link
>
> mention the style and styleId and the styleClass properties?
>
> thanks,
> Theron
>
>
>
>
> Gernot Koller
>  .at> <[EMAIL PROTECTED]>
>  cc:
> 03/22/02 Subject: Re: what is
html:link equivelant
> 11:43 AM
> Please
> respond to
> Struts Users
> Mailing List
>
>
>
>
>
> Just leave your http://localhost:8080/express/billing.css"; rel
> ="stylesheet">
> tag as it is !
> The  tag is for generating http://some.url.com
> ">foobar  tags...
>
> cheers,
>
> gernot.
>
>
> 22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:
>
> >
> >This is tricker than I thought:
> >
> >What is the equivelant of:
> >
> >http://localhost:8080/express/billing.css"; rel="stylesheet">
> >
> >using the html:link tag?
> >
> >I see they have the style property and the styleClass property but I am
> not
> >sure exactly how they are used.
> >
> >thanks for any insight...
> >
> >thanks,
> >Theron
> >
> >
> >--
> >To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
>
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread theron . kousek


thanks...

But for my next question though:

Why does the documentation:
http://jakarta.apache.org/struts/userGuide/struts-html.html#link

mention the style and styleId and the styleClass properties?

thanks,
Theron



   

Gernot Koller  

 <[EMAIL PROTECTED]>  

 cc:   

03/22/02 Subject: Re: what is html:link equivelant 

11:43 AM   

Please 

respond to 

Struts Users   

Mailing List   

   

   




Just leave your http://localhost:8080/express/billing.css"; rel
="stylesheet">
tag as it is !
The  tag is for generating http://some.url.com
">foobar  tags...

cheers,

gernot.


22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:

>
>This is tricker than I thought:
>
>What is the equivelant of:
>
>http://localhost:8080/express/billing.css"; rel="stylesheet">
>
>using the html:link tag?
>
>I see they have the style property and the styleClass property but I am
not
>sure exactly how they are used.
>
>thanks for any insight...
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>
>
>




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




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread Eddie Bush

I personally just use the old HTML tag.  I use a relative path though - eg.
/express/billing.css instead of http...billing.css.  ... works fine for me
=)

HTH,

Eddie

- Original Message -
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 11:56 AM
Subject: what is html:link equivelant


>
> This is tricker than I thought:
>
> What is the equivelant of:
>
> http://localhost:8080/express/billing.css"; rel="stylesheet">
>
> using the html:link tag?
>
> I see they have the style property and the styleClass property but I am
not
> sure exactly how they are used.
>
> thanks for any insight...
>
> thanks,
> Theron
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Tiles question: Is it possible to insert a ComponentDefinition into a Tile context dynamically?

2002-03-22 Thread Chris Cool

Hi,

I have a tile that reads items from a PutList list and then inserts each
item into the current page. 

   
   
   

When the items in the list are tiles defined in my tileDefinitions.xml file,
the tiles are inserted into my JSP correctly. However, I want to dynamically
create a tile definition and insert it into the page context. 

I am generating the ComponentDefinition in my tile controller and accessing
the "itemList" where I add the name of the dynamically generated definition:

  /* get the item list and insert new tile def into it */
  ArrayList itemList = (ArrayList)context.getAttribute("itemList");
  if (itemList != null) {

HashMap map = new HashMap();
map.put("name", "newtarget");
map.put("link", "newtarget.do");

ComponentDefinition newItem = 
new ComponentDefinition("new.item",
  "/mytiles/simpleItem.jsp",
map);

DefinitionsUtil.setActionDefinition( request, breadCrumbItem );
itemList.add("new.item");
  }

In my tile, the "itemList" contains the "new.item" entry, but it does not
appear to find the ComponentDefinition I created.

Thanks for you help.

Chris

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: what is html:link equivelant

2002-03-22 Thread Gernot Koller

Just leave your http://localhost:8080/express/billing.css"; 
rel="stylesheet">
tag as it is !
The  tag is for generating http://some.url.com";>foobar  tags...

cheers,

gernot.


22.03.2002 18:56:34, [EMAIL PROTECTED] wrote:

>
>This is tricker than I thought:
>
>What is the equivelant of:
>
>http://localhost:8080/express/billing.css"; rel="stylesheet">
>
>using the html:link tag?
>
>I see they have the style property and the styleClass property but I am not
>sure exactly how they are used.
>
>thanks for any insight...
>
>thanks,
>Theron
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE [2]: Form Question - Dynamic number of checkboxes - Multibox ?

2002-03-22 Thread Gaulin . David

As far as I can see your code looks Ok.

>From the code of the tag, this exception is throw when the value object is
null.  
Can your sb.getCheckBoxName return null?

That is all I can think of.


-Original Message-
From: Mattos, John [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 12:48 PM
To: 'Struts Users Mailing List'
Subject: RE [2]: Form Question - Dynamic number of checkboxes - Multibox
?


Okay, so now I have the following:


  

<%=sb.getProductName()%> 
 
 


 
   


and I have an int[] field on my bean called "assetId"

and it's telling me 

"You must specify the value attribute or nested tag content"

I thought that's what I was doing when I specified
value="<%=sb.getCheckBoxName()%>" in the multiBox.

the getcheckboxName, by the way, returns the assetId, so I hope to end
upwith an array of these things in the bean

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: RE: Form Question - Dynamic number of checkboxes


Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




"Mattos, John" <[EMAIL PROTECTED]> on 03/22/2002
11:13:16 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:


  
<%=sb.getProductName()%> 
  
  




the getCheckBoxName() comes from the database, and it correcponds to the
"Product" in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
To unsubscribe, e-mail:

For additional commands, e-mail:









--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




reg Forward action

2002-03-22 Thread Kumari, Ramana

Hi  

   I am trying to forward request from my Action class to a JSP (which is
configured for forward aciton in struts-config.xml).
   When i submit the page i see the action is fired but it is not forwarding
the request to specified JSP. since i could see no
   output on my browser . When i see my jsp_servlet folder the corresponding
class file for the forwarded JSP is not found.

   My app is running on Weblogic 6.1 server.

   I am wondering if someone could help me in figuring out of what is
happening !

   My Action Class follows

public final class ReferralLoginCompleteAction extends Action {
public ActionForward perform(ActionMapping mapping,
 ReferralForm form,
 HttpServletRequest request,
 HttpServletResponse response)
 throws IOException, ServletException {

System.out.println("in ReferralLoginCompleteAction perform() ");
if (form instanceof ReferralForm) { 
  ReferralForm theForm = (ReferralForm) form;
  String dateReceived = theForm.getDateReceived();
  String workerName =  theForm.getWorkerName();
  String referralNumber =  theForm.getReferralNumber();

  HttpSession session = request.getSession();

  System.out.println("before forwarding "+ dateReceived
+workerName+referralNumber);

request.setAttribute("dateReceived", dateReceived);
request.setAttribute("referralNumber",
referralNumber);
request.setAttribute("workerName", workerName);

  return (mapping.findForward("referral"));
}
else
return null;

}
}

  
  My struts-config.xml file is in \web-inf\conf directory.
  My classes are in \web-inf\classes  directory.

  My struts configuration follows


  

  

  



  


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ActionForm and session

2002-03-22 Thread Sobkowski, Andrej

You can set the scope in your struts-config.xml:



Andrej

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 1:55 PM
To: [EMAIL PROTECTED]
Subject: ActionForm and session


Subject: ActionForm and session
From: "news serge" <[EMAIL PROTECTED]>
 ===
With Struts,

Is the ActionForm always in the session scope?
or can it be just in request

thanks



--
To unsubscribe, e-mail:

For additional commands, e-mail:




ActionForm and session

2002-03-22 Thread @Basebeans.com

Subject: ActionForm and session
From: "news serge" <[EMAIL PROTECTED]>
 ===
With Struts,

Is the ActionForm always in the session scope?
or can it be just in request

thanks



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to display a static file in a body tile

2002-03-22 Thread Cedric Dumoulin


   "perform an internal dispatch to the specified application
component (or external URL) and make the response data from that request available as a
bean of type String. " (extract from doc).

  So you need to write the bean once you have got it :
  

  Hope this help,
 Cedric

Manuel Riche wrote:

> Thanks for your response, but i allways have a problem.
> I work whith the tiles's tutorial :
>
> myPage.jsp =
>
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>
>
> 
>   
>   
>   
>   
>   
> 
>
> myBody.jsp =
>
> <%@ taglib uri="/WEB-INF/tiles.tld"   prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
> http://localhost:8080/anOtherApp/data/myFic.html";
> />
>
> the result is
>
> [ServletException in:/basic/myBody.jsp] Exception reading resource
> http://localhost:8080/anOtherApp/data/myFic.html: java.net.ConnectException:
> Connection refused: no further information'
>
> I put myFic.html in /tutorial/data and i modify myBody.jsp =
>
> <%@ taglib uri="/WEB-INF/tiles.tld"   prefix="tiles" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
>
> http://localhost:8080/tutorial/data/f_ntcd.html"; />
>
> i haven't error but the page isn't displayed
> i have the same result with
> 
>
> I don't understand why ?
>
> Cedric Dumoulin a écrit :
>
> >   You can use Struts  inside your body.
> >   If you want to use a value coming from a Tile attribute, do something like :
> >
> >   
> >   
> >
> >   Checks documentation for these tags for more :
> > http://jakarta.apache.org/struts/userGuide/struts-bean.html#include
> > http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html#useAttribute
> >
> >Hope this help,
> >
> >  Cedric
> >
> > Manuel Riche wrote:
> >
> > > I use the taglib tiles and i want display a static file (an html file
> > > with pictures)  with an absolute URL in a body's tile.
> > > Is it possible and how can i do that ?
> > >
> > > Thanks
> > >
> > > --
> > > To unsubscribe, e-mail:   
> > > For additional commands, e-mail: 
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




what is html:link equivelant

2002-03-22 Thread theron . kousek


This is tricker than I thought:

What is the equivelant of:

http://localhost:8080/express/billing.css"; rel="stylesheet">

using the html:link tag?

I see they have the style property and the styleClass property but I am not
sure exactly how they are used.

thanks for any insight...

thanks,
Theron


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE [2]: Form Question - Dynamic number of checkboxes - Multibox ?

2002-03-22 Thread Mattos, John

Okay, so now I have the following:


  

<%=sb.getProductName()%> 
 
 


 
   


and I have an int[] field on my bean called "assetId"

and it's telling me 

"You must specify the value attribute or nested tag content"

I thought that's what I was doing when I specified
value="<%=sb.getCheckBoxName()%>" in the multiBox.

the getcheckboxName, by the way, returns the assetId, so I hope to end
upwith an array of these things in the bean

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: RE: Form Question - Dynamic number of checkboxes


Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




"Mattos, John" <[EMAIL PROTECTED]> on 03/22/2002
11:13:16 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:


  
<%=sb.getProductName()%> 
  
  




the getCheckBoxName() comes from the database, and it correcponds to the
"Product" in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
To unsubscribe, e-mail:

For additional commands, e-mail:









--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Validating an ActionForm "conditionnally"

2002-03-22 Thread Sobkowski, Andrej

Thank you David, that was the problem... it now works just fine.

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:19 AM
To: Struts Users Mailing List
Subject: Re: Validating an ActionForm "conditionnally"


If you have a form nested like this, it probably
doesn't have the servlet reference set on it.

ServletContext application =
getServlet().getServletContext();

Otherwise what you are doing should be fine.

David

--- "Sobkowski, Andrej" <[EMAIL PROTECTED]>
wrote:
> Hello,
> 
> I've been using the Struts Validator (nightly build
> of November) with no
> problems for a few months (great work!).
> 
> Now I need to call the validation method of a
> specific "nested form" based
> on a condition:
> 
> ParentForm
> +useChild: boolean
> +getChildForm:ChildForm
> 
> If useChild returns true, I want to call the
> validate(mapping, request) of
> ChildForm (ie the nested form).
> 
> I thought that the validator only needed the
> "mapping.getAttribute()" (name
> of the ActionForm) to perform the validation so I
> tried with the following
> (ugly, I know):
> 
> if (parentForm.useChild()) {
>   ActionMapping newMap = new ActionMapping();
>   newMap.setAttribute("childForm"); 
>   ActionErrors errors =
> parentForm.getChildForm().validate(newMap,
> request);
> }
> 
> The configuration is extremely basic:
> - In struts-config.xml:
>  type="com.company.ChildForm"/>
> - In validation.xml:
>   
>   ...
>   
> 
> I'm getting a NullPointerException in the
> validator's code.
> 
> What am I doing wrong? Is this a good way to handle
> the problem (I doubt
> it...)? Any suggestions?
> 
> Thanks.
> 
> Andrej
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: Form Question - Dynamic number of checkboxes

2002-03-22 Thread Gaulin . David

Look at the multibox tag.  Add an attribute to your form called product (I
think it has to be an a String array) and when you read.  It will populate
the array with the product selected.

David



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:32 AM
To: Struts Users Mailing List
Subject: Re: Form Question - Dynamic number of checkboxes




why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




"Mattos, John" <[EMAIL PROTECTED]> on 03/22/2002
11:13:16 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:


  
<%=sb.getProductName()%> 
  
  




the getCheckBoxName() comes from the database, and it correcponds to the
"Product" in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
To unsubscribe, e-mail:

For additional commands, e-mail:









--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Form Question - Dynamic number of checkboxes

2002-03-22 Thread dhay



why don't you use indexed=true on the checkboxes and it will create indexed
names for them.  Have to use nightly build or new 1.1 beta.

Cheers,
Dave




"Mattos, John" <[EMAIL PROTECTED]> on 03/22/2002
11:13:16 AM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   "'[EMAIL PROTECTED]'"
  <[EMAIL PROTECTED]>
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  Form Question - Dynamic number of checkboxes



Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:


  
<%=sb.getProductName()%> 
  
  




the getCheckBoxName() comes from the database, and it correcponds to the
"Product" in this row, and it's dynamic.

Struts complains with the following error message

 No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN

Essentially, I'm trying to create the following
 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 








--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: front end madness?

2002-03-22 Thread Maturo, Larry

I personally use HTML Kit, with it's table extension.
It's free, easy to use, and HTML completion.  After I
get the format I want I then mung this with tags to 
replace the html items.  I, for one, would like to see
a better way to do this.

-- Larry Maturo
   [EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 5:44 PM
To: Struts Users Mailing List
Subject: front end madness?



We're converting our existing JFC/Swing application to use struts.We
have 3 developer's and have written alot of jsp's.   Our pages look quite a
bit different and it's time to start converging them to use a uniform
front-end look and feel.

Can others offer opinions as to how you're doing your front-end's?

- Are you using html generator's?If so, which are the best one's
- Or are you hand-typing in your html within your jsp's and using the
taglibs?

Currently, we're doing the latter and are checking into what
tiles/templates can offer but I was wondering how others are doing it?

thanks,
Theron


--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Re: [Re: how to dynamically change form in a tag]]

2002-03-22 Thread Gaulin . David

Maybe I am wrong here, but try


It is the quote causing the problem.  At least in my case (WebSphere 4.0).

Hope this helps

David

-Original Message-
From: Sudipta Sarkar [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 11:15 AM
To: Struts Users Mailing List
Subject: Re: [Re: [Re: how to dynamically change form in a tag]]


 No this also does not work.
"Nicolas De Loof" <[EMAIL PROTECTED]> wrote:
Does 
   "> 
work ?




The solution you said works.
but 
   "> does not work
although
   <% String id = (String)request.getParameter("id"); %>
   
  works.
Is there anything that I am doing wrong in case 1.

Thanks
Sudipta  




--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: how to dynamically change form in a tag

2002-03-22 Thread Bill Page

thanks.  worked like a charm, but I'm still curious as to why my second
attempt didn't work?

if

else




> -Original Message-
> From: Nicolas De Loof [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 22, 2002 3:03 AM
> To: Struts Users Mailing List
> Subject: Re: how to dynamically change form in a tag
> 
> 
> JSP Tags use an XML syntax, so you must have the same number 
> of opening and
> closing "html:form" jsp tags in your jsp. This is why your JSP engine
> failed.
> 
> acording to struts-form.tld, action attribute in html:form 
> tag can be JSP
> computed. Try this:
> 
> <%
> String actionPath;
> if( something) {
> actionPath =" /AccountMaint";
> }
> else {
> actionPath =" /CreateAccount";
> }
> %>
> 
> 
> 
> 
> ...
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to display a static file in a body tile

2002-03-22 Thread Manuel Riche

Thanks for your response, but i allways have a problem.
I work whith the tiles's tutorial :

myPage.jsp =

<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>


  
  
  
  
  


myBody.jsp =

<%@ taglib uri="/WEB-INF/tiles.tld"   prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

http://localhost:8080/anOtherApp/data/myFic.html";
/>

the result is

[ServletException in:/basic/myBody.jsp] Exception reading resource
http://localhost:8080/anOtherApp/data/myFic.html: java.net.ConnectException:
Connection refused: no further information'

I put myFic.html in /tutorial/data and i modify myBody.jsp =

<%@ taglib uri="/WEB-INF/tiles.tld"   prefix="tiles" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

http://localhost:8080/tutorial/data/f_ntcd.html"; />

i haven't error but the page isn't displayed
i have the same result with


I don't understand why ?

Cedric Dumoulin a écrit :

>   You can use Struts  inside your body.
>   If you want to use a value coming from a Tile attribute, do something like :
>
>   
>   
>
>   Checks documentation for these tags for more :
> http://jakarta.apache.org/struts/userGuide/struts-bean.html#include
> http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html#useAttribute
>
>Hope this help,
>
>  Cedric
>
> Manuel Riche wrote:
>
> > I use the taglib tiles and i want display a static file (an html file
> > with pictures)  with an absolute URL in a body's tile.
> > Is it possible and how can i do that ?
> >
> > Thanks
> >
> > --
> > To unsubscribe, e-mail:   
> > For additional commands, e-mail: 
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Validating an ActionForm "conditionnally"

2002-03-22 Thread David Winterfeldt

If you have a form nested like this, it probably
doesn't have the servlet reference set on it.

ServletContext application =
getServlet().getServletContext();

Otherwise what you are doing should be fine.

David

--- "Sobkowski, Andrej" <[EMAIL PROTECTED]>
wrote:
> Hello,
> 
> I've been using the Struts Validator (nightly build
> of November) with no
> problems for a few months (great work!).
> 
> Now I need to call the validation method of a
> specific "nested form" based
> on a condition:
> 
> ParentForm
> +useChild: boolean
> +getChildForm:ChildForm
> 
> If useChild returns true, I want to call the
> validate(mapping, request) of
> ChildForm (ie the nested form).
> 
> I thought that the validator only needed the
> "mapping.getAttribute()" (name
> of the ActionForm) to perform the validation so I
> tried with the following
> (ugly, I know):
> 
> if (parentForm.useChild()) {
>   ActionMapping newMap = new ActionMapping();
>   newMap.setAttribute("childForm"); 
>   ActionErrors errors =
> parentForm.getChildForm().validate(newMap,
> request);
> }
> 
> The configuration is extremely basic:
> - In struts-config.xml:
>  type="com.company.ChildForm"/>
> - In validation.xml:
>   
>   ...
>   
> 
> I'm getting a NullPointerException in the
> validator's code.
> 
> What am I doing wrong? Is this a good way to handle
> the problem (I doubt
> it...)? Any suggestions?
> 
> Thanks.
> 
> Andrej
> 


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Form Question - Dynamic number of checkboxes

2002-03-22 Thread Mattos, John

Hi there all

I'm generating a form that can have dynamic checkboxes depending on
information retrieved from my database. I basically retrieve a bunch or rows
and for each one, I want to create a checkbox.

Than, in the Action class handling the form submission, I plan to loop
through the checkboxes, and build an array of those that were selected, and
do something to them.

The problem is that I am tying to name the checkboxes for the ID of the
row... here is a JSP snippet:


  
<%=sb.getProductName()%> 
 
   




the getCheckBoxName() comes from the database, and it correcponds to the
"Product" in this row, and it's dynamic.

Struts complains with the following error message

No getter method for property 4363 of bean
org.apache.struts.taglib.html.BEAN 

Essentially, I'm trying to create the following
 and struts can't find get4363() in the
bean. No surprise there, I can't create getters for all the possibilities. I
just planned to loop through the submitted form fields to get the ids
checked.

Is there any way that Struts can not care that the setters don't exist?

Does this make sense?


John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Re: [Re: how to dynamically change form in a tag]]

2002-03-22 Thread Sudipta Sarkar

 No this also does not work.
"Nicolas De Loof" <[EMAIL PROTECTED]> wrote:
Does 
   "> 
work ?




The solution you said works.
but 
   "> does not work
although
   <% String id = (String)request.getParameter("id"); %>
   
  works.
Is there anything that I am doing wrong in case 1.

Thanks
Sudipta  




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Re: how to dynamically change form in a tag]

2002-03-22 Thread Jay sissom

The  tag and the <%= ... %> tags are server tags.  They get 
compiled into Java code that compiles on the server.  From what I've 
discovered, you can't nest these tags.  I'm sure someone will correct me 
if I'm wrong.  I have found that you can nest server tags within browser 
tags like this:



In tomcat, when a JSP is run, the compiled version and source code is put 
into a work directory.  When I run tomcat under jbuilder, the work 
directory is within my project.  If you find the source code for your 
example below, you'll see that the value "<%= request.getParameter... %>" 
is being put in the action property, not the evaluated version.

Again, this is from my poking around on tomcat.  I haven't read the 
servlet spec about this so I don't know for sure that this happens on all 
servlet containers.

To boil it all down, you can't nest server compiled tags.  That's why your 
solution doesn't work.

Jay

On Fri, 22 Mar 2002, Sudipta Sarkar wrote:

> The solution you said works.
> but 
>"> does not work
> although
><% String id = (String)request.getParameter("id"); %>
>
>   works.
> Is there anything that I am doing wrong in case 1.
> 
> Thanks
> Sudipta  
> 
> "Nicolas De Loof" <[EMAIL PROTECTED]> wrote:
> JSP Tags use an XML syntax, so you must have the same number of opening and
> closing "html:form" jsp tags in your jsp. This is why your JSP engine
> failed.
> 
> acording to struts-form.tld, action attribute in html:form tag can be JSP
> computed. Try this:
> 
> <%
> String actionPath;
> if( something) {
> actionPath =" /AccountMaint";
> }
> else {
> actionPath =" /CreateAccount";
> }
> %>
> 
> 
> 
> 
> ..
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Re: how to dynamically change form in a tag]

2002-03-22 Thread Nicolas De Loof

Does 
   "> 
work ?




The solution you said works.
but 
   "> does not work
although
   <% String id = (String)request.getParameter("id"); %>
   
  works.
Is there anything that I am doing wrong in case 1.

Thanks
Sudipta  




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Validating an ActionForm "conditionnally"

2002-03-22 Thread Sobkowski, Andrej

Hello,

I've been using the Struts Validator (nightly build of November) with no
problems for a few months (great work!).

Now I need to call the validation method of a specific "nested form" based
on a condition:

ParentForm
+useChild: boolean
+getChildForm:ChildForm

If useChild returns true, I want to call the validate(mapping, request) of
ChildForm (ie the nested form).

I thought that the validator only needed the "mapping.getAttribute()" (name
of the ActionForm) to perform the validation so I tried with the following
(ugly, I know):

if (parentForm.useChild()) {
ActionMapping newMap = new ActionMapping();
newMap.setAttribute("childForm"); 
ActionErrors errors = parentForm.getChildForm().validate(newMap,
request);
}

The configuration is extremely basic:
- In struts-config.xml:

- In validation.xml:
  
...
  

I'm getting a NullPointerException in the validator's code.

What am I doing wrong? Is this a good way to handle the problem (I doubt
it...)? Any suggestions?

Thanks.

Andrej



Re: [Re: how to dynamically change form in a tag]

2002-03-22 Thread Sudipta Sarkar

The solution you said works.
but 
   "> does not work
although
   <% String id = (String)request.getParameter("id"); %>
   
  works.
Is there anything that I am doing wrong in case 1.

Thanks
Sudipta  

"Nicolas De Loof" <[EMAIL PROTECTED]> wrote:
JSP Tags use an XML syntax, so you must have the same number of opening and
closing "html:form" jsp tags in your jsp. This is why your JSP engine
failed.

acording to struts-form.tld, action attribute in html:form tag can be JSP
computed. Try this:

<%
String actionPath;
if( something) {
actionPath =" /AccountMaint";
}
else {
actionPath =" /CreateAccount";
}
%>




..






--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: NewBie: How to implement Internationalization using Struts

2002-03-22 Thread Bharat Kundnani

refer the bean tag in the struts documentation, this would explain
internationalization.

-Original Message-
From: Vaddiyar, Raghuramudu [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 9:05 PM
To: Struts (E-mail)
Subject: NewBie: How to implement Internationalization using Struts


Hi All,

Can anybody explain me how to implement Internationalization 
using struts. Or cananybody tell me where i can find the documentation
for this...

thanks in advance..


Raghu
SIS

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




NewBie: How to implement Internationalization using Struts

2002-03-22 Thread Vaddiyar, Raghuramudu

Hi All,

Can anybody explain me how to implement Internationalization 
using struts. Or cananybody tell me where i can find the documentation
for this...

thanks in advance..


Raghu
SIS

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] prob with or tag

2002-03-22 Thread Slimane Zouggari

Hi,

thanks for your answer :)
Unfortunately, it still doesn't work the way I want it to. However I do 
have a more explicit error-message (see below).

So, when I do the following, it doesn't work:

1/
   
 Sélectionnez le type de requête
   
 
   
   

But when I do the following (however, I'm aware it's not the Struts way), 
it suddenly works:
2/
   
  Sélectionnez le type de requête
 
   
 ">
   
 
   

What am I missing ? :(

Friendly Regards,
Slimane

PS: here's the error-message throwed using the 1st piece of code:

javax.servlet.ServletException: Cannot find bean under name listTyp
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:631)
 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:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 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:201)
 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:2344)
 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.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 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:1011)
 at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
 at java.lang.Thread.run(Thread.java:484)
root cause
javax.servlet.jsp.JspException: Cannot find bean under name listTyp
 at 
org.apache.struts.taglib.html.OptionsTag.getIterator(OptionsTag.java:383)
 at 
org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:222)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:567)
 at org.apache.jasper.runtime.

RES: Error processing message properties file.

2002-03-22 Thread Gilson Nascimento D Elrei

What the message meaning ? The properties file or key doesn't found ?
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apache.struts.action.MESSAGE 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RES: Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Gilson Nascimento D Elrei

   Thanks for your suggestions. 
   I don't use  on my struts-config.xml cos
my aplicattion doesn't acess a database (is it obligatory ?). Also tried
Otavio's suggestion, about put all jars in WEB-INF/LIB directory but i
didn't get successfully.
   The worse thing is that I can't  continue my development cos I didn't
get execut it. :-(
   Any Ideas ?
   Thanks in advance.
   

> - Mensagem original -
> De:   Anant Sagar [SMTP:[EMAIL PROTECTED]]
> Enviada em:   terça-feira, 5 de março de 2002 10:41
> Para: Struts Users Mailing List
> Assunto:  Re: Newbie Question - Please Helpme (Cannot find
> ActionMapping or...) 
> 
> This usually happens due to improper setting of  Data Source Configuration
> (  ) in struts-config.xml file.
> Check whether driverClass ,url,user,password entered are correctly .
> Hope that may help you.
> 
> Sagar
> 
> 
> - Original Message -
> From: "Otavio C. Decio" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Friday, March 22, 2002 6:56 PM
> Subject: Re: Newbie Question - Please Helpme (Cannot find ActionMapping
> or...)
> 
> 
> > Just a suggestion, put all the jars that come with struts under your
> > web-inf\lib directory, including the commons*.
> >
> > Abracos
> >
> > Otavio
> >
> > - Original Message -
> > From: "Gilson Nascimento D Elrei" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> > Sent: Friday, March 22, 2002 8:16 AM
> > Subject: Newbie Question - Please Helpme (Cannot find ActionMapping
> or...)
> >
> >
 I'm receiving this error when I try to execute my
application (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
  javax.servlet.jsp.JspException: Cannot
find ActionMappings or ActionFormBeans collection 
I have verified my WEB.XML  and STRUTS-CONFIG.XML
files and I didn't find error. 
I think that STRUTS doesn't get to find the path for
STRUTS-CONFIG.XML.  <>  <> 
Below is my structure directory configuration.
HelpDev is my WEBAPP container for my application.
HELPDEV
 |
 +-JSP
 |  |
 |  .-- LoginView.JSP
<--  Main Program
 |  .-- MainMenu.JSP   
 |
 +-WEB-INF:.
|
+---LIB
| | 
|
.--structs.jar
|
.--xerces.jar
|
.--jaxp.jar  
|
.--parse.jar
|
+---CLASSES
| |
|
+---TEST
|
|
|
+--STRUTS
|
. LoginAction.class
|
. LoginBean.class
|
. LoginForm.class
|
. MessageResources.properties

.-- All Structs TLD Files
(*.TLD) 
.-- structs-config.xml
.-- web.xml

Below is content from WEB.XML and STRUTS-CONFIG.XML



http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

  
  
action

org.apache.struts.action.ActionServlet

  application

test.struts.MessageResources


  config

/WEB-INF/struts-config.xml


  debug
  2


  mapping

org.apache.struts.action.RequestActionMapping

2
  
  
  
action
*.do
   

RE: How to compare a notNull string with the nullString!

2002-03-22 Thread Jennings, Christofer J.

I came across this yesterday. Here's what I found. If a bean exists with a
null field, doing a logic:present on the field return true and comparing it
(e.g., using logic:equals) gets a NullPointerException.

If there is a custom tag to check for null values I'd love to know it.

I think this may be what Pitbull is after too, yes? Or do you really want to
campare with an empty string ""?

,boz

-Original Message-
From: Dimitar Stavrakov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 21, 2002 2:52 PM
To: 'Struts Users Mailing List'
Subject: RE: How to compare a notNull string with the nullString!


Try using the present tag ex:



Regards, 
Dimitar

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 9:25 AM
To: [EMAIL PROTECTED]
Subject: How to compare a notNull string with the nullString!

Subject: How to compare a notNull string with the nullString!
From: "PitBull" <[EMAIL PROTECTED]>
 ===
Hi all

i'ld like to compare

and it not work. I tried to use the tag
 but this logic command is for the
struts 1.1 and i did not find the 1.1 version libraries.
Can any one help me?

Thanx

TT





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:




PropertyUtils and NoClassDefFoundError WLS6.1, struts 1.0

2002-03-22 Thread Jouanny

Hello

I'm working on Weblogic 6.1 using Struts 1.0.

I'm making use of the method getPropertyDescriptor(Object object, String 
name_of_Field) of  the org/apache/struts/util/PropertyUtils class in order 
to get a java.beans.PropertyDescriptor.

This PropertyDescriptor is used in a class which implements Interface 
java.util.Comparator in order to sort a  java.util.ArrayList with 
Collections.sort(List aList, Comparator aComparator);

I get what is folowing :

Servlet failed with Exception
java.lang.NoClassDefFoundError: org/apache/struts/util/PropertyUtils

struts.jar, which contains the org/apache/struts/util/PropertyUtils class, 
is in Web-inf/lib.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Newbie] prob with or tag

2002-03-22 Thread Dave J Dandeneau

Make sure that you use the  taglib. Currently you are not
using it. It will get the bean for your page...


 Select request type
   
 
   


dave

-Original Message-
From: Slimane Zouggari [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:09 AM
To: [EMAIL PROTECTED]
Subject: [Newbie] prob with  or  tag


Hi,

I have a weird problem here (as always :).

I have the following code in my *.jsp file:
   
 Select request type
   
 
   
   

so,
 codtyp  is a property of
HandleProjectAddRequestAction
 projectaddrequestform   is a session bean (it's actually loaded

into the session, because I did the check before in the jsp page)
 listTyp is a collection (ArrayList) of 
beans (type is one of mine named ElementSimple)
 id and name are two properties of the class
ElementSimple

My session bean is well loaded.
My ArrayList does contain values.

So why do I have an error when I try to execute the preceding code ?

Thanks for having read me so far :)

Friendly Regards,
Slimane

FYI, here's the exception thrown:

javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.j
ava:378)
 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(JspServle
t.java:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatc
her.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDisp
atcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispat
cher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.jav
a:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestPr
ocessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:243)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:201)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:234
4)
 at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:164)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:566)
 at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
lve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.ja
va:564)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 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.ja
va:566)
 at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
72)
 at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
 at 
org.ap

[ANN] New ActionForm-to-Value Object (and back) mapper

2002-03-22 Thread Sobkowski, Andrej

Hello,

the new version of the Form-to-VO and VO-to-Form mapper is now available at 

http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp

It allows you to perform in ONE line of code the mapping between

ExampleForm 
+getLastName:String
+setLastName(String)
+getDateOfBirth:String
+setDateOfBirth(String)
+getYearsOfJavaExperience:String
+setYearsOfJavaExperience(String)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildForm
+setChild(ChildForm)
+getChildren:ChildForm[]
+setChildren(ChildForm[])

and

ExampleVO 
+getLastName:String
+setLastName(String)
+getDateOfBirth:Date
+setDateOfBirth(Date)
+getYearsOfJavaExperience:Integer
+setYearsOfJavaExperience(Integer)
+getEmailAddresses:String[]
+setEmailAddresses(String[])
+getChild:ChildVO
+setChild(ChildVO) 
+getChildren:ChildVO[]
+setChildren(ChildVO[])

by simply writing FormToVOMapper.map(exampleForm, new ExampleVO()) or
VOToFormMapper.map(exampleVO, new ExampleForm()).

New features/bug fixes:
- Date format is now configurable via System properties
- fixed support for nested elements
- added support for Boolean (any new type can be added in less than 2
minutes)

Future enhancements:
- support for primitive types
- support for nested Collections

Documentation is extensive both on the HTML page and in the code. JUnit
tests are provided with the distribution.

It's still a "0.9beta" release because I wanted to get the enhancements in
before the 1.0 but the code has been running with no problems in our project
for 4 months now.

Any feedback is appreciated :)

Andrej



Re: Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Anant Sagar

This usually happens due to improper setting of  Data Source Configuration
(  ) in struts-config.xml file.
Check whether driverClass ,url,user,password entered are correctly .
Hope that may help you.

Sagar


- Original Message -
From: "Otavio C. Decio" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 6:56 PM
Subject: Re: Newbie Question - Please Helpme (Cannot find ActionMapping
or...)


> Just a suggestion, put all the jars that come with struts under your
> web-inf\lib directory, including the commons*.
>
> Abracos
>
> Otavio
>
> - Original Message -
> From: "Gilson Nascimento D Elrei" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Friday, March 22, 2002 8:16 AM
> Subject: Newbie Question - Please Helpme (Cannot find ActionMapping or...)
>
>
> > > I'm receiving this error when I try to execute my application
> > > (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
> > >   javax.servlet.jsp.JspException: Cannot find ActionMappings
or
> > > ActionFormBeans collection
> > > I have verified my WEB.XML  and STRUTS-CONFIG.XML files and I didn't
> find
> > > error.
> > > I think that STRUTS doesn't get to find the path for
STRUTS-CONFIG.XML.
> > > <>  <>
> > > Below is my structure directory configuration.
> > > HelpDev is my WEBAPP container for my application.
> > > HELPDEV
> > >  |
> > >  +-JSP
> > >  |  |
> > >  |  .-- LoginView.JSP   <--  Main Program
> > >  |  .-- MainMenu.JSP
> > >  |
> > >  +-WEB-INF:.
> > > |
> > > +---LIB
> > > | |
> > > | .--structs.jar
> > > | .--xerces.jar
> > > | .--jaxp.jar
> > > | .--parse.jar
> > > |
> > > +---CLASSES
> > > | |
> > > | +---TEST
> > > |   |
> > > |
> > > +--STRUTS
> > > |
> > > . LoginAction.class
> > > |
> > > . LoginBean.class
> > > |
> > > . LoginForm.class
> > > |
> > > . MessageResources.properties
> > >
> > > .-- All Structs TLD Files (*.TLD)
> > > .-- structs-config.xml
> > > .-- web.xml
> > >
> > > Below is content from WEB.XML and STRUTS-CONFIG.XML
> > > 
> > >
> > > 
> > >  > >   SYSTEM
> > >   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > > 
> > >   
> > >   
> > > action
> > >
> org.apache.struts.action.ActionServlet
> > > 
> > >   application
> > >   test.struts.MessageResources
> > > 
> > > 
> > >   config
> > >   /WEB-INF/struts-config.xml
> > > 
> > > 
> > >   debug
> > >   2
> > > 
> > > 
> > >   mapping
> > >
> > >
org.apache.struts.action.RequestActionMapping
> > > 
> > > 2
> > >   
> > >   
> > >   
> > > action
> > > *.do
> > >   
> > >
> > >   
> > >   
> > > /WEB-INF/struts-bean.tld
> > > /WEB-INF/struts-bean.tld
> > >   
> > >
> > >   
> > > /WEB-INF/struts-html.tld
> > > /WEB-INF/struts-html.tld
> > >   
> > >
> > >   
> > > /WEB-INF/struts-logic.tld
> > > /WEB-INF/struts-logic.tld
> > >   
> > >
> > >   
> > > /WEB-INF/struts-template.tld
> > > /WEB-INF/struts-template.tld
> > >   
> > > 
> > > 
> > > 
> > > 
> > >  > >
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> > > 
> > >
> > >
> > > 
> > >
> > > 
> > >
> > >
> > >
> > >
> > >> >path="/login"
> > >type="test.struts.LoginAction"
> > >name="login"
> > >input="/jsp/LoginView.jsp"
> > >validate="true">
> > >
> > >
> > >   
> > >
> > > 
> > > 
> > > I have tried encounter any solution on web but i didn't success.
> > > Any suggestion ?
> > > thanks in advance.
> > >
> > >
> >
>
>
> --
--
> 
>
>
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Otavio C. Decio

Just a suggestion, put all the jars that come with struts under your
web-inf\lib directory, including the commons*.

Abracos

Otavio

- Original Message -
From: "Gilson Nascimento D Elrei" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, March 22, 2002 8:16 AM
Subject: Newbie Question - Please Helpme (Cannot find ActionMapping or...)


> > I'm receiving this error when I try to execute my application
> > (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
> >   javax.servlet.jsp.JspException: Cannot find ActionMappings or
> > ActionFormBeans collection
> > I have verified my WEB.XML  and STRUTS-CONFIG.XML files and I didn't
find
> > error.
> > I think that STRUTS doesn't get to find the path for STRUTS-CONFIG.XML.
> > <>  <>
> > Below is my structure directory configuration.
> > HelpDev is my WEBAPP container for my application.
> > HELPDEV
> >  |
> >  +-JSP
> >  |  |
> >  |  .-- LoginView.JSP   <--  Main Program
> >  |  .-- MainMenu.JSP
> >  |
> >  +-WEB-INF:.
> > |
> > +---LIB
> > | |
> > | .--structs.jar
> > | .--xerces.jar
> > | .--jaxp.jar
> > | .--parse.jar
> > |
> > +---CLASSES
> > | |
> > | +---TEST
> > |   |
> > |
> > +--STRUTS
> > |
> > . LoginAction.class
> > |
> > . LoginBean.class
> > |
> > . LoginForm.class
> > |
> > . MessageResources.properties
> >
> > .-- All Structs TLD Files (*.TLD)
> > .-- structs-config.xml
> > .-- web.xml
> >
> > Below is content from WEB.XML and STRUTS-CONFIG.XML
> > 
> >
> > 
> >  >   SYSTEM
> >   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > 
> >   
> >   
> > action
> >
org.apache.struts.action.ActionServlet
> > 
> >   application
> >   test.struts.MessageResources
> > 
> > 
> >   config
> >   /WEB-INF/struts-config.xml
> > 
> > 
> >   debug
> >   2
> > 
> > 
> >   mapping
> >
> > org.apache.struts.action.RequestActionMapping
> > 
> > 2
> >   
> >   
> >   
> > action
> > *.do
> >   
> >
> >   
> >   
> > /WEB-INF/struts-bean.tld
> > /WEB-INF/struts-bean.tld
> >   
> >
> >   
> > /WEB-INF/struts-html.tld
> > /WEB-INF/struts-html.tld
> >   
> >
> >   
> > /WEB-INF/struts-logic.tld
> > /WEB-INF/struts-logic.tld
> >   
> >
> >   
> > /WEB-INF/struts-template.tld
> > /WEB-INF/struts-template.tld
> >   
> > 
> > 
> > 
> > 
> >  >   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> > 
> >
> >
> > 
> >
> > 
> >
> >
> >
> >
> >>path="/login"
> >type="test.struts.LoginAction"
> >name="login"
> >input="/jsp/LoginView.jsp"
> >validate="true">
> >
> >
> >   
> >
> > 
> > 
> > I have tried encounter any solution on web but i didn't success.
> > Any suggestion ?
> > thanks in advance.
> >
> >
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Application without cookies and sessions

2002-03-22 Thread Ted Husted

The intent of the Struts Example is not to demonstrate best practices,
but to demonstrate how to do several things that developers commonly
want to do. One thing that many developers like to do is store objects
in the session context, and so the example demonstrates how this can be
done. Of course, there are many ways to do most anything, and Struts is
designed so that it can support just about any scheme you choose.

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Enrique Rodriguez wrote:
> 
> Hi all,
> 
> I'm very newbie with struts and java. I'm developing an application anf I
> don't like to use cookies or session objects.
> 
> Focusing in the struts example, the user is in the session. Why not set this
> object in the request parameter in all the actions and jsps??
> 
> ActionClass
> //Code
> request.setParameter("user", user);
> //more code
> 
> Jsp
> //Code
> <%
> pageContext.setParameter("user", user);
> %>
> //more code
> 
> Is this a good practice??
> 
> Is there another ways to do it??
> 
> Regards, Enrique.
> 
> _
> Enrique Rodriguez Lasterra
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Newbie Question - Please Helpme (Cannot find ActionMapping or...)

2002-03-22 Thread Gilson Nascimento D Elrei

> I'm receiving this error when I try to execute my application
> (http://localhost:8100/helpdev/jsp/LoginView.jsp) on JRUN.
>   javax.servlet.jsp.JspException: Cannot find ActionMappings or
> ActionFormBeans collection 
> I have verified my WEB.XML  and STRUTS-CONFIG.XML files and I didn't find
> error. 
> I think that STRUTS doesn't get to find the path for STRUTS-CONFIG.XML.  
> <>  <> 
> Below is my structure directory configuration.
> HelpDev is my WEBAPP container for my application.
> HELPDEV
>  |
>  +-JSP
>  |  |
>  |  .-- LoginView.JSP   <--  Main Program
>  |  .-- MainMenu.JSP   
>  |
>  +-WEB-INF:.
> |
> +---LIB
> | | 
> | .--structs.jar
> | .--xerces.jar
> | .--jaxp.jar  
> | .--parse.jar
> |
> +---CLASSES
> | |
> | +---TEST
> |   |
> |
> +--STRUTS
> |
> . LoginAction.class
> |
> . LoginBean.class
> |
> . LoginForm.class
> |
> . MessageResources.properties
> 
> .-- All Structs TLD Files (*.TLD) 
> .-- structs-config.xml
> .-- web.xml
> 
> Below is content from WEB.XML and STRUTS-CONFIG.XML
> 
> 
> 
>SYSTEM
>   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> 
>   
>   
> action
> org.apache.struts.action.ActionServlet
> 
>   application
>   test.struts.MessageResources
> 
> 
>   config
>   /WEB-INF/struts-config.xml
> 
> 
>   debug
>   2
> 
> 
>   mapping
>  
> org.apache.struts.action.RequestActionMapping
> 
> 2
>   
>   
>   
> action
> *.do
>   
> 
>   
>   
> /WEB-INF/struts-bean.tld
> /WEB-INF/struts-bean.tld
>   
> 
>   
> /WEB-INF/struts-html.tld
> /WEB-INF/struts-html.tld
>   
> 
>   
> /WEB-INF/struts-logic.tld
> /WEB-INF/struts-logic.tld
>   
> 
>   
> /WEB-INF/struts-template.tld
> /WEB-INF/struts-template.tld
>   
> 
> 
> 
> 
>"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
> 
>
>
>
>
> 
>
>
>
>
>   path="/login"
>type="test.struts.LoginAction" 
>name="login"
>input="/jsp/LoginView.jsp"
>validate="true">
>
>
>   
>
> 
> 
> I have tried encounter any solution on web but i didn't success.
> Any suggestion ?
> thanks in advance.
> 
>  



LoginAction.java
Description: Binary data


LoginView.jsp
Description: Binary data

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: Web application with my own authentication process

2002-03-22 Thread Ted Husted

Typically, people will place an object in the session that indicates
that the user is logged in. You can then either subclass the
ActionServlet to check each incoming request for that session object. If
it is absent, you redirect them to a logon page. More often, people
create a base Action that does the same thing. This makes it easier to
have authenticated and unauthenticated requestd, depending on whether
they extend the authenticated Action or not. The simplest thing is to
have create your own doPerform(...) method, and have the developers
extend that instead of process. Perform then calls doPerform

perform
// Obtain logon
Bean account = request.getSession().getAttribute(LOGON_KEY);
if (account==null)
return mapping.findForward(LOGON_FORWARD);
return doPerform( ...


Also, please do not cross-post questions like this to the DEV list.

http://www.tuxedo.org/~esr/faqs/smart-questions.html

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Fabien Lesire wrote:
> 
> Hi,
> 
> I want use Struts to develop some web application but i would like used
> Smartcard/Certificate Authentication Web Controller from my previous Web
> Application (developed in my company).
> 
> How can i do this ?
> 
> thanks
> 
> ---
> 
> Lesire Fabien
> JAVA developement
> [EMAIL PROTECTED]
> IsaSoftware SA
> 13/15 Bd de l'Impératrice
> B - 1000 Bruxelles
> Web : www.isabel.be

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tiles & sub-applications?

2002-03-22 Thread Ian Tomey


ok, cheers Cedric.

Please make sure that sub applications can access master definitions/actions as well, 
as sub applications accessing say a page definition in the root/default app would be 
very useful.

I have put an enhancement request in for 1.1 b1 to modify the html:form and html:link 
tags to check for a "//sub_app_name/actionorpage" (just a proposal) type format to 
access actions/pages outside the current sub application. Something along these lines 
in tiles would be very useful, as the main look and feel of the app could be defined 
by the default app, with the sub apps inheriting the page layout without having to 
duplicate the definition in each sub app.

cheers
ian



>>> [EMAIL PROTECTED] 03/22/02 09:26am >>>

  Hello,

  Tiles doesn't support sub applications yet, as defined in struts1.1.
  Actually, there is only one definition factory for all sub application. However, it 
is already possible to have several definitions files, but definitions should have 
different names.

  I will provide sub application support, as well as struts plugin asap (hope in less 
than 2 weeks)

Cedric

Ian Tomey wrote:

> Hi all,
>
> been reading about tiles in struts 1.1-b1 and just wondering if it supports sub 
>applications when using definitions? we would need it to support a number of 
>definitons files , one for each sub application
>
> Cheers
> Ian
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




HOWTO: Lessons learned from using Struts, Tomcat and Oracle

2002-03-22 Thread Ted Husted

 Original Message 
Subject: Lessons learned from using Struts, Tomcat and Oracle
Date: Thu, 21 Mar 2002 19:43:22 -0800 (PST)
From: "Walter S. So" <[EMAIL PROTECTED]>

Hi Ted,

I just want to share this information in case someone else also
goes through the same problems I did.  I was able to come up
with this solution after spending an entire afternoon searching
through the net and archives, so if it saves people a few hours
of debugging, I'll be happy.  I am not sure how to categorize it
or even which mailing list to send this, whether it should go to
Tomcat, Struts, or Tyrex, so I decided to send it to you since
you are active in Jakarta.

My goal was to set up a Connection Pooled DataSource using
Oracle running Struts on Tomcat.  I use Tomcat 4.0.3, Struts
1.1-b1-lib, Oracle 8.1.7 "classes12.zip" running on Windows 98,
but it should work well on Solaris/Linux.

Initially, I set up the Oracle JDBC drivers under my webapp and
used the  in struts-config.xml to access Oracle.  My
application consistently hung after the pool was exhausted. 
(For example, if I set the minCount and maxCount to "10", my
webapp would hang after 10 requests)  The problem of Oracle
connections not being returned properly by the Struts pool was
well documented in the mailing list, so I switched the
datasource from struts-config.xml to tomcat's server.xml.  I
followed the instructions in the Tomcat jndi-resources-howto and
copied the Oracle drivers to common/lib after renaming the
"classes12.zip" to "classes12.jar" as suggested by the mailing
list.

I found my webapp wasn't running properly as the servlet would
stop executing after context.lookup().  This bothered me because
Tomcat was not throwing any exceptions. After some more
research, I changed the debug level in server.xml from "0" to
"99".  This time, the log generated showed a
java.lang.ClassCastException: tyrex.jdbc.xa.EnabledDataSource
when the lookup() is called.  A post in the tomcat-dev mailing
list provided the answer:  There was a conflict in the jars of
tomcat and the webapp.  True enough, I found a
jdbc2_0-stdext.jar (83KB) that came in tomcat\common\lib, and a
jdbc2_0-stdext.jar (7KB) that i had unpacked from Struts to my
web-app.  After deleting the 7KB jar, the lookup() executed
properly.

To sum up, when using a DataSource in Tomcat and Struts in the
webapp, make sure to remove the extraneous jdbc2_0-stdext.jar
that comes with the Struts Lib. :)

Hope that helps,

Walter


__
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: logic iterate tag

2002-03-22 Thread Ted Husted

You can nest the iterate tag if you like. 

>  scope="request"/>
> 
> <%-- this is where I'm lost. --%>


> 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


[EMAIL PROTECTED] wrote:
> 
> Hi,
> 
> I'm having some difficulty with the iteration tag in the logic tag lib.
> It's very straight-forward when you are using your own concrete classes(w/
> getters and setters for each property), but I can't seem to figure out a way
> to get it working with utility classes.
> 
> What I'm trying to do is iterate over a Vector filled with Hashtable
> objects.  It seem pretty simple, but I can't seem to get the nested
> iteration working working with the hashtable.
> 
>  scope="request"/>
> 
> // this is where I'm lost.
> 
> 
> I'm not sure what's suppose to happen within the parent iteration tag.  In
> the docs, they use the following example to iterate over a hashtable:
> 
> 
> Next element is 
> 
> 
> Do I need to define a new hashtable bean for every iteration of the Vector?
> If so, how do I set the bean to be the object in the current iteration of
> the vector?
> 
> Does anyone have an example?
> 
> Thanks in advance.
> Eric.
> 
> **
> This message, including any attachments, contains confidential information intended 
>for a specific individual and purpose, and is protected by law.  If you are not the 
>intended recipient, please contact sender immediately by reply e-mail and destroy all 
>copies.  You are hereby notified that any disclosure, copying, or distribution of 
>this message, or the taking of any action based on it, is strictly prohibited.
> TIAA-CREF
> **
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Keep a session in different war

2002-03-22 Thread Ted Husted

It's not permitted. Each web application has its own session for
security reasons. The options are 

* URI's
* Cookies,
* Or a shared database

One popular approach is to use cookies to create a common autologin
procedure that the applications share. Tomcat supports this, and I
believe Expresso is floating a proposal regarding a common convention we
call can use.

http://jcorporate.com

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

Laurent Goncalves wrote:
> 
> Hi,
> 
> I'm currently using Weblogic 5.1 SP8 with struts 1.0.2 and when I use an
> actionMapping to forward to another Web App, a new session is created into
> the second Web-app.
> How can I do to keep the same session ?
> 
> Thanks,
> 
> Laurent
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Detect stop in Action

2002-03-22 Thread Ted Husted

The Action is a servlet-delegate, and so anythinng you can detect in a
servlet you can detect in an Action. You might ask about detecting stop
in a servlet on jGuru or The ServerSide (and report back :o).

http://jguru.com/forums/Servlets

http://www.theserverside.com/home/index.jsp

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


Jens Kühnberger wrote:
> 
> Is it possible to detect in an Action, if the user pressed the stop
> button of the browser?
> 
> Jens
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 'dynamic' form elements in a ActionForm

2002-03-22 Thread Ted Husted

It's difficult to do this in the 1.0.x release, but simple as pie in the
1.1 beta and nightly build. 

http://jguru.com/forums/view.jsp?EID=567079

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


"Struts Newsgroup (@Basebeans.com)" wrote:
> 
> Subject: 'dynamic' form elements in a ActionForm
> From: "Greg Tillbrook" <[EMAIL PROTECTED]>
>  ===
> Hi
> 
> Ive been tryig to use an ActionForm bean for a form which can have a
> variable number of form elements (as defined by a 'meta' configuration
> file). Ive hit on the problem though that each parameter in a form bean
> matched to a form element has to declared when implementing the bean. Is it
> possible to specify a list (i.e. vector or hashtable) in the form bean that
> will contain all of these 'dynamic' parameters or is there a better way?
> 
> I have looked at the documentation/web/this newsgroup but have found nothing
> that seemed appropriate.
> Apologies if Ive missed something obvious but Im pretty new to struts atm.
> 
> cheers
> 
> Greg
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: a NEWBIE question: Cannot Resolve Symbol

2002-03-22 Thread Ted Husted

Gilson Nascimento D Elrei wrote:
> Question 1
> I'm receiving this error when I try to compile my bean source code
> (LoginBean.java).
> "Cannot Resolve Symbol" - Probably JSDK didn't find the struts.jar to
> complete compilation.
> I tried to upload struts.jar in <%JSDK_HOME%>/LIB and updated my CLASSPATH,
> but i continue to getting the same error.

If you are using Ant, the best thing is to have it add the struts.jar in
your webapps lib to the patch. 









> Question 2
> Once that i have compiled LoginBean.java...
> How to do to compile a servlet that use this the Bean Class previously
> created ?
> I can't simply instance in my servlet program, cos I get the error "Cannot
> Resolve..." again - What I need for my servlet to find my LoginBean.class
> and compile it ? I need to save my LoginBean.class in CLASSPATH too ?
> 
> Thanks in Advance.

Struts is designed to use its own ActionServlet. You instead write
Action classes to do what is usually done in standalone servlets. The
Actions are servlet-delegates. The servlet calls the perform method on
each Action, and passes it the bean specified in the struts
configuration. 

A re-reading of the Struts User Guide from the beginning might help
bring things into focus for you. Be sure to review the list of
pre-requesite materials at the top of the introduction. 

http://jakarta.apache.org/struts/doc-1.0.2/userGuide/introduction.html

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Application without cookies and sessions

2002-03-22 Thread Nicolas De Loof

You can configure the session time-out on your servlet container. (refer to
it's documentation). I currently use 30 minutes for web administration
application.

When the time-out occurs, the session collection and it's included objects
are destroyed.

If you configure a very high time-out, be carreful that the memory used by
the session has to be released when the user quits, using a Disconnect URL
that invalidates the session (see javax.servlet.http.HTTPSession javadoc).

There is a mecanism to make the session being persistant: The session
objects and ID are store to a database. This is called "persistant session
management". I've never used it, but perhaps you're interested ?



> Hi Nicolas,
>
> First of all, thank you very much for your response.
>
> What about the session timeout??? I don't like websites that if you left
it
> for ten minutes you have to login again.
>
> Is there any way to do a site without take care of session timeouts??
>
> Regards, and pardon for my english.
>
> Enrique.
>
> _
> Enrique Rodriguez Lasterra
>
>
> > De: Nicolas De Loof
> >
> >
> > Don't panic about session and cookies !
> >
> > Session are used to maintain state in your application between 2 request
> > from user : HTTP is a non connected protocol, so you cannot know
> > where your
> > user comes from where you perform a request.
> >
> > Session is just a Collection of objects in memory associated whith an id
> > that servlet container maintain for you. User browser whith cookies
> > activated receives a cookie with this id so that the container is able
to
> > link future request to the session collection associated with the user.
> > Without cookies, URL are expanded to add the id as a parameter of
> > requests.
> >
> > If you put objets in the request scope, after the JSP has
> > produced the HTML
> > page the objects are destroyed ! Your user objet that MUST be retrieved
in
> > other requests MUST be in the stored session scope.
> >
> > > Hi all,
> > >
> > > I'm very newbie with struts and java. I'm developing an
> > application anf I
> > > don't like to use cookies or session objects.
> > >
> > > Focusing in the struts example, the user is in the session. Why not
set
> > this
> > > object in the request parameter in all the actions and jsps??
> > >
> > > ActionClass
> > > //Code
> > > request.setParameter("user", user);
> > > //more code
> > >
> > > Jsp
> > > //Code
> > > <%
> > > pageContext.setParameter("user", user);
> > > %>
> > > //more code
> > >
> > >
> > > Is this a good practice??
> > >
> > > Is there another ways to do it??
> > >
> > > Regards, Enrique.
> > >
> > >
> > > _
> > > Enrique Rodriguez Lasterra
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > 
> > > For additional commands, e-mail:
> > 
> >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




WAS 401/OS390 Deployment Problems - Servlet/JSPs not found

2002-03-22 Thread Andre Kreich

Hi there,

we've got a problem Deploying Struts on WebSphere 401 running on OS390. The
ActionServlet seems to be initialized correctly, though it parses the
struts-config.xml and calls actionMapping().

The Problem is, that we can access neither servlets nor JSPs, but simple
HTML-Pages. Attached is an extract from the server-log and the DDs.

TIA, Andre Kreich

(See attached file: StrutsMailingListePostWebSphereLogExtract.txt)(See attached
file: struts-config.xml)(See attached file: web.xml)(See attached file:
ibm-web-ext.xmi)(See attached file: ibm-web-bnd.xmi)
--
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.



StrutsMailingListePostWebSphereLogExtract.txt
Description: Text - character set unknown


struts-config.xml
Description: Binary data


web.xml
Description: Binary data


ibm-web-ext.xmi
Description: Binary data


ibm-web-bnd.xmi
Description: Binary data

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


RE: Application without cookies and sessions

2002-03-22 Thread Enrique Rodriguez

Hi Nicolas,

First of all, thank you very much for your response.

What about the session timeout??? I don't like websites that if you left it
for ten minutes you have to login again.

Is there any way to do a site without take care of session timeouts??

Regards, and pardon for my english.

Enrique.

_
Enrique Rodriguez Lasterra


> De: Nicolas De Loof
>
>
> Don't panic about session and cookies !
>
> Session are used to maintain state in your application between 2 request
> from user : HTTP is a non connected protocol, so you cannot know
> where your
> user comes from where you perform a request.
>
> Session is just a Collection of objects in memory associated whith an id
> that servlet container maintain for you. User browser whith cookies
> activated receives a cookie with this id so that the container is able to
> link future request to the session collection associated with the user.
> Without cookies, URL are expanded to add the id as a parameter of
> requests.
>
> If you put objets in the request scope, after the JSP has
> produced the HTML
> page the objects are destroyed ! Your user objet that MUST be retrieved in
> other requests MUST be in the stored session scope.
>
> > Hi all,
> >
> > I'm very newbie with struts and java. I'm developing an
> application anf I
> > don't like to use cookies or session objects.
> >
> > Focusing in the struts example, the user is in the session. Why not set
> this
> > object in the request parameter in all the actions and jsps??
> >
> > ActionClass
> > //Code
> > request.setParameter("user", user);
> > //more code
> >
> > Jsp
> > //Code
> > <%
> > pageContext.setParameter("user", user);
> > %>
> > //more code
> >
> >
> > Is this a good practice??
> >
> > Is there another ways to do it??
> >
> > Regards, Enrique.
> >
> >
> > _
> > Enrique Rodriguez Lasterra
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: 1 tile <-> 1 controller

2002-03-22 Thread Cedric Dumoulin


  Hello,

  Tiles support controller for each individual Tile.
  This controller's role is to prepare data to be rendered by the tile.
  Syntax is as follow :

 
  ..
  or

 

  You can find an example of use in tiles-doc.war or struts-tiles.war :

   *   /examples/rssChannels.jsp
   *   / test/testController.jsp

  More documentation is needed ;-(

  Cedric

Jon Ferguson wrote:

> Hey guys,
>
> I read in the tiles doc that you can associate a controller with each tile.
> However, I cannot find an example of how this is done.
>
> Any pointers?
>
> Thanks in advance,
> Jon
>
>   
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Tiles & sub-applications?

2002-03-22 Thread Cedric Dumoulin


  Hello,

  Tiles doesn't support sub applications yet, as defined in struts1.1.
  Actually, there is only one definition factory for all sub application. However, it 
is already possible to have several definitions files, but definitions should have 
different names.

  I will provide sub application support, as well as struts plugin asap (hope in less 
than 2 weeks)

Cedric

Ian Tomey wrote:

> Hi all,
>
> been reading about tiles in struts 1.1-b1 and just wondering if it supports sub 
>applications when using definitions? we would need it to support a number of 
>definitons files , one for each sub application
>
> Cheers
> Ian
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to display a static file in a body tile

2002-03-22 Thread Cedric Dumoulin


  You can use Struts  inside your body.
  If you want to use a value coming from a Tile attribute, do something like :

  
  

  Checks documentation for these tags for more :
http://jakarta.apache.org/struts/userGuide/struts-bean.html#include
http://www.lifl.fr/~dumoulin/tiles/doc/tilesTags.html#useAttribute

   Hope this help,

 Cedric

Manuel Riche wrote:

> I use the taglib tiles and i want display a static file (an html file
> with pictures)  with an absolute URL in a body's tile.
> Is it possible and how can i do that ?
>
> Thanks
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




[Newbie] prob with or tag

2002-03-22 Thread Slimane Zouggari

Hi,

I have a weird problem here (as always :).

I have the following code in my *.jsp file:
   
 Select request type
   
 
   
   

so,
 codtyp  is a property of HandleProjectAddRequestAction
 projectaddrequestform   is a session bean (it's actually loaded 
into the session, because I did the check before in the jsp page)
 listTyp is a collection (ArrayList) of 
beans (type is one of mine named ElementSimple)
 id and name are two properties of the class ElementSimple

My session bean is well loaded.
My ArrayList does contain values.

So why do I have an error when I try to execute the preceding code ?

Thanks for having read me so far :)

Friendly Regards,
Slimane

FYI, here's the exception thrown:

javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
 at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
 at 
org.apache.jsp.ProjectAddRequest$jsp._jspService(ProjectAddRequest$jsp.java:378)
 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:202)
 at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
 at 
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:431)
 at 
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:355)
 at 
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:970)
 at 
org.apache.struts.action.RequestProcessor.processActionForward(RequestProcessor.java:404)
 at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:269)
 at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1099)
 at 
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:450)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
 at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
 at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
 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:201)
 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:2344)
 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.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
 at 
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
 at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
 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:1011)
 at 
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
 at java.lang.Thread.run(Thread.java:484)
root cause
javax.servlet.jsp.JspException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN
 at 
org.apache.struts.taglib.html.Sel

Problem with logic:equal and logic:notEqual tags both evaluating to true

2002-03-22 Thread $B%"%s%H%K!<(B $B%9%F%$%9(B

Hi

I have the following code



I am logic:equal


I am logic:notEqual



For some reason it is printing out both

"I am logic:notEqual"

and

"I am logic:equal"

Am I missing the point about the "logic:equal" and "logic:notEqual" tags, or
is there a reason this might be happening?




Cheers

Tony





_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Application without cookies and sessions

2002-03-22 Thread Nicolas De Loof

Don't panic about session and cookies !

Session are used to maintain state in your application between 2 request
from user : HTTP is a non connected protocol, so you cannot know where your
user comes from where you perform a request.

Session is just a Collection of objects in memory associated whith an id
that servlet container maintain for you. User browser whith cookies
activated receives a cookie with this id so that the container is able to
link future request to the session collection associated with the user.
Without cookies, URL are expanded to add the id as a parameter of requests.

If you put objets in the request scope, after the JSP has produced the HTML
page the objects are destroyed ! Your user objet that MUST be retrieved in
other requests MUST be in the stored session scope.

> Hi all,
>
> I'm very newbie with struts and java. I'm developing an application anf I
> don't like to use cookies or session objects.
>
> Focusing in the struts example, the user is in the session. Why not set
this
> object in the request parameter in all the actions and jsps??
>
> ActionClass
> //Code
> request.setParameter("user", user);
> //more code
>
> Jsp
> //Code
> <%
> pageContext.setParameter("user", user);
> %>
> //more code
>
>
> Is this a good practice??
>
> Is there another ways to do it??
>
> Regards, Enrique.
>
>
> _
> Enrique Rodriguez Lasterra
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: