[OT] Identify file type

2006-11-03 Thread Vijay Venkataraman
Hi, I have requirement where uploaded files exists in database as blobs. Now i need to retrieve the file and push this to the browser. I have no clue as to what the file type is. So i am not in a position to set the content type clearly. Does any one know of a utility which can identify the

Struts 2 View : FreeMarker or Velocity

2006-11-03 Thread Stas Ostapenko
Hello ! I need an advice to choose templating framework for using as a view with Struts 2. We had used Velocity with Struts 1.2 + Velocity-Tools in the past. Struts has changed since that time :) Are there any benefits of using FreeMarker against Velocity ? Thanks !

How do I configure this Interceptor for every action in struts.xml

2006-11-03 Thread Asish Kr. Samanta
Hi everybody, I have written an Interceptor. How do I configure this Interceptor for every action in struts.xml? Regards, Asish - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: struts2 action and spring bean

2006-11-03 Thread Lixin Chu
just curious, what's the benifits of configuring Struts Actions in Spring ? isn't Struts config file enough ?

RE: [OT] Identify file type

2006-11-03 Thread Lance Semmens
On your upload form, your property that maps to your file upload input should be of type org.apache.struts.upload.FormFile. Then save the FormFile .getFileData() and FormFile.getContentType() to the database. -Original Message- From: Vijay Venkataraman [mailto:[EMAIL PROTECTED] Sent:

RE: [OT] Identify file type

2006-11-03 Thread Lance Semmens
On your upload form, your property that maps to your file upload input should be of type org.apache.struts.upload.FormFile. Then save the FormFile .getFileData() and FormFile.getContentType() to the database. -Original Message- From: Vijay Venkataraman [mailto:[EMAIL PROTECTED] Sent:

Re: How to make a SELECT list readonly? If set disabled, loses the value when submit.

2006-11-03 Thread Yujun Liang
Do you maintain the actionform in the http session? If you do, it doesn't matter whether the select is disabled or not. If it is disabled, the actionform will not be changed since there is parameter in the request. Regards On 11/3/06, Dean, Michael [EMAIL PROTECTED] wrote: MJ, This is

Re: Struts 2 View : FreeMarker or Velocity

2006-11-03 Thread Ted Husted
From a framework perspective, it's not a difference that makes a difference. The same with choosing between JSP and Freemarker or Velocity. The Struts Tags supports all three views equally, and we keep the door open for XLST and other alternatives. So, from a development perspective, it's a

Re: How do I configure this Interceptor for every action in struts.xml

2006-11-03 Thread Martin Gainty
http://tomcatbook.sourceforge.net/book/defaulthtml/ch04.html I am curious if this a context interceptor or request interceptor and the functionality you have built in? M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the

Re: Optimal Heap Size for my Struts-Application

2006-11-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jorge Martín, Jorge Martín Cuervo wrote: It's a realy cool question, i've a complex webapp with a lot of differents diciplines: - xstl - xsl-fo - very large objects in session These three are going to kill you. XSLT uses a ton of memory

Struts 2 GA status?

2006-11-03 Thread Bruno Melloni
I am slightly confused about the status of Struts 2. Messages in this list frequently say that Struts 2 is production-ready and very stable, yet the Struts site does not show it as a General Availability release. If a member of the Struts 2 project reads this, could you please clarify?

Re: DynaActionForm indexed properties

2006-11-03 Thread Puneet Lakhina
On 11/3/06, Niall Pemberton [EMAIL PROTECTED] wrote: On 11/2/06, Puneet Lakhina [EMAIL PROTECTED] wrote: Hi, This is the first time I am trying to use indexed properties with DynaActionForm. Now the number of fields that I will have is not certain. So does that mean I cant use

newbie struts and beans scope question

2006-11-03 Thread Rick Schumeyer
I'm trying to understand how and when beans are available within struts. (1.3.5) For example, if my Action class contains code like: MyBean mybean = new MyBean() // NOT an ActionForm, just a regular bean I would have thought (and the docs suggest) that I would need something like

request.getParameterMap

2006-11-03 Thread temp temp
I want all the parameters in ServletRequest object for this I am using the method request.getParameterMap(). It returns java.util.Map which contains request parameter name and its value.When I print out the Map I can read the key but I cannot read the value . Here is the

Downloading file

2006-11-03 Thread Balwinder
Hi All, I am developing an application in struts in which I needed to download a file from a server. When iam clicking on download button, file lose its extension and it with the action ie .do and does not open with the associated application. Any help is highly appreciated. Thanks in

Re: Struts 2 GA status?

2006-11-03 Thread Niall Pemberton
On 11/3/06, Bruno Melloni [EMAIL PROTECTED] wrote: I am slightly confused about the status of Struts 2. Messages in this list frequently say that Struts 2 is production-ready and very stable, yet the Struts site does not show it as a General Availability release. If a member of the Struts 2

Re: newbie struts and beans scope question

2006-11-03 Thread Mike Baroukh
But I don't...the bean seems to automatically be available to the jsp. It is automatically available with something like bean:write name=mybean property=thePropertyName/ If you don't specify 'cope' attribute, it lokk in session, request and application scope. Of course, it must be a forward

Re: Downloading file

2006-11-03 Thread Mike Baroukh
You must use content-disposition header : response.setHeader(Content-Disposition, attachment; filename=\+myfilename+\); You can also add a mime type with something like String mimeType = getServletContext().getMimeType(myfilename); response.setHeader(Content-Type,

RE: request.getParameterMap

2006-11-03 Thread Levan Dvalishvili
That’s Objects default toString() method that does that . try casting .out((String)value); Levan Dvalishvili Support Lead  US Verticali,Inc (646) 736 - 6075 -Original Message- From: temp temp [mailto:[EMAIL PROTECTED] Sent: Friday, November 03, 2006 11:04 AM To:

Re: Downloading file

2006-11-03 Thread Niall Pemberton
On 11/3/06, Balwinder [EMAIL PROTECTED] wrote: Hi All, I am developing an application in struts in which I needed to download a file from a server. When iam clicking on download button, file lose its extension and it with the action ie .do and does not open with the associated application.

Re: request.getParameterMap

2006-11-03 Thread Mike Baroukh
I suppose this values are array of strings ... temp temp a écrit : I want all the parameters in ServletRequest object for this I am using the method request.getParameterMap(). It returns java.util.Map which contains request parameter name and its value.When I print out the Map I can

Re: Downloading file

2006-11-03 Thread Puneet Lakhina
On 11/3/06, Balwinder [EMAIL PROTECTED] wrote: Hi All, I am developing an application in struts in which I needed to download a file from a server. When iam clicking on download button, file lose its extension and it with the action ie .do and does not open with the associated application.

Re: newbie struts and beans scope question

2006-11-03 Thread robin bajaj
Hi Rick, I am using Struts 1.2. Unless Struts 1.3 provides something special on this aspect, following is my understanding : a) If you have a bean that is NOT an actionForm, then you HAVE TO explicitly put it in request scope using request.setAttribute(mybean,mybean); to access it in the jsp

Re: request.getParameterMap

2006-11-03 Thread Niall Pemberton
On 11/3/06, temp temp [EMAIL PROTECTED] wrote: I want all the parameters in ServletRequest object for this I am using the method request.getParameterMap(). It returns java.util.Map which contains request parameter name and its value.When I print out the Map I can read the key but I

Re: DynaActionForm indexed properties

2006-11-03 Thread Niall Pemberton
On 11/3/06, Puneet Lakhina [EMAIL PROTECTED] wrote: On 11/3/06, Niall Pemberton [EMAIL PROTECTED] wrote: On 11/2/06, Puneet Lakhina [EMAIL PROTECTED] wrote: Hi, This is the first time I am trying to use indexed properties with DynaActionForm. Now the number of fields that I will have is

Re: Downloading file

2006-11-03 Thread Balwinder
Mike Baroukh wrote: You must use content-disposition header : response.setHeader(Content-Disposition, attachment; filename=\+myfilename+\); You can also add a mime type with something like String mimeType = getServletContext().getMimeType(myfilename); response.setHeader(Content-Type,

get webapp root directory from action constructor

2006-11-03 Thread Patrice Le Cozler
Hi, I want to load a property file at webapp start. Since that property file is located in my webapp's directory structure, I want to be able to determine its absolute name at runtime. I tried this.getServlet().getServletContext().getRealPath(PROPS_FILE) but getServlet() returns null when called

Radio buttons in a iterated list

2006-11-03 Thread Perry Minchew
Hi all, I'm trying to create a registration admin approval page, where an admin signs in and sees all pending requests on their portal. My idea was to display all information about the user, and then have a final column with an approve/deny/noChange radio. DN, First, Last, .., *Approve o

Re: get webapp root directory from action constructor

2006-11-03 Thread Mike Baroukh
Maybe you can - override setServlet() and do it after the servlet had benn set - do another servlet that will load at startup and whose only job is to find path ... Mike Patrice Le Cozler a écrit : Hi, I want to load a property file at webapp start. Since that property file is located in my

RE: Radio buttons in a iterated list

2006-11-03 Thread Perry Minchew
I forgot to mention that I am iterating over an arraylist of beans, and I want each row in the table to associate with a single array list entry (eg a single bean). I want the approve radio on button 1 to update the status of the first bean in the list. -Original Message- From: Perry

Re: webcast/sms

2006-11-03 Thread Jim Theodoridis
Sócrates Medina wrote: Hello everybody. I have 2 question : 1) I've been feeling the needs, just for hobbie, to realize a test videoconference or webcast system over the internet. I would like to know if some of you have done something related and where to get information about it. 2)I

Using html:errors with a field that is iterated.

2006-11-03 Thread Adam K
Hi all I am using struts 1.2.9 and starting to work on error validation. So far I have my login page using: html:errors property=username/html:errors etc etc etc. I was wondering firstly Is this still the best manner in which to display errors ? The second question which has more

Re: Using html:errors with a field that is iterated.

2006-11-03 Thread robin bajaj
Hi Adam, Yes, I think html:errors is a pretty good validaiton mechanism. Especially if you use the Struts validation framework (validation.xml, validator-rules.xml) for generating your errors. For showing errors right beside each specific field that fails the validation, you will need to have

Re: How do I configure this Interceptor for every action in struts.xml

2006-11-03 Thread Ted Husted
Any given action can create an ad-hoc interceptor stack action name=login class=tutorial.Login interceptor-ref name=timer/ interceptor-ref name=logger/ interceptor-ref name=default-stack/ result name=inputlogin.jsp/result result

Re: Using html:errors with a field that is iterated.

2006-11-03 Thread Adam K
On 11/3/06, robin bajaj [EMAIL PROTECTED] wrote: Hi Adam, Yes, I think html:errors is a pretty good validaiton mechanism. Especially if you use the Struts validation framework (validation.xml, validator-rules.xml) for generating your errors. Yes I am using validation.xml and

Re: get webapp root directory from action constructor

2006-11-03 Thread Craig McClanahan
On 11/3/06, Patrice Le Cozler [EMAIL PROTECTED] wrote: Hi, I want to load a property file at webapp start. Since that property file is located in my webapp's directory structure, I want to be able to determine its absolute name at runtime. I tried

checkbox issue

2006-11-03 Thread fea jabi
struts-config The below form-bean is session scoped and hence using reset. form-bean name=CustForm type=com.formbeans.CustForm dynamic=true ... form-property name=split type=java.lang.Boolean/ /form-bean public class CustForm extends DynaValidatorForm { public

Re: How to make dropdown box editable.

2006-11-03 Thread Yujun Liang
You can't make a dropdown editable, but you can made an input field selectable, if you are using gmail, try the search, that's what you want, you can implement it with AJAX. Regards On 10/27/06, zhang xiao [EMAIL PROTECTED] wrote: I think you should use it with javascript From: [EMAIL

Two values on input attribute

2006-11-03 Thread Yariel Ramos Moreno
Hi all: I have a page validated with Validation Framework, but I can get that page from two diferent jsp inputs. When an error ocurs, the validator always turn me back to the same jsp input (the one especified) not matter which was the selected input. It is possible to set two values to input