RE: urgent- exception in sending e-mail from application
Sheetal, Did you check port number used by mail server. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 11:49 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject RE: urgent- exception in sending e-mail from application Oh my mistake Actually Our network is 10.9.57.* And Smtp is on 10.9.55.29 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 11:53 AM To: Struts Users Mailing List Cc: Patil, Sheetal Subject: RE: urgent- exception in sending e-mail from application Sheetal, I don't think there is any problem with network, because if you are able to ping it, then it should connect also by your program but for this you need the port number. You are also saying that smtp server is not on your network but it is clear from the ip address that both are using same VLAN i.e. "57". so leave it and check the port used by you mail server. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 11:40 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject RE: urgent- exception in sending e-mail from application No smtp server is not on our network Our network is 10.9.57.* And Smtp is on 10.9.57.29 -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 11:32 AM To: Struts Users Mailing List Subject: RE: urgent- exception in sending e-mail from application Is it the same network? --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > Ye I can ping to host > > Pinging smtp-host-name [IP] with 32 bytes of data: > > Reply from IP: bytes=32 time=361ms TTL=125 > Reply from IP: bytes=32 time=323ms TTL=125 > Reply from IP: bytes=32 time=326ms TTL=125 > Reply from IP: bytes=32 time=252ms TTL=125 > > Ping statistics for IP: > Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), > Approximate round trip times in milli-seconds: > Minimum = 252ms, Maximum = 361ms, Average = 315ms > > > > -Original Message- > From: Mon Cab [mailto:[EMAIL PROTECTED] > Sent: Friday, June 16, 2006 11:12 AM > To: Struts Users Mailing List > Subject: RE: urgent- exception in sending e-mail from application > > Are you on the same network as the SMTP host? Can you ping the host? > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > Hi thx for reply > > > > I have tried to use the authentication, as u describe but still the > > exception is same > > > > Thanks > > Shital > > > > -Original Message- > > From: Mon Cab [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 16, 2006 10:48 AM > > To: Struts Users Mailing List > > Subject: Re: urgent- exception in sending e-mail from application > > > > Patil > > > > Your smtp server may require authentication. Find out and, if so, > > Add > > the following lines to your code. > > > > > > class MyAuthenticator extends Authenticator > > { > > protected PasswordAuthentication getPasswordAuthentication() > > { > > PasswordAuthentication pa = > > new > > PasswordAuthentication(username,password); > > return pa; > > } > > } > > > > props.put("mail.smtp.auth", "true"); > > Authenticator a1= new MyAuthenticator(); > > Session mailsession = Session.getDefaultInstance(props, a1); > > > > > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello friends > > > I am trying to send mail from my application > > > Here is the code > > > Properties properties = System.getProperties (); > > > properties.put ("mail.smtp.host","smtp host name"); > > > > > > Session session = Session.getDefaultInstance > > > (properties,null); > > > > > > Message message = new MimeMessage (session); > > > try > > > { > > > message.setFrom (new InternetAddress > > > ("[EMAIL PROTECTED]")); > > > message.setRecipient > (Message.RecipientType.TO,new > > > InternetAddress ("[EMAIL PROTECTED]")); > > > message.setSubject ("Hi "); > > > message.setText ("How is it going ?"); > > > message.setSentDate (new Date ()); > > > Transport.send (message); > > > System.out.println ("Message sent !!!"); > > > } > > > catch (MessagingException e) > > > { > > > e.printStackTrace (); > > > } > > > > > > But this code is giving me exception > > > javax.mail.MessagingException: Could not connect to SMTP host: > > > smtp-host-name, port: 25 > > > is there any additional setting's required for this one > > > plse let me know > > > Sp > > > > > > >
RE: urgent- exception in sending e-mail from application
Sheetal, I don't think there is any problem with network, because if you are able to ping it, then it should connect also by your program but for this you need the port number. You are also saying that smtp server is not on your network but it is clear from the ip address that both are using same VLAN i.e. "57". so leave it and check the port used by you mail server. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 11:40 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject RE: urgent- exception in sending e-mail from application No smtp server is not on our network Our network is 10.9.57.* And Smtp is on 10.9.57.29 -Original Message- From: Mon Cab [mailto:[EMAIL PROTECTED] Sent: Friday, June 16, 2006 11:32 AM To: Struts Users Mailing List Subject: RE: urgent- exception in sending e-mail from application Is it the same network? --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > Ye I can ping to host > > Pinging smtp-host-name [IP] with 32 bytes of data: > > Reply from IP: bytes=32 time=361ms TTL=125 > Reply from IP: bytes=32 time=323ms TTL=125 > Reply from IP: bytes=32 time=326ms TTL=125 > Reply from IP: bytes=32 time=252ms TTL=125 > > Ping statistics for IP: > Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), > Approximate round trip times in milli-seconds: > Minimum = 252ms, Maximum = 361ms, Average = 315ms > > > > -Original Message- > From: Mon Cab [mailto:[EMAIL PROTECTED] > Sent: Friday, June 16, 2006 11:12 AM > To: Struts Users Mailing List > Subject: RE: urgent- exception in sending e-mail from application > > Are you on the same network as the SMTP host? Can you ping the host? > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > Hi thx for reply > > > > I have tried to use the authentication, as u describe but still the > > exception is same > > > > Thanks > > Shital > > > > -Original Message- > > From: Mon Cab [mailto:[EMAIL PROTECTED] > > Sent: Friday, June 16, 2006 10:48 AM > > To: Struts Users Mailing List > > Subject: Re: urgent- exception in sending e-mail from application > > > > Patil > > > > Your smtp server may require authentication. Find out and, if so, > > Add > > the following lines to your code. > > > > > > class MyAuthenticator extends Authenticator > > { > > protected PasswordAuthentication getPasswordAuthentication() > > { > > PasswordAuthentication pa = > > new > > PasswordAuthentication(username,password); > > return pa; > > } > > } > > > > props.put("mail.smtp.auth", "true"); > > Authenticator a1= new MyAuthenticator(); > > Session mailsession = Session.getDefaultInstance(props, a1); > > > > > > > > --- "Patil, Sheetal" <[EMAIL PROTECTED]> wrote: > > > > > > > > Hello friends > > > I am trying to send mail from my application > > > Here is the code > > > Properties properties = System.getProperties (); > > > properties.put ("mail.smtp.host","smtp host name"); > > > > > > Session session = Session.getDefaultInstance > > > (properties,null); > > > > > > Message message = new MimeMessage (session); > > > try > > > { > > > message.setFrom (new InternetAddress > > > ("[EMAIL PROTECTED]")); > > > message.setRecipient > (Message.RecipientType.TO,new > > > InternetAddress ("[EMAIL PROTECTED]")); > > > message.setSubject ("Hi "); > > > message.setText ("How is it going ?"); > > > message.setSentDate (new Date ()); > > > Transport.send (message); > > > System.out.println ("Message sent !!!"); > > > } > > > catch (MessagingException e) > > > { > > > e.printStackTrace (); > > > } > > > > > > But this code is giving me exception > > > javax.mail.MessagingException: Could not connect to SMTP host: > > > smtp-host-name, port: 25 > > > is there any additional setting's required for this one > > > plse let me know > > > Sp > > > > > > > > > > > > __ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > __ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.y
Re: urgent- exception in sending e-mail from application
Sheetal, I think problem is with the port number only. Default port would always be 25 for the mail server and you are not specifying the any specific port number in your program it means it will pick the default port number but you should first check it with your network people that mail server uses the default port i.e. 25 or some other port. If some other port then set the port number also in your program. Check it, I think it will definitely wotk for you. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "Patil, Sheetal" <[EMAIL PROTECTED]> 06/16/2006 10:36 AM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject urgent- exception in sending e-mail from application Hello friends I am trying to send mail from my application Here is the code Properties properties = System.getProperties (); properties.put ("mail.smtp.host","smtp host name"); Session session = Session.getDefaultInstance (properties,null); Message message = new MimeMessage (session); try { message.setFrom (new InternetAddress ("[EMAIL PROTECTED]")); message.setRecipient (Message.RecipientType.TO,new InternetAddress ("[EMAIL PROTECTED]")); message.setSubject ("Hi "); message.setText ("How is it going ?"); message.setSentDate (new Date ()); Transport.send (message); System.out.println ("Message sent !!!"); } catch (MessagingException e) { e.printStackTrace (); } But this code is giving me exception javax.mail.MessagingException: Could not connect to SMTP host: usncex10.ad.diebold.com, port: 25 is there any additional setting's required for this one plse let me know Sp
Re: Action Forms in Session
Deepali, Following are the two methods of session object which you can use to get the all session attributes name and value: getAttributesName() : Return the Enumeration of String objects containing the name of all the objects bound in the session. getAttribute() :Return the object bound with the specified name in the session or null if no objects is bound under the name. Thanks & Regards Sunil Sahu Sr. Software Engineer Ph. +91-124-4047100 Ext. 752 "deepali sharma" <[EMAIL PROTECTED]> 06/16/2006 10:58 AM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Action Forms in Session Hi We are using struts.And in our application we are putting all forms in session. After completing the transaction we are clearing the form values. Is that after the transaction the forms are in session or will be deleted?? If I want to get which objects are in session how we can get that??? Is there any API to find out in struts/servlets cheers.. deepali
Re: how to deal with request attributes and validation?
Dario, In this situation, in the "input" attribute of action-mapping, you should provide the action-mapping which you want to execute to populate your drop-down in jsp. Usually we provide the JSP page in "input" attribute, but when you have to forward to JSP through any action, you should provide one more attribute in struts-config.xml file. In Controller tag, "inputForward" attribute should be set as "true", by default it is "false". In case of "false" value, you can not use action-mapping in "input" attribute, but in case of "true", you can. Consider following example.. Hope it helps. Thanks & Regards Sunil Sahu dario <[EMAIL PROTECTED]> 05/12/2006 02:05 PM Please respond to Struts Users Mailing List To user@struts.apache.org cc Subject how to deal with request attributes and validation? hello everybody, I'd like to know how do you deal with situations where you need to display some dynamic elements (menus, dropdowns...) on the page? putting those in the request scope in the action thus making them available to JSP, seems most naturally to me. problem is when form data does not pass validation, and action is never called, so JSP page breaks because it has no data to display. is there any proven tactics for this? basicly, i want some action/method executed even if validation fails, but still want validation to work and error messages passed to JSP. thanks a lot! dario - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing List in JSP
Sonu, Make two changes in your code, it will definitely work.. 1. Add the following line in your Action Class: request.setAttribute("myForm",myForm); 2. Modify the JSP code Hope it helps. Thanks & Regards Sunil Sahu Sonu S <[EMAIL PROTECTED]> 05/12/2006 10:27 AM Please respond to Struts Users Mailing List To user@struts.apache.org cc Subject Accessing List in JSP Hi 2 all I am using Struts 1.2 in my action class i am writing List testList = new ArrayList(); testList.add("str 1"); testList.add("str 2"); testList.add("str 3"); MyForm myForm = (MyForm) form; myForm.setMyList(testList); In Action Form i have done public class myForm extends ActionForm{ List myList; public List getMyList() { return MyList; } public void setMyList(List MyList) { this.MyList = MyList; } I want to access this List in JSP. I am trying butit is not working. I am trying Could u please tell me how to access List in JSP page Thank you With regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem while deployin
Anil, I think problem is with your validation.xml file. While doing the validation of a field (of form-bean) in validation.xml, we usually use the and element, and i think instead of writing element you have wrongly mentioned element somewhere in your validation.xml. Verify your validation.xml, it must be having wrong element name, and when container trying to verify this element against the DTD, it is giving exception. Hope it helps... Thanks & Regards Sunil Anil Kumar Pippalapalli <[EMAIL PROTECTED]> 05/11/2006 04:31 PM Please respond to Struts Users Mailing List To user@struts.apache.org cc Subject problem while deployin Hi all, I have a simple application which tries to validate user using username and password.The problem is when iam tryin to deploy application in tomcat 5.5, it gives out lots of errors. Iam furnishing the errors which i got, Any help would be appreciated, May 10, 2006 3:40:26 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on port 8080 May 10, 2006 3:40:26 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 3141 ms May 10, 2006 3:40:26 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina May 10, 2006 3:40:26 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/5.0.18 May 10, 2006 3:40:26 PM org.apache.catalina.core.StandardHost start INFO: XML validation disabled May 10, 2006 3:40:27 PM org.apache.catalina.core.StandardHost getDeployer INFO: Create Host deployer for direct deployment ( non-jmx ) May 10, 2006 3:40:27 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:F:\Tomcat 5.0\conf\Catalina\localhost\admin.xml May 10, 2006 3:40:29 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true May 10, 2006 3:40:29 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true May 10, 2006 3:40:31 PM org.apache.struts.util.PropertyMessageResources INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', returnNull=true May 10, 2006 3:40:34 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:F:\Tomcat 5.0\conf\Catalina\localhost\manager.xml May 10, 2006 3:40:35 PM org.apache.catalina.core.StandardHostDeployer install INFO: Processing Context configuration file URL file:F:\Tomcat 5.0\conf\Catalina\localhost\balancer.xml May 10, 2006 3:40:36 PM org.apache.catalina.core.StandardHostDeployer install INFO: Installing web application at context path /simplestruts from URL file:F:/Tomcat 5.0/webapps/simplestruts May 10, 2006 3:40:39 PM org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml' May 10, 2006 3:40:39 PM org.apache.struts.validator.ValidatorPlugIn initResources INFO: Loading validation rules file from '/WEB-INF/validation.xml' May 10, 2006 3:40:40 PM org.apache.commons.digester.Digester error SEVERE: Parse Error at line 50 column 35: Element type "va-value" must be declared. org.xml.sax.SAXParseException: Element type "va-value" must be declared. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1591) at org.apache.commons.validator.ValidatorResources.(ValidatorResources.java:159) at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237) at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162) at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336) at javax.servlet.GenericServlet.init(GenericServlet.java:256)
Re: Problems fetching struts-config DTD
Niklas, I think there is nothing to do with any kind of validation. When you refer a doctype in your struts-config.xml file, it will verify it from DTD which is part of struts.jar, either you can put jar file in such a place that classloader can load it (web-inf/lib) or you can place DTD file in web-inf folder of WAR. If DTD is not available then only it will try to connect to internet. First verify that struts.jar which is loaded by classloader is having this 1.3 DTD or not. Hope it helps.. Thanks & Regards Sunil [EMAIL PROTECTED] 05/11/2006 03:31 PM Please respond to Struts Users Mailing List To user@struts.apache.org cc Subject Problems fetching struts-config DTD Hi! I have a Struts webapp with a struts-config.xml that starts with the usual http://struts.apache.org/dtds/struts-config_1_3.dtd";> So when the web application is started Struts goes out to struts.apache.org to try to fetch the DTD file. This is becoming a problem since the Internet can't be reached from all environments that the web application is going to run in. What is the preferred way to handle this? Can you turn of validation so Struts never tries to fetch the DTD file? I have tried to add an init-param validating=false to web.xml (also tried validate=true) but that didn't seem to help. Can you put the DTD file locally womewhere inside the webapp and reference it in a way so that it works regardless of the environment? Thanks for any help! /Niklas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Developing and running Struts on Tomcat without an Internet Connection
Gurpreet, I have faced same problem and got the solution too. Actually I have taken struts-config.xml file from my old project and DOCTYPE in struts-config.xml was having old URL of apache given as bold in following doctype. http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";> While i was having newer version of jar file in which struts-config_1_2.dtd was having following DOCTYPE and URL of apache was newer one given as bold in follwoing doctype. http://struts.apache.org/dtds/struts-config_1_2.dtd";> Now if your computer is on internet then it will connect to http://jakarta.apache.org as well as http://struts.apache.org. On standalone computer it will try to resolve from DTD file in JAR file itself but due to mismatch it will not be able to resolve and then it will try to connect to internet and end result is "UnknownHostException" exception. Moral of he story is check DOCTYPE in your xml file and match it with corresponding DTD in struts.jar file. Hope it helps.. Sunil <[EMAIL PROTECTED]> 03/17/2006 09:07 PM Please respond to "Struts Users Mailing List" To cc Subject RE: Developing and running Struts on Tomcat without an Internet Connection You are referring to the tab lib files which are hosted on jakarta.apache.org website. When you are connected to the internet it get resolved by your web server and the moment you unhook it The problem starts. Best practice is to download the same tab lib files (Tld) and copy them in any of the folder under Your web application> once done change the path in your JSPs to load the tld file from your local path instead of jakarta.apache.org -Original Message- From: Richard Yee [mailto:[EMAIL PROTECTED] Sent: Thursday, March 16, 2006 9:28 PM To: Struts Users Mailing List Subject: Developing and running Struts on Tomcat without an Internet Connection I know this is supposed to work, but I'm getting an error starting up my Struts 1.2.8 application on Tomcat 5.5.15 when I unplug my computer from the Internet. The stack trace is: java.net.UnknownHostException: jakarta.apache.org at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177) at java.net.Socket.connect(Socket.java:507) at java.net.Socket.connect(Socket.java:457) at sun.net.NetworkClient.doConnect(NetworkClient.java:157) at sun.net.www.http.HttpClient.openServer(HttpClient.java:365) at sun.net.www.http.HttpClient.openServer(HttpClient.java:477) at sun.net.www.http.HttpClient.(HttpClient.java:214) at sun.net.www.http.HttpClient.New(HttpClient.java:287) at sun.net.www.http.HttpClient.New(HttpClient.java:299) at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC onnection.java:792) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne ction.java:744) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection .java:669) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon nection.java:913) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrent Entity(XMLEntityManager.java:973) I'm using Java 1.5.0 I'm using the standard DOCTYPES from the struts_blank webapp Any help is appreciated. Thanks, Richard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: simple struts example : HTTP 404
Rakesh, I think you should have following doctype in your struts-config.xml http://struts.apache.org/dtds/struts-config_1_2.dtd";> Currently you have following doctype: http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";> Please check this in your struts.jar file also. Doctype which is you are using is for struts-config_1_1.dtd. Best Regards Sunil Sahu Sr. Software Engineer Keane India Ltd Gurgaon Pazhanikanthan Periasamy <[EMAIL PROTECTED]> 01/05/2006 03:21 PM Please respond to "Struts Users Mailing List" To <[EMAIL PROTECTED]> cc Subject RE: simple struts example : HTTP 404 Are you sure that the Application Server did deploy the webapp and configure the Struts XMLs during startup? Have you configured (in web.xml) to mandatorily validate the Struts Configuration files during startup by the Action Servlet? Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: <[EMAIL PROTECTED]>, From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:36PM Subject: RE: simple struts example : HTTP 404 Yes sir. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:16 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: RE: simple struts example : HTTP 404 Have u configured your web.xml with the Strust Action Servlet? Have u associated a URL Pattern as *.do? Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:32PM Subject: RE: simple struts example : HTTP 404 Now I changed this,early it was http://localhost:8080/Emp_App/setupEmployeeForm.do This is not working also. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:10 PM To: Rakesh Bhat-IC Cc: Rakesh Bhat-IC; user@struts.apache.org Subject: RE: simple struts example : HTTP 404 http://localhost:8080/Emp_App/WEB-INF/setupEmployeeForm.do WHY does WEB-INF pattern in the URL ? Have you protected all your resources? If not, It should be like http://localhost:8080/Emp_App/setupEmployeeForm.do This should work Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: <[EMAIL PROTECTED]> From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:24PM cc: Subject: RE: simple struts example : HTTP 404 See after I click on below link in index.jsp Add An Employee Below is the url. http://localhost:8080/Emp_App/WEB-INF/setupEmployeeForm.do Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:01 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: RE: simple struts example : HTTP 404 Kindly send the URL thru which u are accessing it from the Browser. Unless we see that we cant debug. Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:14PM Subject: RE: simple struts example : HTTP 404 Yes,sir.I am accessing it thru your browser. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 2:28 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: Re: simple struts example : HTTP 404 You have not specified how you are accessing it thru your browser. Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date: 01/05/2006 0
RE: simple struts example : HTTP 404
Rakesh, Did you configure the mapping in "ActionServlet" and URL pattern "do". You should have following configuration in your web.xml: action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml 1 action *.do Please check your web.xml. Best Regards Sunil Sahu Sr. Software Engineer Keane India Ltd Gurgaon Pazhanikanthan Periasamy <[EMAIL PROTECTED]> 01/05/2006 03:21 PM Please respond to "Struts Users Mailing List" To <[EMAIL PROTECTED]> cc Subject RE: simple struts example : HTTP 404 Are you sure that the Application Server did deploy the webapp and configure the Struts XMLs during startup? Have you configured (in web.xml) to mandatorily validate the Struts Configuration files during startup by the Action Servlet? Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: <[EMAIL PROTECTED]>, From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:36PM Subject: RE: simple struts example : HTTP 404 Yes sir. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:16 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: RE: simple struts example : HTTP 404 Have u configured your web.xml with the Strust Action Servlet? Have u associated a URL Pattern as *.do? Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:32PM Subject: RE: simple struts example : HTTP 404 Now I changed this,early it was http://localhost:8080/Emp_App/setupEmployeeForm.do This is not working also. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:10 PM To: Rakesh Bhat-IC Cc: Rakesh Bhat-IC; user@struts.apache.org Subject: RE: simple struts example : HTTP 404 http://localhost:8080/Emp_App/WEB-INF/setupEmployeeForm.do WHY does WEB-INF pattern in the URL ? Have you protected all your resources? If not, It should be like http://localhost:8080/Emp_App/setupEmployeeForm.do This should work Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: <[EMAIL PROTECTED]> From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:24PM cc: Subject: RE: simple struts example : HTTP 404 See after I click on below link in index.jsp Add An Employee Below is the url. http://localhost:8080/Emp_App/WEB-INF/setupEmployeeForm.do Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 3:01 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: RE: simple struts example : HTTP 404 Kindly send the URL thru which u are accessing it from the Browser. Unless we see that we cant debug. Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date: 01/05/2006 03:14PM Subject: RE: simple struts example : HTTP 404 Yes,sir.I am accessing it thru your browser. Kind regards, Rakesh Bhat PrimeSourcing(tm) The Global IT Services business from i-flex - "Add Value Reduce Risk" www.iflexsolutions.com/services/services.asp i-flex solutions limited - Bangalore Phone : (080) 5759-6873 Email : Rakesh.Bhat@ iflexsolutions.com -Original Message- From: Pazhanikanthan Periasamy [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 2:28 PM To: Struts Users Mailing List Cc: Rakesh Bhat-IC Subject: Re: simple struts example : HTTP 404 You have not specified how you are accessing it thru your browser. Thanks and regards, Pazhanikanthan. P Project Leader, Caritor (India) Pvt. Ltd., Madras - 600 006 Mob: 9884321672 Extn: 4307 -<[EMAIL PROTECTED]> wrote: - To: From: <[EMAIL PROTECTED]> Date
Re: how to display error messages from actions?
Add following entry in your resource bundle errors.header = errors.footer = errors.prefix= errors.suffix = Use in your jsp page, it will display error in separate row. hope it helps Sunil "Kanuri, Chand" <[EMAIL PROTECTED]> 11/21/2005 06:31 PM Please respond to "Struts Users Mailing List" To 'Struts Users Mailing List' cc Subject how to display error messages from actions? hi all, i am trying to display error messages.it works fine with the following code(works for both form validation messages and messages from actions). now i am trying to display the error messages each in a row this works finr for form validation messages but fails with messages from actions.. any ideas?it thows error 500 Error 500: ServletException in '/errors.jsp': Cannot find bean error in any scope fails at at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja va:923) any ideas? regards and thanks in advance This e-mail (and any attachments) may contain privileged and/or confidential information. If you are not the intended recipient please do not disclose, copy, distribute, disseminate or take any action in reliance on it. If you have received this message in error please reply and tell us and then delete it. Should you wish to communicate with us by e-mail we cannot guarantee the security of any data outside our own computer systems. For the protection of Legal & General's systems and staff, incoming emails will be automatically scanned. Any information contained in this message may be subject to applicable terms and conditions and must not be construed as giving investment advice within or outside the United Kingdom. The following companies are subsidiary companies of the Legal & General Group Plc which are authorised and regulated by the Financial Services Authority for advising and arranging the products shown: Legal & General Partnership Services Limited (insurance and mortgages), Legal & General Insurance Limited (insurance), Legal & General Assurance Society Limited (life assurance, pensions and investments), Legal & General Unit Trust Managers Limited and Legal & General Portfolio Management Services Limited (investments). They are registered in England under numbers shown. The registered office is Temple Court, 11 Queen Victoria Street, London EC4N 4TP. Legal & General Partnership Services Limited: 5045000 Legal & General Assurance Society Limited: 166055 Legal & General (Unit Trust Managers) Limited: 1009418 Legal & General (Portfolio Management Services) Limited: 2457525 Legal & General Insurance Limited: 423930 They are registered with the Financial Services Authority under numbers shown. You can check this at www.fsa.gov.uk/register Legal & General Partnership Services Limited: 300792 Legal & General Assurance Society Limited: 117659 Legal & General (Unit Trust Managers) Limited: 119273 Legal & General (Portfolio Management Services) Limited: 146786 Legal & General Insurance Limited: 202050 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call a dispatch-Action from a link?
To specify the corresponding value of paramId, you can use only one of the following approaches: Specify only the paramName attribute - The named JSP bean (optionally scoped by the value of the paramScope attribute) must identify a value that can be converted to a String. Specify both the paramName and paramProperty attributes - The specified property getter method will be called on the JSP bean identified by the paramName (and optional paramScope) attributes, in order to select a value that can be converted to a String. For more detail you can refer following link http://struts.apache.org/struts-doc-1.2.4/userGuide/struts-html.html#link Hope it helps Sunil "starki78" <[EMAIL PROTECTED]> 11/21/2005 04:41 PM Please respond to "Struts Users Mailing List" To "user" cc Subject How to call a dispatch-Action from a link? in this example the first works and the second not: dispatch from a submit-buttom: //-- dispatch from a link I get the error after clicking the link: Request[/lookupdispatch2] does not contain handler parameter named 'method'. Can someone help me? Thank you! Ciao - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: what is the use of parameter attribute in action tag
ok , then you can access "abc" parameter in your action class from request object. "Nandakishore Nekkanti" <[EMAIL PROTECTED]> 11/21/2005 03:11 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: what is the use of parameter attribute in action tag I want to access "abc" Rgds Nanda kishore Nekkanti Software Engineer EvolveWare, Inc Riveresa complex, Baner Road, Baner, Pune - 411 045 Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084 Email: [EMAIL PROTECTED] URL: http://www.evolveware.com There is a difference between an objective and actions.Unless you understand your objective , you will be wasting your time in actions.Know your objective first. -- Swami Vivekananda - Original Message - From: <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, November 21, 2005 2:33 PM Subject: Re: what is the use of parameter attribute in action tag > "nanda" is method name in your Action class or you want to access "abc" > parameter in your method of Action Class. > > > > > > "Nandakishore Nekkanti" <[EMAIL PROTECTED]> > 11/21/2005 02:21 PM > Please respond to > "Struts Users Mailing List" > > > To > "Struts Users Mailing List" > cc > > Subject > Re: what is the use of parameter attribute in action tag > > > > > > > Hi Tahnks for ur response. > > I want to send some request parametrs as query string in my first request > to the action. > > This is just like this. > localhost:8080/form.do?abc=nanda > > Here i can hard code Nanda in Action. > > Instead of hard coding in action is there any way for to do that. > > > Rgds > > Nanda kishore Nekkanti > Software Engineer > EvolveWare, Inc > Riveresa complex, Baner Road, Baner, > Pune - 411 045 > Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084 > > Email: [EMAIL PROTECTED] > URL: http://www.evolveware.com > > There is a difference between an objective and actions.Unless you > understand your objective , you will be wasting your time in > actions.Know > your objective first. > > > > -- Swami Vivekananda > - Original Message - > From: <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Monday, November 21, 2005 2:18 PM > Subject: Re: what is the use of parameter attribute in action tag > > > > Nandan, > > > > parameter attribute in action-mapping is used for method name. you can > get > > the request parameters from request object itself in action class, no > > extra setting is required. > > Ex if you have any parameter in request as "type" then use > > String type = (String) request.getParameter("type"); > > > > Hope it helps. > > > > Sunil > > > > > > > > > > "Nandakishore Nekkanti" <[EMAIL PROTECTED]> > > 11/21/2005 01:44 PM > > Please respond to > > "Struts Users Mailing List" > > > > > > To > > "Struts Users Mailing List" , > > <[EMAIL PROTECTED]> > > cc > > > > Subject > > what is the use of parameter attribute in action tag > > > > > > > > > > > > > > Hi > > > > Is there any option in struts-config.xml to send request parameters to > > the > > action. > > > > i guess parameter attribute in action can do this .Is this for that > > purpose. > > > > > > > > > > > > -- > > Internal Virus Database is out-of-date. > > Checked by AVG Anti-Virus. > > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 > > > > > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > -- -- > > > > Internal Virus Database is out-of-date. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 > > > > -- > Internal Virus Database is out-of-date. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: what is the use of parameter attribute in action tag
"nanda" is method name in your Action class or you want to access "abc" parameter in your method of Action Class. "Nandakishore Nekkanti" <[EMAIL PROTECTED]> 11/21/2005 02:21 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: what is the use of parameter attribute in action tag Hi Tahnks for ur response. I want to send some request parametrs as query string in my first request to the action. This is just like this. localhost:8080/form.do?abc=nanda Here i can hard code Nanda in Action. Instead of hard coding in action is there any way for to do that. Rgds Nanda kishore Nekkanti Software Engineer EvolveWare, Inc Riveresa complex, Baner Road, Baner, Pune - 411 045 Tel: +91 (020) 27290713 X 27 . Fax: +91 (020) 2729 1084 Email: [EMAIL PROTECTED] URL: http://www.evolveware.com There is a difference between an objective and actions.Unless you understand your objective , you will be wasting your time in actions.Know your objective first. -- Swami Vivekananda - Original Message - From: <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Monday, November 21, 2005 2:18 PM Subject: Re: what is the use of parameter attribute in action tag > Nandan, > > parameter attribute in action-mapping is used for method name. you can get > the request parameters from request object itself in action class, no > extra setting is required. > Ex if you have any parameter in request as "type" then use > String type = (String) request.getParameter("type"); > > Hope it helps. > > Sunil > > > > > "Nandakishore Nekkanti" <[EMAIL PROTECTED]> > 11/21/2005 01:44 PM > Please respond to > "Struts Users Mailing List" > > > To > "Struts Users Mailing List" , > <[EMAIL PROTECTED]> > cc > > Subject > what is the use of parameter attribute in action tag > > > > > > > Hi > > Is there any option in struts-config.xml to send request parameters to > the > action. > > i guess parameter attribute in action can do this .Is this for that > purpose. > > > > > > -- > Internal Virus Database is out-of-date. > Checked by AVG Anti-Virus. > Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: what is the use of parameter attribute in action tag
Nandan, parameter attribute in action-mapping is used for method name. you can get the request parameters from request object itself in action class, no extra setting is required. Ex if you have any parameter in request as "type" then use String type = (String) request.getParameter("type"); Hope it helps. Sunil "Nandakishore Nekkanti" <[EMAIL PROTECTED]> 11/21/2005 01:44 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" , <[EMAIL PROTECTED]> cc Subject what is the use of parameter attribute in action tag Hi Is there any option in struts-config.xml to send request parameters to the action. i guess parameter attribute in action can do this .Is this for that purpose. -- Internal Virus Database is out-of-date. Checked by AVG Anti-Virus. Version: 7.0.300 / Virus Database: 265.6.5 - Release Date: 12/26/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't build project because of unavailable dtd
Lionel, probably DOCTYPE which u have given in your xml file is not matching with the DOCTYPE in your struts.jar that why its trying to connect it to internet. check you DOCTYPE in xml and DTD in struts.jar. "Lionel" <[EMAIL PROTECTED]> Sent by: news <[EMAIL PROTECTED]> 11/17/2005 04:46 PM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Re: Can't build project because of unavailable dtd Lionel wrote: > Hi ! > > Hi have a web project using struts. > This morning, I've had problems to build this project be built because > jakarta.apache.org has been unavailable for few minutes: eclipse > tries to access the online dtd and gets blocked. > The only way to be able to work is to disable xml validation, kill > eclipse and start it again. > Why doesn't it try to get the dtd from the struts.jar in web-inf/lib ? wrong group selected: it was for the WTP group. Sorry. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Preventing users from resubmitting payment screen
Jadeler, If you are using struts, in your class you can use saveToken() method and isValidToken() method to revalidate the request. more detail you can get from struts site. hope it helps Sunil Jadeler <[EMAIL PROTECTED]> 11/10/2005 01:05 PM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Preventing users from resubmitting payment screen I wanted to find out any recommendations in handling successful payments where the user is redirected to a receipt screen after a successful payment transaction. Basically, I need to prevent users from resubmitting the payment screen again via clicking on the browser back button, etc or via other means. Thanks. Jadeler __ Find your next car at http://autos.yahoo.ca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding images to items in a drop down list
Faisal, Why you want to use image, you can use stylesheet. You may refer following code: New Document OPTION.mar{background-color:maroon; color:white} OPTION.red{background-color:red; color:maroon} OPTION.blue{background-color:blue; color:maroon} Select Sunil Faisal Mahmoud <[EMAIL PROTECTED]> 10/20/2005 12:31 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Adding images to items in a drop down list Hi, I am creating a drop down list using the HTML and tags. The items in the list will be color names (ex. red, green, blue, etc..). I would like a small square image to be next to each color name text in the list. How would I go about this in my jsp file with my struts tags? -Faisal -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot]Date utilitiy to take date String, add a day, and return sql date?
noofDays is the Number of days which you want to add in the date. Laurie Harper <[EMAIL PROTECTED]> Sent by: news <[EMAIL PROTECTED]> 10/18/2005 10:33 AM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Re: [ot]Date utilitiy to take date String, add a day, and return sql date? [EMAIL PROTECTED] wrote: > [...] > public static String addDaysToDate( String strDate, String noofDays, > String dateFormat ) throws Exception noofDays? What are those? Days 30 minutes offset from everywhere else? ;-) L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: I am getting frustrated with LookupDispatchAction
Did you implement the getKeyMethodMap() method in the subclass of LookupDispatchAction. Sunil <[EMAIL PROTECTED]> 10/18/2005 03:48 AM Please respond to "Struts Users Mailing List" To cc Subject I am getting frustrated with LookupDispatchAction Hi. I am using struts 1.2.7. My struts-config-xml file has the following: my jsp has the following: But I get the following error in tomcat: javax.servlet.ServletException: Request[/mywizard1] does not contain handler parameter named 'method'. Can someone save me from insanity? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [ot]Date utilitiy to take date String, add a day, and return sql date?
Mick, You can refer following code but still you have to convert the type in the last because this method returns string. public static String addDaysToDate( String strDate, String noofDays, String dateFormat ) throws Exception { Calendar calendar = Calendar.getInstance(); String str_dt = ""; SimpleDateFormat formatter = new SimpleDateFormat( dateFormat ); Date input_dt = formatter.parse( strDate ); calendar.setTime( input_dt ); calendar.add( Calendar.DATE, Integer.parseInt( noofDays ) ); Date result_dt = calendar.getTime(); str_dt = formatter.format( result_dt ); return str_dt; } Hope it helps Sunil Dave Newton <[EMAIL PROTECTED]> 10/17/2005 11:37 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: [ot]Date utilitiy to take date String, add a day, and return sql date? Mick Knutson wrote: >I need to see if anyone has a utility to take a String date, add 1 day, >and return a java.sql.Date > > I'd probably check out the Calendar class. Dave Newton Technical Lead, MonkeyLips Omnigalgomon Project - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Unit Testing of Action class which are using Spring - JDBCTemplate
Bakul, I am also facing same problem but mine is little bit different. I have written some code over spring(Wrapper class) so that might be creating problem for me but if you are using struts and spring directly then i think u can refer appfuse code(Matt Raiable), StrutsTestCase is being used to test action class mathod in appfuse. Hope it helps Sunil Bakul Kakadiya <[EMAIL PROTECTED]> 10/17/2005 09:42 PM Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Unit Testing of Action class which are using Spring - JDBCTemplate Hi, I am using struts and spring in my project. While I am trying to write unittest cases of Action class using MockStrutsTestCase (StrutsTestCase) its giving error like Application context not found. Would be thankful if any one can give some guidence or suggest any other Framework to test this kind of class. Thanks in advance. Bakul. - Yahoo! Music Unlimited - Access over 1 million songs. Try it free.
Re: problem with html:select / html:options
Troy, I think it should work like this Hope it helps Sunil Troy Bull <[EMAIL PROTECTED]> 10/13/2005 11:33 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject problem with html:select / html:options Hi I am trying to use the struts taglibs as much as I can and I have the following situation. I have a collection object filled with DTO beans stored in session. The following prints out the list as I would expect: and if I try this on the same page what I can't figure out is how to make this work: I would like the output to be something to this effect: USA France Thanks troy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: action class not being called for repeat initial requests when using validation
John, Can you explain your problem little bit more, i am not getting your problem exactly. Sunil "John Andrews" <[EMAIL PROTECTED]> 10/12/2005 10:16 PM Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" , "Martin Gainty" <[EMAIL PROTECTED]> cc Subject RE: action class not being called for repeat initial requests when using validation Hi Martin, Thanks for your suggestion. Basically the problem that I have is that my action class is only being called intermittently - the rest of the time I am just being sent straight to the jsp that I want to display - without ever getting into the action class. This is causing a major problem since the action class is neccessary to populate the form's formbean correctly. John -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: 12 October 2005 17:00 To: Struts Users Mailing List Subject: Re: action class not being called for repeat initial requests when using validation John There are a number of solutions I would suggest looking at JBuilder doc located at http://bdn.borland.com/borcon2004/article/paper/0,1963,32246,00.html the fastest way is for your button to route to your jsp page is to route to the page identified by the action mapping in struts-config.xml For example here is a form which routes to logon page URI when username, password are satisfied and submit is called <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>User Name: Password: you could also place in a html:link to forward such as whereas Home idenitifies a URI which you will link to from the definition associated with 'home' in the Global forwards defined in struts-config.xml HTH, Martin- - Original Message - From: "John Andrews" <[EMAIL PROTECTED]> To: Sent: Wednesday, October 12, 2005 10:57 AM Subject: action class not being called for repeat initial requests when using validation >I have the action mapping below in my struts config file: > >path="/packageActionCreateT" >type="struts.actions.packages.PackageAction" >name="PackageForm" >input="/pages/createPackage.jsp" >parameter="dispatch" >scope="session"> > > path="/pages/createPackageTResults.jsp"/> > > > When I request that the corresponding action be executed using the URL: > > http://www.xx.com/packages/packageActionCreateT.do?dispatch=createPackag > e > > > Then the action is only executed once - unless i hit the submit button on > the createPackage.jsp page. On all other ocasions the action will act just > like a forward. It will just forward straight back to the > createPackage.jsp > page. This I presume? is because the validation is finding the > corresponding > formbean in the session and then going straight back to the jsp page. > However it is not acting exactly like a normal validation because the > incorrect fields are not highlighted. > > Is there someway to get the validator to only return directly to the jsp > page only after a submit - not after an initial request? - or is there > some > other good way to solve/design around this issue? > > Thanks for any help > John > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Print out Bean value
Troy, You can use tag to display the value as text. Here is example show it like this : <%=(String)txtSecret%> Hope it helps. Sunil Troy Bull <[EMAIL PROTECTED]> 10/12/2005 08:25 PM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Print out Bean value Hello I have a form bean that is changed in an action. I set one attribute "secret" then on the next jsp I want to display this. If I do a text box appears with the correct value in it. My problem is i dont want it in a text box I just want to display the text. I am sure this should be easy, can anyone give me a pointer I have been googleing and came up short so far. thanks troy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:text not interpreted :-(
Have u map it with form-bean. bib_lucene bib <[EMAIL PROTECTED]> 10/11/2005 11:54 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject Re: html:text not interpreted :-( ok I attached files , I access this page using http://localhost:8090/rs/tiles/example.jsp It displays header, left pane, content, footer. But does not show text box in content. Thanks for your help. bib Wendy Smoak <[EMAIL PROTECTED]> wrote: From: "bib_lucene bib" > I still cannot see the text field in body. > > This is the content of my web.xml If you're using the known URI for the taglibs, then you don't need in web.xml. (Fix the Tiles URI before removing its from web.xml though.) Are you sure your browser hasn't cached the old, incorrect page? Try holding down shift and hitting refresh/reload to make sure you're getting a new version. You can also stop your container and delete its 'work' files to force it to recompile the JSP. If you still need help, post some of the JSP code for your form and the resulting HTML. -- Wendy Smoak - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com mands, e-mail: [EMAIL PROTECTED] Yahoo! Music Unlimited - Access over 1 million songs. Try it free. RS DB Connection jdbc/mysqlDB javax.sql.DataSource Container AdminServlet com.rs.servlets.AdminServlet UserServlet UserServlet User Actions go into this one com.rs.servlets.UserServlet CandidateServlet CandidateServlet Candidate Actions go into this one com.rs.servlets.CandidateServlet action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 3 detail 3 0 AdminServlet /servlet/AdminServlet UserServlet /servlet/UserServlet CandidateServlet /Candidate.html action *.do 30 http://displaytag.sourceforge.net/ /WEB-INF/tlds/displaytag-11.tld index.jsp login.jsp 404 /error.jsp /tags/struts-bean /WEB-INF/struts-bean.tld /tags/struts-logic /WEB-INF/struts-logic.tld /tags/struts-nested /WEB-INF/struts-nested.tld /tags/struts-tiles /WEB-INF/struts-tiles.tld - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Navigation menu help
Faisal, If you are using then you have to provide the path woth context name but better way is to use instead of . In your case, instead of using Home , you should use Home. It will definitely work. Sunil Faisal Mahmoud <[EMAIL PROTECTED]> 06/10/2005 04:51 Please respond to "Struts Users Mailing List" To user@struts.apache.org cc Subject Navigation menu help I have created a navigation menu jsp file that I include with all the pages on my webapp via the jsp:include tag. This page has the following nav menu: Home New Job Retrieve Job I have placed all jsp pages under WEB-INF/jsp/, except for the login page which resides at WebRoot/index.jsp. The user will access the index.jsp page, login and then upon succesfull authentication, they will be forwarded to WEB-INF/jsp/home.jsp. This occurs via a struts Action class. This action forwards as shown below: I use ActionForwards to perform menu navigation. I specify them as follows in my struts-config.xml file: When the home.jsp loads after the user logs in the menu displays fine. The links show paths such as http://localhost:8080/homePage http://localhost:8080/newJobPage However, if I click on any of the nav links, I get a Tomcat error page saying: HTTP Status 404 - /homePage type Status report message /homePage description The requested resource (/homePage) is not available. This occurs for any of the links. What am I doing wrong here? -Faisal -- http://www.quidprocode.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: encoding the session
are you using struts framework <[EMAIL PROTECTED]> 05/10/2005 18:12 Please respond to "Struts Users Mailing List" To cc Subject encoding the session Hi, Can anyone advise on how to encode the session Id so that a user cannot just type in the URL and get to the jsp? For example my user can create a client form creatClient.jsp but can also go straight to the editClient.jsp by adding it to the URl and I want to stop this Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Action mapping to a Tile
Greg, 1- create one layout.jsp: <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"; prefix="tiles" %> 2 - add following entry in struts-config.xml If you want you can use your own action, in that case you have to provide method and forward name also. if you want more detail about this let me know. 3 - add following entry in tiles-def.xml http://struts.apache.org/dtds/tiles-config_1_1.dtd";> 4- add following link in your jsp: Test Link try it and let me know if you have any issue. Sunil Greg Reddin <[EMAIL PROTECTED]> 01/10/2005 03:23 Please respond to "Struts Users Mailing List" To "Struts Users Mailing List" cc Subject Re: Action mapping to a Tile Are you using the TilesRequestProcessor? In struts-config.xml: Also make sure the Tiles Plugin is configured: Greg On Sep 30, 2005, at 4:47 PM, Graham Reeds wrote: > I'm trying to set an action mapping to a tile. > > I have a jsp page with a link to Tester: Test > > In my struts-config.xml I have a forward mapped: path="pages/Tester" forward="Test.page" /> > > And in tile-def.xml I have Test.page defined: > > > > > However this gives a 404 for the page test/pages/Tester > > I thought it might be that the application hasn't been updated so I > stopped and restarted Tomcat and that had no effect - still 404's. > > Anything else I need to check? > > Thanks Graham Reeds. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: chaining actions i think!!
Faisal, Why are you making different action classes for Search and Edit functionality. You can have these method in one Action class itself and then you can call the 'search action mapping' from 'edit action mapping' defined in struts-config.xml. If you want more detail that how to do it, let me know. Sunil <[EMAIL PROTECTED]> 05/10/2005 16:17 Please respond to "Struts Users Mailing List" To cc Subject chaining actions i think!! Hi, Is there a way that I can call another action from within a action class. Is it as simple as just calling the execute method of the other action or another method of the action class as is required.? My scenario is as follows: A user searches on a client and is returned a number of results. He then chooses to edit one of the results and goes to the edit jsp. After editing the user has the option of returning back to the search results. To show the record that has been edited I am making another trip to the DB as I don't have a cache. To return back to the results the user clicks on his button and is forwarded to the edit Action class. It is from this action class that I want to call the search Action class passing in the search form which is held in the session. This will then go to the DB and return to the appropriate search jsp. Any one any views on this Thanks
Re: [OT] where to put the displaytag.properties file for i18n?
Hi leung, you can put displaytag.properties file under WEB-INF/classes folder and classloader will autmatically load it. There is no need to define that properties file in struts-config.xml because anyway you are not going to put this property file under any package structure. Keep this property file under WEB-INF/classes, it will definitely work. Sunil 梁炳場 <[EMAIL PROTECTED]> 09/30/2005 01:20 AM Please respond to "Struts Users Mailing List" To Struts Users Mailing List cc Subject [OT] where to put the displaytag.properties file for i18n? the titleKey gives null. A single line is input into displaytag.properties userRole.system.title=System I have put displaytag.properties /WEB-INF/ and /WEB-INF/user The column title is still blank. Where is the correct path to put displaytag.properties? Where can I define the path of displaytag.properties just like ApplicationProperties.properties defined in struts-config.xml? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]