Re: Help PLEASE!!!! How do you create struts template file using frame instead of table
Hello Anh, In the template page, you have to write something like : --- " name="header" > " name="body" > " name="footer" > -- The scriplet <%=request.getContextPath()%> is not mandatory, but it allows to put relative URL rather than absolute URL in the insert tag. Thus, your page are portable on different sites. Your insert tag looks like : -- - Don't forget direct="true" ! This instruct to output the string as is, rather than trying to include a jsp page. Cedric "Hoang, Anh" wrote: > Hello all, > > In the template tag example, the template file used the table and table row > to indicate where in the layout to insert the content. Is there a way to > build the template file using frame instead of table? How do you specify the > src so that it will take to be the file to > be displayed in the frame? In other world, how do you change the following > code: > > <%@ taglib uri="/struts-template.tld" prefix="template" %> > > <%-- Layout component > parameters : title, header, menu, body, footer > --%> > > > > > > > > > > > > > > > > > > > > > > > To this code: > > <%@ taglib uri="/struts-template.tld" prefix="template" %> > > <%-- Frameset Layout component > parameters : title, header, menu, body, footer > --%> > > > > > > > scrolling="no" border="0" frameborder="no" noresize> > scrolling="no" border="0" frameborder="no" noresize> > scrolling="auto" border="0" frameborder="no" noresize> > > scrolling="auto" border="0" frameborder="no" noresize> > scrolling="no" border="0" frameborder="no" noresize> > > > > > > I tried to put src="" but it didn't work. > > Is it possible of using frame with template or table and row are the only > choices? Thank you very much for your help.
Re: MySQL
I'm using : org.gjt.mm.mysql.Driver it work fine for me, very fast. but I have a problem : when I do ; Context env = (Context) new InitialContext().lookup("java:comp/env"); DataSource source = (DataSource) env.lookup("jdbc/db"); Connection conn = source.getConnection(); Statement stmt = conn.createStatement (); StringBuffer sql = new StringBuffer(""); sql.append("SELECT *"); sql.append(" FROM table"); sql.append(" ..."); ResultSet rs = stmt.executeQuery (sql.toString()); in a .jsp page it work fine but when I put that in a business bean who do the same thing and return a ResultSet I have : 500 Servlet Exception java.lang.NullPointerException at com.artprice.web.DBbean.artistSearch(DBbean.java:55) at _jsp._artprice._recArti__jsp._jspService(/artprice/recArti.jsp:39) at com.caucho.jsp.JavaPage.service(JavaPage.java:87) at com.caucho.jsp.JavaPage.subservice(JavaPage.java:81) at com.caucho.jsp.Page.service(Page.java:407) at com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:136) at com.caucho.server.http.Invocation.service(Invocation.java:259) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:146) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:157) at com.caucho.server.TcpConnection.run(TcpConnection.java:140) at java.lang.Thread.run(Thread.java:484) it happen on then line : ResultSet rs = stmt.executeQuery (sql.toString()); I'am using resin. I don't understand, some help please. James Bell a écrit : > Hi everyone I want to use MySQL with Struts. Although not a Struts > specific question, what jdbc driver is the best to use. I downloaded > the driver from caucho and noticed that it was marked as > experimental. I know that may mean that it is still a good driver. > But I would like an independent opionion. Thanks in AdvanceJames Bell
MySQL
Hi everyone I want to use MySQL with Struts. Although not a Struts specific question, what jdbc driver is the best to use. I downloaded the driver from caucho and noticed that it was marked as experimental. I know that may mean that it is still a good driver. But I would like an independent opionion. Thanks in Advance James Bell
Re: getting value from bean
See comments intermixed. - Original Message - From: "Nishit Trivedi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 29, 2001 3:29 PM Subject: RE: getting value from bean > This is what i think should happen... > (Correct me wherever i am wrong...) > > This is how i call bean for setting values in config file: > > > type="org.apache.struts.dir1.dir2.MyBean" > scope="session"/> > The 'scope' attribute does not apply to the element. It applies only to the element, as you use it below. It seems odd that your form is under the Struts package, but it won't cause any problems. > then after i set the values and after validate method, control goes as > follows: > --- > > has form it has > action as > "/struts-example/doSomeAction.do" --> >type="org.apache.struts.dir1.dir2.ProcessMyBean" >name="myForm" > scope="session" >validate="false"> > > > > --- This looks OK. When doSomeAction.do is invoked, Struts will look for an instance of your form in the session, under the attribute name "myBean". If it does not find one, it will create a new one for you. It will then populate the bean with the values from the request. > So in ProcessMyBean class, i instantiated object MyBean with: > MyBean mb = new MyBean(); > and then i called the getter to get the value which was set before: > (here is somewhat i am missing) I think this is where your problem lies. You should not be creating an instance of your form bean. Struts will do that for you, and call the appropriate setter methods based on the query string for the request. The form bean will then be passed to your action's perform() method, and you can call the getter methods as necessary. Hope this helps. -- Martin Cooper > > Please help me... > Nishit > -Original Message- > From: Jacob Thomas [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 29, 2001 5:58 PM > To: '[EMAIL PROTECTED]' > Subject: RE: getting value from bean > > > I think your tag is instantiating a new Form bean and hence the > fields have their default values when the page is rendered. When the page is > submitted another form bean is getting created. You may want to set the > scope to 'session' and remove the bean appropriately. > -- > Jacob > > -Original Message- > From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 29, 2001 2:49 PM > To: [EMAIL PROTECTED] > Subject: getting value from bean > > > hi. > > I am new to struts... > > I have a problem with getting a value from bean... > here are some pieces of my code where i set and get values: > > In jsp page i have this: > - > > > > > > > In class i have getter and setter as: > -- > public String getTotalCopies(){ >System.out.println("getting total copies:"+this.totalCopies); >return this.totalCopies; > } > > public void setTotalCopies(String totCopy){ >this.totalCopies = totCopy; >System.out.println("setting total copies:"+this.totalCopies); > } > - > > Print statement of setter is perfectly fine as i expected but > the statement in getter returns null...?? what's wrong? > TIA.. > > Nishit Trivedi > Software Engineer > Planet Access Networks - An InSage Company > 973-691-4704 X157
Re: beta 2
Beta 2 is still under development, which is why it's not available for download yet. The release notes are there, I believe, as a "running commentary", if you will, on the changes that have happened so far between Beta 1 and the current nightly builds. Beta 2 should happen soon, but I'm not exactly sure when. (A couple of weeks would be my guess.) -- Martin Cooper - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 29, 2001 2:34 PM Subject: RE: beta 2 > > Hello Struts Users, > > I am fairly new to struts (like a lot of folks), and was fairly > confused > by the duplicate tags in the struts.tld and other of the struts tag > libraries (e.g. struts-bean). I finally saw in the release notes for > the > beta 2 that this entire tag library is deprecated. Why is there a link > for the release notes for 1.0b2 (beta 2), but not a link under Acquiring > > struts to download the beta 2? > > J. Darren James > [EMAIL PROTECTED] >
Re: downloadable javadoc
Absolutely everything is in the source distribution. Burr Sutter wrote: > > Is there a downloadable version of the javadoc for Struts (found online at > http://jakarta.apache.org/struts/api/index.html)? > > I normally like to keep these things on the local disk for offline work. > > Burr -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
downloadable javadoc
Is there a downloadable version of the javadoc for Struts (found online at http://jakarta.apache.org/struts/api/index.html)? I normally like to keep these things on the local disk for offline work. Burr
session bean in action
I'm getting the error at the bottom and would like to know if there's anything special I need to do inside an Action. Server type is Orion 1.4.5. ConfigBuildBean - Session Bean ConfigBuildHome - EJBHome ConfigBuild - EJBObject -- ejb-jar.xml Used in the configuration of new builds. Build Configuration Session Bean com.neuroquest.cais.ejb.config.ConfigBuildBean com.neuroquest.cais.ejb.config.ConfigBuildBean com.neuroquest.cais.ejb.config.ConfigBuildHome com.neuroquest.cais.ejb.config.ConfigBuild Stateless Container Session Bean Implementations -- public class NewAction extends Action { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { // turn form instance into custom form bean. NewForm newForm = (NewForm) form; //String viewName = newForm.getView(); String initCtxFactory = getInitParameter(Context.INITIAL_CONTEXT_FACTORY); String providerURL = getInitParameter(Context.PROVIDER_URL); try { Properties env = System.getProperties(); env.put(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory); env.put(Context.PROVIDER_URL, providerURL); Context ctx = new InitialContext(env); ConfigBuildHome home = (ConfigBuildHome) ctx.lookup("ConfigBuildBean"); ConfigBuild cfgBuild = home.create(); cfgBuild.saveConfig(); } catch (Exception e) { log(e); e.printStackTrace(); } ... - The Error -- cassia(root):/u/public/orion# java -jar orion.jar Auto-unpacking /u/build/release/cais.ear... done. Auto-deploying cais-ejb.jar (ejb-jar.xml had been touched since the previous deployment)... done. Orion/1.4.5 initialized javax.naming.NameNotFoundException: ConfigBuildHome not found at com.evermind.server.rmi.RMIContext.lookup(JAX, Compiled Code) at com.evermind.server.hm.f4(JAX, Compiled Code) at com.evermind.server.hm.lookup(JAX, Compiled Code) at javax.naming.InitialContext.lookup(InitialContext.java, Compiled Code) at com.neuroquest.cais.actions.NewAction.perform(NewAction.java, Compiled Code) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.ja va, Compiled Code) at org.apache.struts.action.ActionServlet.process(ActionServlet.java, Compiled Code) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at javax.servlet.http.HttpServlet.service(HttpServlet.java, Compiled Code) at com.evermind.server.http.d3.sw(JAX, Compiled Code) at com.evermind.server.http.d3.su(JAX, Compiled Code) at com.evermind.server.http.ef.s1(JAX, Compiled Code) at com.evermind.server.http.ef.do(JAX, Compiled Code) at com.evermind.util.f.run(JAX, Compiled Code)
RE: using struts in a load-balanced environement
Hi Doug, If you do not require cookies and you want clustering to be effective, then the app server/ servlet container you choose will have to embed the server specific information into JSESSIONID parameter. You would then load balance to any web server that has a plug-in which can decrypt the parameter and redirect the request to the server housing the session variables for that user. You have to be careful when selecting an app server because most require cookies for clustering to work effectively. --Abraham > -Original Message- > From: Doug Wright [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 28, 2001 4:50 PM > To: [EMAIL PROTECTED] > Subject: using struts in a load-balanced environement > > > I am very curious about whether the struts framework could be > applied in a 'load-balanced' or 'webserver-farm' environment. One of the > main requirements of the application I am currently working on is that it > function properly in such a distributed or load-balanced environment where > each request may or may not come from the same web server. > This obviously precludes us from using session and application > scopes in the application. We have been using the database to maintain > state, but it seems like a very inefficient and dirty solution. > I would love to be able to use the model 2 architecture (and > specifically the struts framework), but it seems like most of the benefits > can only be had in an environment where the same web server will > be used for > each request (our load-balancers support 'sticky-sessions' but > these rely on > cookies and we don't want cookies to be a requirement for using the > application). > Am I missing something? Is there a way to effectively use struts > and the session and application scope in a load-balanced environment? > I greatly appreciate any advice that anyone has on this subject. > ---DougWright >
how to handle the runtime or uncaught exceptions thrown from the Action class.
Hello, I have my logon.jsp page as .. <%@ page language="java" isErrorPage="false" errorPage="errorpage.jsp" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> and errorpage.jsp as .. <%@ page language="java" isErrorPage="true" %> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %> the error page does not showup if the LogonAction's perform method throws an exception, instead it shows an error page as.. Error 500--Internal Server Error From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1: 10.5.1 500 Internal Server Error The server encountered an unexpected condition which prevented it from fulfilling the request. What am I doing wrong? Thanks in advance, 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.
Re: just want to know...
Thank you very much. I just now realized that the version I am using is not updated and contains the unstable source codes. I already shifted to the nightly version, I hope that I'll have more success on this one. Maya Muchnik wrote: > > Different sizes - I can understand, because the different compilers and > / or different build environment. Why does not work - no clue? I am > using prebuild (night build) version. > > "Charlemagne L. Rey" wrote: > > > Hello everybody, > > > > I currently have the 1.0 version of struts. I tried to look at > > the examples and studied it. When I recompiled the sources from > > the examples/src directory, I noticed that the byte size are not > > equal. And when I replaced the classes, it produces a different > > output. It is very obvious that the version that I recompiled > > is different and also not working. Why? > > > > Thank you. > > Charlemagne Rey
RE: getting value from bean
ActionServlet will take MyBean from 'session' scope (put there by tag) and populate it with the form parameters before calling ProcessMyBean.perform(). -- Jacob -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 3:29 PM To: '[EMAIL PROTECTED]' Subject: RE: getting value from bean This is what i think should happen... (Correct me wherever i am wrong...) This is how i call bean for setting values in config file: then after i set the values and after validate method, control goes as follows: --- type="org.apache.struts.dir1.dir2.ProcessMyBean" name="myForm" scope="session" validate="false"> --- So in ProcessMyBean class, i instantiated object MyBean with: MyBean mb = new MyBean(); and then i called the getter to get the value which was set before: (here is somewhat i am missing) Please help me... Nishit -Original Message- From: Jacob Thomas [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 5:58 PM To: '[EMAIL PROTECTED]' Subject: RE: getting value from bean I think your tag is instantiating a new Form bean and hence the fields have their default values when the page is rendered. When the page is submitted another form bean is getting created. You may want to set the scope to 'session' and remove the bean appropriately. -- Jacob -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 2:49 PM To: [EMAIL PROTECTED] Subject: getting value from bean hi. I am new to struts... I have a problem with getting a value from bean... here are some pieces of my code where i set and get values: In jsp page i have this: - In class i have getter and setter as: -- public String getTotalCopies(){ System.out.println("getting total copies:"+this.totalCopies); return this.totalCopies; } public void setTotalCopies(String totCopy){ this.totalCopies = totCopy; System.out.println("setting total copies:"+this.totalCopies); } - Print statement of setter is perfectly fine as i expected but the statement in getter returns null...?? what's wrong? TIA.. Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
Re: Validating dates
I've been working on some validation routines. There is a date one in com.wintecinc.struts.validation.Validator in the src/share directory. The date validation doesn't support multiple locales though, but you could enhance it. You can get to the source at (more recent builds). http://home.earthlink.net/~dwinterfeldt David Winterfeldt --- [EMAIL PROTECTED] wrote: > > > Does anyone have a code example for validating a > date field in the validate > method of actionform? Actually, a date in a string > attribute. > > thanks in advance for your help, > Donnie Hall > > __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
RE: getting value from bean
This is what i think should happen... (Correct me wherever i am wrong...) This is how i call bean for setting values in config file: then after i set the values and after validate method, control goes as follows: --- type="org.apache.struts.dir1.dir2.ProcessMyBean" name="myForm" scope="session" validate="false"> --- So in ProcessMyBean class, i instantiated object MyBean with: MyBean mb = new MyBean(); and then i called the getter to get the value which was set before: (here is somewhat i am missing) Please help me... Nishit -Original Message- From: Jacob Thomas [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 5:58 PM To: '[EMAIL PROTECTED]' Subject: RE: getting value from bean I think your tag is instantiating a new Form bean and hence the fields have their default values when the page is rendered. When the page is submitted another form bean is getting created. You may want to set the scope to 'session' and remove the bean appropriately. -- Jacob -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 2:49 PM To: [EMAIL PROTECTED] Subject: getting value from bean hi. I am new to struts... I have a problem with getting a value from bean... here are some pieces of my code where i set and get values: In jsp page i have this: - In class i have getter and setter as: -- public String getTotalCopies(){ System.out.println("getting total copies:"+this.totalCopies); return this.totalCopies; } public void setTotalCopies(String totCopy){ this.totalCopies = totCopy; System.out.println("setting total copies:"+this.totalCopies); } - Print statement of setter is perfectly fine as i expected but the statement in getter returns null...?? what's wrong? TIA.. Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: Communicating with EJB's from Action
Chris, What we've done is this: - Put a layer of business logic session stateless beans above the entity EJBs. The beans in this layer have methods that perform specific business functions. - Have the Action classes translate the user's click into one or more calls to the business logic layer. We don't pass the ActionForm to the business layer, because the ActionForm is too close to the view. If we need to pass a set of related data items to the business layer, we do it with a value object that represents the kind of businessy attributes you'd find in an EJB. So, we partition responsibility like this: JSPs: rendering. To us this is View. Actions: translation of user actions into business operations (if necessary) and always a decision about what to display next. This layer doesn't implement business operations, but knows what high level business operation it needs to call to fulfill the user's request. We consider this layer to be Controller. Business session stateless beans: fulfillment of business function. For cross-entity operations, do the details here. Speak in only business terms, not in any view terms. Completely independent of Struts. Still Controller for us. Entity EJBs: Fulfill single-entity business operations here (like basic value checking of attributes). Of course, these EJBs also give us all the entity-bean function we get from the container. Only this layer knows about the database. In general, we don't let an entity EJB interact with another entity EJB; we leave this to the session stateless beans above. This is our Model. Utility classes: ActionForms - for passing view-specific information around between Actions & JSPs, etc. Value objects - for passing entity-specific information around, including up to and down from the Actions. Steve -Original Message- From: Assenza, Chris [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:59 PM To: '[EMAIL PROTECTED]' Subject: Communicating with EJB's from Action Hello! :) Our dev team for a big enterprise app has been going back and forth on how to send the data from the ActionForm to a Session bean. We have a number of options and I was hoping for some feedback because we've had enough talk and its time to decide! :) (Our architecture is as of now to use only Session Beans, but we will probably start wrapping Entity beans with Session beans eventually). 1) Send the ActionForm to the EJB from Action perform() Pros: Easy and less work Cons: Defeats the purpose of Struts in that the Business Logic is no longer self-contained and independent of the V in MVC :). If for whatever reason we overhaul the front end and remove Struts, we're not in the ideal position to do so. 2) Create a special utility class that with special methods, that when invoked from the Action perform() method, will put the data from ActionForm into a HashTable. Then, we'll pass that object to the EJB and do whatever business logic is necessary. 3) JMS - Sort of an adaptation of the number 2 as JMS uses HashMaps and the like but it follows a specific spec and has a lot more to it then what we'd be doing above. However, none of us really know much about JMS yet. :| Obviously we can learn, but is it a recommended path to follow from your experience? (in regards to Struts specifically as well). 4) RMI or RMI-IIOP. Create a remote object within the client and pass the remote reference to the EJB. The EJB can then use this reference to make callbacks to the client. Not sure about this one either, seems rather inefficient. Oh, and one other question, since DataTable (Java collection) is basically made up of vectors, can one use the iterate tag to move through it? Any thoughts or experiences?? :) Thanks, Chris Assenza
RE: getting value from bean
I think your tag is instantiating a new Form bean and hence the fields have their default values when the page is rendered. When the page is submitted another form bean is getting created. You may want to set the scope to 'session' and remove the bean appropriately. -- Jacob -Original Message- From: Nishit Trivedi [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 2:49 PM To: [EMAIL PROTECTED] Subject: getting value from bean hi. I am new to struts... I have a problem with getting a value from bean... here are some pieces of my code where i set and get values: In jsp page i have this: - In class i have getter and setter as: -- public String getTotalCopies(){ System.out.println("getting total copies:"+this.totalCopies); return this.totalCopies; } public void setTotalCopies(String totCopy){ this.totalCopies = totCopy; System.out.println("setting total copies:"+this.totalCopies); } - Print statement of setter is perfectly fine as i expected but the statement in getter returns null...?? what's wrong? TIA.. Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
Re: Communicating with EJB's from Action
How about a slight variation on #1? interface BusinessBeanThingie {} class YourActionForm implements BusinessBeanThingie {} class YourSessionBean { YourSessionBean(BusinessBeanThingie bbt) {} } Because YourActionForm implements BusinessBeanThingie, you can pass it to your session bean in your perform method just like your first alternative. However, YourSessionBean is no longer dependent on YourActionForm; it's not even dependent on Struts! You end up trading a little more work (creating the business interface) for a less tightly coupled -- and therefore more reusable -- Session bean. Personally, I don't like passing containers because it's not obvious from the code what they contain. I've had good success with the interface approach, though. Good luck. -- Jim "Assenza, Chris" wrote: > > Hello! :) > > Our dev team for a big enterprise app has been going back and forth on how > to send the data from the ActionForm to a Session bean. We have a number of > options and I was hoping for some feedback because we've had enough talk and > its time to decide! :) (Our architecture is as of now to use only Session > Beans, but we will probably start wrapping Entity beans with Session beans > eventually). > > 1) Send the ActionForm to the EJB from Action perform() > Pros: Easy and less work > Cons: Defeats the purpose of Struts in that the Business Logic is no > longer self-contained and independent of the V in MVC :). If for whatever > reason we overhaul the front end and remove Struts, we're not in the ideal > position to do so. > > 2) Create a special utility class that with special methods, that when > invoked from the Action perform() method, will put the data from ActionForm > into a HashTable. Then, we'll pass that object to the EJB and do whatever > business logic is necessary. > > 3) JMS - Sort of an adaptation of the number 2 as JMS uses HashMaps and the > like but it follows a specific spec and has a lot more to it then what we'd > be doing above. However, none of us really know much about JMS yet. :| > Obviously we can learn, but is it a recommended path to follow from your > experience? (in regards to Struts specifically as well). > > 4) RMI or RMI-IIOP. Create a remote object within the client and pass the > remote reference to the EJB. The EJB can then use this reference to make > callbacks to the client. Not sure about this one either, seems rather > inefficient. > > Oh, and one other question, since DataTable (Java collection) is basically > made up of vectors, can one use the iterate tag to move through it? > > Any thoughts or experiences?? :) > > Thanks, > > Chris Assenza
getting value from bean
hi. I am new to struts... I have a problem with getting a value from bean... here are some pieces of my code where i set and get values: In jsp page i have this: - In class i have getter and setter as: -- public String getTotalCopies(){ System.out.println("getting total copies:"+this.totalCopies); return this.totalCopies; } public void setTotalCopies(String totCopy){ this.totalCopies = totCopy; System.out.println("setting total copies:"+this.totalCopies); } - Print statement of setter is perfectly fine as i expected but the statement in getter returns null...?? what's wrong? TIA.. Nishit Trivedi Software Engineer Planet Access Networks - An InSage Company 973-691-4704 X157
RE: beta 2
Hello Struts Users, I am fairly new to struts (like a lot of folks), and was fairly confused by the duplicate tags in the struts.tld and other of the struts tag libraries (e.g. struts-bean). I finally saw in the release notes for the beta 2 that this entire tag library is deprecated. Why is there a link for the release notes for 1.0b2 (beta 2), but not a link under Acquiring struts to download the beta 2? J. Darren James [EMAIL PROTECTED]
Re: just want to know...
Different sizes - I can understand, because the different compilers and / or different build environment. Why does not work - no clue? I am using prebuild (night build) version. "Charlemagne L. Rey" wrote: > Hello everybody, > > I currently have the 1.0 version of struts. I tried to look at > the examples and studied it. When I recompiled the sources from > the examples/src directory, I noticed that the byte size are not > equal. And when I replaced the classes, it produces a different > output. It is very obvious that the version that I recompiled > is different and also not working. Why? > > Thank you. > Charlemagne Rey
Re: need some explaination with logon.do
First, be sure that you have followed the "tour" that comes with the example. There's a small link on the first page. The "do" pages are "action mappings". When the Struts ActionServlet is registered with the container, it asks for the "do" pages. The ActionServlet then refers to the mappings defined in the struts-config file to call the appropriate Action class. The Action class is not really a page, but it does have access to the ActionServlet, and so can create a HTTP response, or forward control on to a JSP. "Charlemagne L. Rey" wrote: > > Hello everybody, > > I think I still don't understand how did the struts-example flows. > Could anybody please give me an explaination of what is happening > to have the virtual page logon.do? Who created this page? How this > page come-up? It is here where I am stocked up with my learning > of the Jakarta Struts. > Any help will be greatly appreciated. > > Thank you. > Charlemagne Rey -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
just want to know...
Hello everybody, I currently have the 1.0 version of struts. I tried to look at the examples and studied it. When I recompiled the sources from the examples/src directory, I noticed that the byte size are not equal. And when I replaced the classes, it produces a different output. It is very obvious that the version that I recompiled is different and also not working. Why? Thank you. Charlemagne Rey
Communicating with EJB's from Action
Hello! :) Our dev team for a big enterprise app has been going back and forth on how to send the data from the ActionForm to a Session bean. We have a number of options and I was hoping for some feedback because we've had enough talk and its time to decide! :) (Our architecture is as of now to use only Session Beans, but we will probably start wrapping Entity beans with Session beans eventually). 1) Send the ActionForm to the EJB from Action perform() Pros: Easy and less work Cons: Defeats the purpose of Struts in that the Business Logic is no longer self-contained and independent of the V in MVC :). If for whatever reason we overhaul the front end and remove Struts, we're not in the ideal position to do so. 2) Create a special utility class that with special methods, that when invoked from the Action perform() method, will put the data from ActionForm into a HashTable. Then, we'll pass that object to the EJB and do whatever business logic is necessary. 3) JMS - Sort of an adaptation of the number 2 as JMS uses HashMaps and the like but it follows a specific spec and has a lot more to it then what we'd be doing above. However, none of us really know much about JMS yet. :| Obviously we can learn, but is it a recommended path to follow from your experience? (in regards to Struts specifically as well). 4) RMI or RMI-IIOP. Create a remote object within the client and pass the remote reference to the EJB. The EJB can then use this reference to make callbacks to the client. Not sure about this one either, seems rather inefficient. Oh, and one other question, since DataTable (Java collection) is basically made up of vectors, can one use the iterate tag to move through it? Any thoughts or experiences?? :) Thanks, Chris Assenza
Re: how do i unsubscribe from this list?
To stop subscription for this address, mail: <[EMAIL PROTECTED]> where john = your username, host.domain = your domain name. "Perez, Bill" wrote: > how do i unsubscribe from this list?
how do i unsubscribe from this list?
how do i unsubscribe from this list?
Re: forward in struts-config.xml file
> During the demo i noticed that i get a 404 error when trying to reach this > page (which is as it should be). I want to keep an indefined state page to > these. My problem is that i don't want to write the 'undefined.jsp' in each You can specify an 404 handler page for the servlet engine (web.xml). You can set up your forwards with the real (non-existent) pages and you can write your 404 page handler as you think is best for your purposes to embed most smoothly into your current env. It is Quite similar then your current situation but you use rela page names, and add up navigation, parameters, skin to the error page mimicing that it belongs to your app. icnze
RE: forward in struts-config.xml file
Ted , Regarding your reply i hate typing in the same name again and again... > > > > For example you have typed issues.jsp a lot of times. I want to know if there is a way to utilize the web.xml file. The following is an excerpt from the web-app_2_2.dtd. Is there anyway i can use this with struts. For example when struts throws an 404 error (page not found) the below code can kick into play.. cheers, Amar.. -Original Message- From: Ted Husted [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:08 PM To: [EMAIL PROTECTED] Subject: Re: forward in struts-config.xml file > syntax : What I do is put in the actual name for the forward, and then point the path to an "under construction page" where I also list any beta-testing issues. As the pages come online, you simply need to update the configuration file -- all the forward links remain the same. So I have a sections in my struts-config that looks like this: and so forth. (Issues is my "under construction" page.) The forward and action names should actually be considered part of the requirements process. If you've built a "straw man" version of the application, you can usually define them all from that. I haven't gotten there myself yet, but I have heard of people having well over a 100 action classes in a Struts applications. "Nanduri, Amarnath" wrote: > > Hi everybody, > >I am faced with a unique situation. I have at present 45 Action > classes in my project. In the future this number may climb to more than 100 > ( yeah it is a huge project). We just completed requirements and want to > make sure that struts can really handle such a heavy load (flow). For some > of the forwards in the struts_config.xml file there is not yet a defined > stage as to where to take the user to. For that reason the path is set to an > empty string. > > syntax : > > During the demo i noticed that i get a 404 error when trying to reach this > page (which is as it should be). I want to keep an indefined state page to > these. My problem is that i don't want to write the 'undefined.jsp' in each > and every forward (i confess i am lazy, besides it is dull and monotonous). > I want to know if there is a flag i can set in the struts-config.xml which > defines a global undefined state (similar to the 'unknown' attribute for an > action class). Please note that the forward names are different (in > different actions). So i can't use a single global forward. > > Now if one of you gurus out there can find me a solution i would greatly > appreciate it. > > cheers, > Amar.. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
Re: forward in struts-config.xml file
> syntax : What I do is put in the actual name for the forward, and then point the path to an "under construction page" where I also list any beta-testing issues. As the pages come online, you simply need to update the configuration file -- all the forward links remain the same. So I have a sections in my struts-config that looks like this: and so forth. (Issues is my "under construction" page.) The forward and action names should actually be considered part of the requirements process. If you've built a "straw man" version of the application, you can usually define them all from that. I haven't gotten there myself yet, but I have heard of people having well over a 100 action classes in a Struts applications. "Nanduri, Amarnath" wrote: > > Hi everybody, > >I am faced with a unique situation. I have at present 45 Action > classes in my project. In the future this number may climb to more than 100 > ( yeah it is a huge project). We just completed requirements and want to > make sure that struts can really handle such a heavy load (flow). For some > of the forwards in the struts_config.xml file there is not yet a defined > stage as to where to take the user to. For that reason the path is set to an > empty string. > > syntax : > > During the demo i noticed that i get a 404 error when trying to reach this > page (which is as it should be). I want to keep an indefined state page to > these. My problem is that i don't want to write the 'undefined.jsp' in each > and every forward (i confess i am lazy, besides it is dull and monotonous). > I want to know if there is a flag i can set in the struts-config.xml which > defines a global undefined state (similar to the 'unknown' attribute for an > action class). Please note that the forward names are different (in > different actions). So i can't use a single global forward. > > Now if one of you gurus out there can find me a solution i would greatly > appreciate it. > > cheers, > Amar.. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
RE: dropdown values gone after validation error
Thanks. I moved my call to populate the dropdown values from the Action descendant perform() method to the ActionForm descendant reset() method. That worked & makes sense to me. Question: Is this violating any kind of "separation" rule that I'm going to get drilled on by other developers? Wayne [EMAIL PROTECTED] -Original Message- From: Incze Lajos [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 1:43 PM To: [EMAIL PROTECTED] Subject: Re: dropdown values gone after validation error On Thu, Mar 29, 2001 at 10:49:24AM -0600, Young, Wayne wrote: > I have the following struts/JSP fragment that creates a dropdown with values > from the networkTypes attribute. > > > > > > The networkTypes attribute is created in the "getNetworkTypes" action that > displays this page. The page displays correctly initially. But if I have a > validation error & the page reloads, the networkTypes variable is empty & I > end up with an empty dropdown. > validation error? Is there any way to re-invoke the "getNetworkTypes" action > from the Validate() method on my ActionForm descendant? (Maybe forward to > the "getNetworkTypes" action & return null in Validate?) > > Any help would be appreciated. > > Thanks. > > Wayne > [EMAIL PROTECTED] That's what the reset method of the FormBean is for. The ActionServlet calls that method before populating request parameters when the bean was created. (So, if it was in request scope, on every submit - actually, you have tosave the state of your options in some way and reset it in the reset method. Or you use a session bean and the reset is called only once to initialize the bean - but save it's state between submits.) incze
forward in struts-config.xml file
Hi everybody, I am faced with a unique situation. I have at present 45 Action classes in my project. In the future this number may climb to more than 100 ( yeah it is a huge project). We just completed requirements and want to make sure that struts can really handle such a heavy load (flow). For some of the forwards in the struts_config.xml file there is not yet a defined stage as to where to take the user to. For that reason the path is set to an empty string. syntax : During the demo i noticed that i get a 404 error when trying to reach this page (which is as it should be). I want to keep an indefined state page to these. My problem is that i don't want to write the 'undefined.jsp' in each and every forward (i confess i am lazy, besides it is dull and monotonous). I want to know if there is a flag i can set in the struts-config.xml which defines a global undefined state (similar to the 'unknown' attribute for an action class). Please note that the forward names are different (in different actions). So i can't use a single global forward. Now if one of you gurus out there can find me a solution i would greatly appreciate it. cheers, Amar..
Re: .properties file
Yes, you can put anything into your application file (jsp file name, image file name, and text file name). The problem is who will read it? You need to have some Action that for a particular request will open this file (name you can get though MessagesResources) and read it. Maya Yuriy Zubarev wrote: > Hello friends, > > I was wondering if there is a way to store a relatively big amount of text > (which can't be fitted in one single line) assigned to some variable in > the ApplicationResources.properties file. This text eventually will be > local-sensitive that's why I want to put it into the .properties file. > > Thank you for your time. > > Best of luck, > Yuriy Zubarev > > ___ > Do You Yahoo!? > Get your free @yahoo.ca address at http://mail.yahoo.ca
Validating dates
Does anyone have a code example for validating a date field in the validate method of actionform? Actually, a date in a string attribute. thanks in advance for your help, Donnie Hall
Re: form bean question
Eugene, If I have understood your question, the 1st place is jsp file, where the form is directly used. The 2nd place (config file) where you set mapping up. For example you tell that logonForm (the first letter is lower case) is coming from the class LogonForm, and jsp file logon.jsp will be called if the server needs to access the form logonForm. Maya Jacob Thomas wrote: > The tag will either lookup or instantiate the ActionForm so that > the form parameters can be set to meaningful values on the page. Then, when > the user makes changes and submits the form, the ActionServlet will populate > the same ActionForm instance (if it is given 'session' scope) with the > user's values and pass the form bean to the Action controller. > -- > Jacob > > -Original Message- > From: Eugene Krivopaltsev [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 29, 2001 10:52 AM > To: [EMAIL PROTECTED] > Subject: form bean question > > Hello everyone, > > I am learning struts and have following question: > > Why form should be described in two places: > > 1. in jsp page (I am looking at logon example): > > < html:form name="LogonForm" type="fully qualif. name" ... > > > 2. struts-config.xml > >type = " as in 1 " > . > > Thanks, > -- > Eugene Krivopaltsev Sun Microsystems, Inc. > [EMAIL PROTECTED] 901 San Antonio Road > Voice: 650.786.6260 (x86260)Palo Alto, CA. 94303 > Fax: 650.786.7816 www.sun.com
Re: java.lang.IllegalStateException: Can't happen - classname is null , who added this ?
On Thu, Mar 29, 2001 at 09:46:15AM -0500, Szlapa, Michael wrote: > Every now and then I get the following exception: > > Location: /poc/ > Internal Servlet Error: > java.lang.IllegalStateException: Can't happen - classname is null, who added > this ? ... > To be precise it happens when I navigate back to the first page of my > application. > > I would very much appreciate any hints > > Michael Szlapa > [EMAIL PROTECTED] I saw this bug on a tomcat list and don't know if it was fixed or not. Your best bet is to check the apache bugzilla and upgrade your tomcat. Don't mind if it's name is beta, the 3.2.2 beta series is entirely a bugfix effort and is better in any sense as the 3.2.1. If you are brave enough you can experiance with the 3.3 or even with 4.0. But if you need a stable platform hold on with 3.2.2. incze
Re: standard administrative actions?
On Thu, Mar 29, 2001 at 10:34:47AM -0500, Maring, Steve wrote: > > I understand what the end result of these do, but how do they do them, and > how are they used? > Do they modify the struts-conf.xml or just the ActionMapper? > Just the later.icnze
Re: dropdown values gone after validation error
On Thu, Mar 29, 2001 at 10:49:24AM -0600, Young, Wayne wrote: > I have the following struts/JSP fragment that creates a dropdown with values > from the networkTypes attribute. > > > > > > The networkTypes attribute is created in the "getNetworkTypes" action that > displays this page. The page displays correctly initially. But if I have a > validation error & the page reloads, the networkTypes variable is empty & I > end up with an empty dropdown. > validation error? Is there any way to re-invoke the "getNetworkTypes" action > from the Validate() method on my ActionForm descendant? (Maybe forward to > the "getNetworkTypes" action & return null in Validate?) > > Any help would be appreciated. > > Thanks. > > Wayne > [EMAIL PROTECTED] That's what the reset method of the FormBean is for. The ActionServlet calls that method before populating request parameters when the bean was created. (So, if it was in request scope, on every submit - actually, you have tosave the state of your options in some way and reset it in the reset method. Or you use a session bean and the reset is called only once to initialize the bean - but save it's state between submits.) incze
Re: need some explaination with logon.do
Here is a good explanation how this application works and other stuff. http://www.husted.com/about/struts/example-tour.html http://www.husted.com/about/struts/ Maya "Charlemagne L. Rey" wrote: > Hello everybody, > > I think I still don't understand how did the struts-example flows. > Could anybody please give me an explaination of what is happening > to have the virtual page logon.do? Who created this page? How this > page come-up? It is here where I am stocked up with my learning > of the Jakarta Struts. > Any help will be greatly appreciated. > > Thank you. > Charlemagne Rey
Re: Compiling Issues
Steven, Do you use 0.5 version or 1.0b1? 0.5 version is no longer supported - no errors will be corrected. The best way - go to 1.0b1(2). The file struts-form.tld is used in 0.5. The second thing - please check how to install struts on Weblogic (if I remember, it is required unpacked application and maybe something else). Check this email archive too. Maya Steven Leija wrote: > Hello All, > > I'm new to the Struts framework and trying to compile my first struts > application using weblogic 6 and the newest download of the struts > application. > > Here is my code for the test page. > > <%@ page language="java" %> > <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="struts" %> > Struts Test > > Username: > Password: > > > > > And here is the exception that I'm getting: > > Parsing of JSP File '/Test.jsp' failed: > /Test.jsp(2): Error in using tag library uri='/WEB-INF/struts-form.tld' > prefix='struts': The Tag class 'org.apache.struts.taglib.html.ImageTag' has > no setter method corresponding to TLD declared attribute 'path', (JSP 1.1 > spec, 5.4.1) > probably occurred due to an error in /Test.jsp line 2: > <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="struts" %> > > My output from my weblogic console window is: > weblogic.servlet.jsp.JspException: (line 2): Error in using tag library > uri='/WEB-INF/struts-form.tld' prefix='struts': > The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method > corresponding to TLD declared attribute 'pa > th', (JSP 1.1 spec, 5.4.1) > at > weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.java:257 > ) > at > weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:389) > at > weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:2 > 67) > at > weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:234) > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:104) > at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3939) > at > weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3674) > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3521) > at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1829) > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1670) > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1552) > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:893) > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:71) > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:139) > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:113) > at > weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253) > at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:324) > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:180) > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:148) > at > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:30 > 6) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :208) > at > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java > :246) > at > weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo > ntext.java:1265) > at > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java > :1622) > at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) > > Thanks for any help! > > Steven
.properties file
Hello friends, I was wondering if there is a way to store a relatively big amount of text (which can't be fitted in one single line) assigned to some variable in the ApplicationResources.properties file. This text eventually will be local-sensitive that's why I want to put it into the .properties file. Thank you for your time. Best of luck, Yuriy Zubarev ___ Do You Yahoo!? Get your free @yahoo.ca address at http://mail.yahoo.ca
Help PLEASE!!!! How do you create struts template file using frame instead of table
Hello all, In the template tag example, the template file used the table and table row to indicate where in the layout to insert the content. Is there a way to build the template file using frame instead of table? How do you specify the src so that it will take to be the file to be displayed in the frame? In other world, how do you change the following code: <%@ taglib uri="/struts-template.tld" prefix="template" %> <%-- Layout component parameters : title, header, menu, body, footer --%> To this code: <%@ taglib uri="/struts-template.tld" prefix="template" %> <%-- Frameset Layout component parameters : title, header, menu, body, footer --%> I tried to put src="" but it didn't work. Is it possible of using frame with template or table and row are the only choices? Thank you very much for your help.
Re: Internationalised 'alt' text
I am sorry for sending this email again. But I made a mistake to point to "name" attribute. This attribute has to be equal to "", because I do not use it. But no attribute "alt" was generated. Maya P.S. here is my statement with the tag: Maya Muchnik wrote: No exception. Here is a short cut from view source: ... Username: Password: name="" src="/jndi2/images/button_enter.gif;jsessionid=..." border="0"> ...
...
... As you can see name is empty. Maya Howard Moore wrote: It's possible I suppose. I've tried it with Tomcat 3.2 using pageKey rather than src and it works ok (using Struts 1.0b1). What happens when you try to use the tag, e.g. what html is produced or what exception is thrown? > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: 29 March 2001 14:01 > To: [EMAIL PROTECTED] > Subject: Re: Internationalised 'alt' text > > > Thank you, Howard. And if this does not work for me, is that > meant, because I > am using Tomcat 3.1? In your example below I am using pageKey > instead of src. > > > > Howard Moore wrote: > > > The html:img tag now contains an altKey attribute that does > what you want. > > > > e.g. > > > > > > > > > -Original Message- > > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > > > Sent: 28 March 2001 21:54 > > > To: [EMAIL PROTECTED] > > > Subject: Re: Internationalised 'alt' text > > > > > > > > > Hi, this is an old email, but not resolved, at least for me. > > > Maybe somebody can give > > > me a hunt. > > > I have tried both suggestions. Both are not working. Maybe I > > > am doing something > > > wrong. > > > Thanks in advance. > > > Maya > > > > > > Craig Tataryn wrote: > > > > > > > How about this: > > > > > > > > < -- MyResources would be replaced with whatever class name > > > you used in the > > > > application > > > > init-param you setup for the ActionServlet > > > > --> > > > > > > > > > > > > > > > > > > > > Craig T. > > > > > > > > Peter Alfors wrote: > > > > > > > > > scratch that. You would need to have a bean that had > > > access to the messages. > > > > > > > > > > Peter Alfors wrote: > > > > > > > > > > > I think that does what you want. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > HTH, > > > > > > Pete > > > > > > > > > >
RE: form bean question
The tag will either lookup or instantiate the ActionForm so that the form parameters can be set to meaningful values on the page. Then, when the user makes changes and submits the form, the ActionServlet will populate the same ActionForm instance (if it is given 'session' scope) with the user's values and pass the form bean to the Action controller. -- Jacob -Original Message- From: Eugene Krivopaltsev [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 10:52 AM To: [EMAIL PROTECTED] Subject: form bean question Hello everyone, I am learning struts and have following question: Why form should be described in two places: 1. in jsp page (I am looking at logon example): < html:form name="LogonForm" type="fully qualif. name" ... 2. struts-config.xml
form bean question
Hello everyone, I am learning struts and have following question: Why form should be described in two places: 1. in jsp page (I am looking at logon example): < html:form name="LogonForm" type="fully qualif. name" ... 2. struts-config.xml
RE: How to redirect to the input jsp page from the formbean's validat e method instead of populating ActionErrors.
We can use mapping.getInput() to forward to the "input" page. -- Jacob -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 29, 2001 4:18 AM To: [EMAIL PROTECTED] Subject: Re: How to redirect to the input jsp page from the formbean's validat e method instead of populating ActionErrors. Hi Senthil, Sorry for answering a question with a question. How do you redirect errors from perform to the input page without ActionErrors? Best regards Suresh "Suriyanarayanan, Senthil Kumar" cc: Subject: How to redirect to the input jsp 03/29/01 06:39 AM page from the formbean's validat e method instead Please respond to struts-user of populating ActionErrors. Hello, How do I redirect to the input jsp page from the formbean's validate method instead of populating ActionErrors. I knew redirecting from the perform method of the Action object, wondering is it possible to simulate the same from the validate method. Thanks in advance, 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.
RE: How to redirect to the input jsp page from the formbean's validat e method instead of populating ActionErrors.
If the ActionForm validate() fails, ActionServlet will automatically forward to the "input" page specified in the ActionMapping. -- Jacob -Original Message- From: Suriyanarayanan, Senthil Kumar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 5:09 PM To: [EMAIL PROTECTED] Subject: How to redirect to the input jsp page from the formbean's validat e method instead of populating ActionErrors. Hello, How do I redirect to the input jsp page from the formbean's validate method instead of populating ActionErrors. I knew redirecting from the perform method of the Action object, wondering is it possible to simulate the same from the validate method. Thanks in advance, 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.
need some explaination with logon.do
Hello everybody, I think I still don't understand how did the struts-example flows. Could anybody please give me an explaination of what is happening to have the virtual page logon.do? Who created this page? How this page come-up? It is here where I am stocked up with my learning of the Jakarta Struts. Any help will be greatly appreciated. Thank you. Charlemagne Rey
Invalid path error
Hello everybody, I would like to ask if what are the possible scenarios that you will get an "Invalid path error" or Error: 400. Thank you. Charlemagne Rey
variable number of fields in a form
Forgive me if this has been asked; I'm having trouble reading old messages. Within a page, I need to show a variable number of rows (each of which represents a database row). Each row will have a text entry field. The user can enter values in any number of these fields before submitting them all with a single button click. Is there a way to use an ActionForm for this task, other than to hard code the maximum number of fields into the ActionForm? (If not, I supposed I can still have the Action sift through the request to find the values.) Thanks, Steve
Compiling Issues
Hello All, I'm new to the Struts framework and trying to compile my first struts application using weblogic 6 and the newest download of the struts application. Here is my code for the test page. <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="struts" %> Struts Test Username: Password: And here is the exception that I'm getting: Parsing of JSP File '/Test.jsp' failed: /Test.jsp(2): Error in using tag library uri='/WEB-INF/struts-form.tld' prefix='struts': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'path', (JSP 1.1 spec, 5.4.1) probably occurred due to an error in /Test.jsp line 2: <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="struts" %> My output from my weblogic console window is: weblogic.servlet.jsp.JspException: (line 2): Error in using tag library uri='/WEB-INF/struts-form.tld' prefix='struts': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'pa th', (JSP 1.1 spec, 5.4.1) at weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.java:257 ) at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:389) at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:2 67) at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:234) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:104) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3939) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3674) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3521) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1829) at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1670) at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1552) at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:893) at weblogic.servlet.jsp.JspParser.doit(JspParser.java:71) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:139) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:113) at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253) at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:324) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:180) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:148) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:30 6) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :246) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:1265) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1622) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Thanks for any help! Steven
Re: Internationalised 'alt' text
No exception. Here is a short cut from view source: ... Username: Password: name="" src="/jndi2/images/button_enter.gif;jsessionid=..." border="0"> ...
...
... As you can see name is empty. Maya Howard Moore wrote: It's possible I suppose. I've tried it with Tomcat 3.2 using pageKey rather than src and it works ok (using Struts 1.0b1). What happens when you try to use the tag, e.g. what html is produced or what exception is thrown? > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: 29 March 2001 14:01 > To: [EMAIL PROTECTED] > Subject: Re: Internationalised 'alt' text > > > Thank you, Howard. And if this does not work for me, is that > meant, because I > am using Tomcat 3.1? In your example below I am using pageKey > instead of src. > > > > Howard Moore wrote: > > > The html:img tag now contains an altKey attribute that does > what you want. > > > > e.g. > > > > > > > > > -Original Message- > > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > > > Sent: 28 March 2001 21:54 > > > To: [EMAIL PROTECTED] > > > Subject: Re: Internationalised 'alt' text > > > > > > > > > Hi, this is an old email, but not resolved, at least for me. > > > Maybe somebody can give > > > me a hunt. > > > I have tried both suggestions. Both are not working. Maybe I > > > am doing something > > > wrong. > > > Thanks in advance. > > > Maya > > > > > > Craig Tataryn wrote: > > > > > > > How about this: > > > > > > > > < -- MyResources would be replaced with whatever class name > > > you used in the > > > > application > > > > init-param you setup for the ActionServlet > > > > --> > > > > > > > > > > > > > > > > > > > > Craig T. > > > > > > > > Peter Alfors wrote: > > > > > > > > > scratch that. You would need to have a bean that had > > > access to the messages. > > > > > > > > > > Peter Alfors wrote: > > > > > > > > > > > I think that does what you want. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > HTH, > > > > > > Pete > > > > > > > > > >
Re: standard administrative actions?
Use the source, Luke, use the source. ;-) Just as an aside -- Struts "digests "the Struts config file when it loads, using it as a "script" to create the mappings. At runtime, Struts refers to the mappings (loaded in memory) -- not to the actual configuration file stored on disk. (Hence, the need for the reload administrative action.) These actions do the same thing -- they affect the mappings stored as a protected property of the ActionServlet. These "Maring, Steve" wrote: > > I understand what the end result of these do, but how do they do them, and > how are they used? > Do they modify the struts-conf.xml or just the ActionMapper? > > > > > type="org.apache.struts.actions.AddFormBeanAction"/> > type="org.apache.struts.actions.AddForwardAction"/> > type="org.apache.struts.actions.AddMappingAction"/> > type="org.apache.struts.actions.ReloadAction"/> > type="org.apache.struts.actions.RemoveFormBeanAction"/> > type="org.apache.struts.actions.RemoveForwardAction"/> > type="org.apache.struts.actions.RemoveMappingAction"/> -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/
Compiling Issues
Hello All, I'm new to the struts framework. I've set up struts using weblogic 6 and the newest version of struts. On my first application, when trying to retrieve the web page, it produces a "Parsing of JSP File '/Test.jsp' failed" message. The following is the error from my server console: <[WebAppServletContext(6964063,DefaultWebApp_myserver)] Servlet failed wit h Exception weblogic.servlet.jsp.JspException: (line 2): Error in using tag library uri='/WEB-INF/struts-form.tld' prefix='struts': The Tag class 'org.apache.struts.taglib.html.ImageTag' has no setter method corresponding to TLD declared attribute 'pa th', (JSP 1.1 spec, 5.4.1) at weblogic.servlet.jsp.StandardTagLib.tld_jspException(StandardTagLib.java:257 ) at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:389) at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:2 67) at weblogic.servlet.jsp.StandardTagLib.(StandardTagLib.java:234) at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:104) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3939) at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3674) at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3521) at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1829) at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1670) at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1552) at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:893) at weblogic.servlet.jsp.JspParser.doit(JspParser.java:71) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:139) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:113) at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253) at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:324) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:180) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:148) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:30 6) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java :246) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo ntext.java:1265) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java :1622) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) Here is the code that I'm compiling: <%@ page language="java" %> <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="struts" %> Username: Password: Any help would be greatly appreciated! Thanks Steven
dropdown values gone after validation error
I have the following struts/JSP fragment that creates a dropdown with values from the networkTypes attribute. The networkTypes attribute is created in the "getNetworkTypes" action that displays this page. The page displays correctly initially. But if I have a validation error & the page reloads, the networkTypes variable is empty & I end up with an empty dropdown. Any ideas on how to keep from losing the values in my dropdown after a validation error? Is there any way to re-invoke the "getNetworkTypes" action from the Validate() method on my ActionForm descendant? (Maybe forward to the "getNetworkTypes" action & return null in Validate?) Any help would be appreciated. Thanks. Wayne [EMAIL PROTECTED]
RE: JUNIT and Struts
Title: RE: JUNIT and Struts Is there a sample available for testing struts with j2eeunit Thanks, Padma -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 5:27 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: JUNIT and Struts Yes, and you can also do unit tests of your server side code if you want, using J2EEUnit (http://j2eeunit.sourceforge.net). We are in the process of writing a test suite using J2EEUnit for Struts. Thanks. Vincent. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, March 02, 2001 5:43 AM Subject: JUNIT and Struts > We use a JUnit extension (HttpUnit) to do all of our functional testing. We > can effectively 'fake' the user submitting a form, and check for page > results. We've added some code into a base test class so that we can use > methods like assertPageText("xyz") or assertPageError > ("struts.resources.key"). > > This works very well. > -- > dIon Gillard, Multitask Consulting > Work: http://www.multitask.com.au > NetRexx: http://www.multitask.com.au/NetRexx.nsf > - Forwarded by dIon Gillard/Multitask Consulting/AU on 02/03/2001 03:39 > PM - > JUNIT and Struts > > > Hello, > > We are using the XP development process(http://www.extremeprogramming.org/) > as > we develop our Struts web application. We need to write some tests in > JUnit(http://www.junit.org) to incrementally test as we write code. Has > anyone > ever used JUnit with Struts? Does anyone have any advice about how to > proceed > in coding these tests? > > TIA, > > Julia > > > > > > > Previous Document (Embe (Embe Next Document > dded dded > image image > moved moved > to to > file: file: > pic26 pic19 > 500.p 169.p > cx) cx) > > Return to View > > (Embedded image moved to > file: pic15724.pcx) > > > >
RE: JUNIT and Struts
Title: RE: JUNIT and Struts Is there a sample available for testing struts with j2eeunit Thanks, Padma -Original Message- From: Vincent Massol [mailto:[EMAIL PROTECTED]] Sent: Friday, March 02, 2001 5:27 AM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: JUNIT and Struts Yes, and you can also do unit tests of your server side code if you want, using J2EEUnit (http://j2eeunit.sourceforge.net). We are in the process of writing a test suite using J2EEUnit for Struts. Thanks. Vincent. - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, March 02, 2001 5:43 AM Subject: JUNIT and Struts > We use a JUnit extension (HttpUnit) to do all of our functional testing. We > can effectively 'fake' the user submitting a form, and check for page > results. We've added some code into a base test class so that we can use > methods like assertPageText("xyz") or assertPageError > ("struts.resources.key"). > > This works very well. > -- > dIon Gillard, Multitask Consulting > Work: http://www.multitask.com.au > NetRexx: http://www.multitask.com.au/NetRexx.nsf > - Forwarded by dIon Gillard/Multitask Consulting/AU on 02/03/2001 03:39 > PM - > JUNIT and Struts > > > Hello, > > We are using the XP development process(http://www.extremeprogramming.org/) > as > we develop our Struts web application. We need to write some tests in > JUnit(http://www.junit.org) to incrementally test as we write code. Has > anyone > ever used JUnit with Struts? Does anyone have any advice about how to > proceed > in coding these tests? > > TIA, > > Julia > > > > > > > Previous Document (Embe (Embe Next Document > dded dded > image image > moved moved > to to > file: file: > pic26 pic19 > 500.p 169.p > cx) cx) > > Return to View > > (Embedded image moved to > file: pic15724.pcx) > > > >
Re: iterate tag
It looks to me like LanguageBean has a method call langCollection that returns your collection. If this is true the tags should be like this. The will loop through each element in the collection. David --- Marcin Baj <[EMAIL PROTECTED]> wrote: > Hello, > I want to use tag for displaying my data. > Is it working properly? Where should be placed my > Collection property? > > I'm receiving data from database in > CustomAction.java bean. Is it correct? > > My target JSP page contains: > > > name="estatenet.custom.LanguageBean" > scope="application"> > > >property="langCollection"/> > > > > > > and I receive > > javax.servlet.ServletException: Cannot find bean > lang in scope null > at > org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) > at > jsp._0002fjsp_0002fCustomDisplay_0002ejspCustomDisplay_jsp_7._jspService(_0002fjsp_0002fCustomDisplay_0002ejspCustomDisplay_jsp_7.java:269) > at > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > What is wrong? > > Thnx, Bajo > __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/?.refer=text
RE: ActionForward and Frames
yes, thats what we doing currently but under certain conditions I would like to change the target frame. Thanks Sean -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 28, 2001 10:49 PM To: [EMAIL PROTECTED] Subject: Re: ActionForward and Frames On Wed, 28 Mar 2001, Sean Giles wrote: > Is it possible to target a specific frame with an ActionForward? For > instance if I want to return to a search page that exists in a leftmost > frame if the target of the search results link was a contents frame? > Which frame the output goes to is determined by the "target" attribute on the or tag that submitted the request. Make sure you generate your hyperlinks and input forms with the appropriate value, and this should work. > > Thanks > Sean Craig McClanahan
standard administrative actions?
I understand what the end result of these do, but how do they do them, and how are they used? Do they modify the struts-conf.xml or just the ActionMapper?
RE: struts and cocoon
Have you played with the order that these occur in the CLASSPATH? -Original Message-From: Ali Ozoren [mailto:[EMAIL PROTECTED]]Sent: Tuesday, August 29, 2000 10:10 AMTo: [EMAIL PROTECTED]Cc: [EMAIL PROTECTED]Subject: struts and cocoon Hi all- I’ve been trying to get cocoon and struts together, however one is using the servlet.jar the other servlet_2_2.jar. Is it possible to combine these two? Thanks!
iterate tag
Hello, I want to use tag for displaying my data. Is it working properly? Where should be placed my Collection property? I'm receiving data from database in CustomAction.java bean. Is it correct? My target JSP page contains: and I receive javax.servlet.ServletException: Cannot find bean lang in scope null at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386) at jsp._0002fjsp_0002fCustomDisplay_0002ejspCustomDisplay_jsp_7._jspService(_0002fjsp_0002fCustomDisplay_0002ejspCustomDisplay_jsp_7.java:269) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) What is wrong? Thnx, Bajo
struts and cocoon
Hi all- I’ve been trying to get cocoon and struts together, however one is using the servlet.jar the other servlet_2_2.jar. Is it possible to combine these two? Thanks!
RE: Internationalised 'alt' text
It's possible I suppose. I've tried it with Tomcat 3.2 using pageKey rather than src and it works ok (using Struts 1.0b1). What happens when you try to use the tag, e.g. what html is produced or what exception is thrown? > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: 29 March 2001 14:01 > To: [EMAIL PROTECTED] > Subject: Re: Internationalised 'alt' text > > > Thank you, Howard. And if this does not work for me, is that > meant, because I > am using Tomcat 3.1? In your example below I am using pageKey > instead of src. > > > > Howard Moore wrote: > > > The html:img tag now contains an altKey attribute that does > what you want. > > > > e.g. > > > > > > > > > -Original Message- > > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > > > Sent: 28 March 2001 21:54 > > > To: [EMAIL PROTECTED] > > > Subject: Re: Internationalised 'alt' text > > > > > > > > > Hi, this is an old email, but not resolved, at least for me. > > > Maybe somebody can give > > > me a hunt. > > > I have tried both suggestions. Both are not working. Maybe I > > > am doing something > > > wrong. > > > Thanks in advance. > > > Maya > > > > > > Craig Tataryn wrote: > > > > > > > How about this: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Craig T. > > > > > > > > Peter Alfors wrote: > > > > > > > > > scratch that. You would need to have a bean that had > > > access to the messages. > > > > > > > > > > Peter Alfors wrote: > > > > > > > > > > > I think that does what you want. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > HTH, > > > > > > Pete > > > > > > > > > >
java.lang.IllegalStateException: Can't happen - classname is null, who added this ?
Every now and then I get the following exception: Location: /poc/ Internal Servlet Error: java.lang.IllegalStateException: Can't happen - classname is null, who added this ? at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:261) at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289) at org.apache.tomcat.core.Handler.service(Handler.java:254) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.handleStatus(ContextManager.java:1049) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:77 5) 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) To be precise it happens when I navigate back to the first page of my application. I would very much appreciate any hints Michael Szlapa [EMAIL PROTECTED]
Re: JavaScript in Struts
I've added these to our Jyve FAQ: How Do I use Javascript in my Struts forms? --- The relevant HTML tags provide support for the Javascript event handlers onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup. For more about Javascript events, see the Netscape Javascript Reference guide < http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm >. For more about HTML tags, see the Struts HTML Tag Guide < http://developer.netscape.com/docs/manuals/communicator/jsref/evnt.htm >. The Javascript itself can then be placed 1. Inline, if it is simple enough, like onclick="history.go(-1)" 2. As a
Re: Internationalised 'alt' text
Thank you, Howard. And if this does not work for me, is that meant, because I am using Tomcat 3.1? In your example below I am using pageKey instead of src. Howard Moore wrote: > The html:img tag now contains an altKey attribute that does what you want. > > e.g. > > > > > -Original Message- > > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > > Sent: 28 March 2001 21:54 > > To: [EMAIL PROTECTED] > > Subject: Re: Internationalised 'alt' text > > > > > > Hi, this is an old email, but not resolved, at least for me. > > Maybe somebody can give > > me a hunt. > > I have tried both suggestions. Both are not working. Maybe I > > am doing something > > wrong. > > Thanks in advance. > > Maya > > > > Craig Tataryn wrote: > > > > > How about this: > > > > > > > > > > > > > > > > > > > > > Craig T. > > > > > > Peter Alfors wrote: > > > > > > > scratch that. You would need to have a bean that had > > access to the messages. > > > > > > > > Peter Alfors wrote: > > > > > > > > > I think that does what you want. > > > > > > > > > > > > > > > > > > > > > > > > > HTH, > > > > > Pete > > > > > > >
Re: tomcat 4 and reloading application
I still am unable to get Tomcat4 to reload my app when a class changes. Can't figure it out. Resin does the reload with no problem, so it isn't some problem within my app. Guess I'll be using Resin for the time being. - Original Message - From: "William Jaynes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, March 26, 2001 3:17 PM Subject: Re: tomcat 4 and reloading application > When I recompile a class, I have waited at least 15 seconds. But no reload happens. >I've checked > that the class files are really getting updated and the timestamp is getting >updated. There is > nothing special written to the logs. At tomcat startup time the logs do indicate >that "Reloading > checks are enabled for this Context" for my application. And yet, no reload. > > As for the explicit manager reload that causes a servlet exception, the logs >indicate that the > manager app does start the reload.The last log entries are: > > 2001-03-26 15:06:00 action: Processing a GET for /welcome > 2001-03-26 15:06:00 action: Looking for Action instance for class > edu.umich.umms.physicianAudit.WelcomeAction > 2001-03-26 15:06:00 action: Double checking for Action instance already there > 2001-03-26 15:06:00 action: Creating new Action instance > 2001-03-26 15:06:01 StandardWrapper[/physicianaudit:jsp]: Using Jasper classloader >for servlet jsp > 2001-03-26 15:06:01 jsp: init > 2001-03-26 15:06:01 jsp: init > 2001-03-26 15:06:03 jsp: init > 2001-03-26 15:06:03 ApplicationDispatcher[/physicianaudit] Servlet.service() for >servlet jsp threw > exception javax.servlet.ServletException: >org.apache.struts.util.PropertyMessageResources > > Am I the only one having these problems? > > Will Jaynes > > > - Original Message - > From: "Craig R. McClanahan" <[EMAIL PROTECTED]> > To: "struts user" <[EMAIL PROTECTED]> > Sent: Monday, March 26, 2001 12:16 PM > Subject: Re: tomcat 4 and reloading application > > > > > > > > On Mon, 26 Mar 2001, William Jaynes wrote: > > > > > I find that application reloading with Tomcat 4 b1 simply doesn't work for me, >although others > on > > > this list seem to have no problem. (I do notice that Tomcat 4 isn't in the >installation special > > > instructions list). I would appreciate any help. > > > > > > I have tomcat configured as follows: > > > - I had to move crimson.jar and jaxp.jar from the jasper directory into the lib >directory. This > per > > > Keith Kee >(http://www.mail-archive.com/struts-user@jakarta.apache.org/msg05043.html) > > > > Essentially, this makes the XML parser available to all webapps without > > having to include it in WEB-INF/lib. > > > > > - My app directory isn't under that default tomcat4 webapps, so I have the >following in the > > > servlet.xml > > >> > docBase="E:/apps/physicianaudit" > > > debug="0" > > > reloadable="true" > > > > > > > > That's fine. > > > > > - I have my source files in one place, and use Ant to compile the class files >into the > > > WEB-INF/classes directory of my application. > > > > Yes, /WEB-INF/classes of your app is the *only* place you can put classes > > that should trigger automatic reloading. > > > > > > > > If I recomple a file, Tomcat4 does not reload the application. It never seems to >notice that > > > anything has changed. > > > > > > > Reloading is normally checked only once every 15 seconds. Have you waited > > long enough? Have you confirmed that nothing at all is written to the > > Tomcat log files? > > > > > I have also tried reloading explicitly, using a url like > > > http://localhost:8080/manager/reload?path=/physicianaudit > > > But after invoking this url and going back to the application, I get a servlet >exception > > > java.lang.ClassCastException: org.apache.struts.util.PropertyMessageResources > > > > > > I am at a loss to understand why reloading works for everyone else and not for >me. I've tried to > > > follow all instructions. Any suggestions would be much appreciated. > > > > > > > That sounds like it might be a Tomcat issue. I will look at it in more > > detail. > > > > > Will Jaynes > > > > > > > > > > Craig > > > > >
Re: How to redirect to the input jsp page from the formbean's validat emethod instead of populating ActionErrors.
Hi Senthil, Sorry for answering a question with a question. How do you redirect errors from perform to the input page without ActionErrors? Best regards Suresh "Suriyanarayanan, Senthil Kumar" cc: Subject: How to redirect to the input jsp 03/29/01 06:39 AM page from the formbean's validat e method instead Please respond to struts-user of populating ActionErrors. Hello, How do I redirect to the input jsp page from the formbean's validate method instead of populating ActionErrors. I knew redirecting from the perform method of the Action object, wondering is it possible to simulate the same from the validate method. Thanks in advance, 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.
RE: Internationalised 'alt' text
The html:img tag now contains an altKey attribute that does what you want. e.g. > -Original Message- > From: Maya Muchnik [mailto:[EMAIL PROTECTED]] > Sent: 28 March 2001 21:54 > To: [EMAIL PROTECTED] > Subject: Re: Internationalised 'alt' text > > > Hi, this is an old email, but not resolved, at least for me. > Maybe somebody can give > me a hunt. > I have tried both suggestions. Both are not working. Maybe I > am doing something > wrong. > Thanks in advance. > Maya > > Craig Tataryn wrote: > > > How about this: > > > > > > > > > > > > > > Craig T. > > > > Peter Alfors wrote: > > > > > scratch that. You would need to have a bean that had > access to the messages. > > > > > > Peter Alfors wrote: > > > > > > > I think that does what you want. > > > > > > > > > > > > > > > > > > > > HTH, > > > > Pete > > > > >
Re: init'ing a session bean in Action
what you have to lookup is the jndi name. I am using Weblogic and I have a weblogic-ejb-jar.xml where you say the name you want to put to EJB in jndi directory. namexxx ConfigHome home = (ConfigHome) ctx.lookup("namexxx"); Bye > "G.L. Grobe" wrote: > > Probably not the right group and I'm new to ejb's and am having a > problem getting a sesson bean going from within an Action class (a > class from the apache struts framework which probably doesn't make a > difference what the class is). Is this on the right track to doing > this correctly, though I get the following error. > > javax.naming.NameNotFoundException: ConfigHome not found > at com.evermind.server.rmi.RMIContext.lookup(JAX, Compiled > Code) > at com.evermind.server.hm.f4(JAX, Compiled Code) > at com.evermind.server.hm.lookup(JAX, Compiled Code) > at javax.naming.InitialContext.lookup(InitialContext.java, > Compiled Code) > My Sesson bean is made up of the following: > ConfigHome - home interface > ConfigBean - session bean > Config - ejbobject interface > > My ejb-jar.xml file looks like this. > > > Configuration Session Bean > com.neuroquest.cais.ejb.config.Config > com.neuroquest.cais.ejb.config.ConfigHome > com.neuroquest.cais.ejb.config.Config > > com.neuroquest.cais.ejb.config.ConfigBean > Stateless > > > > Any help much appreciated. > > -- > public ActionForward perform(ActionMapping mapping, ActionForm form, > HttpServletRequest request, HttpServletResponse response) { > > String initCtxFactory = > getInitParameter(Context.INITIAL_CONTEXT_FACTORY); > String providerURL = getInitParameter(Context.PROVIDER_URL); > > try { > > Properties env = System.getProperties(); > env.put(Context.INITIAL_CONTEXT_FACTORY, initCtxFactory); > env.put(Context.PROVIDER_URL, providerURL); > > Context ctx = new InitialContext(env); > > ConfigHome home = (ConfigHome) ctx.lookup("ConfigHome"); > > ConfigBean cfgBean = home.create(); > cfgBean.doMyMethod(); > } > catch (Exception e) { > log(e); > e.printStackTrace(); > } > > -- This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Sema Group. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. --