RE: How to test only for the language-code but not for the country?
Title: How to test only for the language-code but not for the country? i faced a similar problem and i override the processLocale method of ActionServlet as follows... protected void processLocale(HttpServletRequest request) { // Validate that we need to create a Locale if (!locale) return; // Service not requested HttpSession session = request.getSession(); if (session.getAttribute(Action.LOCALE_KEY) != null) return; // Locale object is already present // Use the Locale returned by the servlet container (if any) Locale locale = request.getLocale(); if (locale != null) { if (locale.getLanguage().equals("en"))locale = new Locale("en","US"); if (locale.getLanguage().equals("nl"))locale = new Locale("nl","NL"); if (!(locale.getLanguage().equals("en") || locale.getLanguage().equals("nl")))locale = new Locale("nl","NL"); session.setAttribute(Action.LOCALE_KEY, locale); } else { locale = new Locale("nl","NL"); session.setAttribute(Action.LOCALE_KEY, locale); } } -Original Message-From: Friedli Beat [UFA AG Her] [mailto:[EMAIL PROTECTED]]Sent: Wednesday, September 12, 2001 10:22 AMTo: '[EMAIL PROTECTED]'Subject: How to test only for the language-code but not for the country? I want to test the Accept-Language and show a french message if the user speaks french. But the following code doesn't take care of the Accept-Language fr-ch. Welcome french And this code doesn't take care of the Accept-Language fr-ch. Welcome french Do I have to write my own tag? Has anybody allready an apropriate tag? thanks Beat Friedli -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: problem in showing PDF, Doc, xls etc
Title: SV: Including Actions via jsp:include hi, your typical flow is something like, u click on a link which invokes a new window which inturn invokes some action class, which fetches the file may be from a file system or BLOB field of database, and then u dont forward it anywhere... !!! and ur last part of action class will look like this... response.setContentType("application/pdf"); javax.servlet.ServletOutputStream out = response.getOutputStream(); out.write(data); // where data is byte[] containing ur filedata out.flush(); out.close(); return null; i hope it helps.. -satyen -Original Message-From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]Sent: Monday, September 03, 2001 11:39 AMTo: '[EMAIL PROTECTED]'Subject: SV: problem in showing PDF, Doc, xls etc you have to use a servlet for this...print to the servletOutPutStream Jsp's cant display binary files :: Mikkel Bruun Senior IT Developer [EMAIL PROTECTED] Direct: +45 32 88 22 73 Valtech A/S Kanonbaadsvej 10 DK-1437 Copenhagen Tel +45 32 88 20 00 Fax +45 32 88 20 20 -Oprindelig meddelelse-Fra: Anwar Sadat [mailto:[EMAIL PROTECTED]]Sendt: 03 September 2001 12:28Til: '[EMAIL PROTECTED]'Emne: problem in showing PDF, Doc, xls etc Hi, I have one jsp which shows some links.. This link contains the filename (HTML file). If i click on this link, i will execute one more jsp. This jsp has some methods which will get the file and show the content. This works fine if i have only html files to be shown.. If i have other document types (like pdf, doc, xls etc), how can i show these things on the browser thro my second JSP Thanx in Advance Regards Anwar The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com
RE: need help? (to TED)
name="<%=Action.ERROR_KEY%>"> u missed the quotations probably ... -Original Message- From: Shamir Juma [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 4:39 PM To: '[EMAIL PROTECTED]' Subject: RE: need help? (to TED) Try this: > Shamir Juma -Original Message- From: Satyan Nair [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 12:16 PM To: [EMAIL PROTECTED] Subject: need help? (to TED) i want to generate a particular link if there is any error! according to the example in strutsthe error tag is i want to generate this link only if there is an error how do i use the error tag... i tried doing like but it didn't work(obviously)! how do i go about it? take care... -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: and javascript incompatibility ???
When you use a image, instead of using its onclick event , put an href link on the image and it will work fine this is html constraint -Original Message- From: Arnaud Heritier [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 30, 2001 11:46 AM To: 'struts users mailing list' Subject: RE: and javascript incompatibility ??? Sorry, but as you should seen it, I reversed the two JSP codes :-) arno -Message d'origine- De: Arnaud Heritier [SMTP:[EMAIL PROTECTED]] Date: jeudi 30 aout 2001 12:40 A: 'struts users mailing list' Objet: and javascript incompatibility ??? Hello Guys!! I've a little problem concerning the use of the html taglib and the javascript code. I'm not sure that it concerns directly the html taglib or the html language itself. The problem is that I would like to propose to the user to confirm an action before to do it. I had written this javascript function : function validateAndSubmit(theform,warningtext) { if (window.confirm(warningtext)) { alert('ok') theform.submit() return true } else { alert('not ok') return false } } and this JSP code : and it's WORK. When I don't confirm nothing happends, whereas when I confirm the action executes. So, now I would like to replace this button by an image. I keep the same javascript code and I replace the JSP by this one : Supprimer Now in both cases (if I confirm or not), the action is called, but I get the good alert message from the javascript !! I don't understand what it happends ! Is anyone have an idea concerning my problem. Thanx all arno PS : my configuration is : OS : NT 4 SP6 WebApp Server : Tomcat 3.2.3 Browser : IE5.5 and Struts 1.0 Arnaud HERITIER Ingenieur d'etudes SOPRA. Group EAI Consulting Tel : +33-1-49-00-58-12 Fax : 04 50 33 30 78 Email : [EMAIL PROTECTED] -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Error creating action
1. Your RequeteAction should be in classpath. 2. RequeteAction should not have any errors. 3. Check the name of class is correct, i mean type mistake. -Original Message- From: BOURREE Pierre [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 21, 2001 4:15 PM To: '[EMAIL PROTECTED]' Subject: Error creating action Hi, i'm a new user of struts and did not manage to execute an action mapping. Here is the message log from jasper : Tue Aug 21 17:03:02 CEST 2001 Class name is: _0002frequete_0002ejsprequete_jsp_0 Context log path="/struts-jdbc" :action: Error creating Action instance for path '/requete', class name 'com.sopra.etudestruts.jdbcstandard.RequeteAction' I would appreciate any help. ++ | Ce courrier ainsi que les fichiers joints sont confidentiels. | | Si vous avez recu ce courrier par erreur, veuillez en informer | | l'administrateur du systeme : [EMAIL PROTECTED] | | - | | Ce message confirme que le courrier a passe le controle| | antivirus du relais de messagerie Internet avec succes.| ++ -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: DataSource timeouts?
in the documentation it says that you close the connection after you have used it... ie. conn.close(); this wont close the connection but will release it for others to use... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 02, 2001 5:07 PM To: [EMAIL PROTECTED] Subject: DataSource timeouts? Is there any parameter that can be set to timeout datasources, or to re-init them after a specified period of time? We recently bounced our Oracle database that our struts connection pool points to, and I noticed that all the connections had hung (the app just hung while trying to perform queries). The only way to fix it (that I knew of) was to restart the servlet container. Is there a better way around this? Thnaks, Jason -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Accessing JDBC-ODBC from Struts
in the struts-config.xml there is configuration for datasources which you can use... u dont have to do anything in the action servlet... in the action class u get the connection to the object... -Original Message- From: Rodney Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 2:20 PM To: [EMAIL PROTECTED] Subject: Accessing JDBC-ODBC from Struts Hi I need some direction on how to incorporate JDBC-ODBC into my struts and where the ODBC should be stored in my application. Also how to reference that in my Action Servlet, I am a little unsure about this area, but would appreciate some feed back or documentation that will simplify my work. Thanks Rodney -- Sent through GMX FreeMail - http://www.gmx.net -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Baisc q 2 Cannot find message resources u/key -
give this a try.. add the classes folder to classpath... -Original Message- From: Chuck Amadi [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 10:19 AM To: [EMAIL PROTECTED] Subject: Re: Baisc q 2 Cannot find message resources u/key - Hi i still get the following error message. My path is /bbnpa/helloworld/WEB-INF/classes/helloworld/HelloWorldResources.properties Any more pointers Cheers Chuck Error: 500 Location: /bbnpa/helloworld/hello.jsp Internal Servlet Error: javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE Chuck Amadi wrote: > > Hi , can anyone work out this one i have followed the correct procedures > albeit i am missing somthing. (bbnpa the name of my application) > > My path C:\jakarta-tomcat\webapps\bbnpa\helloworld\hello.jsp > 1) declared directives. > 2) created property file. > 3) created web.xml file. > 4)Copied all necessary .tld to /helloworld/WEB-INF/ > 5)Copied all necessary .jar's to /WEB-INF/lib > 6)Copied and deployed the struts-trailmap war's to /bbnpa/ my app's dir. > > Wats left error below > > Error: 500 > Location: /bbnpa/helloworld/hello.jsp > Internal Servlet Error: > > javax.servlet.ServletException: Cannot find message resources under key > org.apache.struts.action.MESSAGE > > Cheers Chuck. > > -- > The views expressed by the sender of this message don't > necessarily represent those of Brecon Beacons National Park > Authority. This message is intended for the addressee(s) only > and is sent in confidence; if you receive it in error, please can you > let us know (at [EMAIL PROTECTED]) and then destroy all copies. > Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn > adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. > Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion > yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn > mewn camgymeriad, a fyddech gystal rhoi gwybod i > ni (yn [EMAIL PROTECTED]) ac yna dilwch bob copi. -- The views expressed by the sender of this message don't necessarily represent those of Brecon Beacons National Park Authority. This message is intended for the addressee(s) only and is sent in confidence; if you receive it in error, please can you let us know (at [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi. -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: View data
Hello Debashish, (If I have got your question correctly) The mapping looks something like this in the config file... now your data will be send in the request object to the OrderList.jsp which will display it, you dont require any other action again... -Satyen -Original Message- From: Debasish Ghosh [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 3:29 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: View data Hi - I am new to Struts. I also have this kind of application where I need to show a lot of data. I understand your solution. But for this, do I need to make any entry in the config file for the jsp which renders the view of the bean. Otherwise, how will it fit in the overall framework of Struts ? Does this mean that we will have a FormBean and an Action class for this JSP as well ? TIA. - Debasish --- John Schroeder <[EMAIL PROTECTED]> wrote: > The application I am developing uses a lot of view > only data. We are doing > exactly what you mention. We have DAOs that contact > the database and return > CachedRowSets. These RowSet objects are stored in > the proper context and > custom tags on the JSP handle the display. > > Hope this helps... > > --John > > > > -Original Message- > From: Jay Walters [mailto:[EMAIL PROTECTED]] > Sent: Monday, June 25, 2001 1:03 PM > To: '[EMAIL PROTECTED]' > Subject: View data > > > Just to bounce this off of people, the ActionForm is > really just for > handling Form based input data from the user. > > What do people do to handle result data which is > view only. We are thinking > we will just put the model beans into our request > object in the > action.perform method and pull them out to use in > the jsp. Does this make > sense? Any reason we should be using forms for > output of read only data? > > Cheers > Jay __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: More on running Tomcat+Struts w/o internet connection
I'm using Visualage with tomcat patch and the following is working fine I have also added the folder in the classpath... try some permutations and u'll get it done... http://localhost:8080/examples/myproj/struts-config_1_0.dtd";> Regards, Satyen -Original Message- From: Thomas Burns [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: More on running Tomcat+Struts w/o internet connection My coworker posted the original question in the "Running Tomcat+Struts w/o internet connection" thread, but since I'm the one trying to overcome this particular problem, I thought I'd add some more detail. First off, we're using Tomcat 3.2.1 or 3.2.2 (not sure) and Struts 1.0. The DOCTYPE line of the struts-config.xml by default looks like: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";> If I run tomcat disconnected from the network I get the following: resolveEntity('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd') Not registered, use system identifier Parse Fatal Error at line 3 column -1: External entity not found: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd. whereupon Tomcat barfs and stops loading. It was suggested to use a 'file://' style URL to fix this. That works fine, (i.e. 'file:///c:/foo/bar/struts-config_1_0.dtd') but it demands an absolute file path. Any attempt to use a relative path (such as 'file://struts-config_1_0.dtd') has failed with the same 'external entity not found' error as above. I've tried various permutations, but either it doesn't work, or I can't figure out what the current working directory is that the URL will base itself off of (tried tomcat/bin, webapps, webapps/myapp, webapps/myapp/WEB-INF). So, how about specifying the file directly, as in: Well, here's the resulting error: Parse Fatal Error at line 3 column -1: Relative URI "struts-config_1_0.dtd"; can not be resolved without a document URI. Even though XML Spy thinks this is OK, obviously tomcat wants a little more information. I poked around in the XML Bible, but couldn't find anything to tip me off as to what to include in the XML that would make this error go away. All I want to do is have the struts DTD be a local file, referenced with some sort of resolveable relative path. An absolute path just can't be worked with, and we cannot guarantee a network connection. Any more ideas? Thanks! t -- Thomas Burns RiskMetrics Group [EMAIL PROTECTED] 734.945.6428 -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Cannot get request dispatcher for path login.jsp
Check the path given for the jsp in the input... -Original Message- From: Aaron Crandall [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 5:26 AM To: [EMAIL PROTECTED] Subject: Cannot get request dispatcher for path login.jsp Hello all, I began to get the above error after adding validation code to my LoginForm bean. Detail below: I have recently begun to setup a simple struts web. I have a login page (login.jsp), an action servlet (LoginAction) and a form (LoginForm). I placed some simple validation in the LoginAction "perform()" method and everything worked fine (if successful, the user was forwarded to a menu.jsp page, if not they were sent back to login.jsp). However, when I moved some validation into the form itself, so that I could display error messages, I began to get the "Cannot get request dispatcher for path login.jsp" error. Isn't the user supposed to be sent back to the "input" page if validate() returns errors? Why can't it find the login.jsp page? Thanks in advance for any help! Aaron -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Basic Q
Hi, U r right!!! Moving to struts will be really moving to true MVC... I'm right now making some servlets struts compatible, just have to move the business logic to some java class from the servlet, add appropriate action class and update the config file... it works and is worth doing that -Satyen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 7:37 PM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: Basic Q Hi anthony.. thanks for the response.. our project is currently using MVC architecture its just that we dont have a "controller" per say... but we have the JSPs taking care of the GUI and the servlets doing the business logic.. i think that moving to struts will give us the advantage of truly moving to MVC arch. any comments ..suggestions on this one.. vik -Original Message- From: Anthony Martin [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 2:18 PM To: '[EMAIL PROTECTED]' Subject: RE: Basic Q I think, without a doubt, the best advice is to try building a Struts application from scratch. You might find that it's easier to add aspects of your existing JSP application to the Struts application, or maybe it'll be easier to go the other way. But either way, knowing where everything goes, and why, is very important. Likely, you'll find that functionality exists in the JSP application that doesn't belong in the same place in the Struts counterpart. Separating the Model and Control from the View can be like pulling teeth if the team is used the other way. I'm facing the same problem with one project. It was started in February, and has gone to present with the *intention* to move into Struts. No such luck. The team was resistant because they didn't understand it. I recently told them to try their hand at designing their own project from scratch, and presto: They understand the point of Struts now ... at least some of it. Another problem is that you need some class writers who like to say out of the HTML yet offer flexible functionality in the form of taglib and beans. I took on that task in our project because I detest UI, and this keeps my hands clean. So far, I'm way ahead of the UI team, but I'm sure they'll catch up quickly. Anthony -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 10:38 AM To: [EMAIL PROTECTED] Subject: Basic Q Hi .. I am new to Struts...we have an existing application using JSP and servlet technology which we want to migrate to struts...any pointers on how to go ahead with it. thanks in advance.. vik [Paranjpe, Vikrant (PS, Contractor, IT)] -Original Message- From: Mike Thompson [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 28, 2001 12:17 PM To: [EMAIL PROTECTED] Subject: struts with jboss problems I recently switched to the JBoss app server and have been slowly been redeploying my struts application on it. I finally got my ejbs deployed and my web application deployed, BUT whenever I click on a link that is supposed to trigger a struts action, this is what I get. 2001-06-28 11:11:30 - Ctx( /SecureExWeb ): 500 R( /SecureExWeb + /servicemanager.do + null) No action instance for path /servicemanager could be created. This application used to work on suns reference j2ee server beta 2. Thanks for any help. --m Michael R. Thompson http://www.instanton.com 512.439.3815 -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: form is null in Action
Hi, Check the mapping for the form class in the config-file... the EDIT action should be pointing to the correct form class... -satyen -Original Message-From: Michelle Popovits [mailto:[EMAIL PROTECTED]]Sent: Wednesday, June 20, 2001 3:57 PMTo: [EMAIL PROTECTED]Subject: form is null in Action Hi, - In my SEARCH action I retrieve the required data from a datasource based on user entered search criteria. - I place this data in a new EDIT Form instance and place it in the session. - I Then forward to the EDIT jsp (which uses the EDIT Form) and the data is displayed nicely in a table. - I then click SUBMIT which sends me to the EDIT Action. - In the EDIT action the form argument is null. I am expecting that my EDIT Form would be available here. If I do a getAttribute from the session the EDIT Form is there. Why is the form argument in the perform() method of the EDIT action null? Thanks, Michelle -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --
RE: Struts setup Q...
seems to me like ur tag libraries are not setup correctly... try removing the tags and tag lib reference from ur page and see whether it works.. if it works then u can set up ur env. to use the tags... -satyen -Original Message- From: Jon.Ridgway [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 20, 2001 10:18 AM To: [EMAIL PROTECTED] Cc: JohnH.O'[EMAIL PROTECTED] Subject: RE: Struts setup Q... Hi John, Did you ever get to the bottom of this one? Jon. -Original Message- From: O'Neill, John H [mailto:JohnH.O'[EMAIL PROTECTED]] Sent: 19 June 2001 13:57 To: [EMAIL PROTECTED] Subject: Struts setup Q... Hi, Could anyone tell me why I am getting the following error message. It occurs when I try to access any Jsp page. I have Struts1.0b-3 set up and running in the Websphere Test Environment within Visual Age for Java 3.53. The struts 'ActionServlet' servlet seems to get instantiated correctly in my environment. Is this a problem with attributes I need to provide to the servlet in one of the config files? Cheers, John Error 500 An error has occured while processing request:http://localhost:8080/blank/index.jsp Message: "Directive: Invalid attribute, prefix" Target Servlet: jsp StackTrace: Root Error-1: "Directive: Invalid attribute, prefix" com.ibm.servlet.engine.webapp.WebAppErrorReport: "Directive: Invalid attribute, prefix" java.lang.Throwable(java.lang.String) java.lang.Exception(java.lang.String) javax.servlet.ServletException(java.lang.String) com.ibm.websphere.servlet.error.ServletErrorReport(java.lang.String) com.ibm.servlet.engine.webapp.WebAppErrorReport(java.lang.String) void com.ibm.servlet.engine.webapp.WebAppDispatcherResponse.sendError(int, java.lang.String) void com.sun.jsp.runtime.JspServlet.unknownException(javax.servlet.http.HttpServl etResponse, java.lang.Throwable) void com.sun.jsp.runtime.JspServlet.service(javax.servlet.http.HttpServletRequest , javax.servlet.http.HttpServletResponse) void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictServletInstance.doService(javax.servlet. ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(javax.servlet. ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.IdleServletState.service(com.ibm.servlet.engin e.webapp.StrictLifecycleServlet, javax.servlet.ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(javax.servlet.S ervletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.webapp.ServletInstance.service(javax.servlet.ServletR equest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(com.ibm.se rvlet.engine.webapp.ServletInstanceReference, javax.servlet.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(javax.servle t.ServletRequest, javax.servlet.ServletResponse, com.ibm.servlet.engine.webapp.WebAppServletInvocationEvent) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(c om.ibm.servlet.engine.webapp.WebAppRequest, javax.servlet.http.HttpServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(javax.servlet .ServletRequest, javax.servlet.ServletResponse, boolean) void com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(javax.servlet. ServletRequest, javax.servlet.ServletResponse) void com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(java.lang.Obje ct) void com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(java.lan g.Object) void com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(java.lang.S tring, com.ibm.servlet.engine.srp.ISRPConnection) void com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(com.ibm.ser vlet.engine.oselistener.api.IOSEConnection) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.handleConnection( java.net.Socket) void com.ibm.servlet.engine.http_transport.HttpTransportHandler.run() void java.lang.Thread.run() - John O' Neill Fidelity Investments (FISC IRL) Phone : (W) 00 353 1 6141258 (M) 00 353 86 6774844 email : johnh.o'[EMAIL PROTECTED] - -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be un
RE: Logon API in struts?
Hi, We here are trying to use our own Authorization stuff hooked into struts... there is a method called processPreProcess in Struts ActionServlet. Now we are creating a new Servlet, MyActionServlet extends ActionServlet, and then overriding the processPreProcess method with the code which will match the role of the user with the role required to process the specific action path (which is unique ).. the role and user objects can be oracle objects(as our Data Architect suggests..)... so u'll be inhibiting the access to the specific path in the first place itself before any processing takes place... there are other issues to be sorted out though, like if a user should be able to process the path but should be able to view only some specific data... though this is still in a primitive stage, will gain some shape in a week or two... I know this doesnt give any solution for u, but maybe u can think over this and get an idea of how to go with this approach... -Satyen. -Original Message-From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]Sent: Monday, June 18, 2001 3:16 PMTo: [EMAIL PROTECTED]Subject: RE: Logon API in struts? Hi Mike, To use roles you need to use the containers auth mechanism. I.e. basic, digest, form (custom in the case of WebSphere) or certificate based auth. The problem is that each container sets things up differently. The issues have been discussed on this group before. See the archive at: http://www.mail-archive.com/struts-user@jakarta.apache.org/ Jon. -Original Message-From: Mike Thompson [mailto:[EMAIL PROTECTED]] Sent: 18 June 2001 14:06To: [EMAIL PROTECTED]Subject: Re: Logon API in struts? Ok, so the fairly standard aproach is to authenticate the user by hand and shove the user name into a session attribute that is application defined? i.e. session.setAttribute(Constants.USER_KEY, user); What if I'm using roles and I want to be able to say request.isUserInRole("ADMIN"); or Principal p = request.getUserPrincipal(); or I have some java beans that snag the princiapl name out of the SessionContext and would like to return different results based on who is making the call? will this approach work? --m - Original Message - From: Jon.Ridgway To: [EMAIL PROTECTED] Sent: Monday, June 18, 2001 4:57 AM Subject: RE: Logon API in struts? Hi Bob, User authentication is a tricky one. The struts-example app uses a fairly standard approach. The difficulties start if you choose to use container managed auth. According to Javasoft we should all be aspiring to use Form Based auth. But each container has a different config mechanism and some such as WebSphere don't support standard form based auth at all. Do you know which web/app server you will be deploying to? Jon. -Original Message-From: Bob Byron [mailto:[EMAIL PROTECTED]] Sent: 15 June 2001 19:21To: [EMAIL PROTECTED]Subject: Logon API in struts? I would like to know from the Struts elite if there are any struts centric facilities to help with login/logout? I just don't want to reinvent the wheel if it is already out there. The username and password would be entered on the webpage itself and not entered into the user/pass dialog popup (as in the Struts-Admin application). Thank You, Bob ByronRAD Systems, Inc.www.radit.com(972)516-4256 -- The information in this Internet email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this Internet email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful. When addressed to our clients any opinions or advice contained in this Internet email are subject to the terms and conditions expressed in any applicable governing ING Barings' terms of business or client engagement letter. Visit us at www.ingbarings.com --