Re: Running a prepare method before the assigned action method

2008-03-25 Thread meeboo
Still no solution to this problem. How come parameters in actions with wildcards (for example myapp/modelObject/*) aren't parsed in the prepare method? They work fine when I parse them in my assigned action method :( meeboo wrote: Hey again I'm posting via nabble, and it seems to strip

Running a prepare method before the assigned action method

2008-03-22 Thread meeboo
Hi all I have a class for several actions and each action is mapped to a method, like this: action name=update/modelObject class=net.myapp.web.modelObjectActions method=update result/index.jsp/result /action The above action will fire when a form is submitted and the

Re: Running a prepare method before the assigned action method

2008-03-22 Thread meeboo
stack but with no luck. meeboo wrote: Hi all I have a class for several actions and each action is mapped to a method, like this: action name=update/modelObject class=net.myapp.web.modelObjectActions method=update result/index.jsp/result /action The above

Re: Running a prepare method before the assigned action method

2008-03-22 Thread meeboo
It seems as if the preparable method can't parse parameters if they are in the following format update/modelObject/10.action (where 10.action is the primary key) where as it works fine when using action urls like this update/modelObject?10.action Is this expected behavior? meeboo wrote

Re: Running a prepare method before the assigned action method

2008-03-22 Thread meeboo
doing update/modelObject/22.action The parameter is parsed in the update method, but not in the prepare method (i've tried using the newton.dave wrote: --- meeboo [EMAIL PROTECTED] wrote: I have a class for several actions and each action is mapped to a method, like this: action name

Re: Running a prepare method before the assigned action method

2008-03-22 Thread meeboo
/models/objectModel/update.jsp/result /action Hopefully this is viewable. newton.dave wrote: --- meeboo [EMAIL PROTECTED] wrote: won't work with a wildcard parameter mapping Dave action name=update/modelObject/* class=net.myapp.web.ModelObjectActions method=update Your

Re: s:date

2008-03-19 Thread meeboo
http://localhost:8080/myapp/day/2007-05-12.action Also I noticed that there seems to be a bug with the var attribute in s:url (it doesn't work at all) Maybe someone can shed some light on these issues? Alexis Pigeon wrote: Hi, On 18/03/2008, meeboo [EMAIL PROTECTED] wrote: Has anyone had

Re: s:date

2008-03-18 Thread meeboo
Has anyone had success with s:date / and setting the struts.date.format property? meeboo wrote: Hi all I have set my struts.date.format properties but they seem to have no effect at all. The set value is struts.date.format=-MM-dd but when using the s:date tag the format

s:date

2008-03-16 Thread meeboo
Hi all I have set my struts.date.format properties but they seem to have no effect at all. The set value is struts.date.format=-MM-dd but when using the s:date tag the format is for example Jan 14, 2008 8:00:00 AM. All my other properties take effect so there's no problem with setting other

Re: Struts url problem

2007-09-06 Thread meeboo
try s:url id=url value=%{#myPath} s:param name=solutions:property value=solution//s:param ... (other params) /s:url TonyD wrote: I'm trying to use a property value into a struts url but doesn't work because I can not use the ( character) twice into a url value, could somebody

Re: Struts2 - troubles with ParameterAware

2007-08-22 Thread meeboo
I think that you'll need to declare the param, something in the likes of... action name=actionparam class=test.ActionParam result/ActionParam.jsp/result {1} !-- added this -- interceptor-ref name=servlet-config / interceptor-ref name=params/

src.js in Struts2

2007-08-16 Thread meeboo
Hey all I've moved all the static Dojo stuff from the Struts2 jar to an external location, but my app constantly complains about not finding src.js - as far as I can see this file isn't even included in the S2 lib. I've tried googling for the file but can't seem to find it anywhere, any ideas?

Re: [S2] Problems loading css files in RestfulActionMapper

2007-07-31 Thread meeboo
Try using absolute URL:s for the CSS files, it might be a workaround but it's worked for me before. Srinivas.N. wrote: I am using the restful mapper through a CompositeActionMapper as in constant name=struts.mapper.class value=org.apache.struts2.dispatcher.mapper.CompositeActionMapper/

Re: S2 + REST urls

2007-07-30 Thread meeboo
At the moment we are using URLRewrite to bypass all the trouble with S2 intercepting static content (we are also not using any action extension). But it would be even better if the filter was patched :) Ted Husted wrote: It's possible that the use case of a an empty action extension was not

Accessing constants in Struts.xml

2007-07-12 Thread meeboo
Hey all How can I access constants via my S2 mapping files? At the moment I have the following mapping: action name=upload class=com.myapp.web.struts.page.UploadMovie result name=login type=redirect${UMA_REDIRECT_URL}http://myapp:8080/app/upload.action/result result

Set a session value in the view

2007-07-03 Thread meeboo
Hey all How can I achieve something like this: %session.removeAttribute(successMessage);% with the s:set tag? I tried s:set name=session.get('successMessage') value=null/ but it didn't work. Thanks! -- View this message in context:

[S2] Design patterns

2007-06-11 Thread meeboo
Hey all How do you build up your Struts 2 applications architecture wise? Say for instance that you have a User model object. Do you create an action class (e.g. UserAction.java) for all User actions, or do you separate them into UpdateUser.java/CreateUser.java etc...? We thought Struts 2 was a

[S2] s:textfield questions

2007-06-04 Thread meeboo
Hey all Is there a way to set a default value for a s:textfield? I am trying something like this: s:textfield name=someField value=s:property value=someValue / but am receiving a TLD error. I also discovered that a s:form doesn't capture values from disabled input fields, now I know that

URL question

2007-05-18 Thread meeboo
Hey all Can I somehow hide the action name in a URL to make it more search engine friendly? I am specifically talking about the index page (in for example http://www.myapp.com/index.action ). Cheers -- View this message in context: http://www.nabble.com/URL-question-tf3776809.html#a10679563

Redirecting from mapping error exceptions

2007-05-16 Thread meeboo
Hey all I have the following lines in Struts.xml global-results result name=error/index/result /global-results global-exception-mappings exception-mapping result=error exception=java.lang.Throwable/ /global-exception-mappings But it won't catch exceptions where the user has

Re: [S2] UTF-8 woes

2007-05-08 Thread meeboo
IE6 to a application ran in Resin? Thanks! Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 meeboo, meeboo wrote: But that other poster was using Struts 1! Also, I am already using meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1/meta

[S2] concurrency issues

2007-05-07 Thread meeboo
Hey all We just launched a webapp using Hibernate/Spring/S2. The architecture is pretty standard with a DAO, Service and a Web layer. Our problem is that we are receiving massive traffic which pretty much kills the application after just a couple of seconds. I am guessing this is since our S2

Re: [S2] concurrency issues

2007-05-07 Thread meeboo
of the hibernateDaoTemplate. Thanks for the quick reply though Dave, you're a stand up S2 guy :) Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: We just launched a webapp using Hibernate/Spring/S2. The architecture is pretty standard with a DAO, Service and a Web layer. Our

[S2]XML output problem

2007-05-05 Thread meeboo
Hey all I am trying to output a RSS feed via a JSP page in S2. The problem is that I keep on getting a blank row/new line before the actual XML data is written to the page. The error message is XML Parsing Error: xml declaration not at start of external entity because of this . Here's the JSP

Re: [S2]XML output problem

2007-05-05 Thread meeboo
Damn it, I feel stupid now :p Thanks, and have a good weekend! Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: Where is this blank line coming from? The newlines in your JSP. Put it all on one line; just because there's a JSP directive there doesn't mean it will just ignore

[S2] UTF-8 woes

2007-05-03 Thread meeboo
Hey all I am trying to submit form data with UTF-8 characters but am having no luck. The special characters are garbled when inserted in the database from a s:form for example - this is regardless of what browser I am using. I am using a page content type declaration for each page, but that

Re: [S2] UTF-8 woes

2007-05-03 Thread meeboo
/html; charset=ISO-8859-1/meta Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 meeboo, It's amazing to me that people not only don't read the archives, but they also don't read the messages posted on the same day or even in the /same hour/. :( - -chris

Nested s:form

2007-04-28 Thread meeboo
Hey all Is there a way to nest s:form elements in S2? I have a nested form which won't reach the specified action, even though it is correctly mapped. If I move it outside of the first form it automagically starts working. The action is mapped like: action name=deleteMovie/*/

s:textfield question

2007-04-27 Thread meeboo
Hey all I am trying to populate the value of a s:textfield with some data from a method via OGNL. I tried value=getTagsAsString(movie.id) which doesn't work at all (the textfield is populated with getTagsAsString(movie.id)). Then I tried the JSTL approach, by writing

Re: s:textfield question

2007-04-27 Thread meeboo
here. Regards, Felipe meeboo wrote: Hey all I am trying to populate the value of a s:textfield with some data from a method via OGNL. I tried value=getTagsAsString(movie.id) which doesn't work at all (the textfield is populated with getTagsAsString(movie.id)). Then I tried

Re: s:textfield question

2007-04-27 Thread meeboo
. I'm not sure about what of % or # will work. Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: But when I write s:textfield value=getMovieCategory(category)/ it only prints out getMovieCategory(category). Does %{getMovieCategory(category)} work? d

Another file upload question

2007-04-24 Thread meeboo
Hey all I have an action class which handles file uploads via a setter method: private File uploadedMovie = null; public void setUploadedMovie(File uploadedMovie) {this.uploadedMovie = uploadedMovie;} The problem is that I can't set the name of the uploaded file before it is saved to the

Iterating through a map

2007-04-23 Thread meeboo
Hey all How do I iterate through a map? My current method returns a LinkedHashMapString, Movie - the map is populated and accessed by the view as my debugger shows, but it is never iterated through. Here's the JSP fragment s:iterator value=aMovieFromEachCategory pShould iterate 12

Re: Iterating through a map

2007-04-23 Thread meeboo
can't do that. A good solution is create a keySet or a list from Map's keys and iterate over that, using each object to get the Map values. Good look, Felipe meeboo wrote: Hey all How do I iterate through a map? My current method returns a LinkedHashMapString, Movie - the map

Nesting a s:property in a s:url/

2007-04-18 Thread meeboo
Hey all I am trying to include a session property in a s:url component, but get the following error: Unterminated lt;s:url tag s:url action=user/s:property value=#session.user.username /// Are there other ways of including session values without nesting S2 components? -- View this message in

Re: Nesting a s:property in a s:url/

2007-04-18 Thread meeboo
Yeah it works, I tried s:url action= My profile br / Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: s:url action=user/s:property value=#session.user.username /// Are there other ways of including session values without nesting S2 components? Does using OGNL EL

Problem with form action mapping

2007-04-18 Thread meeboo
Hey all I've been trying to solve this problem for a couple of hours but to no prevail... struts.xml action name=upload/ result/uploadMovie.jsp/result /action action name=uploadMovie class=com.myapp.web.struts.action.UploadMovie

Re: Problem with form action mapping

2007-04-18 Thread meeboo
Quick note, it seems as if I am reaching the uploadFile method when not specifying a file to upload. The movieTitle is then read in the action class. But if I also choose to upload a file alongside with it the method will not be reached. I'm stumped! :( meeboo wrote: Hey all I've been

Re: Problem with form action mapping

2007-04-18 Thread meeboo
not solve your problem, but are you using the action context cleanup filter? d. --- meeboo [EMAIL PROTECTED] wrote: Quick note, it seems as if I am reaching the uploadFile method when not specifying a file to upload. The movieTitle is then read in the action class. But if I also choose

Re: struts.action.extension question

2007-04-11 Thread meeboo
No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like this action name=movie/* class=com.bubbleclip.web.struts.action.PlayMovie param name=movieTitle{1}/param result/movie.jsp/result /action The wildcard is for backwards

Re: struts.action.extension question

2007-04-11 Thread meeboo
-pattern /filter-mapping u can foward or redirect to the url movie.action?movieTitle=* or something else in your filter. regards joey On 4/11/07, meeboo [EMAIL PROTECTED] wrote: No takers on this? meeboo wrote: Hey all I have a mapping pattern which looks like

Re: struts.action.extension question

2007-04-11 Thread meeboo
: I don't believe this can be cleanly handled with just the web 2.4 spec and struts2. Some container, like Resin, allow for url-patterns to be regexes, which would help in this scenario. meeboo wrote: The problem is that I have a lot of URL:s which look like /user/username, movie

struts.action.extension question

2007-04-09 Thread meeboo
-- View this message in context: http://www.nabble.com/struts.action.extension-question-tf3548145.html#a9905001 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: resume after login feature

2007-04-06 Thread meeboo
? Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: Yeah Dave, the problem is passing the data. I have my Login.java action class which implements ServletRequestAware but it'll of course only retrieve localhost:8080/login.action since that's the request URI. I need to somehow tell

Re: resume after login feature

2007-04-05 Thread meeboo
I'm kind of stumped on this problem too, how can I send the original request uri to the login action so that it knows what page to redirect to? Jae K wrote: Hello all, this is a struts2 question. I'm trying to implement a feature where a custom AuthenticationInterceptor would redirect

Re: resume after login feature

2007-04-05 Thread meeboo
redirect back to that specific page. Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: I'm kind of stumped on this problem too, how can I send the original request uri to the login action so that it knows what page to redirect to? Which is the problem; getting the original request

Re: resume after login feature

2007-04-05 Thread meeboo
Gotcha Dave... now all I need is clean URL:s before I can actually consider using this damned framework :) Dave Newton-4 wrote: --- meeboo [EMAIL PROTECTED] wrote: Yeah Dave, the problem is passing the data. I have my Login.java action class which implements ServletRequestAware

RE: Common header and footer html

2007-03-30 Thread meeboo
Is there a good way of achieving this in Struts 2 without using Tiles? I'm new to Struts and coming from a Tapestry background my first hunch was to create classes for a header and a footer element, but is this even a viable option in an action based framework? If not, what's the best practice

Re: [S2] There is no Action mapped for action name HelloWorld. - [unknown location]

2007-03-09 Thread meeboo
that seems relevent both on startup and on the request? Also, if you're getting the freemarker error, look *before* the freemarker error in the log to see what the actual problem is (and turn devMode on). d. --- meeboo [EMAIL PROTECTED] wrote: I tried using the maven archetype but still get

Re: [S2] There is no Action mapped for action name HelloWorld. - [unknown location]

2007-03-08 Thread meeboo
a Struts 2 app (without Spring). Ian Roughley wrote: I recently fixed the starter maven archetype, it might be a better starting point. /Ian Musachy Barroso wrote: well, something is quite broken :), do you get any error log when you start the app? musachy On 3/7/07, meeboo [EMAIL

There is no Action mapped for action name HelloWorld. - [unknown location]

2007-03-07 Thread meeboo
Hey all I recently decided to evaluate Struts2 for a big project, but am having difficulties mapping actions. I get the There is no Action mapped... error when I try running the blank struts2 application. Here's my example.xml package name=example namespace=com/bubbleclip/web/example

Re: [S2] There is no Action mapped for action name HelloWorld. - [unknown location]

2007-03-07 Thread meeboo
setting namespace=/com/bubbleclip/web/example, in the package, and access the action: {...}/com/bubbleclip/web/example/HelloWorld.action musachy On 3/7/07, meeboo [EMAIL PROTECTED] wrote: Hey all I recently decided to evaluate Struts2 for a big project, but am having difficulties

Re: [S2] There is no Action mapped for action name HelloWorld. - [unknown location]

2007-03-07 Thread meeboo
. Musachy Barroso wrote: yes, that should be it. If you are learning||having problems, you can use the Struts Config browser plugin: http://struts.apache.org/2.x/docs/config-browser-plugin.html to see the mapping of your actions and play around with them. musachy On 3/7/07, meeboo