{Maybe OT} Ajax with struts

2006-04-10 Thread vijay r
Hello,

I used AJAX to fill details for a corrosponding selected value listed in a
combo box. So for a particular registration number, the details of the
vehicle are filled.

On the onchange() event of the combo box, I am calling a JavaScript function
which creates a XmlHttpRequest with the url = "RegDetails.do?action=populate"
where action is a DispatchAction parameter. I am working in Websphere
Application Developer Studio and its working great in it. But when I deploy
the application in Websphere AS 5.0, the AJAX stuff does not work.

Pre-population of the jsp form works great (which is also based on
DispatchAction - I give
http://localhost:9080/dpims/RegDetails.do?action=populate). Only the AJAX
stuff does not work. I get the following error

[4/11/06 12:07:14:250 IST] 5fbb0406 DispatchActio E
org.apache.struts.actions.DispatchAction  Request[/RegDetails] does not
contain handler parameter named action

I am not able to figure out the problem.

regards,
vijay.


variable in one tile to another

2006-04-10 Thread Raghuveer
Is there a facility to get a variable in one tile from another tile in
Struts Tiles


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



Error reading tld listeners

2006-04-10 Thread Anuradha Vaidya
Hi 

 

I am using Tomcat/5.5.12 and java version "1.4.2_10" and am receiving
errors: the description follows...

 

SEVERE: Error reading tld listeners javax.servlet.ServletException:
Exception processing TLD at resource path /WEB-INF/s

n context /mycontext

 

 javax.servlet.ServletException: Exception processing TLD at resource
path /WEB-INF/struts-logic.tld in context /mycontext  

 at
org.apache.catalina.startup.TldConfig.tldScanTld(TldConfig.java:547)

at
org.apache.catalina.startup.TldConfig.execute(TldConfig.java:300)

at
org.apache.catalina.core.StandardContext.processTlds(StandardContext.jav
a:4216)

at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4072
)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)

at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)

at
org.apache.catalina.core.StandardService.start(StandardService.java:450)

at
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)

at org.apache.catalina.startup.Catalina.start(Catalina.java:536)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)

at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

 

It seems to work by getting rid of the DOCTYPE declaration and using the
new taglib start 

 

http://java.sun.com/xml/ns/j2ee"; 

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 

  

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_
0.xsd" 

 

  version="2.0">

 

but I cant replace all the tld's, besides the current set of tld's are
working fine for a colleague with similar environment. 

 

Please answer whatever you may think might be the best solution and if
someone is sure request you to send a reply asap...

 

 

Thanks

Anu

 

MASTEK 
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCOMASTEK

~~
Opinions expressed in this e-mail are those of the individual and not that of 
Mastek Limited, unless specifically indicated to that effect. Mastek Limited 
does not accept any responsibility or liability for it. This e-mail and 
attachments (if any) transmitted with it are confidential and/or privileged and 
solely for the use of the intended person or entity to which it is addressed. 
Any review, re-transmission, dissemination or other use of or taking of any 
action in reliance upon this information by persons or entities other than the 
intended recipient is prohibited. This e-mail and its attachments have been 
scanned for the presence of computer viruses. It is the responsibility of the 
recipient to run the virus check on e-mails and attachments before opening 
them. If you have received this e-mail in error, kindly delete this e-mail from 
all computers.
~~


Re: Usage of Clay in portal environment

2006-04-10 Thread Dakota Jack
These posts are supposed to be preceded by [SHALE]

On 4/10/06, Phanidhar Adusumilli <[EMAIL PROTECTED]> wrote:
>
> Can Clay be used in portlets as it is or do we need to customize it.? we
> would like to use it weblogic portal environment.
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~


Re: [HELP] how do I catch url like http://www.myweb.com/mysite :(

2006-04-10 Thread Pham Anh Tuan

Thanks Dave,

I try following your instructions.

again, thank you! :)

bowlkhin
- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Monday, April 10, 2006 10:07 PM
Subject: Re: [HELP] how do I catch url like http://www.myweb.com/mysite :(



Pham Anh Tuan wrote:

I just think that we can check request object, after that we check db
for specific username (360.yahoo.com/username), if it's exist, we will
view homepage of that username.

The problem here, I don't know how to do that :(


I had to recreate this usecase for a conversion: I ended up writing a
filter that has a known list of URLs (paths) to not filter; any other
path is used as a DB lookup for user by username. The filter then puts
that user into session and forwards into the Struts app.

You could also do this in a custom RequestProcesser, but keeping it in a
Filter gives you more flexibility. I ended up refactoring the
functionality completely out so it could be plugged in as necessary.

Dave



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





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



Re: [HELP] Problem with redirect attribute of forward tag

2006-04-10 Thread Pham Anh Tuan

hiz ... thank you very much Dave :)
- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Monday, April 10, 2006 10:11 PM
Subject: Re: [HELP] Problem with redirect attribute of forward tag



Pham Anh Tuan wrote:

I got problem with redirect attribute in forward tag.

after MyRegistration is processed, it register some values in request 
scope (some messages to inform that Registration was successful), but 
after redirecting to Summary action, all values which registered in 
request scope is empty or null.


I don't want user see url: /processMyForm in address bar, instead that, 
user only see /summary.do on url :( ..




Likely the easiest choice would be to put the information in session
(and remove it later).

Dave



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






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



Re: [Shale] Clay

2006-04-10 Thread Gary VanMatre
>Gary, I appreciate the information.  Ok, here is what I have and it is not
>working.  Bear with me, I am going to post the bulk of my files, though the=
>y
>are quite short.
>
>
>[web.xml]

I didn't seen anything that didn't look correct in the web.xml snippet you 
provided.  
One thing to check is the chains-config.xml.  If you are using the  
ContextRelativePathFilter
to prevent direct access to resources, make sure that "/S*\.html" is added to 
the includes
attribute list.

>[clay-config.xml]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>[clay-symbols-config.xml]
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>[layout.html]
>
>
>
>Test
>
>
>
>
>
>
>
>allowBody=3D"false">Body ContentBody Content
>
>
>
>
>
>
>[welcome.html]
>
>
>Username
>
>
>
>Password
>
>
>
>

When you are using clay full html views exclusively, the entry point to the 
page 
needs to be a html file.  This means that you don't have a pseudo page 
definition 
like in tiles.  You can do this sort of thing with clay's full XML views as the 
page 
entry point – usecase symbols example (page1 & page2).  

What you need in your example is for the welcome.html page to be a generic 
entry 
point that pulls a layout in and overrides the body using a symbol (the 
page3.html 
symbols use cases example).  

So in your example you might want to call the welcome.html template 
welcomeBody.html.  
And, then add a welcome.html entry point template that pulls it all togather.

welcome.html example:

  
   Mock Header
   The entire document is replaced by the layout.


The bodyContent attribute in the html node becomes a symbol that overrides 
the @bodyContent in the layout.  


>And when I go to http//localhost:8080/test/welcome.html I get a 500, page
>cannot be found [welcome.html].  I have it under the web root pages dir and
>I have layout.html under templates.  Looking for suggestions one what I have
>done wrong.

The 500 response code indicates that there was a server error.  Check the 
server logs for more information on the exception.
 

>
>Thanks.
>
>Gregg

Gary

Re: how to include a "do" url?

2006-04-10 Thread 王曾wang_zeng
OK. I have checked it out,so great.
Sorry, I reply  so late. cos the place where I live is opposite to the place
where you live on this earth. When you get up,I am going to sleep.


2006/4/10, Michael Jouravlev <[EMAIL PROTECTED]>:

> You can check out how I use it.
>
> This is main website of my project, JSP Controls Tag Library:
> http://www.jspcontrols.net
>
> This is what you talked about: http://www.jspcontrols.net/struts.jsp
>
> Michael.
>
>


Re: Usage of Clay in portal environment

2006-04-10 Thread Phanidhar Adusumilli
But I have seen some code in ClayViewHandler that casts the response to
ServletResponse. This is in RenderView method. The code is as follows:

ServletResponse response = (ServletResponse) context.getExternalContext
().getResponse();

Following this line, the ServletResponse is used to get Character encoding
by invoking getCharacterEncoding().

How would this work with portal environment?


On 4/10/06, Ryan Wynn <[EMAIL PROTECTED]> wrote:
>
> I have used Clay with WebSphere Portal 5.1 and the MyFaces JSR-168
> portlet without any changes to clay.  In fact, because the MyFaces
> portlet is a bridge, I can run the same clay app in either a portlet
> or web environment without any changes.
>
> I can't speak to weblogic, but I guess it should work the same.
>
>
> On 4/10/06, Phanidhar Adusumilli <[EMAIL PROTECTED]> wrote:
> > Can Clay be used in portlets as it is or do we need to customize it.? we
> > would like to use it weblogic portal environment.
> >
> >
>


Re: trying to get a Collection from my jsp

2006-04-10 Thread ot 811
Kid,

> I try to get a collection from my jsp to my form bean.
 do you mean that you get the exception when you POST from the JSP ?
Struts will not call your setPrestationsComptage(List
prestationsComptage) method.
Instead you must used indexed properties.
see:
http://struts.apache.org/struts-doc-1.2.7/faqs/indexedprops.html
regards
Sanjeev

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



Re: Custom tag question

2006-04-10 Thread Aladin Alaily

... with tag files ...

Aladin Alaily wrote:


Hi Dave,

I'm also wary of doing such a thing (hence why I'm posting here) because 
I would essentially be mimicking the servlet container's job.


Now if it's possible to do what I'm trying to with files then I'll give 
that a shot instead.


Thanks.
Aladin


Dave Newton wrote:


Aladin Alaily wrote:


Would you use a .tag to produce the effect described above?




If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



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



.




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







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



Re: Custom tag question

2006-04-10 Thread Aladin Alaily

Hi Dave,

I'm also wary of doing such a thing (hence why I'm posting here) because 
I would essentially be mimicking the servlet container's job.


Now if it's possible to do what I'm trying to with files then I'll give 
that a shot instead.


Thanks.
Aladin


Dave Newton wrote:


Aladin Alaily wrote:


Would you use a .tag to produce the effect described above?



If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



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



.




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



Re: Custom tag question

2006-04-10 Thread Dave Newton
Aladin Alaily wrote:
> Would you use a .tag to produce the effect described above?

If you mean a JSP 2.0 custom tag written in JSP, then sure. I'd also be
wary of using other custom tags inside a tag like that, although I guess
I've never tried it.

Dave



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



Custom tag question

2006-04-10 Thread Aladin Alaily

Hi,

I have a question pertaining intregrating a custom tags with a struts 
tag.  I want to know if there exists a "best practise" when trying to do 
what I'm doing (other than not doing it).


I am trying to write a custom tag which wraps another tag in the 
following way:


HTML Written: 

Desired Output: "printout" number of  tags

Code to do it:
--
void doStartTag() ... {
...
for(int i=0 ; iHave you guys come across a situation where you had to do something like 
this?  and if so, what is the best way of creating such a custom tag? 
Would you use a .tag to produce the effect described above?


Thanks.
Aladin



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



Re: Action DTD for struts-config.xml

2006-04-10 Thread Craig McClanahan
On 4/10/06, Lim Hock-Chai <[EMAIL PROTECTED]> wrote:
>
> Anybody know where I can find a complete explanation of Action tag and
> all of its properties?  I'm trying to see how the "include" property
> work.


The DTD itself is chock full of documentation comments.  Look for the
relevant version(s) in the "lib" directory of your Struts distribution.

thanks.
>
>

Craig


Re: Is there an "IsInSet" or "IsInList" Tag already out there?

2006-04-10 Thread Rick Reumann

Rick Reumann wrote the following on 4/10/2006 10:44 AM:
I'm going to be needing a tag similar to how struts' logic:present 
role="" tag works, but I need it to work with my own set of roles that 
are going to be in bean ( in List or Set).



I supposed I could consider a JSTL function as well.



Ended up just writing a static function to do it. More info on calling 
methods from JSP2.0 pages:

http://www.javaworld.com/javaworld/jw-05-2003/jw-0523-calltag.html

--
Rick
http://www.learntechnology.net

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



Action DTD for struts-config.xml

2006-04-10 Thread Lim Hock-Chai
Anybody know where I can find a complete explanation of Action tag and
all of its properties?  I'm trying to see how the "include" property
work.
 
thanks.


Re: [Shale] Clay

2006-04-10 Thread Gregg Bolinger
Gary, I appreciate the information.  Ok, here is what I have and it is not
working.  Bear with me, I am going to post the bulk of my files, though they
are quite short.


[web.xml]
 
Shale Blank Starter App



javax.faces.STATE_SAVING_METHOD
client




javax.faces.CONFIG_FILES
/WEB-INF/faces-config.xml




org.apache.commons.chain.CONFIG_WEB_RESOURCE

/WEB-INF/chain-config.xml




org.apache.shale.dialog.CONFIGURATION
/WEB-INF/dialog-config.xml



clay-config-files
/WEB-INF/clay-config.xml,/WEB-INF/clay-
symbols-config.xml



javax.faces.DEFAULT_SUFFIX
.html




shale

org.apache.shale.faces.ShaleApplicationFilter





shale
/*
REQUEST
FORWARD





org.apache.commons.chain.web.ChainListener





org.apache.shale.clay.config.ClayConfigureListener





faces
javax.faces.webapp.FacesServlet
1




faces
*.faces



faces
*.html
  

[clay-config.xml]














[clay-symbols-config.xml]
























[layout.html]



Test







Body ContentBody Content






[welcome.html]


Username



Password




And when I go to http//localhost:8080/test/welcome.html I get a 500, page
cannot be found [welcome.html].  I have it under the web root pages dir and
I have layout.html under templates.  Looking for suggestions one what I have
done wrong.

Thanks.

Gregg

On 4/8/06, Gary VanMatre <[EMAIL PROTECTED]> wrote:
>
> >From: "Gregg Bolinger" <[EMAIL PROTECTED]>
> >
> > I am evaluating Shale. I realize it is a work in progress and that
> nothing
> > is fully finallized/stable and I expect there to be issues. I also
> expect
> > great things from Shale in the future and want to help track down issues
> for
> > development. Hence, my eval. I've got some questions about Clay...
> >
> > I have searched the mailing list archives and found psuedo answers to my
> > issues but nothing concrete. I am trying to utalize tapestry like views
> and
> > full HTML layout. I've read the online doc and downloaded and read the
> PDF
> > doc. I have also looked at the code for the Use Case Roladex which
> seemed
> > to just confuse me more. I know people have asked for a simpler example
> of
> > using Clay already, so I won't. But I would like some clarification.
> >
> > If I want to use tapestry like views and full html layout, do I need the
> > clay-template-suffix context param and do I need to map the servlet to
> the
> > same extension. Also the documentation shows the clay-template-suffix as
> > .clay and then the servlet mapping as .html. It states both should be
> the
> > same. Is HTML preferred?
> >
>
> The default suffix for the clay html views is .html.  You can override
> this if you want using the context param in the web.xml.
>
> 
> 
>  org.apache.shale.clay.HTML_TEMPLATE_SUFFIX
> 
> .clayh
> 
>
>
> You also need to modify the faces servlet mapping so that the suffix you
> choose is handled by the faces servlet.
>
>   
> faces
> *.html
>   
>
>
> > Exactly what file should I place my component declarations in and where
> > should this file reside?
> >
>
> The component declarations can reside under the context root or within the
> classpath but both should be registered in the web.xml.
>
>
>
>   org.apache.shale.clay.COMMON_CONFIG_FILES
>   /WEB-INF/clay-config.xml, /WEB-INF/clay-
> symbols-config.xml
>
>
> We borrowed the prefix of  "classpath*:" from spring to indicate the
> config file should be loaded with the class loader.
>
>
>   org.apache.shale.clay.COMMON_CONFIG_FILES
>   classpath*:org/apache/shale/usecases/symbols/clay-
> tiles-config.xml
>
>
> These files will be loaded on startup.  If you are only using full html
> views, you will need to add another param
> to the web.xml.  The usecase apps shows how to use three types of views in
> the same app (JSP, HTML, XML).
> This is probably not a normal usecase in the real world.
>
> 
>   javax.faces.DEFAULT_SUFFIX
>   .html
> 
>
>
> > For full HTML layout, do I need a JSP that pulls in the appropriate
> template
> > using the clay-shale taglib?
> >
>
> No, the shale-clay.jar has a self registering view handler that detects
> the suffix (.html) defined in the web.xml.  So you don't even have to use
> a JSP.  There are a couple of the full HTML rol

Re: Usage of Clay in portal environment

2006-04-10 Thread Ryan Wynn
I have used Clay with WebSphere Portal 5.1 and the MyFaces JSR-168
portlet without any changes to clay.  In fact, because the MyFaces
portlet is a bridge, I can run the same clay app in either a portlet
or web environment without any changes.

I can't speak to weblogic, but I guess it should work the same.


On 4/10/06, Phanidhar Adusumilli <[EMAIL PROTECTED]> wrote:
> Can Clay be used in portlets as it is or do we need to customize it.? we
> would like to use it weblogic portal environment.
>
>


Usage of Clay in portal environment

2006-04-10 Thread Phanidhar Adusumilli
Can Clay be used in portlets as it is or do we need to customize it.? we
would like to use it weblogic portal environment.


indexed property validation error:java.lang.reflect.InvocationTargetException

2006-04-10 Thread Carl Smith
I have a jsp containing three text fields which are indexed property, I needs 
to validate all the text box contains a value other than null or empth string. 
When I click on save I got the error (see the bottom). Your helps are highly 
appreciated!
   
  jsp:
  

 
 (1) indexed property - text box
 
 
 Fields to be validated: 
  
 
   save

   
  ActionForm:
public class TestingForm extends ValidatorActionForm {
 
 private LabelValueBean[] listOfItems;
 private LabelValueBean labelValue=null;
 
 
 public LabelValueBean getLabelValue(int index) {
  return (LabelValueBean)listOfItems[index];
 }
 
 public void setLabelValue(LabelValueBean bean, int index) {
  listOfItems[index]= bean;
 }
   public LabelValueBean[] getListOfItems() {
  return listOfItems;
 }
   public void setListOfItems(LabelValueBean[] beans) {
  listOfItems = beans;
 }   
}
   
  Actions:
public class DisplayAction extends org.apache.struts.action.Action { 

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

  TestingForm testingForm = (TestingForm) form;
  
  if (null == testingForm || null ==testingForm.getListOfItems()) {
   LabelValueBean[] listOfItems = new   LabelValueBean[3];
   LabelValueBean bean1 = new LabelValueBean("1", "");
   LabelValueBean bean2 = new LabelValueBean("2", "");
   LabelValueBean bean3 = new LabelValueBean("3", "");
   listOfItems[0]=bean1;
   listOfItems[1]=bean2;
   listOfItems[2]=bean3;
   testingForm.setListOfItems(listOfItems); 
  }
  
 return mapping.findForward("success");
 }
}
  
public class TestingSaveAction extends org.apache.struts.action.Action{
   
 public ActionForward executeAction(
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws NestedException {
  
  TestingForm testingForm = (TestingForm) form;
  
  return mapping.findForward("success");
 }
   
  struts-config.xml

   

  
  
   

  


 
 
  validation.xml
  
  
 
   
  
  
  
 
  Errors when click on save:
E SRVE0026E: [Servlet Error]-[BeanUtils.populate]: 
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
 at MyPath.TestingForm.getLabelValue(TestingForm.java:75)
 at java.lang.reflect.Method.invoke(Native Method)
 at 
org.apache.commons.beanutils.PropertyUtils.getIndexedProperty(PropertyUtils.java:493)
  where line 75 is the place: return (LabelValueBean)listOfItems[index]; in the 
actionform
  

 


-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

Re: Struts 1.3 - WebSite/Docs

2006-04-10 Thread Rahul Akolkar
On 4/10/06, Dion Gillard <[EMAIL PROTECTED]> wrote:
> Any pointers to where to find details on the changes and details in 1.3?
>


Probable starting points:

http://struts.apache.org/struts-action/userGuide/release-notes.html
http://wiki.apache.org/struts/StrutsUpgrade

-Rahul

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



[OT] where i can find List of all JBI implementation?

2006-04-10 Thread Legolas Woodland

Hi
Thank you for reading my post
where i can find a list of all JBI implementation ?
projects like
service mix
mule
celtix
...

Thanks

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



trying to get a Collection from my jsp

2006-04-10 Thread KID

Hi,
I try to get a collection from my jsp to my form bean. This is my code:



   

   
   









and in my form bean:

private List prestationsComptage;

public List getPrestationsComptage() {
return prestationsComptage;
}


public void setPrestationsComptage(List prestationsComptage) {
this.prestationsComptage = prestationsComptage;
}

Each element of my list is an object with the 3 properties (idPrest,
libellePrestationComptage,  nbUnites).

when I try to get the collection, an exception is occured :

javax.servlet.ServletException: BeanUtils.populate
at
net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:214)
at
net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at
net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:153)
at
net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at
net.sf.acegisecurity.wrapper.ContextHolderAwareRequestFilter.doFilter(ContextHolderAwareRequestFilter.java:50)
at
net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at
net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:226)
at
net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
at
net.sf.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
at
net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:125)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)



thank you for your assistance.
Kid


--
View this message in context: 
http://www.nabble.com/trying-to-get-a-Collection-from-my-jsp-t1426098.html#a3845501
Sent from the Struts - User forum at Nabble.com.


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



Struts tiles layout by tiles-config

2006-04-10 Thread Raghuveer

Is there facility to restrict some tile in my base configration.

Example

In "page.error" how to use only header part of my base configration.


-
tiles-config xml file













-

  



  
  


  
 
  


   

  

  


  
 
  

  










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



Re: problem in tiles

2006-04-10 Thread Dave Newton
Ahmed Hashim wrote:
> I tried to forward to loginPage.page from the action and it is working fine,
> but i remember that I can request the page directly...
> any suggestion?
>   

You can use tile definitions as "input" or "forward" attribute values in
your Struts config file; is that what you mean?

Dave



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



Re: [HELP] Problem with redirect attribute of forward tag

2006-04-10 Thread Dave Newton
Pham Anh Tuan wrote:
> I got problem with redirect attribute in forward tag.
>
> after MyRegistration is processed, it register some values in request scope 
> (some messages to inform that Registration was successful), but after 
> redirecting to Summary action, all values which registered in request scope 
> is empty or null.
>
> I don't want user see url: /processMyForm in address bar, instead that, user 
> only see /summary.do on url :( ..
>   

Likely the easiest choice would be to put the information in session
(and remove it later).

Dave



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



Re: [HELP] how do I catch url like http://www.myweb.com/mysite :(

2006-04-10 Thread Dave Newton
Pham Anh Tuan wrote:
> I just think that we can check request object, after that we check db
> for specific username (360.yahoo.com/username), if it's exist, we will
> view homepage of that username.
>
> The problem here, I don't know how to do that :(

I had to recreate this usecase for a conversion: I ended up writing a
filter that has a known list of URLs (paths) to not filter; any other
path is used as a DB lookup for user by username. The filter then puts
that user into session and forwards into the Struts app.

You could also do this in a custom RequestProcesser, but keeping it in a
Filter gives you more flexibility. I ended up refactoring the
functionality completely out so it could be plugged in as necessary.

Dave



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



Is there an "IsInSet" or "IsInList" Tag already out there?

2006-04-10 Thread Rick Reumann
I'm going to be needing a tag similar to how struts' logic:present 
role="" tag works, but I need it to work with my own set of roles that 
are going to be in bean ( in List or Set).


I can write my own, but I was wondering if one already existed. 
Something like..




(maybe an optional arg to decide whether all items have to be in the Set 
or just any one of them.)


I supposed I could consider a JSTL function as well.

--
Rick
http://www.learntechnology.net

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



-Tag inside a -Tag?

2006-04-10 Thread Klaus Rohwer
Hello together,

I am trying to implement a search_form with a dynamic pull-down menu whose
entries can be in different languages.

Unfortunatelly, I can't put a -Tag inside a -Tag.
At least I get the following exception: 

org.apache.jasper.JasperException: /search_form_advanced.jsp(48,126) equal
symbol expected

Is there a workaround for this? Or do I have to use JSP instead?


Here is my code:





">" />





Thanks for your help,

Klaus

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



RE: Servlet Filter?

2006-04-10 Thread Frank W. Zammetti
On Mon, April 10, 2006 2:09 am, Quinn Stone said:
> Frank, thanks for the link to javawebparts. The source code there helped
> me a
> great deal.

Good deal, glad to hear it!

> My next question is whether there's a mechanism by which I can stick an
> ActionError in the request so that the error page can display a message to
> the
> user using the familiar Struts  tag.

Take a look at the addMessages() method of the base Action class in the
Struts source.  No, wait, I'll save you the time... from 1.2.4...

protected void addMessages(HttpServletRequest request, ActionMessages
messages) {
  if (messages == null){
// bad programmer! *slap*
return;
  }
  // get any existing messages from the request, or make a new one
  ActionMessages requestMessages =
(ActionMessages)request.getAttribute(Globals.MESSAGE_KEY);
  if (requestMessages == null){
requestMessages = new ActionMessages();
  }
  // add incoming messages
  requestMessages.add(messages);
  // if still empty, just wipe it out from the request
  if (requestMessages.isEmpty()) {
request.removeAttribute(Globals.MESSAGE_KEY);
return;
  }
  // Save the messages
  request.setAttribute(Globals.MESSAGE_KEY, requestMessages);
}

Add this to your filter, import the appropriate classes (Globals,
ActionMessages) and you should be all set.  Use it just like you would in
your Action.

> Q

Frank


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



RE: Proxy rewrites

2006-04-10 Thread George.Dinwiddie
If you put

https://machine1/proxy/machine2//application/index.jsp";>

into the head of your index.jsp, what is the redirect URL?

> -Original Message-
> From: Anil Arora [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 07, 2006 6:42 PM
> To: Struts Users Mailing List
> Subject: RE: Proxy rewrites
> 
> 
> I don't think that the base tag helps me.  For example, I 
> have an index.jsp file that looks like...
> 
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%> 
> 
> 
> The HTTP header Location is being returned...
> 
> HTTP/1.1 302 Moved Temporarily
> Set-Cookie: JSESSIONID=1F664A9B4B0612843864A5B817DE0AE8; 
> Path=/interlace
> Location: 
> http://machine2:/context/application/main.do;jsessionid=1F
> 664A9B4B06
> 12843864A5B817DE0AE8
> Content-Type: text/html;charset=ISO-8859-1
> Content-Length: 0
> Date: Fri, 07 Apr 2006 22:38:38 GMT
> Server: Apache-Coyote/1.1
> 
> And this is an absolute URL instead of a relative url.  I 
> need Location to say 
> https://machine1/proxy/machine2//
> application/main.do;jsessionid=1F664A9B4B0612843864A5B817DE0AE8
> 
> 
> Thanks,
> Anil
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 07, 2006 1:49 PM
> > To: user@struts.apache.org
> > Subject: RE: Proxy rewrites
> > 
> > Anil,
> > 
> > Have you tried using a  tag? 
> > http://www.htmlhelp.com/reference/html40/head/base.html
> > 
> > > -Original Message-
> > > From: Anil Arora [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, April 06, 2006 2:35 PM
> > > To: user@struts.apache.org
> > > Subject: Proxy rewrites
> > >
> > >
> > > Didn't see this go through...resending...sorry for the 
> duplicates...
> > >
> > >
> > >
> > > 
> > >
> > > Hello,
> > >
> > >
> > >
> > > I'm fairly new to struts development (actually a non-UI developer 
> > > trying to do some UI development)  I'm trying to find an 
> answer to a 
> > > problem that I am having with Struts 1.2.9 and proxy webservers.
> > >
> > >
> > >
> > > I'm trying to set up a configuration as follows:
> > >
> > >
> > >
> > > 1.machine1: Apache WebServer with SSL using URL 
> rewrite and proxy
> > > redirect
> > >   Maps the following pattern:
> > > https://machine1/proxy/machine2//*   ->
> > > http://machine2:/context/*
> > > 2.machine2: Apache Tomcat 5.0 with Struts 1.2.9
> > >
> > >
> > >
> > > The incoming requests are working fine.  But my problem is that 
> > > outgoing URLs are not correct.
> > >
> > >
> > >
> > > First problem is with URL redirects.  I have an index.jsp in the 
> > > root,
> > >
> > >
> > >
> > > <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
> > >
> > > 
> > >
> > >
> > >
> > > The URL in the Location HTTP header looks like 
> > > http://machine2:/context/application/main.> do.
> > >
> > >
> > >
> > >
> > > Second, sometimes URLs are relative
> > >
> > >
> > >
> > > So, in the
> > > login.jsp page, we have a form element
> > >
> > >
> > >
> > >   
> > >
> > >  > > value="<%=cookieUsername%>"/>
> > >
> > >  > > value="<%=cookiePassword%>"/>
> > >
> > >   
> > >
> > >
> > >
> > > What I see generated is the following...
> > >
> > >
> > >
> > > 
> > >
> > > ...
> > >
> > > 
> > >
> > >
> > >
> > > In my configuration, I can specify the url prefix for the proxy 
> > > webserver, so I do have that information somewhere.  Is 
> there a way 
> > > to make struts rewrite the URL so that a) It is always 
> absolute and 
> > > b) It uses my external url prefix.  Can I build a plugin to do
> > > this?   I tried
> > > writing a filter to rewrite the URLs but then I ran into the
> > > relative URL issue.
> > >
> > >
> > >
> > > Thanks,
> > >
> > > Anil
> > >
> > >
> > >
> > >
> > 
> > 
> -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



RE: Reg: use of Application Resources

2006-04-10 Thread Shasirekha Engala


-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 08, 2006 7:20 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Reg: use of Application Resources


Yes, you can specify an alternate "bundle" in the relevant tags, and
load the bundle in the struts-config. For a concrete exampole, see the
MailReader application that is bundled with Struts Action 1.2.9.
MailReader uses an alternate bundle to reference images and iconic
text.

HTH, Ted.

On 4/8/06, Shasirekha Engala <[EMAIL PROTECTED]> wrote:
> Hi
>
> can we use more than one Application Resources files in a jsp using
> 
>
>
>
> Shasi
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
HTH, Ted.
** http://www.husted.com/ted/blog/



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



RE: Reg: use of Application Resources

2006-04-10 Thread Shasirekha Engala
I am thankful to you for the reply.Can I get some more information regarding
the topic and if possible an example. Which site I have to refer for this?

Thanks and regards
Shasi

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]
Sent: Saturday, April 08, 2006 7:20 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: Reg: use of Application Resources


Yes, you can specify an alternate "bundle" in the relevant tags, and
load the bundle in the struts-config. For a concrete exampole, see the
MailReader application that is bundled with Struts Action 1.2.9.
MailReader uses an alternate bundle to reference images and iconic
text.

HTH, Ted.

On 4/8/06, Shasirekha Engala <[EMAIL PROTECTED]> wrote:
> Hi
>
> can we use more than one Application Resources files in a jsp using
> 
>
>
>
> Shasi
>
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
HTH, Ted.
** http://www.husted.com/ted/blog/



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



Re: [OT] Need information about books to buy

2006-04-10 Thread erikweber


-Original Message-
>From: Ashish Kulkarni <[EMAIL PROTECTED]>
>Sent: Apr 7, 2006 11:58 AM
>To: user@struts.apache.org
>Subject: [OT] Need information about books to buy
>
>Hi
>I need to buy couple of books, 1 for AJAX, and 2 for
>Webservices,
>I know the basics of Ajax and Webservices, and need to
>use them in real time application
>
>These are the onces i have seen, need input from
>people who have read them so can purchase them
>
>Ajax
>1 Ajax Hacks, by Bruce W. Perry Oreilly Publication
>2 Ajax in Action
>
>Webservices
>1 J2EE Web Services by Richard Monson-Haefel
>Addison-Wesley Professional
>2 Java Web Services
>By David A. Chappell, Tyler Jewell

Tyler Jewell has been doing this stuff for a long time. He was teaching J2EE 
courses for BEA several years ago, and even back then he seemed to know the ins 
and outs of how everything was implemented, so I'm betting there's some good 
information in this book. I learned a lot from one of his classes.

On the other hand, I've had good luck with the Addison-Wesley books too . . .

Erik


>Oreilly Publication
>
>Or Any other which will have lot of working code
>examples and different strageries 
>
>
>A$HI$H
>
>__
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>


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



Re: struts validation problem

2006-04-10 Thread Madhav Bhargava
As a quick fix i changed the validator-rules.xml file. I added the
following:

*if (field == undefined) {*
*   isValid = true;*
} else if { 
}

I did this for required and mask rules. This solved the problem for me.

Thanks for your response. Moreover with the version of validator framework i
am using i doubt there is *validwhen* available. I need to double check
that.

~madhav



On 4/10/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> Madhav Bhargava wrote:
> > Hi All,
> >
> > I am using Struts 1.0 and struts-validator 1.0.
> > I have a JSP which has 3 tabs. Each tab body has a different 
> element
> > inside it. I am using Ajax to dynamically generate the tab body content.
> >
> > Let me take an example and explain it. Assume there are 2 tabs - Tab1
> and
> > Tab2.
> > *Controls in Tab1: *a text field - t1
> > *Controls in Tab2:* a single select drop down - s1
> > At any time either the text field is present on the form or a single
> select
> > drop down.
> >
> > In my validation.xml i have validation rules specified for both of these
> > controls.
> > *Extract from validation.xml*
> >
> > 
> >
> >  >   "-//Apache Software Foundation//DTD Commons Validator Rules
> > Configuration 1.0//EN"
> >   "/WEB-INF/config/dtd/validator_1_0.dtd">
> >
> > 
> > 
> > 
> >  depends="required,minlength">
> > 
> >  > "minlength" resource="false" />
> > 
> > minlength
> > 2
> > 
> > 
> > 
> >  name="mask" />
> > 
> > 
> > mask
> > ^[0-9]+$
> > 
> > 
> > 
> > 
> > 
> > When the form is submitted then client side validation occurs using
> > validation.xml and "An error on page" comes up on the botton left corner
> of
> > the web page indicating that there has been an error. The processing
> does
> > not stop but the error is displayed.
> >
> > The problem is that i am unable to create a rule in validation.xml which
> > will only validate a control if it is present on the generated web page.
> >
> > *Question:*  Is there any way in which it can be specified that only if
> the
> > control is there then validate it else ignore the rule? I guess this
> problem
> > must be faced by other people as well.
> >
> > One option will be: Do client side validations using Javascript
> functions
> > and do server side validations using validation.xml/defer till you hit
> > action and do it explicitely there. But if i have to use
> struts-validator
> > framework for client side validations as well then what will the
> solution?
>
> The validation framework has no way to know the difference between 'the
> control wasn't present on the page' and 'no value was submitted for the
> control' so no, there's no way to tell it to only apply a validation
> when the control is 'there'.
>
> One possibility would be to express your validation constraints with
> validwhen and use a hidden input or something to decide what rules to
> apply.
>
> But a better approach may be to leverage the validation framework's
> 'wizard' support. That allows you to specify a 'page' key on each
> validation rule to control when it's applied. You would need to figure
> out how to map the currently displayed tab to a page key for the
> validator to look at, but that would probably give you a fairly clean
> solution.
>
> L.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do


Struts 1.3 - WebSite/Docs

2006-04-10 Thread Dion Gillard
Any pointers to where to find details on the changes and details in 1.3?

--
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris


[ANN] JSP Controls Tag Library 0.6 has been released

2006-04-10 Thread Michael Jouravlev
New website, new features:

* removed hardcoded Javascript from JSP tags, using Behaviour.js instead.
* rewritten Tabbed Notebook tags - it cannot get simpler than that:

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ taglib uri="http://jspcontrols.net/tags/core"; prefix="jc" %>

  

  Tab1 content goes here.


  Tab2 content goes here.

  


* removed Attach tag
* new Component tag - it is mandatory

website: http://www.jspcontrols.net
Live demos: http://www.jspcontrols.net/jspcontrols-0.6-samples/
Tabbed Notebook tags: http://www.jspcontrols.net/notebooksummary.jsp

Tabbed Notebook, like all other components built with JSP Controls Tag
Library, is dual-mode. It works with Javascript/XMLHTTPRequest in Ajax
mode, or without Javascript in synchronous mode.

Michael J.

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



Re: how to include a "do" url?

2006-04-10 Thread Michael Jouravlev
You can check out how I use it.

This is main website of my project, JSP Controls Tag Library:
http://www.jspcontrols.net

This is what you talked about: http://www.jspcontrols.net/struts.jsp

Michael.

On 4/9/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote:
> That's great! Thank you,Michael,for using your time. This approach is kind
> of  novel, I have nerver seen this kind of usage before. Actually,it's not
> my ideal, one of my coworker teachs me to do that. I am really moved.
>
> 2006/4/9, Michael Jouravlev <[EMAIL PROTECTED]>:
> >
> > I use it. Works well for me.
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>

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