Re: html:optioncollection

2005-09-19 Thread Praveen Kumar
Hi
 
I think your question's answer will be   
use these tags 
 
refer  tag lib
 
Regards
Kumar

Marc Ende <[EMAIL PROTECTED]> wrote:
Hi,

I'm using the only with collections. Now I need
to order the contents. It's possible to assign anything else
(orderable/sortable) than collections
to this tag? 

marc

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: [Shale] NullpointerException when running struts-shale-usecas es

2005-09-19 Thread Wendy Smoak

From: <[EMAIL PROTECTED]>


I downloaded and installed a clean Tomcat 5.0.30, and now it started Ok.
So I went back and looked at my other Tomcat 5 install, and found that I
had some commons-xxx jars and log4J among other things in the common/lib
directory. Since we have been suspecious of digester, I removed that one
first - No cigar. I then readded that one and remove the next until I
finally figured out what causes the problem.

There is a compatibility issue between log4j (1.2.8) and Shale. When I
removed my two log4j jars, Shale started ok.


I just added a dependency on log4j-1.2.8 to the use-cases, added 
commons-logging.properties and log4j.properties to WEB-INF/classes, built 
and deployed it.  It starts up normally.  That's with the log4j .jar file in 
WEB-INF/lib, however.


You mention _two_ log4j jars, which could be a problem.  Where were they? 
If you have multiple copies of the same class(es) available on the 
classpath, strange things can happen.


--
Wendy Smoak




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



Re: Multiple Webapps and the TLDs

2005-09-19 Thread Michael Jouravlev
On 9/8/05, Wendy Smoak <[EMAIL PROTECTED]> wrote:
> From: "Jason Kwon" <[EMAIL PROTECTED]>
> 
> > Say I have multiple webapps.
> > Currently, I am deploying each webapp with their own copies of the
> > struts TLDs.
> > Is there any way I can deploy each webapp and deploy only a single set
> > of struts TLDs?
> 
> There is a way you can deploy *none* of the tlds. :)  Assuming you're on a
> Servlet 2.3 or better container, and that by "deploying" you mean you're
> putting the tlds under WEB-INF and configuring them in web.xml, all you have
> to do is start using the right URI in your <@taglib> tags, and the tlds
> which are already in (for example) struts.jar will be automatically used.
> 
> Example:
><%@ taglib uri="http://struts.apache.org/tags-html-el"; prefix="html" %>
> 
> If you're using the non-el version of the tags, the URI will be different--
> look in the tld itself for the
> http://struts.apache.org/tags-html, and use that in your <%@
> taglib> tag.
> 
> Then delete the .tld files from wherever you had them, and delete the
>  tags from web.xml.

Ok, I have Struts 1.2.7 distro, which contains META-INF/tlds directory
with the following tld files:

struts-bean-1.1.tld
struts-bean.tld
struts-html-1.1.tld
struts-html.tld
struts-logic-1.1.tld
struts-logic.tld
struts-nested-1.1.tld
struts-nested.tld
struts-tiles-1.1.tld
struts-tiles.tld

*1.1.tld files have older uri in them referring jakarta.struts
(interesting why they have higher version number?).

What about EL tags? Will they be included in distro? With JSP 2.4 most
users will fall back to standard Struts tags, but I use Struts-EL and
I would like it to be in the distro as well.

Michael.

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



SV: [Shale] NullpointerException when running struts-shale-usecas es

2005-09-19 Thread hermod . opstvedt
Hi

I downloaded and installed a clean Tomcat 5.0.30, and now it started Ok.
So I went back and looked at my other Tomcat 5 install, and found that I
had some commons-xxx jars and log4J among other things in the common/lib
directory. Since we have been suspecious of digester, I removed that one
first - No cigar. I then readded that one and remove the next until I
finally figured out what causes the problem.

There is a compatibility issue between log4j (1.2.8) and Shale. When I
removed my two log4j jars, Shale started ok.

Hermod.

-Opprinnelig melding-
Fra: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sendt: 19. september 2005 16:18
Til: Struts Users Mailing List
Emne: Re: [Shale] NullpointerException when running struts-shale-usecas
es


From: <[EMAIL PROTECTED]>

> Same problem with latest build - It gives a NPE on 5.0.30 during
> startup:
>
> 2005-09-19 15:48:19 StandardContext[/struts-shale-usecases]Exception
> starting filter shale
> javax.servlet.ServletException: Error at line 41 char 56: null
> ...
> - Root Cause -
> java.lang.NullPointerException
> at
>
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
> 19)
>
> My setup is Sun JDK 1.4.2_09
> Tomcat 5.0.30 - No frills
>
> It runs OK on 5.5.

What OS?  It's working fine on both JDK 1.4.2_09 and 1.5.0_01 with
Tomcat 
5.0.30 on WinXP Pro.

Sep 19, 2005 7:06:48 AM org.apache.shale.faces.ShaleApplicationFilter
init
INFO: Initializing Shale Application Filter

-- 
Wendy 



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



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



Re: A Unique problem Struts 1.2.4

2005-09-19 Thread Praveen Kumar
Hi ,
 
I think the Struts ActionMapping will try to invoke the setter and getter 
methods of the ActionForm with the same name in  if the names are 
not equal simply it will not invoke the Setter() method . So the corresponding 
Variable will be null . i think it wont throw any exception also(ActionMapping)
 
Regards
Kumar


Pradeep Shekade <[EMAIL PROTECTED]> wrote:
Hello,

We are using Struts 1.2.4, and Weblogic 8.1.

The problem is as follows -

One of the action mappings in my struts-config.xml is -

type="com.action.carrier.SampleAction"
name="sampleActionForm">


The "sampleActionForm" corresponds to an entry in as follows 

com.web.struts.form.carrier.SampleActionForm" name="sampleActionForm" />

The class SampleActionForm has a single variable with the appropriate setter 
and getter namely
public void setCarrierName(String carrierName)
public String getCarrierName()

The JSP that correponds to this action has entries as follows -



 [input] "saveChangeCarrier()"/>


Please note that the property "carrierNam" has been deliberately misspelt.

The SURPRISING thing is that struts does not throw any errors at all when 
forwarding to this page. I am sure I am missing something

We have many JSPs like this but only this one seems to be having this 
problem...

Any pointers on what could be the problem ?


Thanks and Regards,

Pradeep


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 

[Hibernate] This stuff is cool

2005-09-19 Thread Murray Collingwood
Hi all

Hibernate is an excellent tool!  I managed to get it running quite quickly, 
only a few 
small issues to resolve, fortunately the error messages were fairly clear.

I've implemented Hibernate into the beginning of a new Struts app, however my 
code 
isn't looking like the examples and I'm wondering if I'm putting files in the 
wrong places.  
Here is the structure I have:

Note, the term "Menu" here refers to a restaurant menu item.

Form bean "MenuForm" is stored in com.path.controller.form
Action class is in com.path.controller.action

In this app my form beans reflect closely the database so I am using the same 
form 
bean classes for the model.

I created "Menu.hbm.xml" and tried placing it in com.path.controller.form as 
the 
Hibernate documentation said to place these 'hbm' files with the pojos.  When I 
tried to 
start the app Hibernate complained that it couldn't find the Menu.hbm.xml file. 
 So I 
moved the file around a bit, finally placing it in the root of the Source 
directory, eg 
"src/Menu.hbm.xml" with "src/com/path/controller/form/MenuForm.java".  The 
contents 
of my Menu.hbm.xml is as follows:


http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>



















My hibernate.cfg.xml is:


http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>



java:comp/env/jdbc/dbname
true
org.hibernate.dialect.MySQLDialect


create








THE QUESTION IS: My hbm file is not stored next to the pojo and has to 
reference it 
using the full path.  Is this normal?  Is there a better way of doing this?  

Kind regards
mc



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005


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



Re: [Shale] clay templating

2005-09-19 Thread Gary VanMatre
> Sorry for interruption. 
> After reading your discussion, I try to read the more about Shale. 
> From the webpage, http://struts.apache.org/shale/index.html, 
> it is found that Shale does not depend on Struts. 
> 
> I wonder if Shale will be independent of Struts? 
> 

I think that depends on the context that you are using "Struts".  In terms of a 
framework, Shale is independent of core Struts.  In terms of an open souce 
community, Shale is a subproject under the umbrella of the Struts (a top-level 
apache project).

Shale and core Struts share common utilities like chains, validator and in the 
future Tiles.  Shale is built on the JSF framework where core Struts is built 
from the ground up.  

Both are dependent on the Struts community.

Gary

Re: [Shale] clay templating

2005-09-19 Thread 梁炳場
Sorry for interruption.
After reading your discussion, I try to read the more about Shale.
>From the webpage, http://struts.apache.org/shale/index.html,
it is found that Shale does not depend on Struts. 

I wonder if Shale will be independent of Struts?


2005/9/20, Gary VanMatre <[EMAIL PROTECTED]>:
> >
> > > The only difference is instead of  in profile
> > > screen I need profile.html and in main I need main.html components. How
> > > can I do this?
> >
> > Well... to me, this sounds like a job for Tiles.  Gary, what do you think?
> >
> 
> Yes, I agree.  The role of Clay is to glue togather JSF components.  This is 
> at a smaller granularity than pulling together page fragments as tiles does.
> 
> The main difference is that Clay doesn't have a concept of a abstract page 
> layout like tiles.  In tiles, you can define a single layout that is used by 
> all pages.  With Clay you have to have a concrete HTML template or JSP page.
> 
> In your example you could construct a jsp page that has a single clay 
> component that includes your layout components.  But, you would still have to 
> create a jsp or clay template for each page.
> 
> mainPage.jsp
> **JSP page declarations**
> 
> 
> Or a page with a single span tag.
> Mypage.clay
> 
> 
> Tiles allows you to define an abstract page where Cay currently requires a 
> concrete page where you abstract the content.
> 
> > --
> > Wendy Smoak
> >
> >
> 
> Gary
> 
> 
> > From: "Maksimenko Alexander" <[EMAIL PROTECTED]>
> >
> > > The only difference is instead of  in profile
> > > screen I need profile.html and in main I need main.html components. How
> > > can I do this?
> >
> > Well... to me, this sounds like a job for Tiles.  Gary, what do you think?
> >
> > As far as Shale + Tiles documentation goes, there is David's blog entry:
> >http://jroller.com/page/dgeary?entry=shale_adds_tiles_integration
> >
> > And another list member, Geeta Ramani, has put together an example webapp:
> >http://marc.theaimsgroup.com/?l=struts-user&m=112507041612466&w=2
> >
> > One thing to keep in mind is that Standalone Tiles is still in the Struts
> > Sandbox.  It hasn't had a release yet and it could undergo some changes
> > before it does.
> >
> > If you're using MyFaces, they have support for Struts Tiles-- there's a
> > 'tiles.war' example app as part of their distribution, and a new Wiki page
> > here:  http://wiki.apache.org/myfaces/Tiles_and_JSF .
> >
> > I haven't worked with it enough to know what the difference is between using
> > Struts Tiles or Standalone Tiles in a webapp.  Somewhere on my TODO list is
> > to take the MyFaces tiles.war example and see what it takes to convert it to
> > Standalone Tiles.
> >
> > --
> > Wendy Smoak
> >
> >
> > -
> > 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: Auto Removal of trailing spaces from request params

2005-09-19 Thread Frank W. Zammetti

There's nothing specific in Struts, but a filter does the trick nicely:

http://javawebparts.sourceforge.net/javadocs/index.html

That will actually do *all* incoming requests, but that's probably what 
you want anyway.  You can limit it by path too if that's helpful.


Frank

Laurie Harper wrote:

Abhinav Bhatnagar wrote:


Hi All,

Is there any way in struts to automatically trim the string before
setting them in the form object?

We can do it thru javascript but just want to know if Struts has any
feature for this.



I don't think so. You could define a custom RequestProcessor to do this 
for you, though -- or, in 1.3, the new request chain stuff. That way, 
you can make the trim()ing logic as simple or as complex as you like.


L.


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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Re: Adding a plug-in to a webapp

2005-09-19 Thread Laurie Harper
Wow, that's a big topic :-) The first thing I'd suggest is to think 
about using a full J2EE application server and packaging your 
apps/modules as EARs/WARs/etc. J2EE already includes solutions to most 
of the requirements you list below; in particular, you can use the app 
server's deployment features to deploy new modules without re-deploying 
BaseApp or any other modules. You can even deploy new modules without 
restarting the server or any currently running apps/components.


Outside J2EE there is no 'standard' way of doing what you want. Neither 
does Struts have any built-in support for doing so (though other 
application frameworks may have their own ways to do this).


If you don't want to go the J2EE route, and you don't mind restarting 
Tomcat when you deploy a new module, then all you really need is a way 
to detect deployed modules at server startup time. Again, there's a 
bunch of ways to do that. Some starting points for you to think about:


- have BaseApp look for per-module config files in some directory and 
load modules dynamically based on what module config files exist


- package your modules as JARs, have BaseApp 'deploy' them like the app 
server does a WAR file


- implement the Service Provider API (I think it's specified as part of 
the JavaBeans spec? I can send you sample code if you want it); your 
modules would just include an appropriate service provider config file 
and BaseApp can find/load all installed modules with something like


  Iterator modules = Service.providers(Module.class, true);
  while (modules.hasNext()) {
Module m = (Module) modules.next();
m.initialize();
  }

(where Module is a class or interface you define to represent a module).

I'm not sure what the problem is with authorization. As long as your 
modules are written to work within the available 
authentication/autorization framework, whatever that looks like, you 
should be fine.


The upgrade issue is interesting since you'd presumably be deploying a 
new BaseApp.war; any modules deployed 'inside' the old one would go 
away. So, you either need to design a module deployment scheme that 
stores modules somewhere outside the webapp itself, or make it a 
requirement of the upgrade process that all modules be redeployed.


Like I said, it's a big topic, but that should be enough food for 
thought for now ;-)


L.

Joe Bermann wrote:

Hi,

I’m looking for some advice on how to design a Struts-based webapp that 
can accept dynamic plug-in components after deployment.  I’ve searched 
the archives and found some interesting posts about Struts Modules and 
Single Sign On, but I didn’t find anything that addressed my situation 
exactly.


I have a core webapp, let’s call it BaseApp, that contains a menu of 
launch points to various features.  After BaseApp is deployed and 
running at a customer site, the time will come when I want to add a 
launch point to a new feature there.  In my current design I’ll need to 
re-deploy an updated BaseApp that contains a new menu item and the new 
feature.  A much more flexible design would allow me “drop in” a new set 
of files that the BaseApp would recognize and link to (after restarting 
Tomcat).  This way the BaseApp wouldn’t have to be updated, 
re-qualified, or re-deployed (a huge savings at my company).


One of the problems is dealing with authorization issues – the users 
should have to log in only once and should be automatically logged out 
after a period of inactivity, regardless of where in the GUI they 
click.  Unfortunately the BaseApp has already been developed with custom 
security code; container managed security was not used.  After the 
user’s password is authorized, a special object is stored in session 
scope; the presence of that object indicates an authorized user.


Another problem is upgrading the software in the field.  Eventually a 
new version of the BaseApp will be released and the deployment in the 
field needs to be upgraded.  This means that any plug-ins need to be 
upgraded too, or at least maintained (not wiped out).


I’ve thought of using separate webapps (i.e. the plug-in could be 
packaged as a new webapp) with a dynamic menu in the BaseApp, but then 
I’m faced with the authorization problems mentioned above.


Is there a standard pattern in Struts to satisfy these requirements 
(will Struts Modules do what I need)?  Is there some way to “drop in” 
additional files into a pre-deployed webapp?  Does anyone have 
experience with these types of issues?


Thanks!

-- Joe



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



Re: Radio Button in ActionForm

2005-09-19 Thread Murray Collingwood
You do it exactly the same way, although you specify the values on the tags as 
you 
would for adding a new record.  eg

Male
Female

Struts will automatically check the radio control that matches the current 
value.

Kind regards
mc


On 19 Sep 2005 at 18:04, rahul wrote:

> hi all,
> 
> I am looking at some simplified way of displaying the radio button
> on a jsp depending upon the value of an ActionForm's property.
> 
> For example I have got an ActionForm with a property name sex, which can
> take 'M' or 'F' as input.
> 
> Now after storing the value in an ActionForm instance (which is then set as
> a request
> attribute) from database, I am forwarding the request to a jsp where I need
> to
> display the values I collected. like
> 
> (.) Male
> ( ) Female
> 
> Is there any elegant way of doing this using  tags in struts ?
> 
> 
> I know its pretty simple in case of simple input box where we do it by
>  but how to go with radio
> buttons ?
> 
> 
> Any suggestions ?
> 
>  --Rahul
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005
> 



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005


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



Re: Adding a plug-in to a webapp

2005-09-19 Thread Murray Collingwood
Hi Joe

If there is a particular function (like server type) you could store the 
different types in a
database record and then access the classes using reflection.

Kind regards
mc

On 19 Sep 2005 at 8:13, Joe Bermann wrote:

> That's what I'm doing now, but the problem is that it forces me to
> re-release the BaseApp every time I want to ship a new feature.  The BaseApp
> is on a slower release schedule, about once every six months, whereas it
> would be nice to support new features sooner than that.
>
> The BaseApp is performing some network management functions, and the
> "features" I've been talking about are the management of additional server
> types in the network.  My goal is to be able to dynamically add support for
> new server types without re-releasing the BaseApp.  Otherwise the new server
> types will go unmanaged until the next 6-month release.
>
> -- Joe
>
> Original Message Follows
> From: "Murray Collingwood" <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" 
> To: "Struts Users Mailing List" 
> Subject: Re: Adding a plug-in to a webapp
> Date: Mon, 19 Sep 2005 12:05:29 +1000
>
> Can you deploy the entire application with all options and use the security
> system to
> establish which menu items appear?
>
> This avoids the problem of different versions of baseApp and module.
> It also avoids the problem of trying to look for different modules
> installed.
> The only issue is that there may be a larger download for your customers
> when they
> upgrade as the entire application is shipped each time.
>
> Kind regards
> mc
>
> On 18 Sep 2005 at 21:27, Joe Bermann wrote:
>
>  > Hi,
>  >
>  > I’m looking for some advice on how to design a Struts-based webapp that
> can
>  > accept dynamic plug-in components after deployment.  I’ve searched the
>  > archives and found some interesting posts about Struts Modules and Single
>  > Sign On, but I didn’t find anything that addressed my situation exactly.
>  >
>  > I have a core webapp, let’s call it BaseApp, that contains a menu of
> launch
>  > points to various features.  After BaseApp is deployed and running at a
>  > customer site, the time will come when I want to add a launch point to a
> new
>  > feature there.  In my current design I’ll need to re-deploy an updated
>  > BaseApp that contains a new menu item and the new feature.  A much more
>  > flexible design would allow me “drop in” a new set of files that the
> BaseApp
>  > would recognize and link to (after restarting Tomcat).  This way the
> BaseApp
>  > wouldn’t have to be updated, re-qualified, or re-deployed (a huge savings
> at
>  > my company).
>  >
>  > One of the problems is dealing with authorization issues – the users
> should
>  > have to log in only once and should be automatically logged out after a
>  > period of inactivity, regardless of where in the GUI they click.
>  > Unfortunately the BaseApp has already been developed with custom security
>  > code; container managed security was not used.  After the user’s password
> is
>  > authorized, a special object is stored in session scope; the presence of
>  > that object indicates an authorized user.
>  >
>  > Another problem is upgrading the software in the field.  Eventually a new
>  > version of the BaseApp will be released and the deployment in the field
>  > needs to be upgraded.  This means that any plug-ins need to be upgraded
> too,
>  > or at least maintained (not wiped out).
>  >
>  > I’ve thought of using separate webapps (i.e. the plug-in could be
> packaged
>  > as a new webapp) with a dynamic menu in the BaseApp, but then I’m faced
> with
>  > the authorization problems mentioned above.
>  >
>  > Is there a standard pattern in Struts to satisfy these requirements (will
>  > Struts Modules do what I need)?  Is there some way to “drop in”
> additional
>  > files into a pre-deployed webapp?  Does anyone have experience with these
>  > types of issues?
>  >
>  > Thanks!
>  >
>  > -- Joe
>  >
>  >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>  >
>  > --
>  > No virus found in this incoming message.
>  > Checked by AVG Anti-Virus.
>  > Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date:
> 14/09/2005
>  >
>
>
>
> FOCUS Computing
> Mob: 0415 24 26 24
> [EMAIL PROTECTED]
> http://www.focus-computing.com.au
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005
>
>
> -
> 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]
>
>
>
> --
> No virus found in this inc

Re: Auto Removal of trailing spaces from request params

2005-09-19 Thread Laurie Harper

Abhinav Bhatnagar wrote:

Hi All,

Is there any way in struts to automatically trim the string before
setting them in the form object?

We can do it thru javascript but just want to know if Struts has any
feature for this.


I don't think so. You could define a custom RequestProcessor to do this 
for you, though -- or, in 1.3, the new request chain stuff. That way, 
you can make the trim()ing logic as simple or as complex as you like.


L.


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



AW: AW: AW: struts on jboss

2005-09-19 Thread Marc Ende
Hi Adam,

> OK, I think I might have seen problem too, but at this time, 
> I am deploying my struts webapp war as a war file by copying 
> it into the deploy directory and it causes no problem but 
> redeploys nicely.

Now I'm deploying the webapp as a .war-file not as an exploded war anymore.
So I'm not running into any trouble with the locked struts.jar. The jar is
now located in the temporary directory and no real problem anymore.

> What version of JBoss are you using?

It's 4.0.2. But I don't think thats really a problem of
the jboss version. I've got this problem several times
before.

marc


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



Re: AW: AW: struts on jboss

2005-09-19 Thread Adam Hardy

Marc Ende on 17/09/05 18:20, wrote:

Hi Adam,

hmmm... I always had this problem with the struts.jar. So I decided
to put the jar in the shared lib. The .war I do deploy is an
application wich have connections to an existing ejb on the same
server but there are no ejb's inside this project. There is only an 
webapp.war and an webapp.jar (which includes the relevant ejb's). And

these both archives are not packed in an .ear.

Now I'm deploying the war as an packed, not exploded, archive. This
way is no problem because the war is packed in an temporary location
and this changes from deployment to deployment. On undeployment the
jboss failes to delete the previous directory (in cause of a locked
struts.jar) but this is no real problem.


OK, I think I might have seen problem too, but at this time, I am 
deploying my struts webapp war as a war file by copying it into the 
deploy directory and it causes no problem but redeploys nicely.


What version of JBoss are you using?

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



Re: html:optioncollection

2005-09-19 Thread Wendy Smoak

From: "Marc Ende" <[EMAIL PROTECTED]>


I'm using the  only with collections. Now I
need
to order the contents. It's possible to assign anything else
(orderable/sortable) than collections to this tag?


What are you using now, and what do you need it to do?

This works with a TreeMap to keep things in alphabetical order:

 


I'm also using LRUMap from Commons Collections to display a list with a
fixed size from least-to-most recently used, though those are just links,
not .

There's probably a collection that will do what you want, either in the JDK
or in Commons.  And if it's a List, you can write a Comparator and call
Collections.sort(List,Comparator) before you place it in scope for the
 tag.

--
Wendy Smoak


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



Re: [Shale] clay templating

2005-09-19 Thread Gary VanMatre
>
> > The only difference is instead of  in profile
> > screen I need profile.html and in main I need main.html components. How
> > can I do this?
> 
> Well... to me, this sounds like a job for Tiles.  Gary, what do you think?
> 

Yes, I agree.  The role of Clay is to glue togather JSF components.  This is at 
a smaller granularity than pulling together page fragments as tiles does.  

The main difference is that Clay doesn’t have a concept of a abstract page 
layout like tiles.  In tiles, you can define a single layout that is used by 
all pages.  With Clay you have to have a concrete HTML template or JSP page.  

In your example you could construct a jsp page that has a single clay component 
that includes your layout components.  But, you would still have to create a 
jsp or clay template for each page.

mainPage.jsp
**JSP page declarations**


Or a page with a single span tag.
Mypage.clay


Tiles allows you to define an abstract page where Cay currently requires a 
concrete page where you abstract the content.

> -- 
> Wendy Smoak
> 
> 

Gary


> From: "Maksimenko Alexander" <[EMAIL PROTECTED]>
> 
> > The only difference is instead of  in profile
> > screen I need profile.html and in main I need main.html components. How
> > can I do this?
> 
> Well... to me, this sounds like a job for Tiles.  Gary, what do you think?
> 
> As far as Shale + Tiles documentation goes, there is David's blog entry:
>http://jroller.com/page/dgeary?entry=shale_adds_tiles_integration
> 
> And another list member, Geeta Ramani, has put together an example webapp:
>http://marc.theaimsgroup.com/?l=struts-user&m=112507041612466&w=2
> 
> One thing to keep in mind is that Standalone Tiles is still in the Struts
> Sandbox.  It hasn't had a release yet and it could undergo some changes
> before it does.
> 
> If you're using MyFaces, they have support for Struts Tiles-- there's a
> 'tiles.war' example app as part of their distribution, and a new Wiki page
> here:  http://wiki.apache.org/myfaces/Tiles_and_JSF .
> 
> I haven't worked with it enough to know what the difference is between using
> Struts Tiles or Standalone Tiles in a webapp.  Somewhere on my TODO list is
> to take the MyFaces tiles.war example and see what it takes to convert it to
> Standalone Tiles.
> 
> -- 
> Wendy Smoak
> 
> 
> -
> 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]



html:optioncollection

2005-09-19 Thread Marc Ende
Hi,
 
I'm using the  only with collections. Now I need
to order the contents. It's possible to assign anything else
(orderable/sortable) than collections
to this tag? 
 
marc


Re: [Shale] clay templating

2005-09-19 Thread Wendy Smoak

From: "Maksimenko Alexander" <[EMAIL PROTECTED]>


The only difference is instead of  in profile
screen I need profile.html and in main I need main.html components. How
can I do this?


Well... to me, this sounds like a job for Tiles.  Gary, what do you think?

As far as Shale + Tiles documentation goes, there is David's blog entry:
  http://jroller.com/page/dgeary?entry=shale_adds_tiles_integration

And another list member, Geeta Ramani, has put together an example webapp:
  http://marc.theaimsgroup.com/?l=struts-user&m=112507041612466&w=2

One thing to keep in mind is that Standalone Tiles is still in the Struts
Sandbox.  It hasn't had a release yet and it could undergo some changes
before it does.

If you're using MyFaces, they have support for Struts Tiles-- there's a
'tiles.war' example app as part of their distribution, and a new Wiki page
here:  http://wiki.apache.org/myfaces/Tiles_and_JSF .

I haven't worked with it enough to know what the difference is between using
Struts Tiles or Standalone Tiles in a webapp.  Somewhere on my TODO list is
to take the MyFaces tiles.war example and see what it takes to convert it to
Standalone Tiles.

--
Wendy Smoak


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



Re: [Shale] clay templating

2005-09-19 Thread Maksimenko Alexander

Thanks for your answer!
great that I finally found you, guys :)
your answer is very clear but I need some details:
about html template approach:

lets there is two screens "profile" and "main". Layout of them is 
defined by layout.html


#{managed-bean-name.title}

  

 
  


 


  

  


The only difference is instead of  in profile screen 
I need profile.html and in main I need main.html components. How can I do this?

As I understand I need something like this:


   
   
   



   




   


and from login :

   
   #{login.login}
   success
   /profilePage.clay
   

(yes - I've specified addition mapping to faces servlet)

so view handler should try to find view "profilePage" from components 
defined in clay-plugin. but may I do something wrong - I tried many ways 
but without success :(
In rolodex I can't found anything about templating - it's just three 
different pages


Thanks


Hi!
I don't know is there proper place for discussing shale. If it's not can 
you point me to correct mailing list


   



This is the mailing list.  You've even prefixed your message subject with [Shale].   



 

I'm using JSF and looking for good rendering/template framework. 
Remembering that Shale is created by those people who have done Struts I 
prefer using it instead of faceletes ;)


When I read "Clay's approach is unique. The granularity is targeted at 
the declaration of JSF components versus composition of JSP fragments" I 
thought that it's that I exactly want - if I have a tree of components I 
want to change in templates components - not html fragments. But when I 
build Shale from sources I can't find this very important feature for me 
- ability to specify component tree templates  in clay-config.xml. For 
example:

I want to determine component profilePage


   
   
   



   


and redirect to this component from my actions like any other views (e.g 
jsps).


   
   #{login.login}
   success
   /profilePage.clay
   
Did I miss something?
   



You are using full HTML view's in this example.  You must add "*.clay" to your 
faces servlet mapping.

   faces
   *.clay



 


Thanks

   




Clay gives you allot of flexibility for creating composition within a page but there are really only two options for identifying a page that translates into a JSF view id.  


1)  JSP views - A standard JSP page using Clay's custom JSP tag.
2)  HTML tapestry like views - HTML templating where a standard HTML document 
is used to bind a component to an HTML element using a jsfid attribute.

JSP views:
With the first option, you will use clay's XML configuration files to construct 
a page, just as you have shown above.  From the JSP page, you specify a 
top-level clay component using the clay JSP tag.



Since this is a custom tag, you can interleave other JSF tags or even JSTL tags.  Another option using JSP views would be to define a page fragment using an HTML template.  You might use this option if you had a tricky html table layout that the standard panelGrid would not handle.  To do this, you have to specify the suffix that you are using to identify that a jsfid is a HTML template.  


This is done with an environment initialization parameter in your web deployment 
descriptor called "clay-template-suffix".   Another required environment 
setting if your using JSP view’s is “clay-config-files” which is a comma delimited list 
of your clay XML configuration files.

HTML views:
The html views are really starting to shape up.  The idea here is that you can 
use an html page as a template for defining the entire faces page.  There are 
two options here.  You can use the html mockup to bind to component definitions 
within the Clay XML configuration files. Or, you can define a page without 
using a configuration file.  And, you can mix and match these options.  You can 
even imbed JSF expressions within the text of the html page similar to JSP 2.0.


#{managed-bean-name.title}

  

 
  


 


  

  


The key to full html view is that the page must be dispatched thru the faces servlet.  This means that you must have a servlet mapping to the suffix that you specify for the "clay-template-suffix".  


You can see an example of all of these techniques in the Rolodex usecase in the 
nightly build  
(http://svn.apache.org/builds/struts/nightly/struts-shale/shale-framework-20050919.zip).
  The war is located under the webapps folder.

Gary



 


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

   






RE: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread David Erickson
> On 9/19/05, David Erickson <[EMAIL PROTECTED]> wrote:
> > > -Original Message-
> > > From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED]
> > > Use ActionRedirect class in your STRUTS Action's execute:
> > >
> > > ActionRedirect ar = new
> > > ActionRedirect(mapping.findForward("myRedirectForward");
> > > ar.addParameter("id",yourId);
> > > return ar;
> > >
> > > and it should work :]
> >
> > Right, I understand this can work, the problem is WHERE do I return an
> > ActionForward or at least get access to the ActionForward that is going
> to
> > be used when the XML Validation fails.  The validate method on the form
> > returns an ActionErrors object, not an ActionForward...
> 
> Do not use automatic validation, do not use "input" attribute. Call
> validate() manually from your action class.

Perfect, I totally forgot you can trigger the xml validation.  Thanks for
the tip!!

-David


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



Re: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread Michael Jouravlev
On 9/19/05, David Erickson <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED]
> > Use ActionRedirect class in your STRUTS Action's execute:
> >
> > ActionRedirect ar = new
> > ActionRedirect(mapping.findForward("myRedirectForward");
> > ar.addParameter("id",yourId);
> > return ar;
> >
> > and it should work :]
> 
> Right, I understand this can work, the problem is WHERE do I return an
> ActionForward or at least get access to the ActionForward that is going to
> be used when the XML Validation fails.  The validate method on the form
> returns an ActionErrors object, not an ActionForward...

Do not use automatic validation, do not use "input" attribute. Call
validate() manually from your action class.

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



A Unique problem Struts 1.2.4

2005-09-19 Thread Pradeep Shekade
Hello,

We are using Struts 1.2.4, and Weblogic 8.1.

The problem is as follows -

One of the action mappings in my struts-config.xml is -




The "sampleActionForm" corresponds to an entry in  as follows 



The class SampleActionForm has a single variable with the appropriate setter 
and getter namely
public void setCarrierName(String carrierName)
public String getCarrierName()

The JSP that correponds to this action has entries as follows -


 



Please note that the property "carrierNam" has been deliberately misspelt.

The SURPRISING thing is that struts does not throw any errors at all when 
forwarding to this page. I am sure I am missing something

We have many JSPs like this but only this one seems to be having this 
problem...

Any pointers on what could be the problem ?


Thanks and Regards,

Pradeep


RE: Radio Button in ActionForm

2005-09-19 Thread rahul
thank you very much
It worked!

> -Original Message-
> From: Harland, David [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 6:07 PM
> To: Struts Users Mailing List
> Subject: RE: Radio Button in ActionForm
>
>
> Initialise your Action Form set sec equal to 'M' or 'F'.
>
> Add the following to your jsp
> 
> 
>
>
> -Original Message-
> From: rahul [mailto:[EMAIL PROTECTED]
> Sent: 19 September 2005 13:34
> To: Struts Users Mailing List
> Subject: Radio Button in ActionForm
>
> hi all,
>
> I am looking at some simplified way of displaying the radio button
> on a jsp depending upon the value of an ActionForm's property.
>
> For example I have got an ActionForm with a property name sex, which can
> take 'M' or 'F' as input.
>
> Now after storing the value in an ActionForm instance (which is then set
> as
> a request
> attribute) from database, I am forwarding the request to a jsp where I
> need
> to
> display the values I collected. like
>
> (.) Male
> ( ) Female
>
> Is there any elegant way of doing this using  tags in struts
> ?
>
>
> I know its pretty simple in case of simple input box where we do it by
>  but how to go with
> radio
> buttons ?
>
>
> Any suggestions ?
>
>  --Rahul
>
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> This e mail is from DLA Piper Rudnick Gray Cary UK LLP.
>
> The contents of this email and any attachments are confidential
> to the intended recipient. They may not be disclosed to or used
> by or copied in any way by anyone other than the intended
> recipient. If this email is received in error, please contact DLA
> Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 quoting the
> name of the sender and the email address to which it has been
> sent and then delete it.
>
> Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor
> the sender accept any responsibility for viruses and it is your
> responsibility to scan or otherwise check this email and any attachments.
>
> DLA Piper Rudnick Gray Cary UK LLP is a limited liability
> partnership registered in England and Wales (registered number
> OC307847) which provides services from offices in England,
> Belgium, Germany and the People's Republic of China.  A list of
> members is open for inspection at its registered office and
> principal place of business 3 Noble Street, London EC2V 7EE.
> Partner denotes member of a limited liability partnership.
>
> DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law
> Society and is a member of DLA Piper Rudnick Gray Cary, a global
> legal services organisation, the members of which are separate
> and distinct legal entities.  For further information, please
> refer to www.dlapiper.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: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread David Erickson
> -Original Message-
> From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 4:03 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Validator woes, modifying the input forward on the fly?
> 
> > Hi I have a situation like this:
> > User clicks on /viewUser.do?id=4 action, which loads the specific user
> > with
> > id4 to be viewed.
> > On that page is a form, the form is submitted, if some part of the xml
> > validation fails I need to return back to /viewUser.do?id=4.  It would
> be
> > ideal if the information from the form could be retained.  I can set my
> > input forward to be: input="/viewUser.do" but somehow I need to access
> > that
> > and add the parameter id=4 to it after the xml validation takes place,
> but
> > before the new page is requested.  Is there any possible way to do this?
> 
> 
> Use ActionRedirect class in your STRUTS Action's execute:
> 
> ActionRedirect ar = new
> ActionRedirect(mapping.findForward("myRedirectForward");
> ar.addParameter("id",yourId);
> return ar;
> 
> and it should work :]

Right, I understand this can work, the problem is WHERE do I return an
ActionForward or at least get access to the ActionForward that is going to
be used when the XML Validation fails.  The validate method on the form
returns an ActionErrors object, not an ActionForward...

Any other ideas?
Thanks,
David


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



RE: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread David Erickson
Ya I had thought about this, however I am trying to stay away from storing
stuff in the session unless it is absolutely critical, however I will keep
this in mind.
Thanks,
David

> -Original Message-
> From: Holshausen, Ron [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 19, 2005 1:54 AM
> To: Struts Users Mailing List
> Subject: RE: Validator woes, modifying the input forward on the fly?
> 
> Hi David,
> 
> One way to get around the problem would be to store the form bean in the
> session, or at least the id, and it will exist between requests. You'll
> just need to make sure your viewUser.do action updates the session
> variable correctly, and any other actions that use it.
> 
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: 19 September 2005 06:51
> To: 'Struts Users Mailing List'
> Subject: RE: Validator woes, modifying the input forward on the fly?
> 
> > -Original Message-
> > From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> > Sent: Sunday, September 18, 2005 7:26 PM
> > To: user@struts.apache.org
> > Subject: Re: Validator woes, modifying the input forward on the fly?
> >
> > David Erickson wrote:
> > > Hi I have a situation like this:
> > > User clicks on /viewUser.do?id=4 action, which loads the specific
> user
> > with
> > > id4 to be viewed.
> > > On that page is a form, the form is submitted, if some part of the
> xml
> > > validation fails I need to return back to /viewUser.do?id=4.  It
> would
> > be
> > > ideal if the information from the form could be retained.  I can set
> my
> > > input forward to be: input="/viewUser.do" but somehow I need to
> access
> > that
> > > and add the parameter id=4 to it after the xml validation takes
> place,
> > but
> > > before the new page is requested.  Is there any possible way to do
> this?
> >
> > The parameter is stored into the request when it is first submitted,
> so
> > provided you haven't told Struts to redirect to the input page (it'll
> > use a forward by default) the parameter -- and any others submitted
> from
> > your form -- should still be in the request. So, you shouldn't need to
> > do anything yourself to have the data available when the input page is
> > redisplayed.
> 
> I guess a better explanation is due.  Ok the user sees /viewUser.do?id=4
> which in my action pulls the User object with ID 4 from the db, places
> it in
> to the request, then loads the .viewUser tiles definition and displays
> the
> data. In that page is a form that submits to /addEmailAddress.do.  If
> the
> xml validation fails on submitting it then pulls the input forward from
> addEmailAddress.do, which I tried setting to input=".viewUser", the
> tiles
> definition.  After a failure validating, my jsp reports an error finding
> the
> user object, because when you submit you are getting a new request, and
> the
> user object is no longer loaded into the request object.  I also tried
> setting the input element to be input="/viewUser.do", which runs the
> action
> again, but doesn't have the id=4 parameter I need to specify which user
> object to load out of the database.  Make sense?  So essentially what I
> am
> looking for is a way to modify the input forward that is used when
> validation fails.  I tried this in the validate method of my form,
> however
> it says configuration locked if I do a setInput(), and if I do
> getInputForward then modify it, it doesn't seem to do anything..
> (probably
> returning a copy).  So.. if anyone has any ideas.. :)
> 
> Thanks,
> David
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> E-Mail Disclaimer
> 
> Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
> Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
> reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
> Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
> Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
> E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
> den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
> nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
> so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu
> setzen.
> 
> 
> For legal and security reasons the information provided in this e-mail is
> not
> legally binding. Upon request we would be pleased to provide you with a
> legally
> binding confirmation in written form. Any form of unauthorised use,
> publication,
> reproduction, copying or disclosure of the content of this e-mail is not
> permitted.
> This message is exclusively for the person addressed or their
> representative.
> If you are not the intended recipient of this message and its contents,
> please
> notify the sender immediately.
> 
> -

Re: [Shale] clay templating

2005-09-19 Thread Gary VanMatre
> Hi!
> I don't know is there proper place for discussing shale. If it's not can 
> you point me to correct mailing list
> 

This is the mailing list.  You've even prefixed your message subject with 
[Shale].   


> I'm using JSF and looking for good rendering/template framework. 
> Remembering that Shale is created by those people who have done Struts I 
> prefer using it instead of faceletes ;)
> 
> When I read "Clay's approach is unique. The granularity is targeted at 
> the declaration of JSF components versus composition of JSP fragments" I 
> thought that it's that I exactly want - if I have a tree of components I 
> want to change in templates components - not html fragments. But when I 
> build Shale from sources I can't find this very important feature for me 
> - ability to specify component tree templates  in clay-config.xml. For 
> example:
> I want to determine component profilePage
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> and redirect to this component from my actions like any other views (e.g 
> jsps).
> 
> 
> #{login.login}
> success
> /profilePage.clay
> 
> Did I miss something?

You are using full HTML view's in this example.  You must add "*.clay" to your 
faces servlet mapping.

faces
*.clay



> Thanks
> 


Clay gives you allot of flexibility for creating composition within a page but 
there are really only two options for identifying a page that translates into a 
JSF view id.  

1)  JSP views - A standard JSP page using Clay's custom JSP tag.
2)  HTML tapestry like views - HTML templating where a standard HTML document 
is used to bind a component to an HTML element using a jsfid attribute.

JSP views:
With the first option, you will use clay's XML configuration files to construct 
a page, just as you have shown above.  From the JSP page, you specify a 
top-level clay component using the clay JSP tag.



Since this is a custom tag, you can interleave other JSF tags or even JSTL 
tags.  Another option using JSP views would be to define a page fragment using 
an HTML template.  You might use this option if you had a tricky html table 
layout that the standard panelGrid would not handle.  To do this, you have to 
specify the suffix that you are using to identify that a jsfid is a HTML 
template.  

This is done with an environment initialization parameter in your web 
deployment descriptor called "clay-template-suffix".   Another required 
environment setting if your using JSP view’s is “clay-config-files” which is a 
comma delimited list of your clay XML configuration files.

HTML views:
The html views are really starting to shape up.  The idea here is that you can 
use an html page as a template for defining the entire faces page.  There are 
two options here.  You can use the html mockup to bind to component definitions 
within the Clay XML configuration files. Or, you can define a page without 
using a configuration file.  And, you can mix and match these options.  You can 
even imbed JSF expressions within the text of the html page similar to JSP 2.0.


#{managed-bean-name.title}

   
 
  
   
 
  

   
 
   


The key to full html view is that the page must be dispatched thru the faces 
servlet.  This means that you must have a servlet mapping to the suffix that 
you specify for the "clay-template-suffix".  

You can see an example of all of these techniques in the Rolodex usecase in the 
nightly build  
(http://svn.apache.org/builds/struts/nightly/struts-shale/shale-framework-20050919.zip).
  The war is located under the webapps folder.

Gary



> -
> 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] NullpointerException when running struts-shale-usecas es

2005-09-19 Thread Wendy Smoak

From: <[EMAIL PROTECTED]>


Same problem with latest build - It gives a NPE on 5.0.30 during
startup:

2005-09-19 15:48:19 StandardContext[/struts-shale-usecases]Exception
starting filter shale
javax.servlet.ServletException: Error at line 41 char 56: null
...
- Root Cause -
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
19)

My setup is Sun JDK 1.4.2_09
Tomcat 5.0.30 - No frills

It runs OK on 5.5.


What OS?  It's working fine on both JDK 1.4.2_09 and 1.5.0_01 with Tomcat 
5.0.30 on WinXP Pro.


Sep 19, 2005 7:06:48 AM org.apache.shale.faces.ShaleApplicationFilter init
INFO: Initializing Shale Application Filter

--
Wendy 




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



SV: [Shale] NullpointerException when running struts-shale-usecas es

2005-09-19 Thread hermod . opstvedt
Hi

Same problem with latest build - It gives a NPE on 5.0.30 during
startup:

2005-09-19 15:48:19 StandardContext[/struts-shale-usecases]Exception
starting filter shale
javax.servlet.ServletException: Error at line 41 char 56: null
...
- Root Cause -
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
19)



My setup is Sun JDK 1.4.2_09
Tomcat 5.0.30 - No frills

It runs OK on 5.5.


Hermod


-Opprinnelig melding-
Fra: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sendt: 19. september 2005 15:41
Til: Struts Users Mailing List
Emne: Re: [Shale] NullpointerException when running
struts-shale-usecases


From: "Holshausen, Ron" <[EMAIL PROTECTED]>

> Yeah, I've upgraded to the version from last night (20050918), which
> works ok. This might be a bug, because tomcat 5.0.x and 5.5.x both
> implement the same version of the specs. But I'm not sure whether it
is
> a bug in tomcat, the xml parser, or commons-digester.

I'm not seeing a problem with the latest nightly (20050919) on either
Tomcat 
5.5.9 or 5.0.30.

If anyone is still having trouble with the use-cases app starting up,
can 
you please try the latest version?
   http://svn.apache.org/builds/struts/nightly/struts-shale/

Shale should work with Servlet 2.4 (Tomcat 5.x) and JDK 1.4.  If it
doesn't, 
please let us know what combination you're using.

-- 
Wendy Smoak 



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



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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



Re: [Shale] NullpointerException when running struts-shale-usecases

2005-09-19 Thread Wendy Smoak

From: "Holshausen, Ron" <[EMAIL PROTECTED]>


Yeah, I've upgraded to the version from last night (20050918), which
works ok. This might be a bug, because tomcat 5.0.x and 5.5.x both
implement the same version of the specs. But I'm not sure whether it is
a bug in tomcat, the xml parser, or commons-digester.


I'm not seeing a problem with the latest nightly (20050919) on either Tomcat 
5.5.9 or 5.0.30.


If anyone is still having trouble with the use-cases app starting up, can 
you please try the latest version?

  http://svn.apache.org/builds/struts/nightly/struts-shale/

Shale should work with Servlet 2.4 (Tomcat 5.x) and JDK 1.4.  If it doesn't, 
please let us know what combination you're using.


--
Wendy Smoak 




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



RE: [Shale] NullpointerException when running struts-shale-usecases

2005-09-19 Thread Holshausen, Ron
Yeah, I've upgraded to the version from last night (20050918), which
works ok. This might be a bug, because tomcat 5.0.x and 5.5.x both
implement the same version of the specs. But I'm not sure whether it is
a bug in tomcat, the xml parser, or commons-digester.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2005 17:58
To: user@struts.apache.org
Subject: SV: [Shale] NullpointerException when running
struts-shale-usecases

Hi

It did start up ok under 5.5.9, so there must be some sort of
compatibility issue with 5.0.30

Hermod

-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 13:46
Til: user@struts.apache.org
Emne: SV: [Shale] NullpointerException when running
struts-shale-usecases


Hi 

I will give it a try under 5.5.9, but maybe I should try with another
version of the parser first.

Hermod

-Opprinnelig melding-
Fra: Holshausen, Ron [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 10:46
Til: Struts Users Mailing List
Emne: RE: [Shale] NullpointerException when running
struts-shale-usecases


I'm running it under tomcat 5.5.9, and jdk 1.5.0_04.

It seems to be a problem parsing the chain-config.xml by the shale
filter. I'm not sure if this is something introduced after the 6th, or a
problem with the xml parser.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 16 September 2005 11:33
To: user@struts.apache.org
Subject: SV: [Shale] NullpointerException when running
struts-shale-usecases

Hi

I could not find the 6th distro, so I tried the earliest one I could
find, beeing the 8th. Same problem.

Hermod

-Opprinnelig melding-
Fra: Holshausen, Ron [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 09:47
Til: Struts Users Mailing List
Emne: RE: [Shale] NullpointerException when running
struts-shale-usecases


I'm running the version from the 6th without any modifications, and it
runs fine.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 16 September 2005 10:42
To: user@struts.apache.org
Subject: [Shale] NullpointerException when running struts-shale-usecases

Hi

I tried to run the struts-shale-usecases webapp from the nightly
build(16th), but I get a NullpointerException during startup.

I am running on Tomcat 5.0.30 and have tried both JDK 1.4.2_09 and
1.5.0_04.

javax.servlet.ServletException: Error at line 41 char 56: null
at
org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilte
r.java:334)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
lterConfig.java:225)
...

- Root Cause -
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
19)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
45)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1364)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1647)
at
org.apache.shale.dialog.config.ConfigurationParser.parse(ConfigurationPa
rser.java:160)
at
org.apache.shale.dialog.config.ConfigurationInit.execute(ConfigurationIn
it.java:101)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:166)
at
org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilte
r.java:331)


Anybody had the same problem ?

Hermod

-Opprinnelig melding-
Fra: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 08:59
Til: Struts Users Mailing List
Emne: Re: [Shale]managed beans in request vs. session scope and how to
clean up


On 9/15/05, Holshausen, Ron <[EMAIL PROTECTED]> wrote:
> 
> Hi Geeta,
> 
> Just to let you know that one of the changes that was made to the JSF
> spec was to integrate the JSTL and JSF, so you could use c:forEach
with
> JSF UI components. So using JSTL is still ok, I do. And I think it
will
> be around for a while.


Ron's comments with respect to JSF 1.2 and JSTL interoperability are
correct 
... but they only address part of the overall issue. If all you care
about 
is *rendering* output based on an iteration over a 

SV: [Shale] NullpointerException when running struts-shale-usecas es

2005-09-19 Thread hermod . opstvedt
Hi

It did start up ok under 5.5.9, so there must be some sort of
compatibility issue with 5.0.30

Hermod

-Opprinnelig melding-
Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 13:46
Til: user@struts.apache.org
Emne: SV: [Shale] NullpointerException when running
struts-shale-usecases


Hi 

I will give it a try under 5.5.9, but maybe I should try with another
version of the parser first.

Hermod

-Opprinnelig melding-
Fra: Holshausen, Ron [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 10:46
Til: Struts Users Mailing List
Emne: RE: [Shale] NullpointerException when running
struts-shale-usecases


I'm running it under tomcat 5.5.9, and jdk 1.5.0_04.

It seems to be a problem parsing the chain-config.xml by the shale
filter. I'm not sure if this is something introduced after the 6th, or a
problem with the xml parser.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 16 September 2005 11:33
To: user@struts.apache.org
Subject: SV: [Shale] NullpointerException when running
struts-shale-usecases

Hi

I could not find the 6th distro, so I tried the earliest one I could
find, beeing the 8th. Same problem.

Hermod

-Opprinnelig melding-
Fra: Holshausen, Ron [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 09:47
Til: Struts Users Mailing List
Emne: RE: [Shale] NullpointerException when running
struts-shale-usecases


I'm running the version from the 6th without any modifications, and it
runs fine.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 16 September 2005 10:42
To: user@struts.apache.org
Subject: [Shale] NullpointerException when running struts-shale-usecases

Hi

I tried to run the struts-shale-usecases webapp from the nightly
build(16th), but I get a NullpointerException during startup.

I am running on Tomcat 5.0.30 and have tried both JDK 1.4.2_09 and
1.5.0_04.

javax.servlet.ServletException: Error at line 41 char 56: null
at
org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilte
r.java:334)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
lterConfig.java:225)
...

- Root Cause -
java.lang.NullPointerException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
19)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:29
45)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1364)
at
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(U
nknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.apache.commons.digester.Digester.parse(Digester.java:1647)
at
org.apache.shale.dialog.config.ConfigurationParser.parse(ConfigurationPa
rser.java:160)
at
org.apache.shale.dialog.config.ConfigurationInit.execute(ConfigurationIn
it.java:101)
at
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:166)
at
org.apache.shale.faces.ShaleApplicationFilter.init(ShaleApplicationFilte
r.java:331)


Anybody had the same problem ?

Hermod

-Opprinnelig melding-
Fra: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sendt: 16. september 2005 08:59
Til: Struts Users Mailing List
Emne: Re: [Shale]managed beans in request vs. session scope and how to
clean up


On 9/15/05, Holshausen, Ron <[EMAIL PROTECTED]> wrote:
> 
> Hi Geeta,
> 
> Just to let you know that one of the changes that was made to the JSF
> spec was to integrate the JSTL and JSF, so you could use c:forEach
with
> JSF UI components. So using JSTL is still ok, I do. And I think it
will
> be around for a while.


Ron's comments with respect to JSF 1.2 and JSTL interoperability are
correct 
... but they only address part of the overall issue. If all you care
about 
is *rendering* output based on an iteration over a collection of model
tier 
objects, the JSF 1.2 integration strategy will work fine. If, on the
other 
hand, you want to have *input* fields inside your  tag,
you're 
going to run into more problems. The right answer there is to use an
outer 
"grouping" component (such as, but not limited to, ) that
deals 
with the iteration issues during the postback processing phases (Apply 
Request Values through Process Validations) as well as during rendering.

Solutions based on JSTL

RE: Radio Button in ActionForm

2005-09-19 Thread Harland, David
Initialise your Action Form set sec equal to 'M' or 'F'.

Add the following to your jsp
 
 
 

-Original Message-
From: rahul [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2005 13:34
To: Struts Users Mailing List
Subject: Radio Button in ActionForm

hi all,

I am looking at some simplified way of displaying the radio button
on a jsp depending upon the value of an ActionForm's property.

For example I have got an ActionForm with a property name sex, which can
take 'M' or 'F' as input.

Now after storing the value in an ActionForm instance (which is then set
as
a request
attribute) from database, I am forwarding the request to a jsp where I
need
to
display the values I collected. like

(.) Male
( ) Female

Is there any elegant way of doing this using  tags in struts
?


I know its pretty simple in case of simple input box where we do it by
 but how to go with
radio
buttons ?


Any suggestions ?

 --Rahul





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



This e mail is from DLA Piper Rudnick Gray Cary UK LLP.

The contents of this email and any attachments are confidential to the intended 
recipient. They may not be disclosed to or used by or copied in any way by 
anyone other than the intended recipient. If this email is received in error, 
please contact DLA Piper Rudnick Gray Cary UK LLP on +44 (0) 8700 11 
quoting the name of the sender and the email address to which it has been sent 
and then delete it.

Please note that neither DLA Piper Rudnick Gray Cary UK LLP nor the sender 
accept any responsibility for viruses and it is your responsibility to scan or 
otherwise check this email and any attachments. 

DLA Piper Rudnick Gray Cary UK LLP is a limited liability partnership 
registered in England and Wales (registered number OC307847) which provides 
services from offices in England, Belgium, Germany and the People's Republic of 
China.  A list of members is open for inspection at its registered office and 
principal place of business 3 Noble Street, London EC2V 7EE.  Partner denotes 
member of a limited liability partnership.

DLA Piper Rudnick Gray Cary UK LLP is regulated by the Law Society and is a 
member of DLA Piper Rudnick Gray Cary, a global legal services organisation, 
the members of which are separate and distinct legal entities.  For further 
information, please refer to www.dlapiper.com.




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



Re: Adding a plug-in to a webapp

2005-09-19 Thread Gareth Evans

Hi Joe,

You can create a subclass of ActionServlet to load all of it's 'modules' from a directory rather 
than by specifiying them in the web.xml.  You could package your modules up as a jar file and load 
them directly without exploding them.


The axis2 project has a simular utility for dropping in new modules.

In terms of your menu system, your new ActionServlet subclass could store a list of deployed modules 
that your menu system just needs to query.


Regards,

Gareth

Joe Bermann wrote:

That's what I'm doing now, but the problem is that it forces me to 
re-release the BaseApp every time I want to ship a new feature.  The 
BaseApp is on a slower release schedule, about once every six months, 
whereas it would be nice to support new features sooner than that.


The BaseApp is performing some network management functions, and the 
"features" I've been talking about are the management of additional 
server types in the network.  My goal is to be able to dynamically add 
support for new server types without re-releasing the BaseApp.  
Otherwise the new server types will go unmanaged until the next 6-month 
release.


-- Joe

Original Message Follows
From: "Murray Collingwood" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: Adding a plug-in to a webapp
Date: Mon, 19 Sep 2005 12:05:29 +1000

Can you deploy the entire application with all options and use the 
security system to

establish which menu items appear?

This avoids the problem of different versions of baseApp and module.
It also avoids the problem of trying to look for different modules 
installed.
The only issue is that there may be a larger download for your customers 
when they

upgrade as the entire application is shipped each time.

Kind regards
mc

On 18 Sep 2005 at 21:27, Joe Bermann wrote:

 > Hi,
 >
 > I’m looking for some advice on how to design a Struts-based webapp 
that can

 > accept dynamic plug-in components after deployment.  I’ve searched the
 > archives and found some interesting posts about Struts Modules and 
Single

 > Sign On, but I didn’t find anything that addressed my situation exactly.
 >
 > I have a core webapp, let’s call it BaseApp, that contains a menu of 
launch

 > points to various features.  After BaseApp is deployed and running at a
 > customer site, the time will come when I want to add a launch point 
to a new

 > feature there.  In my current design I’ll need to re-deploy an updated
 > BaseApp that contains a new menu item and the new feature.  A much more
 > flexible design would allow me “drop in” a new set of files that the 
BaseApp
 > would recognize and link to (after restarting Tomcat).  This way the 
BaseApp
 > wouldn’t have to be updated, re-qualified, or re-deployed (a huge 
savings at

 > my company).
 >
 > One of the problems is dealing with authorization issues – the users 
should

 > have to log in only once and should be automatically logged out after a
 > period of inactivity, regardless of where in the GUI they click.
 > Unfortunately the BaseApp has already been developed with custom 
security
 > code; container managed security was not used.  After the user’s 
password is

 > authorized, a special object is stored in session scope; the presence of
 > that object indicates an authorized user.
 >
 > Another problem is upgrading the software in the field.  Eventually a 
new

 > version of the BaseApp will be released and the deployment in the field
 > needs to be upgraded.  This means that any plug-ins need to be 
upgraded too,

 > or at least maintained (not wiped out).
 >
 > I’ve thought of using separate webapps (i.e. the plug-in could be 
packaged
 > as a new webapp) with a dynamic menu in the BaseApp, but then I’m 
faced with

 > the authorization problems mentioned above.
 >
 > Is there a standard pattern in Struts to satisfy these requirements 
(will
 > Struts Modules do what I need)?  Is there some way to “drop in” 
additional
 > files into a pre-deployed webapp?  Does anyone have experience with 
these

 > types of issues?
 >
 > Thanks!
 >
 > -- Joe
 >
 >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >
 >
 > --
 > No virus found in this incoming message.
 > Checked by AVG Anti-Virus.
 > Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 
14/09/2005

 >



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005


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



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

Radio Button in ActionForm

2005-09-19 Thread rahul
hi all,

I am looking at some simplified way of displaying the radio button
on a jsp depending upon the value of an ActionForm's property.

For example I have got an ActionForm with a property name sex, which can
take 'M' or 'F' as input.

Now after storing the value in an ActionForm instance (which is then set as
a request
attribute) from database, I am forwarding the request to a jsp where I need
to
display the values I collected. like

(.) Male
( ) Female

Is there any elegant way of doing this using  tags in struts ?


I know its pretty simple in case of simple input box where we do it by
 but how to go with radio
buttons ?


Any suggestions ?

 --Rahul





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



RE: HTML-Reset-botton works only before submit

2005-09-19 Thread starki78
thank you all very much!


-- Initial Header ---

From  : "Wojciech Ciesielski" [EMAIL PROTECTED]
To  : "Struts Users Mailing List" user@struts.apache.org
Cc  :
Date  : Mon, 19 Sep 2005 13:45:56 +0200
Subject : RE: HTML-Reset-botton works only before submit







> > thank you very much for your answer!
> > But when I validate and I've have a error
> > I would like that the wrong typing is still
> > displayed that the user can see what was wrong!
> > Only after the reset button is clicked the values should be
> > cleared!
> > Is there a good possibility?
>
> Reset button usually works as
> clear-what-I-have-changed-since-page-was-loaded button, not clearing the
> form. So on page displaying submitted data in order to correct data - reset
> sets fields to what was submitted.
>
> If you want to clear form:
>
> 1. javascript: setting values to empty (so you can clear without reloading)
> 2. you probably have two actions like showMyForm.do and updateData.do - send
> user again to first action with form (showMyForm.do) - it's easier but
> requires reloading page
>
>
> 
> -
> 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: Adding a plug-in to a webapp

2005-09-19 Thread Joe Bermann
That's what I'm doing now, but the problem is that it forces me to 
re-release the BaseApp every time I want to ship a new feature.  The BaseApp 
is on a slower release schedule, about once every six months, whereas it 
would be nice to support new features sooner than that.


The BaseApp is performing some network management functions, and the 
"features" I've been talking about are the management of additional server 
types in the network.  My goal is to be able to dynamically add support for 
new server types without re-releasing the BaseApp.  Otherwise the new server 
types will go unmanaged until the next 6-month release.


-- Joe

Original Message Follows
From: "Murray Collingwood" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: "Struts Users Mailing List" 
Subject: Re: Adding a plug-in to a webapp
Date: Mon, 19 Sep 2005 12:05:29 +1000

Can you deploy the entire application with all options and use the security 
system to

establish which menu items appear?

This avoids the problem of different versions of baseApp and module.
It also avoids the problem of trying to look for different modules 
installed.
The only issue is that there may be a larger download for your customers 
when they

upgrade as the entire application is shipped each time.

Kind regards
mc

On 18 Sep 2005 at 21:27, Joe Bermann wrote:

> Hi,
>
> I’m looking for some advice on how to design a Struts-based webapp that 
can

> accept dynamic plug-in components after deployment.  I’ve searched the
> archives and found some interesting posts about Struts Modules and Single
> Sign On, but I didn’t find anything that addressed my situation exactly.
>
> I have a core webapp, let’s call it BaseApp, that contains a menu of 
launch

> points to various features.  After BaseApp is deployed and running at a
> customer site, the time will come when I want to add a launch point to a 
new

> feature there.  In my current design I’ll need to re-deploy an updated
> BaseApp that contains a new menu item and the new feature.  A much more
> flexible design would allow me “drop in” a new set of files that the 
BaseApp
> would recognize and link to (after restarting Tomcat).  This way the 
BaseApp
> wouldn’t have to be updated, re-qualified, or re-deployed (a huge savings 
at

> my company).
>
> One of the problems is dealing with authorization issues – the users 
should

> have to log in only once and should be automatically logged out after a
> period of inactivity, regardless of where in the GUI they click.
> Unfortunately the BaseApp has already been developed with custom security
> code; container managed security was not used.  After the user’s password 
is

> authorized, a special object is stored in session scope; the presence of
> that object indicates an authorized user.
>
> Another problem is upgrading the software in the field.  Eventually a new
> version of the BaseApp will be released and the deployment in the field
> needs to be upgraded.  This means that any plug-ins need to be upgraded 
too,

> or at least maintained (not wiped out).
>
> I’ve thought of using separate webapps (i.e. the plug-in could be 
packaged
> as a new webapp) with a dynamic menu in the BaseApp, but then I’m faced 
with

> the authorization problems mentioned above.
>
> Is there a standard pattern in Struts to satisfy these requirements (will
> Struts Modules do what I need)?  Is there some way to “drop in” 
additional

> files into a pre-deployed webapp?  Does anyone have experience with these
> types of issues?
>
> Thanks!
>
> -- Joe
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 
14/09/2005

>



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005


-
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: Reading image outside webapp contextpath??

2005-09-19 Thread Murray Collingwood
The  tag is evaluated by the browser (not the server), therefore 
when this 
code arrives at your users browser it is going to look for the image on their 
local hard 
drive - obviously it won't be there.

You will probably need to set up an action class to read and write the image 
back to the 
user.  I copied mine from here http://wiki.apache.org/struts/StrutsFileDownload

Kind regards
mc


On 19 Sep 2005 at 12:20, marc wrote:

> I'm making a project that makes a picture gallery that has to be 
> accessible throw web, wap, webdav and file sharing. The project 
> consisting of a ejb backend and struts frontend(using velocity as 
> presentation).
> I have made the EJB backend so that each dir with pictures in has a xml 
> file contaning all the pictures file address, thumbnail file address, a 
> wapnail file address and a name.
> 
> Now my problem is in the sturts frontend, when I what to show the 
> gallery. Tomcat will not show the picture because it is outside me 
> webapp contextpath.
> How do I make tomcat/struts look in this "shared" dir where I got me pic?
> Or do I have to do it in a other way?
> 
> This is my html:
> 
>  alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" > 
> 
> 
> 
> 
> 
> If this is the wrong forum then pls let me know so that I can post in 
> the right place.
> 
> Thank you all very much ;-)
> 
> /Marc
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005
> 



FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.25/102 - Release Date: 14/09/2005


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



R: "not-null" attribute in "key-property" tag cause xml parsing error

2005-09-19 Thread Bianchi Fabio
yes I know ... I made a little CONFUSION  sorry ;)

Fabio Bianchi
SVI/SACI
> Fiditalia S.p.A. 
> via G. Silva, 34 - 20149 Milano
Tel.  +39-02-43012409
Fax. +39-02-43012680
e-mail   [EMAIL PROTECTED]
> Sito internet: www.fiditalia.it


-Messaggio originale-
Da: Larry Meadors [mailto:[EMAIL PROTECTED]
Inviato: lunedì 19 settembre 2005 14.07
A: Struts Users Mailing List
Oggetto: Re: "not-null" attribute in "key-property" tag cause xml
parsing error


On 9/19/05, Bianchi Fabio <[EMAIL PROTECTED]> wrote:
> hi all,
> 
> this is my hbm.xml:

Huh?

> why ?

Huh?

> what can I do ?

Try posting to the Hibernate user list instead? ;-)

Larry

-
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: "not-null" attribute in "key-property" tag cause xml parsing error

2005-09-19 Thread Larry Meadors
On 9/19/05, Bianchi Fabio <[EMAIL PROTECTED]> wrote:
> hi all,
> 
> this is my hbm.xml:

Huh?

> why ?

Huh?

> what can I do ?

Try posting to the Hibernate user list instead? ;-)

Larry

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



RE: Auto Removal of trailing spaces from request params

2005-09-19 Thread Abhinav Bhatnagar

Hi All,



Is there any way in struts to automatically trim the string before
setting them in the form object?



We can do it thru javascript but just want to know if Struts has any
feature for this.



Thanks and regards,
Abhinav



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not to copy, disclose, or distribute this e-mail or its contents to any other 
person and any such actions are unlawful. This e-mail may contain viruses. 
Infosys has taken every reasonable precaution to minimize this risk, but is not 
liable for any damage you may sustain as a result of any virus in this e-mail. 
You should carry out your own virus checks before opening the e-mail or 
attachment. Infosys reserves the right to monitor and review the content of all 
messages sent to or from this e-mail address. Messages sent to or from this 
e-mail address may be stored on the Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***

RE: HTML-Reset-botton works only before submit

2005-09-19 Thread Wojciech Ciesielski
> thank you very much for your answer!
> But when I validate and I've have a error
> I would like that the wrong typing is still
> displayed that the user can see what was wrong!
> Only after the reset button is clicked the values should be
> cleared!
> Is there a good possibility?

Reset button usually works as
clear-what-I-have-changed-since-page-was-loaded button, not clearing the
form. So on page displaying submitted data in order to correct data - reset
sets fields to what was submitted.

If you want to clear form:

1. javascript: setting values to empty (so you can clear without reloading)
2. you probably have two actions like showMyForm.do and updateData.do - send
user again to first action with form (showMyForm.do) - it's easier but
requires reloading page



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



Re: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Martin Gainty

This from Ron Gagnon

 try {
/*
** we specify Locale.US since months are in english
**   we want to parse a TimeStamp
*/
SimpleDateFormat sdf = new SimpleDateFormat("dd-MMM- HH:mm:ss", 
Locale.US);


/*** fix timezone in the SimpleDateFormat**  this is a bug in JDK1.1*/
sdf.setCalendar(Calendar.getInstance());

/***  create a Date (no choice, parse returns a Date object) /
Date d = sdf.parse("11-Sept-2001 09:39:35");
System.out.println(d.toString());

/*** create a GregorianCalendar from a Date object */
GregorianCalendar gc = new GregorianCalendar();
   /*** now set GregorianCalendar object from the date ***/
gc.setTime(d);
System.out.println(gc.getTime().toString());
}
   catch (Exception e)
   {
e.printStackTrace();
}

HTH,
Martin-
- Original Message - 
From: "Holshausen, Ron" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Monday, September 19, 2005 7:21 AM
Subject: RE: a little bit OT: Calendar misbehaviour


Ok, then I assume the problem is that calendar.getTimeInMillis() returns
the timestamp in UTC, and you need it in your local timezone?

-Original Message-
From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED]
Sent: 19 September 2005 16:13
To: 'Struts Users Mailing List'
Subject: RE: a little bit OT: Calendar misbehaviour


You can try use the SimpleDateFormat class in java.text to parse the
time string.


That's what I am doing:

> Java.sql.Timestamp toReturn;
> SimpleDateFormat dateFormatTime("HH:mm");
> Calendar cal = new GregorianCalendar();
> cal.setTime(dateFormatTime.parse(timeString));
> toReturn = new Timestamp(cal.getTimeInMillis());


The problem is that I need to get Timestamp object but I can't find a
way to
set it... Apart from manual calculation of timestamp value based on
Calendar.getField() ...

Wojtek



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

E-Mail Disclaimer

Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach.
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein,
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is 
not
legally binding. Upon request we would be pleased to provide you with a 
legally
binding confirmation in written form. Any form of unauthorised use, 
publication,
reproduction, copying or disclosure of the content of this e-mail is not 
permitted.
This message is exclusively for the person addressed or their 
representative.
If you are not the intended recipient of this message and its contents, 
please

notify the sender immediately.

-
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: [ANN] [STRUTS/JSF] BOF XII / Belgo Central / Wednesday 28th S ept 2005 / 18:45

2005-09-19 Thread Pilgrim, Peter

*
P U S H E D  B A C K  ! 
*

The twelfth bird-of-feature Struts JSF London meet-up has been 
postponed for just eight days.

The event will now take place on Wednesday 28th September 2005,
at approximately 18:45. 

Same venue, same time. Bring a mate.


Thanks very much


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497


> -Original Message-
> From: Pilgrim, Peter [mailto:[EMAIL PROTECTED]
> Sent: 13 September 2005 17:11
> To: Struts User Apache (E-mail); MyFaces Discussion (E-mail)
> Subject: [ANN] [STRUTS/JSF] BOF XII / Belgo Central / Tuesday 
> 20th Sept
> 2005 / 18:45
> 
> 
> Greetings
> 
> I am very pleased to announce that the ``Struts / JSF London Network''
> is meeting for the twelfth bird-of-feather discussions 
> 
> This event will be taking place at the
> 
> ``Belgo Central Restaurant'' at 6:45PM on Tuesday, 20th 
> September, 2005.
> 
> 
> 50 Earlham Street, 
> Covent Garden, 
> London, 
> United Kingdom
> WC2H 9HP
>   
> 
> Nearest Tube: Covent Garden
> Cuisine: Belgian
> Telephone: 020 7813 2233 
> 
> For an ajax Google Map click here
> http://www.london-eating.co.uk/maps/248.asp
> 
> For the more traditional street map try this
> http://www.streetmap.co.uk/newmap.srf?x=530189&y=181082&z=0&sv
=WC2H+9HP&st=2&pc=WC2H+9HP&mapp=newmap.srf&searchp=newsearch.srf


(1) It's ok to bring a friend or colleague.
(2) My choice would have been china town.


--
Peter Pilgrim :: J2EE Software Development
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


==
Please access the attached hyperlink for an important electronic communications 
disclaimer: 

http://www.csfb.com/legal_terms/disclaimer_external_email.shtml

==


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



Re: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Jason Lea
If timezone if the problem, then use SimpleDateFormat.setTimeZone() and 
Calendar.setTimeZone() to set the timezones to UTC.  That should 
eliminate the timezone correction and give you the right number.


Wojciech Ciesielski wrote:


I try to parse some input from HTML form with

Java.sql.Timestamp toReturn;
SimpleDateFormat dateFormatTime("HH:mm");
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(0);
cal.setTime(dateFormatTime.parse(timeString));
toReturn = new Timestamp(cal.getTimeInMillis());


The point is, that getTimeInMillis() is returning 0 if timeString contains
only minutes (like "00:20") while cal.getTime().toString returns properly
"Thu Jan 01 00:10:00 CET 1970".

Why is it so? How can I initialize that Timestamp with such a string if
this
approach does not work?
   




I know what is the cause of this problem but still don't know how to work
around this... :-(

The problem is that in Poland we have GMT+01 time zone. Therefore default
time zone here is set to GMT +01. And time "Thu Jan 01 00:10:00 CET 1970" is
not translatable to milliseconds because getTimeInMillis() returns time in
UCT and it would be 50 minutes before Epoch...

Can anybody suggest any way of parsing time string to Timestamp? Is using
separate fields for hours and minutes the only solution available?

TIA





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


 



--
Jason Lea




Re:Reading image outside webapp contextpath??

2005-09-19 Thread starki78
well it should work but. Check the permissions of the files!
And sometimes you have to use C://ProjectGallery//web//..
this is what I would try at first.

Ciao


-- Initial Header ---

>From  : "news" [EMAIL PROTECTED]
To  : user@struts.apache.org
Cc  :
Date  : Mon, 19 Sep 2005 12:20:04 +0200
Subject : Reading image outside webapp contextpath??







> I'm making a project that makes a picture gallery that has to be
> accessible throw web, wap, webdav and file sharing. The project
> consisting of a ejb backend and struts frontend(using velocity as
> presentation).
> I have made the EJB backend so that each dir with pictures in has a xml
> file contaning all the pictures file address, thumbnail file address, a
> wapnail file address and a name.
>
> Now my problem is in the sturts frontend, when I what to show the
> gallery. Tomcat will not show the picture because it is outside me
> webapp contextpath.
> How do I make tomcat/struts look in this "shared" dir where I got me pic?
> Or do I have to do it in a other way?
>
> This is my html:
>
>  alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" >
>
>
>
>
>
> If this is the wrong forum then pls let me know so that I can post in
> the right place.
>
> Thank you all very much ;-)
>
> /Marc
>
> 
> -
> 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: HTML-Reset-botton works only before submit

2005-09-19 Thread starki78
thank you very much for your answer!
But when I validate and I've have a error
I would like that the wrong typing is still
displayed that the user can see what was wrong!
Only after the reset button is clicked the values should be
cleared!
Is there a good possibility?


Ciao!




-- Initial Header ---

>From  : "Wojciech Ciesielski" [EMAIL PROTECTED]
To  : "Struts Users Mailing List" user@struts.apache.org
Cc  :
Date  : Mon, 19 Sep 2005 12:41:50 +0200
Subject : RE: HTML-Reset-botton works only before submit







> > So my question is:
> >
> > Do I jave to use a javascript function?
> > Is it possible to map 
> > with the reset-method in the ActionForm?
> > I didn't manage this.Thanks for any advice
> >
> > Nice greetings
>
> You need to reset form - after submiting form instance with data is still in
> the request when it's forwarded to form...
>
> There are several solutions:
> If you validate manually (by calling validate() method within action):
> 1. call form's reset() method if validation fails
> or
> 2. set redirect=yes for forward mapping leading from form validation action
> to form displaying action
>
> If you validate it by extending ValidatorForm - add something like this to
> your form's validate method:
>
> ActionErrors toRet = super.validate();
> If(!toRet.isEmpty()) reset();
> Return toRet;
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>











-- Initial Header ---

>From  : "Wojciech Ciesielski" [EMAIL PROTECTED]
To  : "Struts Users Mailing List" user@struts.apache.org
Cc  :
Date  : Mon, 19 Sep 2005 12:41:50 +0200
Subject : RE: HTML-Reset-botton works only before submit







> > So my question is:
> >
> > Do I jave to use a javascript function?
> > Is it possible to map 
> > with the reset-method in the ActionForm?
> > I didn't manage this.Thanks for any advice
> >
> > Nice greetings
>
> You need to reset form - after submiting form instance with data is still in
> the request when it's forwarded to form...
>
> There are several solutions:
> If you validate manually (by calling validate() method within action):
> 1. call form's reset() method if validation fails
> or
> 2. set redirect=yes for forward mapping leading from form validation action
> to form displaying action
>
> If you validate it by extending ValidatorForm - add something like this to
> your form's validate method:
> 
> ActionErrors toRet = super.validate();
> If(!toRet.isEmpty()) reset();
> Return toRet;
>
>
>
> -
> 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: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Holshausen, Ron
Ok, then I assume the problem is that calendar.getTimeInMillis() returns
the timestamp in UTC, and you need it in your local timezone? 

-Original Message-
From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2005 16:13
To: 'Struts Users Mailing List'
Subject: RE: a little bit OT: Calendar misbehaviour

> You can try use the SimpleDateFormat class in java.text to parse the
> time string.

That's what I am doing:
> > Java.sql.Timestamp toReturn;
> > SimpleDateFormat dateFormatTime("HH:mm");
> > Calendar cal = new GregorianCalendar();
> > cal.setTime(dateFormatTime.parse(timeString));
> > toReturn = new Timestamp(cal.getTimeInMillis());

The problem is that I need to get Timestamp object but I can't find a
way to
set it... Apart from manual calculation of timestamp value based on
Calendar.getField() ...

Wojtek



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
E-Mail Disclaimer 
 
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, 
publication, 
reproduction, copying or disclosure of the content of this e-mail is not 
permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.

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



RE: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
> You can try use the SimpleDateFormat class in java.text to parse the
> time string.

That's what I am doing:
> > Java.sql.Timestamp toReturn;
> > SimpleDateFormat dateFormatTime("HH:mm");
> > Calendar cal = new GregorianCalendar();
> > cal.setTime(dateFormatTime.parse(timeString));
> > toReturn = new Timestamp(cal.getTimeInMillis());

The problem is that I need to get Timestamp object but I can't find a way to
set it... Apart from manual calculation of timestamp value based on
Calendar.getField() ...

Wojtek



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



RE: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Holshausen, Ron
You can try use the SimpleDateFormat class in java.text to parse the
time string.

-Original Message-
From: Wojciech Ciesielski [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2005 15:57
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: a little bit OT: Calendar misbehaviour

> I try to parse some input from HTML form with
> 
> Java.sql.Timestamp toReturn;
> SimpleDateFormat dateFormatTime("HH:mm");
> Calendar cal = new GregorianCalendar();
> cal.setTimeInMillis(0);
> cal.setTime(dateFormatTime.parse(timeString));
> toReturn = new Timestamp(cal.getTimeInMillis());
> 
> 
> The point is, that getTimeInMillis() is returning 0 if timeString
contains
> only minutes (like "00:20") while cal.getTime().toString returns
properly
> "Thu Jan 01 00:10:00 CET 1970".
> 
> Why is it so? How can I initialize that Timestamp with such a string
if
> this
> approach does not work?


I know what is the cause of this problem but still don't know how to
work
around this... :-(

The problem is that in Poland we have GMT+01 time zone. Therefore
default
time zone here is set to GMT +01. And time "Thu Jan 01 00:10:00 CET
1970" is
not translatable to milliseconds because getTimeInMillis() returns time
in
UCT and it would be 50 minutes before Epoch...

Can anybody suggest any way of parsing time string to Timestamp? Is
using
separate fields for hours and minutes the only solution available?

TIA





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
E-Mail Disclaimer 
 
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, 
publication, 
reproduction, copying or disclosure of the content of this e-mail is not 
permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.

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



RE: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
> I try to parse some input from HTML form with
> 
> Java.sql.Timestamp toReturn;
> SimpleDateFormat dateFormatTime("HH:mm");
> Calendar cal = new GregorianCalendar();
> cal.setTimeInMillis(0);
> cal.setTime(dateFormatTime.parse(timeString));
> toReturn = new Timestamp(cal.getTimeInMillis());
> 
> 
> The point is, that getTimeInMillis() is returning 0 if timeString contains
> only minutes (like "00:20") while cal.getTime().toString returns properly
> "Thu Jan 01 00:10:00 CET 1970".
> 
> Why is it so? How can I initialize that Timestamp with such a string if
> this
> approach does not work?


I know what is the cause of this problem but still don't know how to work
around this... :-(

The problem is that in Poland we have GMT+01 time zone. Therefore default
time zone here is set to GMT +01. And time "Thu Jan 01 00:10:00 CET 1970" is
not translatable to milliseconds because getTimeInMillis() returns time in
UCT and it would be 50 minutes before Epoch...

Can anybody suggest any way of parsing time string to Timestamp? Is using
separate fields for hours and minutes the only solution available?

TIA





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



RE: HTML-Reset-botton works only before submit

2005-09-19 Thread Murugesan, Kathiresan \(Cognizant\)
--- Begin Message ---
Hi,
 
Check the reset section in this link :
http://struts.apache.org/api/org/apache/struts/action/ActionForm.html#reset(org.apache.struts.action.ActionMapping,%20javax.servlet.http.HttpServletRequest)
 
Regards
Kathir.
 



From: starki78 [mailto:[EMAIL PROTECTED]
Sent: Mon 9/19/2005 3:47 PM
To: user
Subject: HTML-Reset-botton works only before submit 



Hi

I've a form with some input-fields and at the first time the html:reset works
normally.
I submit the form and I've errors that are validated.
I'm still at the same page.
When I now press the reset button they are not deleted any more.
Reset always retrieves the state, that was before the submit.
But I want also then that all fields are cleared.


So my question is:

Do I jave to use a javascript function?
Is it possible to map 
with the reset-method in the ActionForm?
I didn't manage this.Thanks for any advice

Nice greetings





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



<>--- End Message ---
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly 
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: HTML-Reset-botton works only before submit

2005-09-19 Thread Wojciech Ciesielski
> So my question is:
> 
> Do I jave to use a javascript function?
> Is it possible to map 
> with the reset-method in the ActionForm?
> I didn't manage this.Thanks for any advice
> 
> Nice greetings

You need to reset form - after submiting form instance with data is still in
the request when it's forwarded to form...

There are several solutions:
If you validate manually (by calling validate() method within action):
1. call form's reset() method if validation fails
or
2. set redirect=yes for forward mapping leading from form validation action
to form displaying action

If you validate it by extending ValidatorForm - add something like this to
your form's validate method:

ActionErrors toRet = super.validate();
If(!toRet.isEmpty()) reset();
Return toRet;



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



Reading image outside webapp contextpath??

2005-09-19 Thread marc
I'm making a project that makes a picture gallery that has to be 
accessible throw web, wap, webdav and file sharing. The project 
consisting of a ejb backend and struts frontend(using velocity as 
presentation).
I have made the EJB backend so that each dir with pictures in has a xml 
file contaning all the pictures file address, thumbnail file address, a 
wapnail file address and a name.


Now my problem is in the sturts frontend, when I what to show the 
gallery. Tomcat will not show the picture because it is outside me 
webapp contextpath.

How do I make tomcat/struts look in this "shared" dir where I got me pic?
Or do I have to do it in a other way?

This is my html:

alt="C:/ProjectGallery/web/testGallery/webthumb/T_billed4.jpeg" >	






If this is the wrong forum then pls let me know so that I can post in 
the right place.


Thank you all very much ;-)

/Marc


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



HTML-Reset-botton works only before submit

2005-09-19 Thread starki78
Hi

I've a form with some input-fields and at the first time the html:reset works
normally.
I submit the form and I've errors that are validated.
I'm still at the same page.
When I now press the reset button they are not deleted any more.
Reset always retrieves the state, that was before the submit.
But I want also then that all fields are cleared.

So my question is:

Do I jave to use a javascript function?
Is it possible to map 
with the reset-method in the ActionForm?
I didn't manage this.Thanks for any advice

Nice greetings




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



[Shale] clay templating

2005-09-19 Thread Maksimenko Alexander

Hi!
I don't know is there proper place for discussing shale. If it's not can 
you point me to correct mailing list


I'm using JSF and looking for good rendering/template framework. 
Remembering that Shale is created by those people who have done Struts I 
prefer using it instead of faceletes ;)


When I read "Clay's approach is unique. The granularity is targeted at 
the declaration of JSF components versus composition of JSP fragments" I 
thought that it's that I exactly want - if I have a tree of components I 
want to change in templates components - not html fragments. But when I 
build Shale from sources I can't find this very important feature for me 
- ability to specify component tree templates  in clay-config.xml. For 
example:

I want to determine component profilePage


   
   
   



   


and redirect to this component from my actions like any other views (e.g 
jsps).


   
   #{login.login}
   success
   /profilePage.clay
   
Did I miss something?
Thanks

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



RE: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread Wojciech Ciesielski
> Hi I have a situation like this:
> User clicks on /viewUser.do?id=4 action, which loads the specific user
> with
> id4 to be viewed.
> On that page is a form, the form is submitted, if some part of the xml
> validation fails I need to return back to /viewUser.do?id=4.  It would be
> ideal if the information from the form could be retained.  I can set my
> input forward to be: input="/viewUser.do" but somehow I need to access
> that
> and add the parameter id=4 to it after the xml validation takes place, but
> before the new page is requested.  Is there any possible way to do this?


Use ActionRedirect class in your STRUTS Action's execute:

ActionRedirect ar = new
ActionRedirect(mapping.findForward("myRedirectForward");
ar.addParameter("id",yourId);
return ar;

and it should work :]



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



a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
Hi there,

I try to parse some input from HTML form with 

Java.sql.Timestamp toReturn;
SimpleDateFormat dateFormatTime("HH:mm");
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(0);
cal.setTime(dateFormatTime.parse(timeString));
toReturn = new Timestamp(cal.getTimeInMillis());


The point is, that getTimeInMillis() is returning 0 if timeString contains
only minutes (like "00:20") while cal.getTime().toString returns properly
"Thu Jan 01 00:10:00 CET 1970".

Why is it so? How can I initialize that Timestamp with such a string if this
approach does not work?

TIA



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



RE: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread Holshausen, Ron
Hi David,

One way to get around the problem would be to store the form bean in the
session, or at least the id, and it will exist between requests. You'll
just need to make sure your viewUser.do action updates the session
variable correctly, and any other actions that use it.

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: 19 September 2005 06:51
To: 'Struts Users Mailing List'
Subject: RE: Validator woes, modifying the input forward on the fly?

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper
> Sent: Sunday, September 18, 2005 7:26 PM
> To: user@struts.apache.org
> Subject: Re: Validator woes, modifying the input forward on the fly?
> 
> David Erickson wrote:
> > Hi I have a situation like this:
> > User clicks on /viewUser.do?id=4 action, which loads the specific
user
> with
> > id4 to be viewed.
> > On that page is a form, the form is submitted, if some part of the
xml
> > validation fails I need to return back to /viewUser.do?id=4.  It
would
> be
> > ideal if the information from the form could be retained.  I can set
my
> > input forward to be: input="/viewUser.do" but somehow I need to
access
> that
> > and add the parameter id=4 to it after the xml validation takes
place,
> but
> > before the new page is requested.  Is there any possible way to do
this?
> 
> The parameter is stored into the request when it is first submitted,
so
> provided you haven't told Struts to redirect to the input page (it'll
> use a forward by default) the parameter -- and any others submitted
from
> your form -- should still be in the request. So, you shouldn't need to
> do anything yourself to have the data available when the input page is
> redisplayed.

I guess a better explanation is due.  Ok the user sees /viewUser.do?id=4
which in my action pulls the User object with ID 4 from the db, places
it in
to the request, then loads the .viewUser tiles definition and displays
the
data. In that page is a form that submits to /addEmailAddress.do.  If
the
xml validation fails on submitting it then pulls the input forward from
addEmailAddress.do, which I tried setting to input=".viewUser", the
tiles
definition.  After a failure validating, my jsp reports an error finding
the
user object, because when you submit you are getting a new request, and
the
user object is no longer loaded into the request object.  I also tried
setting the input element to be input="/viewUser.do", which runs the
action
again, but doesn't have the id=4 parameter I need to specify which user
object to load out of the database.  Make sense?  So essentially what I
am
looking for is a way to modify the input forward that is used when
validation fails.  I tried this in the validate method of my form,
however
it says configuration locked if I do a setInput(), and if I do
getInputForward then modify it, it doesn't seem to do anything..
(probably
returning a copy).  So.. if anyone has any ideas.. :)

Thanks,
David 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 
E-Mail Disclaimer 
 
Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.


For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, 
publication, 
reproduction, copying or disclosure of the content of this e-mail is not 
permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.

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



"not-null" attribute in "key-property" tag cause xml parsing error

2005-09-19 Thread Bianchi Fabio
hi all,

this is my hbm.xml:



..
..
..


the output Error:

[19/09/05 9.03.38:601 CEST] 736f736f XMLHelper E 
org.hibernate.util.XMLHelper  Error parsing XML: XML InputStream(33) the 
attribute "not-null" must be declared for element type "key-property".
[19/09/05 9.03.38:601 CEST] 736f736f XMLHelper E 
org.hibernate.util.XMLHelper  Error parsing XML: XML InputStream(41) the 
attribute "not-null" must be declared for element type "key-property".
[19/09/05 9.03.39:038 CEST] 736f736f WebGroup  E SRVE0026E: [Errore 
servlet]-[]: java.lang.ExceptionInInitializerError
at java.lang.Throwable.(Throwable.java)
at 
java.lang.ExceptionInInitializerError.(ExceptionInInitializerError.java:73)
at java.lang.Class.initialize(Class.java)
at 
it.fiditalia.struts.business.HibEntityBusiness.selectWebuserslog(HibEntityBusiness.java)
at it.fiditalia.struts.actions.HelloAction.execute(HelloAction.java:40)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at 
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at 
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at 
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at 
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at 
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at 
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at 
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at 
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at 
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at 
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
Caused by: java.lang.RuntimeException: Configuration problem: Error reading 
resource: it/fiditalia/hib/entity/Webuserslog.hbm.xml
at java.lang.Throwable.(Throwable.java:59)
at java.lang.Throwable.(Throwable.java:73)
at 
it.fiditalia.hib.manager.HibernateUtil.(HibernateUtil.java:20)
at java.lang.Class.initializeImpl(Native Method)
at java.lang.Class.initialize(Class.java)
at 
it.fiditalia.struts.business.HibEntityBusiness.selectWebuserslog(HibEntityBusiness.java)
at it.fiditalia.struts.actions.HelloAction.execute(HelloAction.java:40)
at 
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at 
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at 
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at 
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at 
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at 
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at 
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:28