Syntax problem: Trying to display label for Select while iterating
Hi I'm iterating over a list in my jsp. The relevant code looks like; s:iterator status=blockStatus value=blocks var=block s:select label=blocks[%{#blockStatus.index}].name name=blocks[%{#blockStatus.index}].value list=%{blocks[#blockStatus.index].options} listKey=value listValue=text /s:select /s:iterator The select box displays correctly populated, but I cannot get the label to display! I've tried the above code and I've tried label=%{blocks[#blockStatus.index].name} which doesn't work either. I've stuck a System.out.println in my getName() method and with both examples, the getName() method on my block class get called and return the correct value. What on earth am I doing wrong? Regards -- View this message in context: http://old.nabble.com/Syntax-problem%3A-Trying-to-display-label-for-Select-while-iterating-tp28175030p28175030.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
old struts 1.3 app not work in GF3
I have an app written in 1.3.10 + Netbeans 6.8 + glassfishv2.1. It works fine both when GFv2.1 is run from Netbeans or standalone. I am trying to switch to GFv3. It still works if I start GFv3 in Netbeans. But if I run it in a standalone GFv3, it failed to start with message: [#|2010-04-javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=26;_ThreadName=Thread-1;|WebModule[/whale-war]PWC1396: Servlet /whale-war threw load() exception javax.servlet.UnavailableException: Parsing error processing resource path jndi:/server/whale-war/WEB-INF/struts-config.xml I tried to start it with a dummy struts-config.xml (with start and end tag only) and it failed with the same message. I expect the parsing of the xml is done by struts modules, but looks from above it is not. Any idea what's wrong? -- View this message in context: http://old.nabble.com/old-struts-1.3-app-not-work-in-GF3-tp28175468p28175468.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Convention Plugin - dynamically setting the result
Hi I'm trying to develop an action mapper type of action. The action analyses the incoming parameters and based on those I want to dynamically select the action to handle the next step. So what I'm trying to do is to set a string field called location with the string name of the action and using the annotation @Result(name=service, type=redirectAction,location=%{location}). This is not working - I get redirected to my application default startup page. Before I go digging deeper, could someone confirm that it is possible to use OGNL to set the location in the @Result annotation at run-time or must the annotation be set at compile-time. Regards -- View this message in context: http://old.nabble.com/Convention-Plugin---dynamically-setting-the-result-tp28176069p28176069.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Syntax problem: Trying to display label for Select while iterating
I had similar problems with labels, most times they where related to themes. http://struts.apache.org/2.x/docs/themes-and-templates.html For example, if you turn on simple theme you'll have to provide your own tags for the labels as struts won't generate this markup. Em 08-04-2010 08:18, RogerV escreveu: Hi I'm iterating over a list in my jsp. The relevant code looks like; s:iterator status=blockStatus value=blocks var=block s:select label=blocks[%{#blockStatus.index}].name name=blocks[%{#blockStatus.index}].value list=%{blocks[#blockStatus.index].options} listKey=value listValue=text /s:select /s:iterator The select box displays correctly populated, but I cannot get the label to display! I've tried the above code and I've tried label=%{blocks[#blockStatus.index].name} which doesn't work either. I've stuck a System.out.println in my getName() method and with both examples, the getName() method on my block class get called and return the correct value. What on earth am I doing wrong? Regards - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Syntax problem: Trying to display label for Select while iterating
Alex Rodriguez Lopez wrote: I had similar problems with labels, most times they where related to themes. http://struts.apache.org/2.x/docs/themes-and-templates.html For example, if you turn on simple theme you'll have to provide your own tags for the labels as struts won't generate this markup. Doh! Thanks Alex. Regards -- View this message in context: http://old.nabble.com/Syntax-problem%3A-Trying-to-display-label-for-Select-while-iterating-tp28175030p28176168.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Convention Plugin - dynamically setting the result
2010/4/8 RogerV roger.var...@googlemail.com: I'm trying to develop an action mapper type of action. The action analyses the incoming parameters and based on those I want to dynamically select the action to handle the next step. So what I'm trying to do is to set a string field called location with the string name of the action and using the annotation @Result(name=service, type=redirectAction,location=%{location}). This is not working - I get redirected to my application default startup page. Before I go digging deeper, could someone confirm that it is possible to use OGNL to set the location in the @Result annotation at run-time or must the annotation be set at compile-time. Yes, it's possible, do you have getLocation() method in that action? Regards -- Łukasz http://www.lenart.org.pl/ Kapituła Javarsovia 2010 http://javarsovia.pl - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
JSP local scope / include con object domain visibility control
Hi, We wonder how to control the visibility of object put in the stack when including a jsp in another one. We do know the action/request/page scope and the include tag specification. But we have a need for another JSP level scope and include tag with the following characteristic: - the scope has the JSP life time - some (input) scope objects can be injected from a parent jsp via a include tag into a the child jsp scope - some (output) scope objects can be backwarded from a child jsp into the parent jsp scope when returning the include tag. - we want to access the JSP scope variables using the common Struts way (# operator), this scope being the prior one. We insist that we want to pass object that might be complex (and not only strings) Did any one have to face with this problem? Is their a way for implementing such a feature in struts? Example: -Parent.jsp: s:set name=myParentScopeObjectName value=%{myObj} scope=JSP/ s:include value=Child.jsp s:inputparam name=myParentScopeObjectName to=myInputName/ //myInputName is injected in the Child JSP scope as reference to the object myParentScopeObject s:outputparam name=myChildScopeObjectName to=myOutputName // myChildScopeObjectName (of Child JSP scope) is injected in Parent JSP scope as myOutputName /s:include s:property value=#myOutputName/ ---Child.jsp: s:property value=#myInputName/ s:set name= myChildScopeObjectName value=%{myChildObj} scope=JSP/
Struts2 annotation problem
Within my web apps lib directory I have the convention plugin and also the config browser plugin. My code is as follows: package com.example; import org.apache.struts2.convention.annotation.*; import org.apache.struts2.interceptor.SessionAware; import java.util.Map; import java.util.List; BaseAction extends Action Support. @ParentPackage(test) @Namespace(/test) public class ShippingDetailsAction extends BaseAction { @Action(value = check) public String check() throws Exception { return SUCCESS; } @Action(value = fetch) public String fetch() throws Exception { return SUCCESS; } } My struts xml file contains struts package name=test extends=struts-default namespace=/test/ /struts However I get action not mapped/found when I try to connect to /CONTEXT/test/fetch.action Or /CONTEXT/test/check.action When I check the config browser it says the test namespace has no actions within it. I am deploying to glassfish 2.1 Thanks Chris
Re: Live search with Dojo (Ajax) and Struts 2
step1. google.com step2 search with autocomplete + dojo On 7 April 2010 01:15, Celinio Fernandes cel...@yahoo.com wrote: Hi, I am using Struts 2.1.8 and the Dojo plugin. What i am trying to realize is the following : the user has to fill a field that corresponds to a REFERENCEID. I want to help that user to type in the REFERENCEID by suggesting 20 REFERENCEID as soon as he types in a digit. For instance, if he types in 1, i want to make a SQL request in the database and bring the 20 first REFERENCEID that start with 1. Then if the user types 13, i do another SQL request and bring the 20 first REFERENCEID that start with 13. And so on. Has anyone done that ? I would be interested in sample code. Is there a component in Dojo that already does that ? I am looking for something a bit like this demo with Ext JS : http://www.extjs.com/deploy/dev/examples/form/forum-search.html Also, does that field have to be a combobox ? can it be a text input (input type=text )? If it is a text input tag, where do i display the result (20 suggestions) ? In a DIV ? I am using Struts 2 which, as you know, comes with a nice plugin for Dojo. So I have sx:div and sx:bind tags at my disposal. Thanks for helping with sample code or any suggestion that might help.
Re: Error creating form bean - struts 1.2 + weblogic 8.1 + myeclipse 5.5
I tried the same code with tomcat 5.5.28 server and surprisingly... it worked absolutely fine.nbsp;But got no clue of what's wrong with weblogic 8.0.nbsp;PS:nbsp;Sandeep, Iam working with struts 1.2, please see the subject line.nbsp;NanuOn Fri, 02 Apr 2010 00:14:44 +0530 wrotegt;in struts 2 we don't have form bean.gt;gt;If you want to access some object similar to form you need to set in action class with get and set methods and fram work will take care of other thing remove the from tag from struts config.gt;gt;Apache struts site has the wonderful startup tutorial you can go through it and start coding in 10 minsgt;gt; On 1 April 2010 17:29, Nanu Khota lt;nanukh...@rediffmail.comgt; wrote:gt; gt;gt;gt;gt;gt;-- Forwarded message --gt;From:nbsp;Panchal, Ashish IN GGN SISL lt;ashish.panc...@siemens.comgt;gt;To:nbsp;nanukh...@rediffmail.com lt;nanukh...@rediffmail.comgt;gt;Date:nbsp;gt;Subject:nbsp;Error creating form bean - struts 1.2 + weblogic 8.1 + myeclipse 5.5gt; nbsp; Hi All, nbsp; I am a newbee to struts and trying some hands on it. I was just trying to develop a simple login form but getting following exception on initial run only. nbsp; - nbsp; SEVERE: Error creating form bean of class com.abc.struts.form.LoginForm java.lang.NullPointerException at org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:212) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:292) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:191) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:477) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457) at jsp_servlet.__login._jspService(__login.java:196) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) nbsp; - nbsp; I tried searching thru all forums from last 2 days but could not found any solution to the issue. This seems to be a very common problem but I don't know why its not going away. I am really stuck up. nbsp; Below are the listing of files required to analyize the cause of error. nbsp; web.xml http://java.sun.com/dtd/web-app_2_3.dtdgt; nbsp; nbsp;nbsp;nbsp; action nbsp;nbsp;nbsp; org.apache.struts.action.ActionServlet nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; config nbsp;nbsp;nbsp;nbsp;nbsp; /WEB-INF/struts-config.xml nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; debug nbsp;nbsp;nbsp;nbsp;nbsp; 3 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; detail nbsp;nbsp;nbsp;nbsp;nbsp; 3 nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; 0 nbsp; nbsp; nbsp;nbsp;nbsp; action nbsp;nbsp;nbsp; *.do nbsp; nbsp; nbsp;nbsp;nbsp; index.jsp nbsp; nbsp; nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /WEB-INF/struts-html.tld nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; /WEB-INF/struts-html.tld nbsp; nbsp; nbsp; index.jsp - .. nbsp;nbsp;nbsp; Login nbsp; . nbsp; nbsp; struts-config.xml - http://struts.apache.org/dtds/struts-config_1_2.dtdgt; nbsp; nbsp; nbsp; nbsp;nbsp;nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; attribute=loginForm nbsp;nbsp;nbsp;nbsp;nbsp; name=loginForm nbsp;nbsp;nbsp;nbsp;nbsp; path=/empLogin nbsp;nbsp;nbsp;nbsp;nbsp;scope=request nbsp;nbsp;nbsp;nbsp;nbsp; type=com.siemens.struts.action.EmpLoginAction nbsp;nbsp;nbsp;nbsp;nbsp;validate=false /gt; nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; nbsp; Login.jsp - nbsp; nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; Login: nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; Password: nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; Login nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp;nbsp;nbsp; nbsp;nbsp;nbsp; nbsp; nbsp; I can also provide the form bean and action class if required but I believe it won't add to solving the problem as the exception occurs when I click on the link on index.jsp and then it tries to render the Login.jsp. nbsp; Please help. nbsp; Nanugt; Important notice: This e-mail and any attachment there to contains corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system.gt;Thank You.gt;gt;gt;-gt;To unsubscribe, e-mail: user-unsubscr...@struts.apache.orggt;For additional commands, e-mail:
Render jsp to web browser and char[]
I am scratching my head on this one. We are generating files in a webapplication using struts 2.1, as part of the process the file contents are presented to the client (jsp include) as a preview. I would like to use the same jsp to render the contents to a byte/char[] or output stream/writer and when done return control to the action to present the results to the view. -Jason -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100- - +1 (443) 269-1555 x333Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Render jsp to web browser and char[]
Jason Pyeron wrote: I am scratching my head on this one. Maybe a filter declared in web.xml akin to sitemesh? Hell, if you're already using sitemesh, a decorator that wraps the whole page in a c:set / tag, followed by a scriptlet (or custom tag or something) that takes that value and stuffs it wherever you need (like into a file) or something? -Dale - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org