Re: OT: Hibernate Session to User Session

2004-06-08 Thread Carl-Eric Menzel
I was reading in the Hibernate forums that when you have a WebApp DAO Hibernate DB design, and you open/close each Hibernate session at every single DAO method call (what I do now) its actually quite expensive, This is fairly expensive, but not that much. The *SessionFactory* is expensive,

Re: OT: Hibernate Session to User Session

2004-06-08 Thread Riyad Kalla
Carl, Thank you for the corrects, yes after you point it out it seems I did read something very incorrectly. I appreciate you suggestion at the bottom of the message, I will look into this. Best, Riyad Carl-Eric Menzel wrote: I was reading in the Hibernate forums that when you have a WebApp

thanxs : Security and Struts (JAAS?)

2004-06-08 Thread Shilpa Vaidya
Thanks Bill, I guess, i would be customising the request processor as u mentioned. this wud be one of the easy ways...of filtering. 1.As all action ie- *.do s pass through the request processor so i will keep an authorisation check. 2. I can use hashmaps and session too. Thanks. have a great

Re: html:link and map of request parameters

2004-06-08 Thread Nicolas De Loof
Great, thanks Nico. Here's how I do it: (This demonstrates both static and dynamic values for use with the html:link) ... ... jsp:useBean id=myLinkParams class=java.util.HashMap/ c:set target=${myLinkParams} property=id value=${dto.id}/ c:set target=${myLinkParams} property=type

RE: Hibernate Session to User Session

2004-06-08 Thread Marco Mistroni
Hi, On hibernate website, there's an example that associates A session to a threadlocal. You can safely use that pattern (it's one Of hibernate patterns)... You could have a DAOFactory (plugin) which instantiates the SessionFactory, And each DAO will get its own session associated with its

Tag tiles:insert/ doesn't use tilesUtilImplClassname parameter

2004-06-08 Thread sirhck
Hi, I have problem with parameter tilesUtilImplClassname defined in struts-config (tiles plug-in definition). I thought that tag tiles:insert/ uses this feature but it isn't. I found in source code that org.apache.struts.taglib.tiles.InsertTag has that implementation: protected void

Re: Dyanamic form

2004-06-08 Thread nikhil walvekar
Hi, Shoaib In getter method of arrayList you must check whether index is within bounds or not. if not then you have to add new object (blank) to arrayList,if possible i will send send utility class for this. Nikhil. [EMAIL PROTECTED] wrote: Hi Nikhil, thanks a lot for your help.But we have

Struts Validator Date Patterns

2004-06-08 Thread Enrique Medina
Hi, I would like to know if it's possible to indicate a validation of type date indicating as a dattePatern/datePatternStrict a key from an application resource message file. I mean, instead of: field property=fechaCierre depends=date arg0 key=field.mantdimensionescg.fechaCierre / arg1 name=date

Re: Single ActionForm accross multiple Actions

2004-06-08 Thread DGraham
Hidden form variables. Dennis Kunal H. Parikh [EMAIL PROTECTED] 06/07/2004 10:08 PM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To 'Struts Users Mailing List' [EMAIL PROTECTED] cc Subject Single ActionForm accross multiple Actions Hi All! I want to

Multibox combined with other fields

2004-06-08 Thread Guillermo Meyer
Hi: I have a form that may contain one or more rows. Each row has a passenger data. All the passengers in the form consists in a reservation: Number Title NameExtraSeat CabinBaggage 1 Mr Carlos Gardel Yes(1) No(1) 2 Mr

Action Forward

2004-06-08 Thread brati . sankarghosh
Is it possible to forward to a page(html/jsp) from the Action Class without declaring that forward in the struts-config.xml? Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.comDISCLAIMER: The information contained in this message is intended only

RE: Action Forward

2004-06-08 Thread Robert Taylor
Yes. return new ActionForward(path); robert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 7:17 AM To: Struts Users Mailing List Cc: Struts Users Mailing List Subject: Action Forward Is it possible to forward to a

RE: Tiles: Use layout definitions from config within jsp?

2004-06-08 Thread Kruse, Matt
You should read section 4.1.1 of the Tiles Advanced Features (link at bottom of the page of the struts site, section on the Tiles User Guide) which gives examples like so: tiles:definition id=definitionName page=/layouts/myLayout.jsp tiles:put name=title value=Page Title / ... How does

[OT] [SUCCESS] Struts Users in London / meet+greet / pub / netwo rking / BOF? / pre J1

2004-06-08 Thread Pilgrim, Peter
Dear Global Struts Users I am writing to you all in order to report that we had a sucessful first meeting in London, last night. Monday 7th June 2004 19:15 GMT @ Waxy O'Connor (Irish Pub) in central London, the West End. The following person were in attendance: Peter

RE: Action Forward

2004-06-08 Thread Shilpa Vaidya
I do not hink its possible. U will have to make an entry in struts config .xml. Something like this...if ur doing a simple forward. w/o any action class. regds shilpa for ex - action forward=/WEB-INF/package/pac_log.jsp path=/pac_log / -Original Message- From: [EMAIL

Re: [PATCH] for DynaActionForm set(String, int, Object)

2004-06-08 Thread Joe Germuska
At 6:06 AM +0200 6/8/04, Uwe Voigt wrote: This adds default resizing of array or java.util.List properties Btw. I don't know why ClassCastException is catched if the type is explicitly checked using instanceof Can you please attach this to a bugzilla ticket? http://issues.apache.org/bugzilla It

RE: Single ActionForm accross multiple Actions

2004-06-08 Thread Frank Zammetti
This is more or less what a session-scope ActionForm is for. As long as the ActionForm class contains all the properties and methods for all the screen it will service, just putting it in session I think is your best bet. As someone else said, hidden form fields are your other choice.

RE: Action Forward

2004-06-08 Thread Frank Zammetti
Cool, I didn't know that. Ignore my solutions Brati! (I suggested manually doing a forward via RequestDispatcher and returning null from the Action... I believe that would work as well, but certainly this is much better). Frank From: Robert Taylor [EMAIL PROTECTED] Reply-To: Struts Users

question about modules and switching .

2004-06-08 Thread Bullard, James
I have my default struts-config.xml and another struts-admin.xml module; Depending on the users credentials they might see a link to take them to the admin module. Anyway, from an Action which is being called from the admin module (would it be fair to call it a context, how separate is it _ ) I

ActionForm creation struts 1.1

2004-06-08 Thread Niall Lynch
HI All, I have an action form with two beans as member vairables. When the form is being ceated calls are made to the getter methods of the two beans in the form. What is making the calls to the getter methods? I can't see anything in the RequestUtils class that indicates a call is being made to

Re: Hibernate Session to User Session

2004-06-08 Thread Riyad Kalla
Marco, I believe that is what I am using now (it seems to be quite popular) but I don't quite understand the reasoning behind the ThreadLocal approach (I've actually never used 'ThreadLocal')... can you shed some light on this? What the mapping between Hibernate Sessions and Users (or Threads)

RE: Action Forward

2004-06-08 Thread brati . sankarghosh
Thanks Shilpa and Frank, I know about the part of adding it to struts-config.xml. but the case is I am receiving the path of a screen at runtime. so I cannot put it in struts-config.xml. Brati Sankar Ghosh Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.com

ServletContext in Action

2004-06-08 Thread Frank Zammetti
Can anyone see how to get access to the current ServletContext object from within an Action? I might be missing something obvious, but I don't see a way to do it. Specifically I need to get the real filesystem path to my WEB-INF folder... I have code that does this already, but it requires

Re: ServletContext in Action

2004-06-08 Thread DGraham
request.getSession().getServletContext(); Frank Zammetti [EMAIL PROTECTED] 06/08/2004 10:36 AM Please respond to Struts Users Mailing List [EMAIL PROTECTED] To [EMAIL PROTECTED] cc Subject ServletContext in Action Can anyone see how to get access to the current

Interaction with .NET web service

2004-06-08 Thread Ciaran Hanley
Hey, Is there an easy way for struts to interact with .NET and web services? Our current system is developed using struts but now there is a requirement to interact with a web service application which is designed using C Sharp and .NET. The problem is how to interact between the two as I do

Re: ServletContext in Action

2004-06-08 Thread Frank Zammetti
Ah! I knew it would be an obvious answer I didn't see. Thank you! Frank From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: ServletContext in Action Date: Tue, 8 Jun 2004 10:39:20 -0400

Re: ServletContext in Action

2004-06-08 Thread Hubert Rabago
There's also getServlet().getServletContext() in case you don't want to go through the HttpSession object. --- Frank Zammetti [EMAIL PROTECTED] wrote: Ah! I knew it would be an obvious answer I didn't see. Thank you! Frank From: [EMAIL PROTECTED] Reply-To: Struts Users Mailing List

Stop on first error not working !!!

2004-06-08 Thread Ayoub, Ashraf A
Dears, I use struts 1.1, and I use client side validation. I just want to set the stop on first error to true, as I don't want alerts to be that big to the user and I want them to appear one after one. I configured it as following, but it is still don't work !!! plug-in

Re: Interaction with .NET web service

2004-06-08 Thread Varun Garg
Use Axis... it will generate all the code that you need to connect to the .net web service, just get the wsdl from .net and use Axis to generate the code and use it. Varun --- Ciaran Hanley [EMAIL PROTECTED] wrote: Hey, Is there an easy way for struts to interact with .NET and web

RE: Hibernate Session to User Session

2004-06-08 Thread Marco Mistroni
Hi, I m no expert in hibernate :-( , I got suggestions From list and hibernate docs... If u check hibernate reference, it mentions somewhere why They suggest using ThreadLocal. If I remember correctly they say that proper use is to use One session (hibernate session) per request.. then I

Re: ServletContext in Action

2004-06-08 Thread Frank Zammetti
What is getServlet() a method of though? I didn't see it in Action, but I could have missed it. I've done as was suggested via Session, works fine. I would in fact prefer to not go through session if possible though... Frank From: Hubert Rabago [EMAIL PROTECTED] Reply-To: Struts Users

Re: Interaction with .NET web service

2004-06-08 Thread Martin Gainty
Ciaran read this article http://www.javaworld.com/javaworld/jw-06-2002/jw-0628-j2eevsnet.html -Martin - Original Message - From: Ciaran Hanley [EMAIL PROTECTED] To: Struts User Mailing List [EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 10:38 AM Subject: Interaction with .NET web service

Re: ServletContext in Action

2004-06-08 Thread Hubert Rabago
It is in fact a method of Action. It's both in 1.1 and 1.2.0. Hubert --- Frank Zammetti [EMAIL PROTECTED] wrote: What is getServlet() a method of though? I didn't see it in Action, but I could have missed it. I've done as was suggested via Session, works fine. I would in fact prefer

Re: ServletContext in Action

2004-06-08 Thread Frank Zammetti
Sorry, answered my own question... I didn't see that method defined in Action. Thanks, I'll use this instead! Frank From: Hubert Rabago [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: ServletContext in Action

URL during app init

2004-06-08 Thread Frank Zammetti
Here's a good one... Assume I have a plug-in to initialize my webapp... Assume further that the URL used to access my webapp is: http://localhost:8181/toa/ What I need to be able to do is, from my plug-in, get that URL exactly as you see above. Further, it should reflect whatever the URL is,

Logic:iterate

2004-06-08 Thread Naresh Sharma
Title: Logic:iterate Hi, I am setting a bean from my action class, this bean class has one hashmap object, and in jsp I want to print Hashmap key and values both. Can you please suggest how to do that? Regards Naresh

RE: ServletContext in Action

2004-06-08 Thread Venkat Maddipati
Frank, You can also use the following, if you want: this.servlet.getServletContext(); Thanks, Venkat -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 7:37 AM To: [EMAIL PROTECTED] Subject: ServletContext in Action Can anyone see how to

RE: ServletContext in Action

2004-06-08 Thread Frank Zammetti
I wound up using servlet.getServletContext(). Seemed like the least verbose code that worked. Incidentally, although it was in another thread, it was related, my question about getting the URL in a plug-in. I wasn't able to find a way to do it, but I did find that I only actually had two

wahtd does it means ? envCtx = (Context) initCtx.lookup(java:comp/env);

2004-06-08 Thread birendar . waldiya
can any onetell me what does java:comp/env mean in following ??? envCtx = (Context) initCtx.lookup(java:comp/env); Birendar Singh Waldiya Tata Consultancy Services Mailto: [EMAIL PROTECTED] Website: http://www.tcs.comDISCLAIMER: The information contained in this message is intended only

Re: html:link and map of request parameters

2004-06-08 Thread Ron Grabowski
From: James Mitchell [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: html:link and map of request parameters Date: Mon, 7 Jun 2004 12:23:33 -0400 Here's how I do it: (This demonstrates both static and dynamic values for use with the html:link) ...

[OT] RE: wahtd does it means ? envCtx = (Context) initCtx.lookup(java:comp/env);

2004-06-08 Thread Robert Taylor
This is not really a Struts question and as such the subject should be prepended with [OT]. That being said, that particular line of code is retrieving the /env context. The javadocs are pretty good at explaining what a Context is and how it is used.

RE: wahtd does it means ? envCtx = (Context) initCtx.lookup(jav a:comp/env);

2004-06-08 Thread Avinash Gangadharan
java:comp/env is the namespace that a J2EE container uses to tie logical names to the various components being managed by the container. The J2EE defines a naming policy for application components. This namespace is rooted with java:comp comp is a sub-tree for component related bindings.

design security issue

2004-06-08 Thread Zhang, Larry \(L.\)
I have an web application on which the manager can view his manage tree and select his employee for transactions (such as Perfromance Rating, putting on Leave of absence). Definitely it is very vital in this case to keep the security or make sure one data for one employee is submitted not for

Re[2]: Hibernate Session to User Session

2004-06-08 Thread Carl-Eric Menzel
Riyad Kalla wrote: I believe that is what I am using now (it seems to be quite popular) but I don't quite understand the reasoning behind the ThreadLocal approach (I've actually never used 'ThreadLocal')... can you shed some light on this? What the mapping between Hibernate Sessions and Users

RE: include action into jsp page

2004-06-08 Thread Marco Rossi
Found. Use JSTL, c:import url=myaction.do / Da:Lesaint Sébastien [EMAIL PROTECTED] Data: Mon, 7 Jun 2004 17:07:21 +0200 A: Struts Users Mailing List [EMAIL PROTECTED] Oggetto: RE: include action into jsp page Hi, I had the same problem. I solved it by using Tiles definitions.

RE: design security issue

2004-06-08 Thread Frank Zammetti
To really do security properly, you really should externalize it using a product like Netegrity's SiteMinder. That would be my first suggestion, but there is considerable cost in something like that, so it's not right for everyone or every situation. So, you can do some more minor things

Re: html:link and map of request parameters

2004-06-08 Thread Kris Schneider
I believe the base requirement for Struts 1.1 is JDK 1.2 or later. Since LinkedHashMap was introduced in JDK 1.4, it really can't be used in the Struts codebase. I suppose org.apache.commons.collections.SequencedHashMap could be used in its place. However, the problem is really more general than

Putting Multiple Parameters in the Request

2004-06-08 Thread Kies, Daniel
Question: I am trying to put two parameters into the request, but with this code, only the second parameter, offer, gets into the request. html:link href=/ActionPath.do paramName=Bean paramProperty=studentName paramId=student paramProperty=offerID

Re: Putting Multiple Parameters in the Request

2004-06-08 Thread Henrique VIECILI
Hi Daniel, from struts-doc at http://jakarta.apache.org/struts/userGuide/struts-html.html#link Normally, the hyperlink you specify with one of the attributes described in the previous paragraph will be left unchanged (other than URL rewriting if necessary). However, there are two ways you can

RE: design security issue

2004-06-08 Thread Wang, Yuanbo
One comment. Make sure your ActionServlet intercepts all URL patterns so any HTTP request need to get session validated first. Yuanbo -Original Message- From: Frank Zammetti [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 3:34 PM To: [EMAIL PROTECTED] Subject: RE: design security

Struts 1.1 J2EE level?

2004-06-08 Thread Yulin Zhao
Our app server only supports J2EE1.2. Does struts1.1 have any requirement that we need use what level of J2ee? (e.g.: do struts framework jars use any New features from Servlet 2.3 or JSP1.2 or above?) I searched a few websites and asked a few more experienced friends but didn't find a sure

RE: Struts 1.1 J2EE level?

2004-06-08 Thread Zhang, Larry \(L.\)
My answer is nothing theoretical but is practical: We are using Struts 1.1 with J2EE 1.2 ( servlet 2.2 and JSP 1.1), they are running just fine. -Original Message- From: Yulin Zhao [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 08, 2004 4:35 PM To: Struts Users Mailing List Subject:

Reload ApplicationResources

2004-06-08 Thread Joseph Toth
Looking for a way to reload ApplicationResources on the fly, WITHOUT restarting the webapp. I've been search for a while now and came up empty handed... Simple, yet so hard. The only thing I found is the following piece of code which I cannot get to work. Field field1 =

RE: Struts 1.1 J2EE level?

2004-06-08 Thread Pingili, Madhupal
We have several Struts 1.1 web applications running on J2EE 1.2 supported app server for about 10 months now. We are not using JSTL either. We are using Struts html/bean/logic/tiles tags. Reddy Pingili -Original Message- From: Yulin Zhao [SMTP:[EMAIL PROTECTED] Sent: Tuesday, June

RE: design security issue

2004-06-08 Thread Frank Zammetti
Excellent point, thanks for adding it! Frank From: Wang, Yuanbo [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: RE: design security issue Date: Tue, 8 Jun 2004 15:32:16 -0500 One comment. Make sure your ActionServlet

RE: design security issue

2004-06-08 Thread Zhang, Larry \(L.\)
Thank you Frank and Yuanbo, for the points. Our application is set up in SSL and password encryption. I guess my question is pretty detail oriented. See I want a design solution so that if the person coming to a page without visiting previous page, I want to display the error page. Also since

RE: design security issue

2004-06-08 Thread Frank Zammetti
Well, you could do something as simple as setting a session attribute every time an Action is called that stores what page was accessed, but before doing that you check what value is there already and if it's not the previous page, or whatever page might be valid before the one your

RE: design security issue

2004-06-08 Thread Sun Peng
Hi, Zhang, Larry: Do you know how to prevent user view previous page after he logon to other website. For example, if you try to leave online banking websites, they will auto log you out first. And even you press the back button, you still cannot view pervious page. Any suggestion of doing it in

Re: html:link and map of request parameters

2004-06-08 Thread Ron Grabowski
Date: Tue, 8 Jun 2004 15:42:58 -0400 From: Kris Schneider [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Subject: Re: html:link and map of request parameters I believe the base requirement for Struts 1.1 is JDK 1.2 or later. Since LinkedHashMap was introduced in JDK

RE: Single ActionForm accross multiple Actions

2004-06-08 Thread Frank Zammetti
You can set the scope attribute of your action mappings to session, then you don't have to do the code you have below. The form instance that is passed into execute() will either be what was in session, or a newly created one. I'm not sure about the answer to the second part of your question,

Re: Logic:iterate

2004-06-08 Thread Bill Siggelkow
I am doing this from memory but I think it is right ... Let' suppose that the HashMap is exposed on the bean by the method Map getFooMap() {...} then you can use on your JSP: logic:iterate id=entry name=bean property=fooMap Key:bean:write name=entry property=key/br / Value:bean:write name=entry

[OT] Expresso

2004-06-08 Thread Andrew Hill
Any Expresso users out there? Id be interested in hearing your comments and evaluation of this framework. It uses Struts as the basis for the presentation layer, Id be especially interested to know if it maintains Struts flexibility of allowing you to use any (ie: not JSP) view rendering

RE: [OT] Expresso

2004-06-08 Thread Andrew Hill
Ah, well heres the answer to the second part of my question! :-) snip src=http://www.jcorporate.com/econtent/Content.do?state=templatetemplate=2 resource=636db=default For the Model, Expresso can interact with any standard data access technology, including Enterprise Java Beans, JDBC, and JNDI.

Connection Pooling

2004-06-08 Thread Shailender Jain
I have fished developing the application using Struts and Tomcat 5.0.16 as server. We used the Connection Pooling provided by Struts (DBCP) After the development we have realized that somewhere in the application the connection is not getting closed. Due to this the application is getting hang

Re: Connection Pooling

2004-06-08 Thread Riyad Kalla
This may seem to simplistic, but you could do a search for whichever method you call to open a connection and then do a search for connection.close() (or whatever you named the variable) and see if the numbers add up... if they don't, this might help you narrow down which file the two aren't