StrutsPrepareFilter, StrutsExecuteFilter, Sitemesh and TagUtils

2009-03-24 Thread Jay Bose
I've upgraded to 2.1.6. I'm using the new StrutsPrepareFilter and StrutsExecuteFilter, instead of the ActionContextCleanUp and FilterDispatcher. I was using the built-in Dojo module. So, I've gone about using the dojo plugin, and importing the taglibs as described here - http://struts.apache.o

Re: getting value from struts.properties in action class

2009-03-24 Thread Chris Pratt
You can use the @Inject annotation to inject values from the struts properties like this: import com.opensymphony.xwork2.inject.Inject; /** * Inject whether XSL Caching should be used * * @param val The Boolean String Value */ @Inject("struts.xslt.nocache") public void setNoCac

Re: getting value from struts.properties in action class

2009-03-24 Thread Rafael Taboada
Try to use ResourceBundle On Tue, Mar 24, 2009 at 6:29 PM, Windy Hung wrote: > Hi > I set > "struts.multipart.saveDir=c:\\test-tmp" in my struts.properties. The > setting is for file uploading. > And I would like to check if the directory exists during file loading in my > action class. > > Is

Re: RE: Global tag settings?

2009-03-24 Thread carlo latasa
I'm thinking thats the way it's currently intended to achieve what I want. I was hoping/assuming that in my struts.xml/struts.properties file I could just add something like : On Tue, Mar 24, 2009 at 4:44 PM, Jim Kiley wrote: > Is there a reason you couldn't just overwrite the textfield t

Re: RE: Global tag settings?

2009-03-24 Thread Jim Kiley
Is there a reason you couldn't just overwrite the textfield tag with a custom theme? On Tue, Mar 24, 2009 at 5:23 PM, carlo latasa wrote: > I'm not sure I understand what you are getting at but this is what I'd like > to do: > > At the moment all of my textfield tags render with labelposition=to

getting value from struts.properties in action class

2009-03-24 Thread Windy Hung
Hi I set "struts.multipart.saveDir=c:\\test-tmp" in my struts.properties. The setting is for file uploading. And I would like to check if the directory exists during file loading in my action class. Is there any easy way to get value out from struts.properties instead of using getClass().getR

how to navigate to another image from the existing image

2009-03-24 Thread taj uddin
Hi, In my application i am having Image in my jsp page with thumb nails. when i click at a particular area of an image it will call a javascript method which helps us in rendering a new jsp page. Below is the page source code for the situation i described above:

Re: Where is Struts 2 Blank Archetype 2.1.6 ?

2009-03-24 Thread Lukasz Lenart
2009/3/24 Radoslav Krivak : > Thanks Lukasz. I was actually checking your catalog few days ago but it > wasn't there yet. I put it yesterday ;-) I've hope, I will be able to publish also conventionize version before Easter Regards -- Lukasz http://www.lenart.org.pl/ ---

Fwd: RE: Global tag settings?

2009-03-24 Thread carlo latasa
I'm not sure I understand what you are getting at but this is what I'd like to do: At the moment all of my textfield tags render with labelposition=top - the default. I'd like to make a global setting for all textfield tags such that the labelposition=left. Instead of having to call it out in ever

Re: Struts mapping

2009-03-24 Thread José Santos
i guess you mean "the web server/jsp container ignores the welcome-file-list", as struts2 takes over everything with /*. the workaround may be to either: - if you're using actions without extension: change struts2 filter mapping from /* to /actions/* and have actions under /actions - if you're usi

RE: Using Anchor Component for creating custom anchor tag

2009-03-24 Thread Martin Gainty
Have you verified the Anchor Tag's 3 required parameters stack, request, response are initialised properrly and non null before constructing the anchor tag ? Martin __ Disclaimer and confidentiality note This message is confidential and may be privi

Re: Where is Struts 2 Blank Archetype 2.1.6 ?

2009-03-24 Thread Radoslav Krivak
Lukasz Lenart wrote: > > I've just put the latest (unreleased version) here [1], you can use it > with command: > mvn archetype:generate -DarchetypeCatalog=http://www.lenart.org.pl/maven/ > > [1] http://www.lenart.org.pl/maven/ > Thanks Lukasz. I was actually checking your catalog few days a

Re: The MIME type of while uploading .dbf files

2009-03-24 Thread Musachy Barroso
This reminds me of a Jira ticket sometime back, which was caused by Safari picking some weird contentType. As Greg said, defining the contentType is up to the browser and it is unreliable at best (and useless at worst) musachy On Tue, Mar 24, 2009 at 12:11 PM, Greg Lindholm wrote: > > > > arunab

Re: Global tag settings?

2009-03-24 Thread carlo latasa
Thanks Jim. On Tue, Mar 24, 2009 at 10:02 AM, Jim Kiley wrote: > I don't know of any way to set those values globally for the application, > but this isn't something I have put a lot of time into. This is the right > list to ask questions on, but if you get no response by the second or third >

Re: Global tag settings?

2009-03-24 Thread Jim Kiley
I don't know of any way to set those values globally for the application, but this isn't something I have put a lot of time into. This is the right list to ask questions on, but if you get no response by the second or third question it probably means that the folks reading don't know offhand and m

Re: Global tag settings?

2009-03-24 Thread carlo latasa
So is this the wrong list to post a question? or is this a RTFM issue? On Mon, Mar 23, 2009 at 4:47 PM, carlo latasa wrote: > So should I post this to : > https://issues.apache.org/struts/secure/Dashboard.jspa ?? > > going once, going twice??? > > can anyone tell me where the defaults are even s

RE: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Martin Gainty
you have 2 different tags you are implementing: form (tag) which creates a form http://struts.apache.org/2.1.6/docs/form-tag.html action (tag) which identifies ActionClass (and possible parameters) http://struts.apache.org/2.1.6/docs/action.html did you have a question on either implementation?

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Lukasz Lenart
2009/3/24 foward : > the method getForm() return a object Form where before with the respective > id is obtained and returned. You put method getForm() in s:form as a action, which means such method will be called by Struts 2 and the framework will expect a String - result name, which you have to

Using Anchor Component for creating custom anchor tag

2009-03-24 Thread Manoj Dhore
Hi, I am trying to create a custom anchor component using org.apache.struts2.components.Anchor. This is done inside a custom component that I am creating. Method that initializes Anchor component is as follows : private void createLink(String action, Containable item, Writer writer)

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Jim Kiley
Look at your execute() method or whatever method you're calling from your JSP. I suspect that you are returning a com.dev.model.Form object instead of a String like "success" or "input". jk On Tue, Mar 24, 2009 at 11:26 AM, foward wrote: > > Hello, > > I don't know if I m right posting here thi

Re: The MIME type of while uploading .dbf files

2009-03-24 Thread Greg Lindholm
arunabh wrote: > > Hi , > > I am trying to do a restricted file upload . > > I have used > > > > > text/plain,application/vnd.ms-excel,application/dbf,application/dbase,application/x-dbase,application/x-dbf,zz-application/zz-winassoc-dbf

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread foward
lukaz, the method getForm() return a object Form where before with the respective id is obtained and returned. Yes I m reading a book struts in action, I don't know if you recomend me a good one. Regards Lukasz Lenart wrote: > > 2009/3/24 foward : >> > > Method getForm() return object Form

Re: ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread Lukasz Lenart
2009/3/24 foward : > Method getForm() return object Form or String? Struts is expecting that action will return a String not an object. I think you should read some tutorial how to use Struts 2. Regards -- Lukasz http://www.lenart.org.pl/ --

ClassCastException com.dev.model.Form cannot be cast to java.lang.String

2009-03-24 Thread foward
Hello, I don't know if I m right posting here this, but I have this problem with my webapp and I couldn't find a solution I hope you can help me please: ERROR [httpSSLWorkerThread-8080-1] ActionComponent.executeAction(259) java.lang.ClassCastException: com.dev.model.Form cannot be cast to java.

Re: [struts2.1.6] Type conversion error.

2009-03-24 Thread Sidhe
I have exactly the same error message in Struts 2.1.6. If I submit a proper integer value from the form there is no exception, but if I enter for example "123abc" I get ognl.MethodFailedException (NoSuchMethodException). It looks like automatic type conversion is not working properly. Something wi

Re: Dojo plugin deprecated on Struts 2.1: why ?

2009-03-24 Thread Lukasz Lenart
2009/3/24 : > I have two main questions about that : > 1) What is the reason ? Is it because it is slow ? Not enough support from community and no plans to upgrade to latest Dojo version (no volunteers) > 2) Will it be replaced by another Javascript library ? Not replacement, but a new plugin,

checkboxlist

2009-03-24 Thread Sandy.Verfaille
Hi, Can anyone tell me how I can make a checkboxlist on my jsp that knows which checkbox should be checked and which not. I have my list of objects with three strings. string1: name (label for the checkbox) string2: key (value that identifies which object is checked) string3: true or false (that

Re: REST Plugin only for some actions

2009-03-24 Thread Radoslav Krivak
GF-7 wrote: > > Is this a TODO or is it already available? > In 2.1.6 it certainly isn't available. I was looking for something exactly like this, because it only makes sense. Maybe there is some work in progress for 2.1.7 (?). REST plugin is great idea, but sadly it seems to me that in curre

Re: REST Plugin only for some actions

2009-03-24 Thread GF
Is this a TODO or is it already available? On Tue, Mar 24, 2009 at 4:06 AM, dusty wrote: > > Ultimately, we should declare what are "resources" and get the free mapping > from the REST plugin for those Controllers.  Seems like that is what the > NamspaceBasedActionMapper is, but I was thinking ei

Struts mapping

2009-03-24 Thread Luis Gervaso
Hi When we use "/*" to map the filter in Struts2 the framework ignores the welcome-file-list in the web.xml It tries to find an Action "" (empty string) in the default namespace "/" but it does not exist Is there any workaround on this? regards Luis -- ---