Re: variable number of inputs
I was asking a very similar question to the mailing list a few days ago. This is the conclusion I did draw from the answers I got: The answers are: - Struts 1.0 does not support variable indexing - there exists a workaround employing some JSP code(see below) - there exists an inofficial implementation of the feature by Dave Hayes on http://www.husted.com/about/struts/resources.htm#extensions (I did not employ it, as I want to stick with the official Struts). The solution to my problem thus looks like that: ... html:form name=report type=ReportForm scope=session action=log.do % String accountVal = null; % % String amountVal = null; % % String remarkVal = null; % logic:iterate name=report property=entries scope=session id=entry indexId=entryId tr td#bean:write name=entryId//td td % accountVal = entry[ + entryId + ].account; % html:text property=%=accountVal%/ /td td % amountVal = entry[ + entryId + ].amount; % html:text property=%=amountVal%/ /td td % remarkVal = entry[ + entryId + ].remark; % html:text property=%=remarkVal%/ /td /tr /logic:iterate ... /html:form ... |-+| |Guido Roth |SYSTOR AG | | || | || | Tel. +41 1 405 35 12 | Fax +41 1 405 31 13 | | || | || | [EMAIL PROTECTED] | Baslerstr. 60 | | | 8048 Zürich | |-+| Mike Thompson mrt@instanton. To: [EMAIL PROTECTED] com cc: Subject: Re: variable number of inputs 03.07.2001 16:01 Please respond to struts-user Struts does not necessairly create an ActionForm out of the returned data, it uses the current one and repopulates it via the property names specified in your html:form. What you need are indexed properties, see archive. You'll end up having something like: throw all this in an iterate tag to iterate over all the rows in your form. You'll need to declare an index variable in your jsp. html:form action=/lookup table % int index = 0; % !-- iterate tag goes here -- tr tdhtml:text property='%= person[ + index + ].first %'//td tdhtml:text property='%= person[ + index + ].last %'//td tdhtml:text property='%= person[ + index + ].phone %'//td /tr % ++index; % /table /html:form - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 8:21 AM Subject: variable number of inputs Newbie question... I need to have a table where each row will have multiple input fields and these fields make up a single record of information. I do not know before I generate the table how many rows it will have. When the user modifies this table and sends it back, struts will want to make an ActionForm out of the returned data. The question is, how do I handle the variable number of rows? For example, if each row has a first name, last name, and phone number, and I happen to have two rows, I might do something like: html:form action=/lookup table tr tdhtml:text property=first//td tdhtml:text property=last//td tdhtml:text property=phone//td /tr tr tdhtml:text property=first//td tdhtml:text property=last//td tdhtml:text property=phone//td /tr /table /html:form (Of course, since the number of rows is variable, I'd actually do that
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi, you got it i couldn't recall what i had done as i have been install a few taglib's in order to have the right tools . Anyway i will try out your suggestion. Much appreciated for you help.Can't wait when i get a clear understanding of jsp and beans. Cheers Chuckie Peter Alfors wrote: Ahh... I think I see what you are trying to do. You have your own modified version of the AcitonMappings class. If you want to add classes to the web-inf/classes directory, then you will need to add the appropriate directory structure that corresponds to the package. Therefore, make an web-inf/classes/org/apache/struts/action directory and place your ActionMapping class in it. HTH, Pete Chuck Amadi wrote: Hi does explain anything that can be digestable and config my .java files problems as i am aware that i have declared the right package path. except for ActionMappings.class thus any suggstions. I have inc a visual of the problem. Cheers all Calvin Yu wrote: Is struts.jar in WEB-INF/lib? If so, check to make sure ActionMappings.class is in it. The package name is correct, its just that javac cannot find the struts.jar. Calvin - Original Message - From: Chuck Amadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 9:13 AM Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont compile Hi, pls can some one confirm the package name for ActionMappings as i recieve the following error. I am aware that i have the incorrect package thus were does ActionMappings reside. Cheers Chuck WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found in type declaration or import. import org.apache.struts.action.ActionMapping; ^ WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in type declaration or import. import org.apache.struts.action.ActionForm; ^ WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found in type declaration or import. import org.apache.struts.action.ActionErrors; ^ WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in type declaration or import. import org.apache.struts.action.ActionError; ^ WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in type declaration or import. public final class LogonForm extends ActionForm { ^ WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found in type declaration or import. public void reset(ActionMapping mapping, HttpServletRequest request) { ^ WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found in type declaration or import. public ActionErrors validate(ActionMapping mapping, ^ WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found in type declaration or import. public ActionErrors validate(ActionMapping mapping, ^ 8 errors Errors compiling LogonForm. Chuck Amadi wrote: Hi, pls could anyone confirm the ActionMappings package ActionForward package name within WBE-INF\classes\. dir as im lead to believe this might be the cause of my problems. Chuck Amadi wrote: Part 1.1Type: Plain Text (text/plain) Encoding: 8bit -- 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
Database Access
I'm currently using Struts connection pooling facilities from Action classes. Now I'm going to implement data access logic in my data access components, but I'm not sure that how can I still use struts based connection pooling. Do I have to transfer DataSource object or servlet ocject from Action to data access component, or can I get that directly from my data access component? I'm not using EJBs right now, because I'm still learning the basics. Can someone give me an example how to coordinate moving data from dao to value objects. Some class examples would be great. Or how in general is the best way to implement database interactions in struts (not using ejbs)? I know that it may depend on what you are doing, but is there some common pattern that can be used? -- Aapo Laakkonen, +358 (50) 33 99 682, ProjectCast Ltd, Helsinki, Finland.
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi, Peter i have completed the file structure albiet it is sensative to the hyphen separting. package WEB-INF.classes.org.apache.struts; Thus i am aware that i have to use the dot notation.or can i begin the package path from say org\apache\struts\action\ActionMappings.java Cheers Chuck. Peter Alfors wrote: Ahh... I think I see what you are trying to do. You have your own modified version of the AcitonMappings class. If you want to add classes to the web-inf/classes directory, then you will need to add the appropriate directory structure that corresponds to the package. Therefore, make an web-inf/classes/org/apache/struts/action directory and place your ActionMapping class in it. HTH, Pete Chuck Amadi wrote: > Hi does explain anything that can be digestable and config my .java files > problems as i am aware that i have declared the right package path. except for > ActionMappings.class thus any suggstions. > I have inc a visual of the problem. > > Cheers all > > Calvin Yu wrote: > > > Is struts.jar in WEB-INF/lib? If so, check to make sure > > ActionMappings.class is in it. The package name is correct, its just that > > javac cannot find the struts.jar. > > > > Calvin > > > > - Original Message - > > From: "Chuck Amadi" [EMAIL PROTECTED]> > > To: [EMAIL PROTECTED]> > > Sent: Tuesday, July 03, 2001 9:13 AM > > Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont > > compile > > > > > Hi, pls can some one confirm the package name for ActionMappings as i > > > recieve the following error. > > > > > > I am aware that i have the incorrect package thus were does ActionMappings > > > reside. > > > Cheers Chuck > > > > > > WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found > > > in type declaration or import. > > > import org.apache.struts.action.ActionMapping; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionForm; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found > > in > > > type declaration or import. > > > import org.apache.struts.action.ActionErrors; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionError; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in > > > type declaration or import. > > > public final class LogonForm extends ActionForm { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found > > > in type declaration or import. > > > public void reset(ActionMapping mapping, HttpServletRequest request) { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > 8 errors > > > Errors compiling LogonForm. > > > > > > Chuck Amadi wrote: > > > > > > > Hi, pls could anyone confirm the ActionMappings package ActionForward > > > > package name within WBE-INF\classes\. dir as im lead to believe this > > > > might be the cause of my problems. > > > > > > > > Chuck Amadi wrote: > > > > > > > > > Part 1.1 Type: Plain Text (text/plain) > > > > > Encoding: 8bit > > > > > > > > -- > > > > 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
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi, again i believe that i can create a classes dir at the same level as WEB-INF\ Thus if i C P and thereby i will then i have a class path as follows classes\org.apache.struts.action.ActionMapping.class is this feasiable as i can do away with hyphen within WEB-INF. Peter Alfors wrote: Ahh... I think I see what you are trying to do. You have your own modified version of the AcitonMappings class. If you want to add classes to the web-inf/classes directory, then you will need to add the appropriate directory structure that corresponds to the package. Therefore, make an web-inf/classes/org/apache/struts/action directory and place your ActionMapping class in it. HTH, Pete Chuck Amadi wrote: > Hi does explain anything that can be digestable and config my .java files > problems as i am aware that i have declared the right package path. except for > ActionMappings.class thus any suggstions. > I have inc a visual of the problem. > > Cheers all > > Calvin Yu wrote: > > > Is struts.jar in WEB-INF/lib? If so, check to make sure > > ActionMappings.class is in it. The package name is correct, its just that > > javac cannot find the struts.jar. > > > > Calvin > > > > - Original Message - > > From: "Chuck Amadi" [EMAIL PROTECTED]> > > To: [EMAIL PROTECTED]> > > Sent: Tuesday, July 03, 2001 9:13 AM > > Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont > > compile > > > > > Hi, pls can some one confirm the package name for ActionMappings as i > > > recieve the following error. > > > > > > I am aware that i have the incorrect package thus were does ActionMappings > > > reside. > > > Cheers Chuck > > > > > > WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found > > > in type declaration or import. > > > import org.apache.struts.action.ActionMapping; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionForm; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found > > in > > > type declaration or import. > > > import org.apache.struts.action.ActionErrors; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionError; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in > > > type declaration or import. > > > public final class LogonForm extends ActionForm { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found > > > in type declaration or import. > > > public void reset(ActionMapping mapping, HttpServletRequest request) { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > 8 errors > > > Errors compiling LogonForm. > > > > > > Chuck Amadi wrote: > > > > > > > Hi, pls could anyone confirm the ActionMappings package ActionForward > > > > package name within WBE-INF\classes\. dir as im lead to believe this > > > > might be the cause of my problems. > > > > > > > > Chuck Amadi wrote: > > > > > > > > > Part 1.1 Type: Plain Text (text/plain) > > > > > Encoding: 8bit > > > > > > > > -- > > > > 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 dilwch
Re: Problems with iterate
That was supposed to be indexed iterator tag . Might not be in the struts - official build Suhas - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 9:37 AM Subject: RE: Problems with iterate Hi There is according to documentation and TLD no attribute 'indexed' for the html:text-tag in Struts 1.0. What version of Struts are you using? Guido |-+| |Guido Roth |SYSTOR AG | | || | || | Tel. +41 1 405 35 12 | Fax +41 1 405 31 13 | | || | || | [EMAIL PROTECTED] | Baslerstr. 60 | | | 8048 Zürich | |-+| Torsten Terp torsten@terps. To: [EMAIL PROTECTED] dk cc: Subject: RE: Problems with iterate 03.07.2001 22:52 Please respond to struts-user Hi, I did make your example work, thank you! However, i must admit, that if i use struts and have to use jsp scriplet code, i think the idea is somehow lost! By using the index struts extension it is possible to make the same thing work like below. A little nicer i think logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId indexed=true/ tr td width=150 html:text size=20 name=contacts property=contactFirstNames indexed=true/ /td td width=150 html:text size=20 name=contacts property=contactLastName indexed=true/ /td /tr /logic:iterate ^terp -Original Message- From: Merikan Peter [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 9:20 AM To: '[EMAIL PROTECTED]' Subject: RE: Problems with iterate Here is a working example of nested properties in an iterator. All I need is an indexed getter and setter for address in my testBean.( getAddress(int index) ) % String propertyValue = null;% logic:iterate id=address name=testBean property=addresses indexId =addressIndex tr td valign=top Index #[bean:write name=addressIndex/] /td td table border=0 tr thStreet:/th td % propertyValue = address[ + addressIndex + ].street; % html:text property=%=propertyValue%/ /td /tr tr thZip Code:/th td % propertyValue = address[ + addressIndex + ].zipCode; % html:text property=%=propertyValue%/ /td /tr /table /td /tr /logic:iterate /Peter -Original Message- From: Torsten Terp [mailto:[EMAIL PROTECTED]] Sent: den 1 juli 2001 20:01 To: Struts user list Subject: Problems with iterate Hi, Sorry if this has been answered before, but i havent been able to find an answer! Im using iterate to display a vector containg valueobjects, i.e., html:form action=showContacts logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId/ tr td width=150 html:text name=contacts property=firstName size=20/ /td td width=150 html:text name=contacts property=lastName size=20/ /td /tr ... ... 'form' is my struts form bean, 'contactDataVector' is a vector of 'contactData' objects each containing (among others) the variables 'firstName' and 'lastName'. There is no problem in displaying the data, all goes well, but updating fields in the form is not working, when i want to save the changes in the struts action the vector is null! I can see that making a variable 'firstName' in the form, results in a call to its setter method, i.e., i can make it work when updating a single row, but i cant manage to get the update to work on the actual contactData objects in the vector. ?!?! Any advices out there?? ^terp
RE: does struts provide multip-channel rendering?
Hi Aysen, No Struts does not explicitly support multi channel rendering. You can use Struts to simplify the generation of an xml file you can then transform (XSLT) this into which ever channel you require. There are examples of doing this at : http://www.javaworld.com/jw-02-2001/jw-0209-xmlj2ee.html http://www-106.ibm.com/developerworks/library/x-xmlist1/index.html http://www-106.ibm.com/developerworks/library/x-xmlist2/index.html Jon. -Original Message- From: Aysen Bankeroglu [mailto:[EMAIL PROTECTED]] Sent: 03 July 2001 11:40 To: '[EMAIL PROTECTED]' Subject: does struts provide multip-channel rendering? Hi All! How does struts support if i want to render my pages to different devices other than browser, for example a WAP device?? thanks, aysen DISCLAIMER: This e-mail contains Proprietary information some or all of which may be legally privileged. It is for the intended recipient only. If an addressing or transmission error has misdirected this e-mail, please notify the author by replying to this e-mail. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on this e-mail. All information contained within this e-mail is subject to the Terms Conditions of Valtech Ltd. which are available upon request.
RE: Problems with iterate
Hi, Im using the proposed index extension, made by Dave Hay. It can be found on Ted Husted's site: http://www.husted.com/about/struts/resources.htm#extensions - Indexed Tags ^terp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 04, 2001 10:37 AM To: [EMAIL PROTECTED] Subject: RE: Problems with iterate Hi There is according to documentation and TLD no attribute 'indexed' for the html:text-tag in Struts 1.0. What version of Struts are you using? Guido |-+| |Guido Roth |SYSTOR AG | | || | || | Tel. +41 1 405 35 12 | Fax +41 1 405 31 13 | | || | || | [EMAIL PROTECTED] | Baslerstr. 60 | | | 8048 Zürich | |-+| Torsten Terp torsten@terps. To: [EMAIL PROTECTED] dk cc: Subject: RE: Problems with iterate 03.07.2001 22:52 Please respond to struts-user Hi, I did make your example work, thank you! However, i must admit, that if i use struts and have to use jsp scriplet code, i think the idea is somehow lost! By using the index struts extension it is possible to make the same thing work like below. A little nicer i think logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId indexed=true/ tr td width=150 html:text size=20 name=contacts property=contactFirstNames indexed=true/ /td td width=150 html:text size=20 name=contacts property=contactLastName indexed=true/ /td /tr /logic:iterate ^terp -Original Message- From: Merikan Peter [mailto:[EMAIL PROTECTED]] Sent: Monday, July 02, 2001 9:20 AM To: '[EMAIL PROTECTED]' Subject: RE: Problems with iterate Here is a working example of nested properties in an iterator. All I need is an indexed getter and setter for address in my testBean.( getAddress(int index) ) % String propertyValue = null;% logic:iterate id=address name=testBean property=addresses indexId =addressIndex tr td valign=top Index #[bean:write name=addressIndex/] /td td table border=0 tr thStreet:/th td % propertyValue = address[ + addressIndex + ].street; % html:text property=%=propertyValue%/ /td /tr tr thZip Code:/th td % propertyValue = address[ + addressIndex + ].zipCode; % html:text property=%=propertyValue%/ /td /tr /table /td /tr /logic:iterate /Peter -Original Message- From: Torsten Terp [mailto:[EMAIL PROTECTED]] Sent: den 1 juli 2001 20:01 To: Struts user list Subject: Problems with iterate Hi, Sorry if this has been answered before, but i havent been able to find an answer! Im using iterate to display a vector containg valueobjects, i.e., html:form action=showContacts logic:iterate id=contacts name=form property=contactDataVector html:hidden name=contacts property=contactId/ tr td width=150 html:text name=contacts property=firstName size=20/ /td td width=150 html:text name=contacts property=lastName size=20/ /td /tr ... ... 'form' is my struts form bean, 'contactDataVector' is a vector of 'contactData' objects each containing (among others) the variables 'firstName' and 'lastName'. There is no problem in displaying the data, all goes well, but updating fields in the form is not working, when i want to save the changes in the struts action the vector is null! I can see that making a variable 'firstName' in the form, results in a call to its setter method, i.e., i can make it work when updating a single row, but i cant manage to get the update to work on the actual contactData objects in the vector. ?!?! Any advices out there?? ^terp
Access a relational database, problem
I want to access relational database via Struts and JDBC. At Struts-User-Guide, 2.6, are instructions for creating the data-source - section at struts-config.xml and a example perform-Method for access. But it does not work, I can make a connect manual, but not with the struts data-source configuration: javax.sql.DataSource dataSource = servlet.findDataSource(null); dataSource is null after this row, so it didn´t find a datasource, although the data-source configuration is correct?! I would be glad if you can help me! Maik Mrazovic T - S y s t e m s debis Systemhaus MEB GmbHBusiness Center Sales eBusiness, RD/VN Erich-Herion Str. 13 70736 Fellbach(Phone) +49 711 17-40549(Mobile) +49 170 832-5616(email) [EMAIL PROTECTED]Internet: http://www.t-systems.de
Frame
There's a frame (frizq-admin_imgs.jsp) that works alone (as a page), but I can't make it work = as a frame. It produces a ServletException, I don't know why. The frame-parent-pages are these: html head titleAdministración de imágenes --- Generación Dinámica de Webs/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head frameset rows=120,* frameborder=NO border=0 framespacing=0 frame name=frsup src=frsup-admin_imgs.jsp scrolling=NO frame name=bottomFrame scrolling=NO noresize src=frinf-admin_imgs.jsp /frameset noframes body bgcolor=#FF text=#00 /body /noframes /html frinf-admin_imgs.jsp: html head titleAdministración de imágenes --- Generación Dinámica de Webs/title meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /head frameset cols=320,* frameborder=NO border=0 framespacing=0 frame name=frizq src=frizq-admin_imgs.jsp marginwidth=0 marginheight=0 scrolling=NO frame name=frder scrolling=NO noresize src=frder-admin_imgs.jsp marginwidth=0 marginheight=0 /frameset noframes body bgcolor=#FF text=#00 /body /noframes /html Must I put any struts-tag on them, or something so? Any idea? Any similar example? Thank-you everybody!
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi , i have located and redeployed struts-package ( jakarta-struts1-.0-b2) to tomcat-3.2.2 . Thus renemd the struts-blank to bbnp ( my other webapp is bbnpa ) anyway on restarting tomcat -3.2.2 i have the following - ROOT,admin,bbnpa(original webapp),examples,bbnp(struts-blank),test the other struts-files. Thus the claases within these files all work albeit i still cant find Action Classes. I have also tried the \struts-examples.index.jsp and everything compiled. So i am continplating transfering my old to the new bbnp (webapp).And then redploy all the jar's tld's. Any pointers to were that Action Class is or is it a Abstract class - final modifer (can't be over ridden). Peter Alfors wrote: Are you looking for the ActionMapping class file or java file? either way, it should be in your download of struts??? Pete Chuck Amadi wrote: > Hi yes all my jar files are in WEB-INf\lib.Could you post a snippet of > ActionMappings.class. > As i have located a copy in the struts-example in another application albeit i > can't access it. > Cheers Chuck > > Calvin Yu wrote: > > > Is struts.jar in WEB-INF/lib? If so, check to make sure > > ActionMappings.class is in it. The package name is correct, its just that > > javac cannot find the struts.jar. > > > > Calvin > > > > - Original Message - > > From: "Chuck Amadi" [EMAIL PROTECTED]> > > To: [EMAIL PROTECTED]> > > Sent: Tuesday, July 03, 2001 9:13 AM > > Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont > > compile > > > > > Hi, pls can some one confirm the package name for ActionMappings as i > > > recieve the following error. > > > > > > I am aware that i have the incorrect package thus were does ActionMappings > > > reside. > > > Cheers Chuck > > > > > > WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found > > > in type declaration or import. > > > import org.apache.struts.action.ActionMapping; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionForm; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found > > in > > > type declaration or import. > > > import org.apache.struts.action.ActionErrors; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in > > > type declaration or import. > > > import org.apache.struts.action.ActionError; > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in > > > type declaration or import. > > > public final class LogonForm extends ActionForm { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found > > > in type declaration or import. > > > public void reset(ActionMapping mapping, HttpServletRequest request) { > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found > > > in type declaration or import. > > > public ActionErrors validate(ActionMapping mapping, > > > ^ > > > 8 errors > > > Errors compiling LogonForm. > > > > > > Chuck Amadi wrote: > > > > > > > Hi, pls could anyone confirm the ActionMappings package ActionForward > > > > package name within WBE-INF\classes\. dir as im lead to believe this > > > > might be the cause of my problems. > > > > > > > > Chuck Amadi wrote: > > > > > > > > > Part 1.1 Type: Plain Text (text/plain) > > > > > Encoding: 8bit > > > > > > > > -- > > > > 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
Re: SV: pls Help Invalid Package Declartions .java File Wont compile
Hi again, i have encountered within the strus-examples a class path that states the wrong name.I have attached a visual for your perusal. Please comment Cheers chuck. Peter Alfors wrote: Are you looking for the ActionMapping class file or java file? either way, it should be in your download of struts??? Pete Chuck Amadi wrote: Hi yes all my jar files are in WEB-INf\lib.Could you post a snippet of ActionMappings.class. As i have located a copy in the struts-example in another application albeit i can't access it. Cheers Chuck Calvin Yu wrote: Is struts.jar in WEB-INF/lib? If so, check to make sure ActionMappings.class is in it. The package name is correct, its just that javac cannot find the struts.jar. Calvin - Original Message - From: Chuck Amadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 9:13 AM Subject: Re: SV: pls Help Invalid Package Declartions .java File Wont compile Hi, pls can some one confirm the package name for ActionMappings as i recieve the following error. I am aware that i have the incorrect package thus were does ActionMappings reside. Cheers Chuck WEB-INF/classes/logon/LogonForm.java [70:1] Class ActionMapping not found in type declaration or import. import org.apache.struts.action.ActionMapping; ^ WEB-INF/classes/logon/LogonForm.java [69:1] Class ActionForm not found in type declaration or import. import org.apache.struts.action.ActionForm; ^ WEB-INF/classes/logon/LogonForm.java [68:1] Class ActionErrors not found in type declaration or import. import org.apache.struts.action.ActionErrors; ^ WEB-INF/classes/logon/LogonForm.java [67:1] Class ActionError not found in type declaration or import. import org.apache.struts.action.ActionError; ^ WEB-INF/classes/logon/LogonForm.java [85:1] Class ActionForm not found in type declaration or import. public final class LogonForm extends ActionForm { ^ WEB-INF/classes/logon/LogonForm.java [159:1] Class ActionMapping not found in type declaration or import. public void reset(ActionMapping mapping, HttpServletRequest request) { ^ WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionErrors not found in type declaration or import. public ActionErrors validate(ActionMapping mapping, ^ WEB-INF/classes/logon/LogonForm.java [177:1] Class ActionMapping not found in type declaration or import. public ActionErrors validate(ActionMapping mapping, ^ 8 errors Errors compiling LogonForm. Chuck Amadi wrote: Hi, pls could anyone confirm the ActionMappings package ActionForward package name within WBE-INF\classes\. dir as im lead to believe this might be the cause of my problems. Chuck Amadi wrote: Part 1.1Type: Plain Text (text/plain) Encoding: 8bit -- 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 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
specifying multiple forms in an action mapping
hi i would like to use two different forms in an action class... kindly advise as to how to specify the action mapping thanks shyamala.
What are the chances of getting struts up and running on Iplanet WebServer 4.1???
Subject says it all... been reading the additional installtion instructions for 4.2, and it seems quite easy...but what about 4.1 thanks! Mikkel Bruun [EMAIL PROTECTED] Valtech Kanonbaadsvej 10 DK-1433 Copenhagen Tel +45 32 88 20 00 Fax +45 32 88 20 20 Direct + 45 32 88 22 73
RE: Help with Resources !!
I also had index.title not found ClassNotFoundException occurring in struts-example other webapps (Windows 98, Tomcat3.2.2, struts-1.0-b3). My Action Form classes weren't found by struts but I could instantiate them directly in a JSP. Does this imply that when a class is loaded from java code in a JSP the class loading is different than when loaded by the struts action servlet? http://www.husted.com/about/struts/kickstart.html#jar explains about classpath struts.jar (lots of other useful stuff there too). After conforming to this I still had the problems. After experiments the problem cleared. I suspect the solution was that I shutdown Tomcat, deleted the webapps/struts-stub directory webapps/struts-stub.war restarted Tomcat. Sorry I haven't spent the time to prove this but any-one else with these problems could try it. Keith --- Jyothi Palvai [EMAIL PROTECTED] wrote: The struts.jar should contain the property file. This is how I fixed this problem. And check whether the web.xml has the right path to the property file. Jyothi -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: Monday, July 03, 2000 4:09 AM To: [EMAIL PROTECTED] Subject: Re: Help with Resources !! Dunno . but u can try this. check ur application's web-inf/lib folder . should have struts.jar in it Then do not set any classpath to struts.jar using set classpath = explicitely . that's what I read in mailing list before Check this out Suhas - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 7:05 AM Subject: Re: Help with Resources !! Yes, it is there. Actually I am trying to run the struts-example application that came with Struts. I checked that the ApplicationResources file is in proper place and contains the key : index.title. I am running on Windows NT. Actually I looked up the mail archive and found a similar problem faced by a Windows 2000 user. No solution to this problem was posted in the thread. --- Pham Thanh Quan [EMAIL PROTECTED] wrote: Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Help with Resources !!
Verify the path to the ApplicationResources.properties file in web.xml is correct. Solved my problem.. -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 04, July, 2001 15:26 To: [EMAIL PROTECTED] Subject: RE: Help with Resources !! I also had index.title not found ClassNotFoundException occurring in struts-example other webapps (Windows 98, Tomcat3.2.2, struts-1.0-b3). My Action Form classes weren't found by struts but I could instantiate them directly in a JSP. Does this imply that when a class is loaded from java code in a JSP the class loading is different than when loaded by the struts action servlet? http://www.husted.com/about/struts/kickstart.html#jar explains about classpath struts.jar (lots of other useful stuff there too). After conforming to this I still had the problems. After experiments the problem cleared. I suspect the solution was that I shutdown Tomcat, deleted the webapps/struts-stub directory webapps/struts-stub.war restarted Tomcat. Sorry I haven't spent the time to prove this but any-one else with these problems could try it. Keith --- Jyothi Palvai [EMAIL PROTECTED] wrote: The struts.jar should contain the property file. This is how I fixed this problem. And check whether the web.xml has the right path to the property file. Jyothi -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: Monday, July 03, 2000 4:09 AM To: [EMAIL PROTECTED] Subject: Re: Help with Resources !! Dunno . but u can try this. check ur application's web-inf/lib folder . should have struts.jar in it Then do not set any classpath to struts.jar using set classpath = explicitely . that's what I read in mailing list before Check this out Suhas - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 7:05 AM Subject: Re: Help with Resources !! Yes, it is there. Actually I am trying to run the struts-example application that came with Struts. I checked that the ApplicationResources file is in proper place and contains the key : index.title. I am running on Windows NT. Actually I looked up the mail archive and found a similar problem faced by a Windows 2000 user. No solution to this problem was posted in the thread. --- Pham Thanh Quan [EMAIL PROTECTED] wrote: Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Forwarding/redirecting to action mappings rather than directly to JSPs
Hi I have an action classfrom which I need to forward to another action mapping (rather than directly to a JSP), and I have managed to get this working by setting up a global forward to an absolute path with rediredt set to true as follows: global-forwards forward name="myForward" path="http://myServer/myDB/myApp/myMapping.do" redirect="true"/ /global-forwards Apart from the inconvenience of having to change the path in struts-config.xml for each deployment, this was fine. Now however I am trying to deploy to a 2 different servers (to which requests are forwarded tofrom a load balancing server). Both these servers share the same database (and therefore the same war file) and so the above forward will failwhen accessed from the other server. The best way to do this would be to use a relative path, but this errors at runtime saying the path must be absolute. Another way would be to add the forward dynamically to the ActionServlet at runtime but I don't know how to get a reference to the servlet instance so I can call its methods. Any help is appreciated Jim
Lookup ejb's in action classes
Title: Message I have a problem performin lookup on my ejb's in struts action classes. I always get NameNotFoundException. I'm pretty sure that my ejb-jar.xml and web.xml are correct. Is this a common problem accessing the Context through the struts action classes? I'm using orion 1.5.2 app. server. Code from my action class.. .. Context ctx = new InitialContext(); Object homeObject = ctx.lookup("java:comp/env/ejbUserManagement"); //throws NameNotFoundException here.home = (UserManagementHome)PortableRemoteObject.narrow(homeObject, UserManagementHome.class); .. As I said before I am pretty sure that my ejb-jar.xml and web.xml are correct so what could be causing this? I've tried almost everything I can think of.. Any ideas..
Re: Forwarding/redirecting to action mappings rather than directly to JSPs
The relative path redirect issue is likely caused by Silverstream (as of 3.7.1) not fully implementing the servlet 2.2 spec. Ifso I'm left with trying to add the forwards to the actionservlet at runtime. - Original Message - From: Jim Quittenton To: [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 4:55 PM Subject: Forwarding/redirecting to action mappings rather than directly to JSPs Hi I have an action classfrom which I need to forward to another action mapping (rather than directly to a JSP), and I have managed to get this working by setting up a global forward to an absolute path with rediredt set to true as follows: global-forwards forward name="myForward" path="http://myServer/myDB/myApp/myMapping.do" redirect="true"/ /global-forwards Apart from the inconvenience of having to change the path in struts-config.xml for each deployment, this was fine. Now however I am trying to deploy to a 2 different servers (to which requests are forwarded tofrom a load balancing server). Both these servers share the same database (and therefore the same war file) and so the above forward will failwhen accessed from the other server. The best way to do this would be to use a relative path, but this errors at runtime saying the path must be absolute. Another way would be to add the forward dynamically to the ActionServlet at runtime but I don't know how to get a reference to the servlet instance so I can call its methods. Any help is appreciated Jim
Re: Help on making struts with Apache + Tomcat
You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
AW: Lookup ejb's in action classes
Title: Message hi, i use the jndi-browser that comes with sun's jndi-examples once in a while to check if my context contains what i expect to. on my last project with orion (but i did notuse struts) i also set java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.provider.url=ormi://localhost/appname java.naming.security.principal=user here java.naming.security.credentials=password here even though i call this from inside my jsps and it should possibly be not necessary - but it works. hope that helps. jan --Jan Heise / Tel: +49-170-4803237 / E-Mail: [EMAIL PROTECTED] -Ursprngliche Nachricht-Von: joi [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 4. Juli 2001 18:20An: [EMAIL PROTECTED]Betreff: Lookup ejb's in action classes I have a problem performin lookup on my ejb's in struts action classes. I always get NameNotFoundException. I'm pretty sure that my ejb-jar.xml and web.xml are correct. Is this a common problem accessing the Context through the struts action classes? I'm using orion 1.5.2 app. server. Code from my action class.. .. Context ctx = new InitialContext(); Object homeObject = ctx.lookup("java:comp/env/ejbUserManagement"); //throws NameNotFoundException here.home = (UserManagementHome)PortableRemoteObject.narrow(homeObject, UserManagementHome.class); .. As I said before I am pretty sure that my ejb-jar.xml and web.xml are correct so what could be causing this? I've tried almost everything I can think of.. Any ideas..
URL Re-writing?
I am new to struts/jsp/etc. I understand that the struts framework can automatically handle session management via URL re-writing if the user's browser does not permit cookies to be used. The funny thing is that sometimes, my browser shows a jsessionid value in the address box and other times it does not. I would expect that I would ONLY see this value if my browser had cookie support disabled and that all other times, I would see nothing as cookie support is enabled and URL re-writing is not required. What I actually see is that sometimes I do not see the value displayed and other times I will see it. Even when cookies are enabled, I may still see this value. I am puzzled. Any help is appreciated. Thanks, David Seattle
RE: Help on making struts with Apache + Tomcat
I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
Re: URL Re-writing?
David White typed the following on 11:10 AM 7/4/2001 -0700 What I actually see is that sometimes I do not see the value displayed and other times I will see it. Even when cookies are enabled, I may still see this value. On the first request to a web application, your browser will not have a cookie to send to the server. The server has no way of knowing whether your browser is accepting cookies, so URL's are rewritten in addition to sending the cookie. On subsequent requests the server gets the cookie so knows it doesn't need to rewrite the URLs. Kief
RE: NotEqual Tag to compare multiple properties to a value
You cant do that with the struts NotEqualTag you can however with the IF/THEN/ELSE tags I wrote which Ted Husted has posted on his site: http://www.husted.com/about/struts/resources.htm#extensions logic:if name="myForm" property="property1" op="NotEqual" value ="xxx" logic:and name="myForm" property="property2" op="NotEqual" value ="xxx"/ logic:and name="myForm" property="property3" op="NotEqual" value ="xxx"/ logic:then . /logic:then logic:else /logic:else /logic:if Niall -Original Message-From: Matt Raible [mailto:[EMAIL PROTECTED]]Sent: 03 July 2001 17:35To: Struts UserSubject: NotEqual Tag to compare multiple properties to a value Is it possible to use the notEqual tag to compare multiple properties to a single value? I'd like to write code similar to the following logic:notEqual name="myForm" properties="property1,property2" value="" do something if either propertynot equal to "" /logic:notEqual Thanks, Matt P.S. I figured out my issue below - it was an iPlanet bug. For value, I used value="%=""%" and it worked as expected. - Original Message - From: Matt Raible To: Struts User Sent: Monday, July 02, 2001 12:17 PM Subject: NotEqual or Present? I am trying to check if the user entered a value for a search criteria in a results page. My ActionForm sets a propertyto "" if the user did not enter a value. So in the following code, I want to only show it if the property does not equal "". But the following does not work, should it? logic:notEqual name="myForm" property="searchParam" value="" show this if property "searchParam" is not equal to "" /logic:notEqual Thanks, Matt
Report to Recipient(s)
Incident Information:- Originator:Niall Pemberton [EMAIL PROTECTED] Recipients:[EMAIL PROTECTED] Subject: RE: NotEqual Tag to compare multiple properties to a value Message from Niall Pemberton [EMAIL PROTECTED] was quarantined because it contained banned content.
Re: Help on making struts with Apache + Tomcat
This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
Team development with struts
Our team is starting to use Struts, that means each developer needs to edit struts-config.xml and *.properties files. The issue we encountered is that several guys (12-15) want to edit these getting huge files at the same time. Of course, we are using currently source control by VSS, we thought about moving to CVS, but it won't completely let us avoid a headache. Can anyone give a suggestion how to solve this? Thanks.
RE: Help on making struts with Apache + Tomcat
Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
RE: Help on making struts with Apache + Tomcat
1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
RE: Help on making struts with Apache + Tomcat
Yes I have all that Indeed I have installed apache-soap and a couple of servlert/jsp apps ( not MVC ) that are working using Apache as a router from port 80 to port 8080 of tomcat. I don't know if Struts needs something special that relates to this Apache-Tomcat deployment. TKS -Mensaje original- De: Martin Duffy [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 04:44 p.m. Para: [EMAIL PROTECTED] Asunto: RE: Help on making struts with Apache + Tomcat 1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
Pls send a ActionMapping ActionForward snip
Hi, folks i have been utlising the struts framework and some hoe i modified the ActioMapping ActionForward thus would any one be so kind and post a snippet of the .class file as mine are still pre-compiled and wont compile to a class file. Thus all the remainder .java classes that are associated with the Actions .java Files are in the same state. Thus i have lost a lot of lead time as i am awaiting to use beans as most of my .jsp pages contain to much html i.e the forms etc. Please send us a snippet. Cheers
Re: Team development with struts
The namespace for the properties file can be arranged so that each developer can add new tokens to separate copies, and then the copies can be concatenated as part of the build process. The same sort of thing can also be done with the struts-config.xml if you follow the workaround recently posed by Dan Miser at http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10052.html -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel 716 737-3463. -- http://www.husted.com/about/struts/ Valeriy Zavidnoy wrote: Our team is starting to use Struts, that means each developer needs to edit struts-config.xml and *.properties files. The issue we encountered is that several guys (12-15) want to edit these getting huge files at the same time. Of course, we are using currently source control by VSS, we thought about moving to CVS, but it won't completely let us avoid a headache. Can anyone give a suggestion how to solve this? Thanks.
Re: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Cedric, very briefly tried adding flush="true" to alltemplate:get ... tags,resulted inthe following error:org.apache.jasper.JasperException: Attribute flush invalid according to the specified TLD. Jon, the browser used is IE5.5, there weren't any exceptions to the console. I've attached part of the source for the generated html, hopefully this will provide some clues, seems the template isbeing rendered at the bottom of the page minus the content. . . . .htmlheadtitleTemplates/titlelink rel="stylesheet"href="http://localhost:8080/jsptemplates/css/templates.css" charset="ISO-8859-1" type="text/css"/headbody background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif' table tr valign='top' td/td tdtable trtd/td/tr trtd/td/tr trtd/td/tr /table /td /tr /table/body/html
Re: Help on making struts with Apache + Tomcat
Hi, On Thu, 5 Jul 2001 08:05, Domingo Aguilera wrote: that are working using Apache as a router from port 80 to port 8080 of tomcat. You shouldn't be using http tunnelling, mod_jk is much better. Look at the mod_jk doco in the docs directory of the tomcat dist. cheesr dim I don't know if Struts needs something special that relates to this Apache-Tomcat deployment. TKS -Mensaje original- De: Martin Duffy [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 04:44 p.m. Para: [EMAIL PROTECTED] Asunto: RE: Help on making struts with Apache + Tomcat 1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
RE: Help on making struts with Apache + Tomcat
I am using mod_jserv.so and Tomcat 3.2.1 Platform is Mandrake Linux 7.1 I'll try mod_jk. TKS -Mensaje original- De: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 08:32 p.m. Para: [EMAIL PROTECTED]; Domingo Aguilera Asunto: Re: Help on making struts with Apache + Tomcat Hi, On Thu, 5 Jul 2001 08:05, Domingo Aguilera wrote: that are working using Apache as a router from port 80 to port 8080 of tomcat. You shouldn't be using http tunnelling, mod_jk is much better. Look at the mod_jk doco in the docs directory of the tomcat dist. cheesr dim I don't know if Struts needs something special that relates to this Apache-Tomcat deployment. TKS -Mensaje original- De: Martin Duffy [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 04:44 p.m. Para: [EMAIL PROTECTED] Asunto: RE: Help on making struts with Apache + Tomcat 1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
Re: Help on making struts with Apache + Tomcat
On Thu, 5 Jul 2001 11:31, you wrote: I am using mod_jserv.so and Tomcat 3.2.1 ok.. not that bad then (although yes, good to change).. you're not using apache as a router from port 80 to 8080... you're using the ajp connector (I think) which runs on 8007 or 8009 depending on which one you're using... to make struts work you'll need to have this in your httpd.conf (or mod_jk.conf) JkMount *.do ajp12 (or ajp13 depending on which you use) I've been brief here... I'll flesh it out more if you like. cheers dim Platform is Mandrake Linux 7.1 I'll try mod_jk. TKS -Mensaje original- De: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 08:32 p.m. Para: [EMAIL PROTECTED]; Domingo Aguilera Asunto: Re: Help on making struts with Apache + Tomcat Hi, On Thu, 5 Jul 2001 08:05, Domingo Aguilera wrote: that are working using Apache as a router from port 80 to port 8080 of tomcat. You shouldn't be using http tunnelling, mod_jk is much better. Look at the mod_jk doco in the docs directory of the tomcat dist. cheesr dim I don't know if Struts needs something special that relates to this Apache-Tomcat deployment. TKS -Mensaje original- De: Martin Duffy [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 04:44 p.m. Para: [EMAIL PROTECTED] Asunto: RE: Help on making struts with Apache + Tomcat 1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache + Tomcat, returns me a 403 HTTP error. I've carefully set up server.xml and tomcat-apache.conf , but can't make it run. My app is not under tomcat's webapp directory but under /home/xyzuser/app. Any suggestions?? Domingo Aguilera
RE: Help on making struts with Apache + Tomcat
That is correct. I m using the ajp connector on 8007. What I don't understand is why my struts app is the only one with the Apache + Jserv + Tomcat deployment , that doesn' t work. Even the struts-example is working... I've been using this configuration for apache-soap and other servlet/jsp apps without problems. This is the first time I have to lead with this ... Well I'll try the other glue ... Tks, Dimitri -Mensaje original- De: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 08:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat On Thu, 5 Jul 2001 11:31, you wrote: I am using mod_jserv.so and Tomcat 3.2.1 ok.. not that bad then (although yes, good to change).. you're not using apache as a router from port 80 to 8080... you're using the ajp connector (I think) which runs on 8007 or 8009 depending on which one you're using... to make struts work you'll need to have this in your httpd.conf (or mod_jk.conf) JkMount *.do ajp12 (or ajp13 depending on which you use) I've been brief here... I'll flesh it out more if you like. cheers dim Platform is Mandrake Linux 7.1 I'll try mod_jk. TKS -Mensaje original- De: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 08:32 p.m. Para: [EMAIL PROTECTED]; Domingo Aguilera Asunto: Re: Help on making struts with Apache + Tomcat Hi, On Thu, 5 Jul 2001 08:05, Domingo Aguilera wrote: that are working using Apache as a router from port 80 to port 8080 of tomcat. You shouldn't be using http tunnelling, mod_jk is much better. Look at the mod_jk doco in the docs directory of the tomcat dist. cheesr dim I don't know if Struts needs something special that relates to this Apache-Tomcat deployment. TKS -Mensaje original- De: Martin Duffy [mailto:[EMAIL PROTECTED]] Enviado el: Miércoles, 04 de Julio de 2001 04:44 p.m. Para: [EMAIL PROTECTED] Asunto: RE: Help on making struts with Apache + Tomcat 1. Do you have the jserv module for Tomcat in the Apache modules directory? 2. Do you have an include statement in your httpd.conf for including the settings for tomcat? something like include /tomcat/conf/tomcat-apache.conf (this is the auto genereated file that is created each time that tomcat starts) or if you edit yourself include /tomcat/conf/tomcat.conf IF you are using the jserv module then there needs to be a refernce for adding it to the apache startup. If you look in the tomcat-apache. conf file you will see the refernce to it at the top of the file. you have to iclude the conf file At Wednesday, 4 July 2001, you wrote: Tks for the help. The browser also tells me that. This is a problem of Apache not talking as desired to tomcat. When I run the app from tomcat ( port 8080 ) alone everything is right , but when trying to run from Apache (which is installed in port 80) this error is being reported. Under webapps the only difference is that I don't have a war file. Can this WAR file omission cause such problem? -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 02:49 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat This might help http://www.iqinternet.com/services/faq/4.htm Domingo Aguilera wrote: I moved the app to $TOMCAT_HOME/webapps but I'm still having the 403 error. By moving the app to $TOMCAT_HOME/webapps I'm avoiding the inclusion of a CONTEXT PATH tag in server.xml (as in struts-example). Also the tomcat-apache.conf file includes the directives very similar to what were related to struts-example, I mean: Alias Directory .. /Directory ApjServMount Location ... for the WEB-INF ... /Location Location ... for the META-INF ... /Location Indeed I am running other Apache + Tomcat non Struts web apps without a problem. -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de Rick Smith Enviado el: Miercoles, 04 de Julio de 2001 12:05 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Help on making struts with Apache + Tomcat You need to create a context or virtual host in the server.xml file. Domingo Aguilera wrote: Hi, I've been using the combination of Apache + tomcat 3.x I've sucessfully installed struts-documentation.war and struts-example.war . When tested both apps work from www.mysite.com:8080/struts-example/ (tomcat) and from www.mysite.com/struts-example/ ( apache + tomcat ) But when testing an app made by me , when attempting to run from tomcat alone works but from Apache +
RE: Help with Resources !!
Hi - The problem was that I had struts.jar in the environment classpath. Once I removed that, restarted Tomcat, the problem was solved. Cheers. - Debasish --- joi [EMAIL PROTECTED] wrote: Verify the path to the ApplicationResources.properties file in web.xml is correct. Solved my problem.. -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 04, July, 2001 15:26 To: [EMAIL PROTECTED] Subject: RE: Help with Resources !! I also had index.title not found ClassNotFoundException occurring in struts-example other webapps (Windows 98, Tomcat3.2.2, struts-1.0-b3). My Action Form classes weren't found by struts but I could instantiate them directly in a JSP. Does this imply that when a class is loaded from java code in a JSP the class loading is different than when loaded by the struts action servlet? http://www.husted.com/about/struts/kickstart.html#jar explains about classpath struts.jar (lots of other useful stuff there too). After conforming to this I still had the problems. After experiments the problem cleared. I suspect the solution was that I shutdown Tomcat, deleted the webapps/struts-stub directory webapps/struts-stub.war restarted Tomcat. Sorry I haven't spent the time to prove this but any-one else with these problems could try it. Keith --- Jyothi Palvai [EMAIL PROTECTED] wrote: The struts.jar should contain the property file. This is how I fixed this problem. And check whether the web.xml has the right path to the property file. Jyothi -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: Monday, July 03, 2000 4:09 AM To: [EMAIL PROTECTED] Subject: Re: Help with Resources !! Dunno . but u can try this. check ur application's web-inf/lib folder . should have struts.jar in it Then do not set any classpath to struts.jar using set classpath = explicitely . that's what I read in mailing list before Check this out Suhas - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 7:05 AM Subject: Re: Help with Resources !! Yes, it is there. Actually I am trying to run the struts-example application that came with Struts. I checked that the ApplicationResources file is in proper place and contains the key : index.title. I am running on Windows NT. Actually I looked up the mail archive and found a similar problem faced by a Windows 2000 user. No solution to this problem was posted in the thread. --- Pham Thanh Quan [EMAIL PROTECTED] wrote: Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Help with Resources !!
Hi - The problem was that I had struts.jar in the environment classpath. Once I removed that, restarted Tomcat, the problem was solved. Cheers. - Debasish --- joi [EMAIL PROTECTED] wrote: Verify the path to the ApplicationResources.properties file in web.xml is correct. Solved my problem.. -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, 04, July, 2001 15:26 To: [EMAIL PROTECTED] Subject: RE: Help with Resources !! I also had index.title not found ClassNotFoundException occurring in struts-example other webapps (Windows 98, Tomcat3.2.2, struts-1.0-b3). My Action Form classes weren't found by struts but I could instantiate them directly in a JSP. Does this imply that when a class is loaded from java code in a JSP the class loading is different than when loaded by the struts action servlet? http://www.husted.com/about/struts/kickstart.html#jar explains about classpath struts.jar (lots of other useful stuff there too). After conforming to this I still had the problems. After experiments the problem cleared. I suspect the solution was that I shutdown Tomcat, deleted the webapps/struts-stub directory webapps/struts-stub.war restarted Tomcat. Sorry I haven't spent the time to prove this but any-one else with these problems could try it. Keith --- Jyothi Palvai [EMAIL PROTECTED] wrote: The struts.jar should contain the property file. This is how I fixed this problem. And check whether the web.xml has the right path to the property file. Jyothi -Original Message- From: suhas [mailto:[EMAIL PROTECTED]] Sent: Monday, July 03, 2000 4:09 AM To: [EMAIL PROTECTED] Subject: Re: Help with Resources !! Dunno . but u can try this. check ur application's web-inf/lib folder . should have struts.jar in it Then do not set any classpath to struts.jar using set classpath = explicitely . that's what I read in mailing list before Check this out Suhas - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 7:05 AM Subject: Re: Help with Resources !! Yes, it is there. Actually I am trying to run the struts-example application that came with Struts. I checked that the ApplicationResources file is in proper place and contains the key : index.title. I am running on Windows NT. Actually I looked up the mail archive and found a similar problem faced by a Windows 2000 user. No solution to this problem was posted in the thread. --- Pham Thanh Quan [EMAIL PROTECTED] wrote: Whether there is the key index.title in your ApplicationResources file or not ? - Original Message - From: Debasish Ghosh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, July 03, 2001 11:17 AM Subject: Help with Resources !! Hello All - I am new to Struts and trying to run the Struts example applications. When I am starting Tomcat, everything loads fine (as found in the $TOMCAT_HOME/logs/servlet.log file). In fact the following gets logged in the file : 2001-07-02 08:38:46 - path=/struts-example :jsp: init 2001-07-02 08:38:46 - path=/struts-example :database: init 2001-07-02 08:38:46 - path=/struts-example :database: Initializing database servlet 2001-07-02 08:38:46 - path=/struts-example :database: Loading database from '/WEB-INF/database.xml' 2001-07-02 08:38:46 - path=/struts-example :action: init 2001-07-02 08:38:46 - path=/struts-example :action: Loading application resources from resource org.apache.struts.example.ApplicationResources 2001-07-02 08:38:46 - path=/struts-example :action: Initializing configuration from resource path /WEB-INF/struts-config.xml 2001-07-02 08:38:46 - path=/struts-example :action: Process servletName=action, urlPattern=*.do 2001-07-02 08:38:46 - path=/struts-example :action: Mapping for servlet 'action' = '*.do' But when I try to run the application in struts-example, I get the following error : javax.servlet.ServletException: Missing message for key index.title But the ApplicationResources file is in proper place, as given in the configuration files. Any help will be appreciated. Cheers. - Debasish __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
URL rewriting
how to achive url rewriting in sturts. rajiv
Re: URL rewriting
it is done internally by struts tags . That's one of the reason u are using struts tag instead of normal html tags . Suhas - Original Message - From: rajiv mulay To: [EMAIL PROTECTED] Sent: Thursday, July 05, 2001 10:22 AM Subject: URL rewriting how to achive url rewriting in sturts. rajiv