Re: OT: Best AJAX framework
Check out http://www.backbase.com for an Ajax framework. On 11/8/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: sarcasmFar be it from me to push my own creation.../sarcasm http://javawebparts.sourceforge.net Go into the javadocs and look at the javawebparts.taglib.ajaxtags package. This isn't the AjaxTags you may have heard of lately, they are two separate projects that just happen to have the same name. I think it's reasonable to say that this AjaxTags is a bit different from most of the other Ajax toolkits/taglibs/whatever out there, but folks might like what they find here (many do already!). If it seems interesting, I recommend downloading the cookbook and checking out the examples there. The recipes in there are simpler than what you'll find in the Java Web Parts sample app, much mroe focused, and can even be used as-is. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Tue, November 8, 2005 10:24 am, David Gagnon said: Hi all, Sorry for the OT guys. I'm looking for a good AJAX framework. I haven't found one under apache.org. Is there one? If not is there one who is more popular/cool/good that other? Thansk for your help!! Best Regard /David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with results of validate method in ActionForm
I have an an HTML form displayed on a jsp with struts html:form tags. In the validate method, I have a checkForEmpty and checkForNumber method that will check whether the field is empty or not a number (as applicable) and if so, add an ActionError to the ActionErrors object. The validate method works if all fields are correctly filled in and the control gets handed off to the Action associated with the form's submit button. However, if there are errors, then I get the following exception: javax.servlet.ServletException: Failed to obtain specified collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495) at org.apache.jsp.watermarkJobDetails_jsp._jspService(watermarkJobDetails_jsp.java:94) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:627) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:306) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1012) at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:980) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:255) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:144) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2358) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:133) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:127) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at
Adding images to option items in a select drop down list
Hi, I am creating a drop down list using the HTML select and option tags. The items in the list will be color names (ex. red, green, blue, etc..). I would like a small square image to be next to each color name text in the list. How would I go about this in my jsp file with my struts tags? -Faisal -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding images to option items in a select drop down list
Okay, somewhere in my head I can remember seeing an example of this, but I can't recall where it was. Sounds like the solution (if one exists) is non-trivial. Appreciate the ideas and if I do come across or develop some sort of solution I will post back to this thread. On 10/19/05, Frank W. Zammetti [EMAIL PROTECTED] wrote: I was thinking you could build an actual custom control to do this, and that's a good start... add a down arrow to the right of it to show the dropdown portion and lock the textbox from editing and you'd have a good start. Thanks Joe! -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, October 19, 2005 3:51 pm, Joe Germuska said: At 3:11 PM -0400 10/19/05, Frank W. Zammetti wrote: This isn's something that is possible in straight HTML. There could be a way to do it via CSS, but nothing obvious presents itself to me... I tried setting a background-image, but that didn't work. Can you find an example of it being done? Unless there's some non-obvious CSS trick, or perhaps some non-standard browser extension, I'd bet this isn't possible. Here's an example of something a user might not distinguish from what is described, although it wouldn't be using select http://script.aculo.us/demos/ajax/autocompleter_customized By using DHTML like this and having an event cause a hidden form field value to be set, you could achieve the goal. Note that Scriptaculous builds upon the Prototype library, which breaks commons-validator client side javascript validation. Joe -- Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com Narrow minds are weapons made for mass destruction -The Ex - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Trouble with html:link and params
I need to construct a table of files available for download. A file is downloaded by hitting the /download.do?jobId=2 action. The info for each row in the table is stored in an action form called retrieveJobsFormBean. This actionform contains a List of DownloadJob objects. Each of these objects is a javabean with 3 fields: jobId, numberFiles and fileSize. I wish to put the job id value that I print out in the first division of a table row into the download link as a param. But I'm not sure how to do it. I tried the following code, but it didn't work. trtdJob ID/tdtdNumber of Files/tdtdFile Size/td/tr logic:iterate id=job name=retrieveJobsFormBean property=jobs scope=request tr tdbean:write name=job property=jobId//td tdbean:write name=job property=numberFiles//td tdbean:write name=job property=fileSize/bean:message key=retrievejob.page.defaultfilesize//td tdhtml:link name=job action=downloadFile.do paramId=jobId paramName=retrieveJobsFormBean paramProperty=jobIdbean:message key=retrievejog.page.downloadlink//html:link/td /tr /logic:iterate /table -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Trouble with html:link and params
Actually, what I did was the following change to my html:link html:link action=downloadFile.do paramId=jobId paramName=job paramProperty=jobId So I changed teh paramName to job, which is the variable that refers to the bean during the iteration. On 10/12/05, Jeff Beal [EMAIL PROTECTED] wrote: On 10/12/05, Faisal Mahmoud [EMAIL PROTECTED] wrote: I need to construct a table of files available for download. A file is downloaded by hitting the /download.do?jobId=2 action. The info for each row in the table is stored in an action form called retrieveJobsFormBean. This actionform contains a List of DownloadJob objects. Each of these objects is a javabean with 3 fields: jobId, numberFiles and fileSize. I wish to put the job id value that I print out in the first division of a table row into the download link as a param. But I'm not sure how to do it. I tried the following code, but it didn't work. What about it didn't work? Did the link text not show up or did clicking on the link fail? If clicking on the link failed, do a View Source and see what shows up. That should help to pinpoint the problem. trtdJob ID/tdtdNumber of Files/tdtdFile Size/td/tr logic:iterate id=job name=retrieveJobsFormBean property=jobs scope=request tr tdbean:write name=job property=jobId//td tdbean:write name=job property=numberFiles//td tdbean:write name=job property=fileSize/bean:message key=retrievejob.page.defaultfilesize//td tdhtml:link name=job action=downloadFile.do paramId=jobId paramName=retrieveJobsFormBean paramProperty=jobIdbean:message key=retrievejog.page.downloadlink//html:link/td /tr /logic:iterate /table If the link text didn't show up, my guess is that you need to change 'retrievejog' to 'retrievejob' in the last bean:message / element. -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is this an appropriate use for plugins
Actually, I deploy on WAS4. We have a WAS5 environment ready, but it has no been made available to do deployments on for us yet. For my next project, we will be using WAS5 though. On 10/9/05, Martin Gainty [EMAIL PROTECTED] wrote: Niall et al *Assuming* your are using websphere 5.0 or 5.1 (and you are not adverse to running maven scripts) this primer on installing PlugIns in Websphere should get you started http://maven-plugins.sourceforge.net/maven-was5-plugin/ Best, Martin- - Original Message - From: Niall Pemberton [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Saturday, October 08, 2005 5:28 PM Subject: Re: Is this an appropriate use for plugins See http://wiki.apache.org/struts/StrutsPlugins Niall - Original Message - From: Faisal Mahmoud [EMAIL PROTECTED] Sent: Saturday, October 08, 2005 8:34 PM For the webapp I am writing, I have several compenents that run as services that always need to be available. I refer to them as JobManagers. Basically, a job handler will receive a job request, add that job to it's job queue and then launch a thread to work on the job. I plan on having these JobManagers implemented as Singletons. I would like these classes live for the duration of the webapp. They should start up when the app server (tomcat for dev, websphere for production) starts up, initialize all their resources and then sit and wait for requests for jobs. Is using a plugin the correct way to make sure these classes are instantiated on startup? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find a bean in the session
:) Thanks for the help Wendy, I was looking at the wrong object, it wasn't a typo. Yet another reason why coding at 8pm on a Friday is a bad idea. On 10/8/05, Wendy Smoak [EMAIL PROTECTED] wrote: From: Faisal Mahmoud [EMAIL PROTECTED] Secondly, in my ContactSupportAction class (subclass of struts Action), I attempt to retrieve this bean from the session and call it's getEmail() method. However, the result of (UserInfoBean) request.getAttribute(userInfoBean); returns a NULL reference. You say you're putting it in the session, but the code above tries to retrieve it from the request. Unless that's a typo, try this instead: session.getAttribute( userInfoBean ); -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Is this an appropriate use for plugins
For the webapp I am writing, I have several compenents that run as services that always need to be available. I refer to them as JobManagers. Basically, a job handler will receive a job request, add that job to it's job queue and then launch a thread to work on the job. I plan on having these JobManagers implemented as Singletons. I would like these classes live for the duration of the webapp. They should start up when the app server (tomcat for dev, websphere for production) starts up, initialize all their resources and then sit and wait for requests for jobs. Is using a plugin the correct way to make sure these classes are instantiated on startup? -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot find a bean in the session
I am using Struts 1.1 deployed in Tomcat 4.1 running under JDK 1.3. I have a contact form I am building. It will get the user's email from an object called a UserInfoBean, which is not an ActionForm subclass, but does follow the JavaBean paradigm. It simply holds user info such as first name, last name, etc. Since it isn't associated with any particular form, I didn't make it subclass ActionForm. So my first question is, is this the correct pattern to follow? Secondly, in my ContactSupportAction class (subclass of struts Action), I attempt to retrieve this bean from the session and call it's getEmail() method. However, the result of (UserInfoBean) request.getAttribute(userInfoBean); returns a NULL reference. I don't understand why this is happening. I create this bean in a class called GetUserInfoAction, which gets fired right after a user logs in succesfully. The GetUserInfoAction will create a UserInfoBean and place it in the session under the name userInfoBean. The GetUserInfoAction will forward the user to the home.jsp. In this page I have some bean:write tags which reference information in the userInfoBean object. And this information displays just find. So I know the bean gets created and succesfully stored in the session. So how come I am not able to find a reference to this object when I attempt to retrieve from the session in my ContactSupportAction class? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts Tags examples and usage
TheServerSide.com has access to a free PDF download of Jakarta Struts Live. While I don't think the book is that great overall, there are some chapters on the Struts tag libs. http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss On 10/7/05, Leon Rosenberg [EMAIL PROTECTED] wrote: maybe http://wiki.apache.org/struts/StrutsTutorials will help you. regards Leon On 10/8/05, Deep Chand [EMAIL PROTECTED] wrote: Hi, Is there any good resource on the net that describes the usage of struts tag libraries (html,bean, logic etc) with examples? I saw the examples available on the http://struts.apache.org/userGuide/struts-bean.htm but there are no examples that describes how you can use it? Please reply. Thanks. Deep - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Navigation menu help
I have created a navigation menu jsp file that I include with all the pages on my webapp via the jsp:include tag. This page has the following nav menu: ul lia href=/homePageHome/a/li lia href=/newJobPageNew Job/a/li lia href=/retrieveJobPageRetrieve Job/a/li /ul I have placed all jsp pages under WEB-INF/jsp/, except for the login page which resides at WebRoot/index.jsp. The user will access the index.jsp page, login and then upon succesfull authentication, they will be forwarded to WEB-INF/jsp/home.jsp. This occurs via a struts Action class. This action forwards as shown below: action path=/userLogin type=com.myorg.struts.actions.LoginUserAction name=loginFormBean input=/index.jsp unknown=true scope=session validate=true forward name=login.success path=/homePage.do/ /action I use ActionForwards to perform menu navigation. I specify them as follows in my struts-config.xml file: action path=/homePage type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/jsp/home.jsp/ action path=/newJobPage type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/jsp/newjob.jsp/ action path=/retrieveJobPage type=org.apache.struts.actions.ForwardAction parameter=/WEB-INF/jsp/retrievejob.jsp/ When the home.jsp loads after the user logs in the menu displays fine. The links show paths such as http://localhost:8080/homePage http://localhost:8080/newJobPage However, if I click on any of the nav links, I get a Tomcat error page saying: HTTP Status 404 - /homePage type Status report message /homePage description The requested resource (/homePage) is not available. This occurs for any of the links. What am I doing wrong here? -Faisal -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Datasource not found by Plugin on startup
Hi, I have written a plugin for a Struts app which accesses a DB connection via a datasource. The datasource is defined in the Tomcat server.xml file, and is loaded via a library we wrote. I know the datasource works fine because I can access if from other classes in the app. But when I start up Tomcat, I get the following exception thrown: javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Is there something I need to do to make the DS available to my Plugin? -Faisal -- http://www.quidprocode.com