where other struts examples ??
Hi, did someone extended the struts example, or created other web applications using struts, I just start learning struts. Thanks -- majid kamal [EMAIL PROTECTED] - email (781) 685-1450 x2371 - voicemail/fax __ FREE voicemail, email, and fax...all in one place. Sign Up Now! http://www.onebox.com
RE: Equivalent of jsp:setProperty
Just wondering was there any struts equivalent similar to bean:write. The reason being, use struts where ever possible instead of coding using both struts and jsp tags at the same time. Thanks Senthil Kumar. -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, April 13, 2001 11:20 PM To: [EMAIL PROTECTED] Subject: Re: Equivalent of jsp:setProperty On Tue, 10 Apr 2001, Suriyanarayanan, Senthil Kumar wrote: Hello, Is there a struts equivalent for setProperty. I'm using logic:equals inside a html:form tag, to check for a specific property's value of the form and display some extra information. I need to reset the value at the end of the logic tag. How could I achieve it other than jsp:setProperty. Thanks Senthil Kumar.S Is there a particular reason you cannot just use jsp:setProperty? Craig ** The Information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
RE: maxFileSize and file upload
Soeren, As far as I understood the maxFileSize init parameter for the action servlet should limit the maximum file size of the file uploaded to the server. If I set this to 200K I can still upload files with more the 2MB. :( I'll check this out today, look for a commit later tonight if I can reproduce the problem. In the struts upload example application it's done within the UploadAction.java. However this is the wrong place to do it. The reason for doing this is that the file's contents are stored in a request attribute, and storing a large file in the request attribute could possibly cause an OutOfMemoryError, that's the only reason. The upload application is just an example of how to use the basic functionality of the upload package. Because the file is then temporarily written to disk, which is a possible security risk. Could you elaborate?
encoded URLs
If I do a mapping.getForward("x"), is the URL that goes to encoded with the session and stuff? Thanks, Jesse
Deploying struts-example WAR using NSAPI plugin with Weblogic6.0
Hello, I'm using Weblogic6.0 with IPlanet WS with NSAPI plugin. When I deploy the struts-example.war on my Weblogic6.0 server and try to access using http://localhost/weblogic/struts-example, all those links inside the jsp refer as http://localhost/struts-example/... and hence they are broken. How do I retain the ppath? Object name="weblogic" ppath="*/weblogic/*" Service fn=wl-proxy WebLogicHost=localhost WebLogicPort=7001 PathTrim="/weblogic" /Object Is it something wrong with my configuration of deploying the struts-example.? Thanks, Senthil Kumar.S ** The Information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
FIELD POPULTION ON 2ND JSP
Can someone help how I can solve this problem I have 2 JSP and 2 forms beans as below: LoginForm.java MainForm.java Login.jsp Main.jsp I have a field called SIN # on Login.jsp and Main.jsp When user Enter SIN # on Login.jsp upon success it goes to Main.jsp. I have also SIN# on Main.jsp. I want this field should be automatically populated based on the values enterd on Login.jsp In the mean tim I don't want a common bean for the both jsp's. any clue and hint will be highly appericated. Thanks, TAHIR++
RE: FIELD POPULTION ON 2ND JSP
Instantiate the MainForm.java class in the Action class that handles the LoginForm.java and set the SSN value in the MainForm.java from the LoginForm.java Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: FIELD POPULTION ON 2ND JSP Can someone help how I can solve this problem I have 2 JSP and 2 forms beans as below: LoginForm.java MainForm.java Login.jsp Main.jsp I have a field called SIN # on Login.jsp and Main.jsp When user Enter SIN # on Login.jsp upon success it goes to Main.jsp. I have also SIN# on Main.jsp. I want this field should be automatically populated based on the values enterd on Login.jsp In the mean tim I don't want a common bean for the both jsp's. any clue and hint will be highly appericated. Thanks, TAHIR++
RE: FIELD POPULTION ON 2ND JSP
Here is my code that I have in LoginAction class but this does not work. MainForm mm = new MainForm(); mm.setSinNum(sinNum); -Original Message- From: Natra, Uday [SMTP:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:05 PM To: '[EMAIL PROTECTED]' Subject: RE: FIELD POPULTION ON 2ND JSP Instantiate the MainForm.java class in the Action class that handles the LoginForm.java and set the SSN value in the MainForm.java from the LoginForm.java Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: FIELD POPULTION ON 2ND JSP Can someone help how I can solve this problem I have 2 JSP and 2 forms beans as below: LoginForm.java MainForm.java Login.jsp Main.jsp I have a field called SIN # on Login.jsp and Main.jsp When user Enter SIN # on Login.jsp upon success it goes to Main.jsp. I have also SIN# on Main.jsp. I want this field should be automatically populated based on the values enterd on Login.jsp In the mean tim I don't want a common bean for the both jsp's. any clue and hint will be highly appericated. Thanks, TAHIR++
Data Connection Pool
I have been very pleased with the Struts framework. I'm sure this issue has been dealt with, I'm just not sure how to approach it. When I leave my database pooled connections open for long periods of time, there is a possibility that the server will reset. When this happens, my database driver keeps the connections open. If I restart tomcat, I get an exception regarding the open pooled connection that's already established. If I kill the java process, I can start up normally. On Win2k, I can get rid of the startup error completely by making the minimum number of connections zero. On FreeBSD, it gets more complicated. I have not found a way to reliably start up tomcat like I can on Win2k. Any ideas? Here's the database portion of my struts-config.xml: data-sources data-source autoCommit="false" description="Interbase Data Source" driverClass="interbase.interclient.Driver" maxCount="4" minCount="0" url="jdbc:interbase://path/to/database" user="username" password="password" / /data-sources Anthony It is by caffeine alone I set my mind in motion. It is by the Beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
RE: FIELD POPULTION ON 2ND JSP
Also U need to set the MainForm object in the request/session scope as per Ur requirements. ex. request.getSession().setAttribute("MainForm",mm)/request.setAttribute("MainF orm",mm) Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:36 AM To: [EMAIL PROTECTED] Subject: RE: FIELD POPULTION ON 2ND JSP Here is my code that I have in LoginAction class but this does not work. MainForm mm = new MainForm(); mm.setSinNum(sinNum); -Original Message- From: Natra, Uday [SMTP:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:05 PM To: '[EMAIL PROTECTED]' Subject: RE: FIELD POPULTION ON 2ND JSP Instantiate the MainForm.java class in the Action class that handles the LoginForm.java and set the SSN value in the MainForm.java from the LoginForm.java Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: FIELD POPULTION ON 2ND JSP Can someone help how I can solve this problem I have 2 JSP and 2 forms beans as below: LoginForm.java MainForm.java Login.jsp Main.jsp I have a field called SIN # on Login.jsp and Main.jsp When user Enter SIN # on Login.jsp upon success it goes to Main.jsp. I have also SIN# on Main.jsp. I want this field should be automatically populated based on the values enterd on Login.jsp In the mean tim I don't want a common bean for the both jsp's. any clue and hint will be highly appericated. Thanks, TAHIR++
Exception creating bean: java.lang.ClassNotFoundException
Can anyone help me with this? I have the classes in the right folders. However, the ActionForm is not visible to the jsp page. javax.servlet.ServletException: Exception creating bean of class messageboard.Message: java.lang.ClassNotFoundException: messageboard/Message at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459) at _0002fmessage_0002ejspmessage_jsp_1._jspService(_0002fmessage_0002ejspmessage_jsp_1.java:602) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) message.jsp html:form action="/add" name="MessageForm" focus="subject" type="messageboard.Message" struts-config.xml struts-config !-- == Form Bean Definitions === -- form-beans !-- user form bean -- form-bean name="IdentityForm" type="messageboard.Identity"/ !-- message form bean -- form-bean name="MessageForm" type="messageboard.Message"/ /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- Edit user registration -- actionpath="/add" type="messageboard.AddMessageAction" name="MessageForm" scope="session" validate="true" inputForm="/message.jsp" forward name="help" path="/help.jsp"/ forward name="success" path="/showmessage.jsp"/ /action /action-mappings /struts-config Thanks in advance. -Fei _ Get your FREE download of MSN Explorer at http://explorer.msn.com
RE: Exception creating bean: java.lang.ClassNotFoundException
I've had this happen too. The classes compile, but fail to run. It always turns out to be some sort of CLASSPATH problem. Check *.properties and make sure any place you define classpath has the required classes there. If you use WinNT/2K, and Tomcat runs as a service, make sure you also check your wrapper.properties that jk_nt_service.exe uses. Anthony -Original Message- From: Fei Xie [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 10:00 AM To: [EMAIL PROTECTED] Subject: Exception creating bean: java.lang.ClassNotFoundException Can anyone help me with this? I have the classes in the right folders. However, the ActionForm is not visible to the jsp page. javax.servlet.ServletException: Exception creating bean of class messageboard.Message: java.lang.ClassNotFoundException: messageboard/Message at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:459) at _0002fmessage_0002ejspmessage_jsp_1._jspService(_0002fmessage_0002ejspmessag e_jsp_1.java:602) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79 7) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:484) message.jsp html:form action="/add" name="MessageForm" focus="subject" type="messageboard.Message" struts-config.xml struts-config !-- == Form Bean Definitions === -- form-beans !-- user form bean -- form-bean name="IdentityForm" type="messageboard.Identity"/ !-- message form bean -- form-bean name="MessageForm" type="messageboard.Message"/ /form-beans !-- == Action Mapping Definitions == -- action-mappings !-- Edit user registration -- actionpath="/add" type="messageboard.AddMessageAction" name="MessageForm" scope="session" validate="true" inputForm="/message.jsp" forward name="help" path="/help.jsp"/ forward name="success" path="/showmessage.jsp"/ /action /action-mappings /struts-config Thanks in advance. -Fei _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Oracle Servlet Engine
Hi, we work with Oracle (8.1.7) in our company. Now, I want to know if Struts works with the Oracle ApplicationServer. If anyone has any know-how with the Oracle Servlet Engine and Struts or the Oracle 8i ApplicationServer I will be very happy for every information send directly to my eMail-address. Bye Michael
Re: Oracle Servlet Engine
No, And it will not work with 9i either. Both use JServ which is a JSP 1.0, Servlet 2.0 container. However, I know 9i uses Apache which could then be modified to use tomcat. Oracle 8i may also use Apache but I am not sure. -Rob Michael Schommer wrote: Hi, we work with Oracle (8.1.7) in our company. Now, I want to know if Struts works with the Oracle ApplicationServer. If anyone has any know-how with the Oracle Servlet Engine and Struts or the Oracle 8i ApplicationServer I will be very happy for every information send directly to my eMail-address. Bye Michael
RE: Pre populating a Form Bean
Hi. Had similar problems earlier. Check that the scope in your config file for jsp2 is indeed request. If it is session you will need to add the form to the session, not request object. Dave "Tewathia, Atul" [EMAIL PROTECTED] on 04/15/2001 03:56:52 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: RE: Pre populating a Form Bean I am doing this.. in the perform method of myaction class. but it still doesn't work OneForm theForm = (OneForm) form; String value = theForm.getValue(); TwoForm twoForm = new TwoForm(); twoForm.setVal2(value); request.setAttribute("twoForm",twoForm); return mapping.findForward("Two"); I am still getting the Jsp2 un populated. Jsp1 ---forwards--- Jsp2 . -Original Message- From: Tharwat Abdul-Malik [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 15, 2001 10:19 AM To: [EMAIL PROTECTED] Subject: Re: Pre populating a Form Bean Does jsp1 forward to jsp2? If so, populate the bean in the perform method, stuff it in the request, the jsp2 can find it there. - Original Message - From: Tewathia, Atul mailto:[EMAIL PROTECTED] To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Sent: Sunday, April 15, 2001 12:46 AM Subject: RE: Pre populating a Form Bean It can't be done in action of jsp1 because there is no reference to the form of jsp2. -Original Message- From: Rajan Gupta [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Sent: Sunday, April 15, 2001 6:53 AM To: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] Subject: Re: Pre populating a Form Bean I think u should be able to Populate it in the Action of JSP1. --- "Tewathia, Atul" [EMAIL PROTECTED] wrote: I want to pre-populate a formBean in this scenario. Jsp1 -- Jsp2 When I process the data of jsp1 using form1 in the perform method how do I set the form2 attributes .. so that the jsp2 is displayed with preloaded data. Can any body guide in this ?? __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ http://personal.mail.yahoo.com/ Title: RE: Pre populating a Form Bean I am doing this.. in the perform method of myaction class. but it still doesn't work OneForm theForm = (OneForm) form; Stringvalue = theForm.getValue(); TwoForm twoForm = new TwoForm();twoForm.setVal2(value);request.setAttribute("twoForm",twoForm);return mapping.findForward("Two"); I am still getting the Jsp2 un populated. Jsp1 ---forwards--- Jsp2 . -Original Message-From: Tharwat Abdul-Malik [mailto:[EMAIL PROTECTED]]Sent: Sunday, April 15, 2001 10:19 AMTo: [EMAIL PROTECTED]Subject: Re: Pre populating a Form Bean Does jsp1 forward to jsp2? If so, populate the bean in the perform method, stuff it in the request, the jsp2 can find it there. - Original Message - From: Tewathia, Atul To: [EMAIL PROTECTED] Sent: Sunday, April 15, 2001 12:46 AM Subject: RE: Pre populating a Form Bean It can't be done in action of jsp1 because there is no reference to the form of jsp2. -Original Message- From: Rajan Gupta [mailto:[EMAIL PROTECTED]] Sent: Sunday, April 15, 2001 6:53 AM To: [EMAIL PROTECTED] Subject: Re: Pre populating a Form Bean I think u should be able to Populate it in the Action of JSP1. --- "Tewathia, Atul" [EMAIL PROTECTED] wrote: I want to pre-populate a formBean in this scenario. Jsp1 -- Jsp2 When I process the data of jsp1 using form1 in the perform method how do I set the form2 attributes .. so that the jsp2 is displayed with preloaded data. Can any body guide in this ?? __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Server Reloading classes
Craig, Are you saying that 3.x versions of Tomcat reload okay if place files in WEB-INF/classes dir? Placed mine in WEB-INF/classes/beans and couldn't get mine to!! As I posted, it was only in 4 beta1 that it worked. Dave "Craig R. McClanahan" [EMAIL PROTECTED] on 04/13/2001 11:18:37 PM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc:(bcc: David Hay/Lex/Lexmark) Subject: Re: Server Reloading classes On Tue, 10 Apr 2001 [EMAIL PROTECTED] wrote: Hi everyone. After a very frustrating time trying to get Tomcat reloading to work, and trying to do so with v4, I finally discovered that it is only version 4.0 b1 (and not b2 or b3) in which this DOES work (see http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg16410.html) Can be downloaded from: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0-b1/ Thought some others out there might find this useful. Dave There is one and only one place that you can put your classes and have them trigger automatic reloading -- in the WEB-INF/classes directory of your web application. Placing them anywhere else will *not* trigger reloading. You also have to set up a Context entry for this application that includes reloadable="true" in its attributes. However, you do have another option with Tomcat 4 -- use the manager appliation to trigger reloading manually. The first thing you have to do is create a user in the "conf/tomcat-users.xml" file that is assigned the role "manager" (because the manager application is protected by a security constraint). Now, if you want to reload your application mounted on context path "/myapp", simply open a new browser window and go to http://localhost:8080/manager/reload?path=/myapp and answer the username/password questions (the first time). This will reload your application unconditionally, so it's quite useful when you changed something like your application resources file, rather than recompiling a class. If you still have problems with reloading in Tomcat, you should report a bug to the bug tracking system http://nagoya.apache.org/bugzilla/ under product category "Tomcat 4". Craig
RE: getting values from bean: newbie
I think U should use the bean:define id="foo" name="bar" scope="session" / tags to access the formBean instead of UseBean Tag. Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: getting values from bean: newbie hi.. I have a form through which i insert some data into DB... I store all these form properties in a form bean... When the form is submitted, DB insert is fine But when i try to dislay the form properties on screen, it gives me nothing... I tried to follow struts example as far as the config file is concern here is some details that reveals some fact about my form: In jsp file i have this: --- html:form action="/addBookForm" focus="bookIsbn" bean:message key="reqd.fields"/ table border="0" width="100%" tr th align="right" bean:message key="book.isbn"/ /th td align="left" html:text property="bookIsbn" maxlength="300"/ /td /tr --- here is my config file --- form-bean name="AddBookForm" type="org.apache.struts.InSageLib.Library.AddBookForm"/ --- and here is how I try to dislay properties: --- jsp:useBean id="abf" scope="session" type="org.apache.struts.InSageLib.Library.AddBookForm" / % String isbnNumber = abf.getBookIsbn(); % jsp:getProperty name="abf" property="bookIsbn"/ --- I don't know what's the problem...?? Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: FIELD POPULTION ON 2ND JSP
I tried this but still does not work. request.getSession().setAttribute("MainForm",mm); -Original Message- From: Natra, Uday [SMTP:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:45 PM To: '[EMAIL PROTECTED]' Subject: RE: FIELD POPULTION ON 2ND JSP Also U need to set the MainForm object in the request/session scope as per Ur requirements. ex. request.getSession().setAttribute("MainForm",mm)/request.setAttribute("Mai nF orm",mm) Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:36 AM To: [EMAIL PROTECTED] Subject: RE: FIELD POPULTION ON 2ND JSP Here is my code that I have in LoginAction class but this does not work. MainForm mm = new MainForm(); mm.setSinNum(sinNum); -Original Message- From: Natra, Uday [SMTP:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 12:05 PM To: '[EMAIL PROTECTED]' Subject:RE: FIELD POPULTION ON 2ND JSP Instantiate the MainForm.java class in the Action class that handles the LoginForm.java and set the SSN value in the MainForm.java from the LoginForm.java Thanks, Uday. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 11:06 AM To: [EMAIL PROTECTED] Subject: FIELD POPULTION ON 2ND JSP Can someone help how I can solve this problem I have 2 JSP and 2 forms beans as below: LoginForm.java MainForm.java Login.jsp Main.jsp I have a field called SIN # on Login.jsp and Main.jsp When user Enter SIN # on Login.jsp upon success it goes to Main.jsp. I have also SIN# on Main.jsp. I want this field should be automatically populated based on the values enterd on Login.jsp In the mean tim I don't want a common bean for the both jsp's. any clue and hint will be highly appericated. Thanks, TAHIR++
RE: getting values from bean: newbie
sorry...I tried to use bean:define id="foo" name="bar" scope="session" / but now it gives me NullPointer exception... here is how i use bean define/ tag... - bean:define id="abf" type="org.apache.struts.InSageLib.Library.AddBookForm" scope="session" / - and down the line i try to print this on screen: - jsp:getProperty name="abf" property="bookIsbn"/ - I did not change tld file.. I digged out in work folder and its giving me error at this line: int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag(); abf = (org.apache.struts.InSageLib.Library.AddBookForm) pageContext.findAttribute("abf"); By the way, mainMenu.jsp in struts example uses jsp:useBean... Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:37 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie I think U should use the bean:define id="foo" name="bar" scope="session" / tags to access the formBean instead of UseBean Tag. Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: getting values from bean: newbie hi.. I have a form through which i insert some data into DB... I store all these form properties in a form bean... When the form is submitted, DB insert is fine But when i try to dislay the form properties on screen, it gives me nothing... I tried to follow struts example as far as the config file is concern here is some details that reveals some fact about my form: In jsp file i have this: --- html:form action="/addBookForm" focus="bookIsbn" bean:message key="reqd.fields"/ table border="0" width="100%" tr th align="right" bean:message key="book.isbn"/ /th td align="left" html:text property="bookIsbn" maxlength="300"/ /td /tr --- here is my config file --- form-bean name="AddBookForm" type="org.apache.struts.InSageLib.Library.AddBookForm"/ --- and here is how I try to dislay properties: --- jsp:useBean id="abf" scope="session" type="org.apache.struts.InSageLib.Library.AddBookForm" / % String isbnNumber = abf.getBookIsbn(); % jsp:getProperty name="abf" property="bookIsbn"/ --- I don't know what's the problem...?? Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: getting values from bean: newbie
Why don't U try bean:write name="abf" property="bookIsbn"/ instead of jsp:getProperty name="abf" property="bookIsbn"/ Thanks, Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:27 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie sorry...I tried to use bean:define id="foo" name="bar" scope="session" / but now it gives me NullPointer exception... here is how i use bean define/ tag... - bean:define id="abf" type="org.apache.struts.InSageLib.Library.AddBookForm" scope="session" / - and down the line i try to print this on screen: - jsp:getProperty name="abf" property="bookIsbn"/ - I did not change tld file.. I digged out in work folder and its giving me error at this line: int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag(); abf = (org.apache.struts.InSageLib.Library.AddBookForm) pageContext.findAttribute("abf"); By the way, mainMenu.jsp in struts example uses jsp:useBean... Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:37 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie I think U should use the bean:define id="foo" name="bar" scope="session" / tags to access the formBean instead of UseBean Tag. Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: getting values from bean: newbie hi.. I have a form through which i insert some data into DB... I store all these form properties in a form bean... When the form is submitted, DB insert is fine But when i try to dislay the form properties on screen, it gives me nothing... I tried to follow struts example as far as the config file is concern here is some details that reveals some fact about my form: In jsp file i have this: --- html:form action="/addBookForm" focus="bookIsbn" bean:message key="reqd.fields"/ table border="0" width="100%" tr th align="right" bean:message key="book.isbn"/ /th td align="left" html:text property="bookIsbn" maxlength="300"/ /td /tr --- here is my config file --- form-bean name="AddBookForm" type="org.apache.struts.InSageLib.Library.AddBookForm"/ --- and here is how I try to dislay properties: --- jsp:useBean id="abf" scope="session" type="org.apache.struts.InSageLib.Library.AddBookForm" / % String isbnNumber = abf.getBookIsbn(); % jsp:getProperty name="abf" property="bookIsbn"/ --- I don't know what's the problem...?? Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: getting values from bean: newbie
i tried that too...i got this error.. javax.servlet.ServletException: bean abf not found within scope sorry to bother you.. Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 4:26 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie Why don't U try bean:write name="abf" property="bookIsbn"/ instead of jsp:getProperty name="abf" property="bookIsbn"/ Thanks, Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:27 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie sorry...I tried to use bean:define id="foo" name="bar" scope="session" / but now it gives me NullPointer exception... here is how i use bean define/ tag... - bean:define id="abf" type="org.apache.struts.InSageLib.Library.AddBookForm" scope="session" / - and down the line i try to print this on screen: - jsp:getProperty name="abf" property="bookIsbn"/ - I did not change tld file.. I digged out in work folder and its giving me error at this line: int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag(); abf = (org.apache.struts.InSageLib.Library.AddBookForm) pageContext.findAttribute("abf"); By the way, mainMenu.jsp in struts example uses jsp:useBean... Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:37 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie I think U should use the bean:define id="foo" name="bar" scope="session" / tags to access the formBean instead of UseBean Tag. Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: getting values from bean: newbie hi.. I have a form through which i insert some data into DB... I store all these form properties in a form bean... When the form is submitted, DB insert is fine But when i try to dislay the form properties on screen, it gives me nothing... I tried to follow struts example as far as the config file is concern here is some details that reveals some fact about my form: In jsp file i have this: --- html:form action="/addBookForm" focus="bookIsbn" bean:message key="reqd.fields"/ table border="0" width="100%" tr th align="right" bean:message key="book.isbn"/ /th td align="left" html:text property="bookIsbn" maxlength="300"/ /td /tr --- here is my config file --- form-bean name="AddBookForm" type="org.apache.struts.InSageLib.Library.AddBookForm"/ --- and here is how I try to dislay properties: --- jsp:useBean id="abf" scope="session" type="org.apache.struts.InSageLib.Library.AddBookForm" / % String isbnNumber = abf.getBookIsbn(); % jsp:getProperty name="abf" property="bookIsbn"/ --- I don't know what's the problem...?? Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: getting values from bean: newbie
Hey Nishit, Its ok. Can U send me Ur Jsp file?? Thanks, Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:33 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie i tried that too...i got this error.. javax.servlet.ServletException: bean abf not found within scope sorry to bother you.. Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 4:26 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie Why don't U try bean:write name="abf" property="bookIsbn"/ instead of jsp:getProperty name="abf" property="bookIsbn"/ Thanks, Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:27 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie sorry...I tried to use bean:define id="foo" name="bar" scope="session" / but now it gives me NullPointer exception... here is how i use bean define/ tag... - bean:define id="abf" type="org.apache.struts.InSageLib.Library.AddBookForm" scope="session" / - and down the line i try to print this on screen: - jsp:getProperty name="abf" property="bookIsbn"/ - I did not change tld file.. I digged out in work folder and its giving me error at this line: int _jspx_eval_bean_define_0 = _jspx_th_bean_define_0.doStartTag(); abf = (org.apache.struts.InSageLib.Library.AddBookForm) pageContext.findAttribute("abf"); By the way, mainMenu.jsp in struts example uses jsp:useBean... Nishit -Original Message- From: Natra, Uday [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 3:37 PM To: '[EMAIL PROTECTED]' Subject: RE: getting values from bean: newbie I think U should use the bean:define id="foo" name="bar" scope="session" / tags to access the formBean instead of UseBean Tag. Uday. -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Monday, April 16, 2001 2:32 PM To: [EMAIL PROTECTED] Subject: getting values from bean: newbie hi.. I have a form through which i insert some data into DB... I store all these form properties in a form bean... When the form is submitted, DB insert is fine But when i try to dislay the form properties on screen, it gives me nothing... I tried to follow struts example as far as the config file is concern here is some details that reveals some fact about my form: In jsp file i have this: --- html:form action="/addBookForm" focus="bookIsbn" bean:message key="reqd.fields"/ table border="0" width="100%" tr th align="right" bean:message key="book.isbn"/ /th td align="left" html:text property="bookIsbn" maxlength="300"/ /td /tr --- here is my config file --- form-bean name="AddBookForm" type="org.apache.struts.InSageLib.Library.AddBookForm"/ --- and here is how I try to dislay properties: --- jsp:useBean id="abf" scope="session" type="org.apache.struts.InSageLib.Library.AddBookForm" / % String isbnNumber = abf.getBookIsbn(); % jsp:getProperty name="abf" property="bookIsbn"/ --- I don't know what's the problem...?? Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: How to use the html:img tag?
If I use html:img inside html:link tag, I get an exception. Looks like I need to use html:link with regular image tag as html:link page="/recentactivity.jsp"img src="/images/nav_recent.gif" /html:link Exception: Apr 16, 2001 3:37:10 PM EDT Error HTTP [WebAppServletContext(8358178,WebApp) ] exception raised on '/WebApp/recentactivity.jsp' javax.servlet.ServletException: runtime failure in custom tag 'link' at jsp_servlet._navigation._jspService(_navigation.java:319) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:208) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat cherImpl.java:249) at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat cherImpl.java:167) at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:104 ) at jsp_servlet._recentactivity._jspService(_recentactivity.java:148) at weblogic.servlet.jsp.JspBase.service(JspBase.java:27) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:208) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat cherImpl.java:149) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1727) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:156 4) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:208) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:1127) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:1529) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) -Original Message- From: Scott Cressler [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 8:06 PM To: '[EMAIL PROTECTED]' Subject: RE: How to use the html:img tag? Probably something like: html:link ... html:img ... / /html:link ? -Original Message- From: Suriyanarayanan, Senthil Kumar [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 10, 2001 5:01 PM To: [EMAIL PROTECTED] Subject: How to use the html:img tag? Hello, I would like to know create an hyperlink image using the html:img ? Basically I want to convert the following html in to html:img ... a href="registration.jsp"img src="images/registration.gif"/a Thanks Senthil Kumar.S ** The Information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer. ** The Information transmitted herewith is sensitive information intended only for use to the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon, this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
Re: [INVITATION] Velocity-Struts integration
I'm really happy with this, me myself was on this move. My motivation was simple. In my application I have to manufacture form-based files, so needed a general purpose template engine. So, I started to stare tea and velocity as template engines capable rendering not only web pages but fill-in file templates, too. Somehow it seemed to be too much to keep booth JSP-s and the other template engine, so started to find ways to replace JSP. I think, many goodies remain duplicate even this way, everybody has it's own introspection e.g. The "commons" project seems to arrive just in time (or a bit late) to me. incze On Mon, Apr 16, 2001 at 12:58:43AM -0400, Geir Magnusson Jr. wrote: Velocity is a general template engine that is well suited for the View layer in web applications. It is considered an excellent alternative to JSP. Velocity is a Jakarta project just like Struts, and has it's homepage at : http://jakarta.apache.org/velocity/ I have been exploring the possiblity of using Velocity templates in the Struts framework, and would like to invite any interested Struts users and developers to participate. Currently, I have it far enough where the struts-example has been converted, and for the most part works 100% like the original. There is support for : 1) Integration of normal velocity templates (*.vm) into the Struts action/forward framework. These templates can co-exist with JSPs in the same application. 2) The excellent Struts message resource management. 3) The Struts Action error system. The package doesn't modify or replace any Struts code, so there will be no disruption of your normal application development. I am looking to guage interest in this continuing, and having people try out Velocity in their Struts-based application. Further, I am very interested in re-purposing the taglibs for general Velocity use, so actual use cases will be good to drive that forward. If you are interested, the package can be found in the Velocity CVS under jakarta-velocity/contrib/temporary/struts-velocity Please read the README.txt for any interesting build or other notes. The example, bundled as a WAR and tested on Tomcat 4.0 an Tomcat 3.2.1, can be found at http://jakarta.apache.org/builds/jakarta-velocity/contrib/struts/ I look forward to working with you. geir P.S. Note - I said 'alternative to...' rather than 'replacement for...'. Some of you may be familiar with the debate over JSP vs template engines(specifically Velocity and WebMacro), and may be familiar with some of the provocative information we have on the Velocity web site regarding this issue. I am not interested in that debate with this - I simply am interested in seeing Velocity as a choice for web development specifically here in the Struts framework, interested in evolving Velocity through comparison with other technologies [yes, I will steal every good idea I see :-) ], and understanding more about approaches to web development frameworks. So be nice :) -- Geir Magnusson Jr. [EMAIL PROTECTED] Developing for the web? See http://jakarta.apache.org/velocity/
Re: [INVITATION] Velocity-Struts integration
Incze Lajos wrote: I'm really happy with this, me myself was on this move. My motivation was simple. In my application I have to manufacture form-based files, so needed a general purpose template engine. So, I started to stare tea and velocity as template engines capable rendering not only web pages but fill-in file templates, too. Somehow it seemed to be too much to keep booth JSP-s and the other template engine, so started to find ways to replace JSP. I think, many goodies remain duplicate even this way, everybody has it's own introspection e.g. The "commons" project seems to arrive just in time (or a bit late) to me. incze That's great. I am interested in what you think of what's there so far. It's very limited - and there's lots I want to redo - but I think it's easy for you to get started and give it a try. Let me know how it works for you. geir -- Geir Magnusson Jr. [EMAIL PROTECTED] Developing for the web? See http://jakarta.apache.org/velocity/