Hi
-Original Message- From: Research labs [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: DaTASOURCE CREATION AT USER LOGIN TIME...Newbie Craig, Thanks a lot. All points taken. In the light of what you and Jim have said, I will re examine my plan of action I found out about you in one of my books "Struts in Action" by Ted Husted et al. If I may, I would like to keep this first email from you as some sort of autograph. Ola. --- Craig McClanahan <[EMAIL PROTECTED]> wrote: > On Mon, 2 Aug 2004 21:23:05 +0100 (BST), Research > labs > <[EMAIL PROTECTED]> wrote: > > Jim, > > > > Thanks for your response. > > I want each user to login to the database(MySQL), > via > > a JSP. Once logged in, I want them to use their > > database username (specified at log in time) for > > communicating with the database throught their > > session. To put it another way, if 4 users are > > currently logged in (via a JSP etc.), When I query > the > > data dictionary of the database, I want their > names to > > come up. At any point in time, I want to be able > to > > find out, who is logged in, this is why I do not > want > > everyone to log in with the same username and > password > > e.g. ola/ola-hardcoded in the Struts config's > > data-source. > > > > Do you care about finding out who is logged in to > your *application*, > or who is logged in to the *database*? Those can > easily be made > separate questions, and in most cases should be > separate. > > > I do not mind using any datasource so long as I > can > > achieve my objective. > > > > The element in struts-config.xml, like > using most JNDI > provided data sources, will not address your need. > That is because > they create application wide pools for shared > connections. > > Doing what you want to do, however, will also be > giving up on the key > advantage of using a data source in the first place > -- sharing a small > number of database connections between multiple > users. By definition, > if you are using per-user logins to the database, > such connections > cannot be shared. That can be problematic for the > scalability of your > app, because it will require more database resources > to be allocated > than would otherwse be necessary. Plus, you'll > likely run into limits > on how many individual database connections can be > opened before you'd > ever run out of capacity in your web server to > support simultaneous > users. > > If all you care is logins to an application, here's > a couple of easy > ways to do that while still sharing database > connections: > > * At login time, write into some table someplace a > row for the logged in user, > and make sure you clean it up when they log out or > when the session > expires. To see who is logged in, run database > queries against > this table. > > * Store some in-memory data structure (perhaps as an > application scope > attribute), and have the login/logout logic add > and remove entries from > this data structure. To see who is logged in, set > up a Struts action or > something that will go through the data structure > and list all the logged > on users. > > If you still really want per-user database logins, > then give up on the > idea of using any sort of data source -- it won't > buy you anything. > Instead, create a standalone JDBC connection at > login time, and store > it in session scope somewhere. But I would suggest > you consider the > disadvantages of such an approach before using it. > > > Thanks. > > Ola. > > > > Craig > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.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]
Data not being populated on edit in my jsp file...
I have a jsp fle which has a html link to EditShipping.jsp file. All the attributes in EditShipping.jsp should be populated, but its not happening. CAn anyone help me out... below is my EditShipping.jsp file...Struts config file..and OrderSummary.jsp on which the hyperlink is displayed. = New York New Hampshire New Jersey UNITED STATES OF AMERICA == Sruts Config.xml === = OrderSummary.sp == -Original Message- From: Research labs [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 5:17 PM To: Struts Users Mailing List Subject: Re: DaTASOURCE CREATION AT USER LOGIN TIME...Newbie Craig, Thanks a lot. All points taken. In the light of what you and Jim have said, I will re examine my plan of action I found out about you in one of my books "Struts in Action" by Ted Husted et al. If I may, I would like to keep this first email from you as some sort of autograph. Ola. --- Craig McClanahan <[EMAIL PROTECTED]> wrote: > On Mon, 2 Aug 2004 21:23:05 +0100 (BST), Research > labs > <[EMAIL PROTECTED]> wrote: > > Jim, > > > > Thanks for your response. > > I want each user to login to the database(MySQL), > via > > a JSP. Once logged in, I want them to use their > > database username (specified at log in time) for > > communicating with the database throught their > > session. To put it another way, if 4 users are > > currently logged in (via a JSP etc.), When I query > the > > data dictionary of the database, I want their > names to > > come up. At any point in time, I want to be able > to > > find out, who is logged in, this is why I do not > want > > everyone to log in with the same username and > password > > e.g. ola/ola-hardcoded in the Struts config's > > data-source. > > > > Do you care about finding out who is logged in to > your *application*, > or who is logged in to the *database*? Those can > easily be made > separate questions, and in most cases should be > separate. > > > I do not mind using any datasource so long as I > can > > achieve my objective. > > > > The element in struts-config.xml, like > using most JNDI > provided data sources, will not address your need. > That is because > they create application wide pools for shared > connections. > > Doing what you want to do, however, will also be > giving up on the key > advantage of using a data source in the first place > -- sharing a small > number of database connections between multiple > users. By definition, > if you are using per-user logins to the database, > such connections > cannot be shared. That can be problematic for the > scalability of your > app, because it will require more database resources > to be allocated > than would otherwse be necessary. Plus, you'll > likely run into limits > on how many individual database connections can be > opened before you'd > ever run out of capacity in your web server to > support simultaneous > users. > > If all you care is logins to an application, here's > a couple of easy > ways to do that while still sharing database > connections: > > * At login time, write into some table someplace a > row for the logged in user, > and make sure you clean it up when they log out or > when the session > expires. To see who is logged in, run database > queries against > this table. > > * Store some in-memory data structure (perhaps as an > application scope > attribute), and have the login/logout logic add > and remove entries from > this data structure. To see who is logged in, set > up a Struts action or > something that will go through the data structure > and list all the logged > on users. > > If you still really want per-user database logins, > then give up on the > idea of using any sort of data source -- it won't > buy you anything. > Instead, create a standalone JDBC connection at > login time, and store > it in session scope somewhere. But I would suggest > you consider the > disadvantages of such an approach before using it. > > > Thanks. > > Ola. > > > > Craig > > - > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > ___ALL-NEW
RE: Data not being populated on edit in my jsp file...
Let me make it clear.. I have a jsp file called OrderSummary.jsp which has a link called "EDIT", which should take me to EditShipping.jsp file. User first enters his billing and shipping information in a session and finally comes to a order summary page from there he can go back to the EditShipping.jsp page by clicking on the link . So when i click on the link , the application should take me back to shipping page with all the fields populated. But my shipping page fields are all empty. I have stored the shipping information in session . But in EditShipping.jsp i do not use any of the session attributes to display the values. Go over my edit shipping.jsp file and let me know i fi am missing something. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 6:58 PM To: Struts Users Mailing List Subject: RE: Data not being populated on edit in my jsp file... > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 2:29 PM > To: Struts Users Mailing List > Subject: Data not being populated on edit in my jsp file... > > > I have a jsp fle which has a html link to EditShipping.jsp file. > All the attributes in EditShipping.jsp should be populated, > but its not > happening. > CAn anyone help me out... Let me see if I understand: You have a jsp file (call it first.jsp) and have or or something the renders an > below is my EditShipping.jsp file...Struts config file..and > OrderSummary.jsp on which the hyperlink is displayed. EditShipping.jsp--- > = > > > > > > > > > > > > > > > > > > > > New York > New Hampshire > New Jersey > > > > > UNITED STATES OF > AMERICA > > > > > > > > > > == > Sruts Config.xml > === > path="/checkCustomer" > type="com.ecommerce.action.CheckCustomerAction" > name="CheckCustomerForm" > scope="session" > input="/CheckCustomer.jsp"> > > > > > path="/editShipping" > type="com.ecommerce.action.EditShippingAction" > name="ShippingForm" > scope="session" > input="/EditShipping.jsp"> > > > > = > OrderSummary.jsp --- > > > > > == > > -Original Message- > From: Research labs [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 5:17 PM > To: Struts Users Mailing List > Subject: Re: DaTASOURCE CREATION AT USER LOGIN TIME...Newbie > > > Craig, > > Thanks a lot. All points taken. In the light of what > you and Jim have said, I will re examine my plan of > action > > I found out about you in one of my books "Struts in > Action" by Ted Husted et al. If I may, I would like > to keep this first email from you as some sort of > autograph. > > Ola. > > > --- Craig McClanahan <[EMAIL PROTECTED]> wrote: > > On Mon, 2 Aug 2004 21:23:05 +0100 (BST), Research > > labs > > <[EMAIL PROTECTED]> wrote: > > > Jim, > > > > > > Thanks for your response. > > > I want each user to login to the database(MySQL), > > via > > > a JSP. Once logged in, I want them to use their > > > database username (specified at log in time) for > > > communicating with the database throught their > > > session. To put it another way, if 4 users are > > > currently logged in (via a JSP etc.), When I query > > the > > > data dictionary of the database, I want their > > names to > > > come up. At any point in time, I want to be able > > to > > > find out, who is logged in, this is why I do not > > want > > > everyone to log in with the same username and > > password > > > e.g. ola/ola-hardcoded in the Struts config's > > > data-source. > > > > > > > Do you care about finding out who is l
RE: Data not being populated from database on form jsp
I retrieve some shipping information from database and this information is displayed in OrderSummary.jsp . There is a link on orderSummary.jsp file to go to Shipping page and edit it. I am not able to populate the shipping form when the edit button is clicked on OrderSummary Page. This is what i am doing -- 1) checkCustomer.jsp -- user enters email address in a text box. when the submit button is clicked here, checkCustomerAction class is called and retrieves the entire shipping information from database and stores the shipping object in session. 2) OrderSummary.jsp -- displays the shipping information from the session. There is an additional link to Edit Shipping form. i have used html:link to go to shipping.jsp like below " " 3) shipping.jsp -- when the user click on edit button from OrderSummary, shipping.jsp is populated all blank.fields. My question is how and where should i populate the shippingForm bean. i have a class called ShippingForm.java which has all the getters and setters for shipping. Should the html link take any parameters? or should i do something in editShippingAction class Please help -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Monday, August 02, 2004 7:50 PM To: Struts Users Mailing List Subject: RE: Data not being populated on edit in my jsp file... > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 4:08 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated on edit in my jsp file... > > > Let me make it clear.. > > I have a jsp file called OrderSummary.jsp which has a link > called "EDIT", > which should take me to EditShipping.jsp file. > User first enters his billing and shipping information in a > session and > finally comes to a order summary page from there he can go > back to the > EditShipping.jsp page by clicking on the link . > So when i click on the link , the application should take me back to > shipping page with all the fields populated. > But my shipping page fields are all empty. I have stored the shipping > information in session . But in EditShipping.jsp i do not > use any of the > session attributes to display the values. Go over my edit > shipping.jsp > file and let me know i fi am missing something. Doesn't look like it. You have the form beans as session. Whenever you go back to the page, you should see it populate... my only thought is what is going on inside the action? Last time I ran into this problem I stupidly was clearing out the form. You might try dumping the form to system.out on each jsp and action in the process, and see if it's still there and populated. > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 6:58 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated on edit in my jsp file... > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 02, 2004 2:29 PM > > To: Struts Users Mailing List > > Subject: Data not being populated on edit in my jsp file... > > > > > > I have a jsp fle which has a html link to EditShipping.jsp file. > > All the attributes in EditShipping.jsp should be populated, > > but its not > > happening. > > CAn anyone help me out... > > Let me see if I understand: > You have a jsp file (call it first.jsp) and have href="/EditShipping.jsp"/> or > or something the > renders an > If that's it.. then why would you expect any kind of > communication between > pages with a link? You would either have to add in the > parameters, or use a > > > > > > below is my EditShipping.jsp file...Struts config file..and > > OrderSummary.jsp on which the hyperlink is displayed. > > EditShipping.jsp--- > > = > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > New York > > New Hampshire > > New Jersey > > > > > > > > > > UNITED STATES OF > > AMERICA > > > > > > > > > > > > > > > > > > > > ===
RE: Data not being populated from database on form jsp
Thi soptions looks better to me, "Alternatively when you get the shipping information from the datbase initially, copy it to an ActionForm, and use that for display everywhere. THis would mean setting the name and validation fields in the strutsconfig for each action that uses the form. Display only should have validation off." But how can i copy the database info to Action Form is there any struts API to do that...and also how can i make the validation off .. i am a starter in Struts, can u give the code snippets for this.. Thanks. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 3:30 PM To: Struts Users Mailing List Subject: RE: Data not being populated from database on form jsp > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 12:22 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated from database on form jsp > > > I retrieve some shipping information from database and this > information is > displayed in OrderSummary.jsp . > There is a link on orderSummary.jsp file to go to Shipping > page and edit it. > I am not able to populate the shipping form when the edit > button is clicked > on OrderSummary Page. > > This is what i am doing -- > 1) checkCustomer.jsp -- user enters email address in a text > box. when the > submit button is clicked here, > checkCustomerAction class is called and retrieves the entire shipping > information from database and stores the shipping object in session. > > 2) OrderSummary.jsp -- displays the shipping information from > the session. > There is an additional link to Edit Shipping form. i have > used html:link to > go to shipping.jsp like below > " > > " The class for editShipping.do should probably copy the shipping information to a form, and then forward to the shipping.jsp page. If the user modifies the shipping information, then validate and copy back to the session object. Alternatively when you get the shipping information from the datbase initially, copy it to an ActionForm, and use that for display everywhere. THis would mean setting the name and validation fields in the strutsconfig for each action that uses the form. Display only should have validation off. > > > 3) shipping.jsp -- when the user click on edit button from > OrderSummary, > shipping.jsp is populated all blank.fields. > > My question is how and where should i populate the > shippingForm bean. i have > a class called ShippingForm.java which has all the getters > and setters for > shipping. Should the html link take any parameters? or should i do > something in editShippingAction class Please help > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Monday, August 02, 2004 7:50 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated on edit in my jsp file... > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 02, 2004 4:08 PM > > To: Struts Users Mailing List > > Subject: RE: Data not being populated on edit in my jsp file... > > > > > > Let me make it clear.. > > > > I have a jsp file called OrderSummary.jsp which has a link > > called "EDIT", > > which should take me to EditShipping.jsp file. > > User first enters his billing and shipping information in a > > session and > > finally comes to a order summary page from there he can go > > back to the > > EditShipping.jsp page by clicking on the link . > > So when i click on the link , the application should take me back to > > shipping page with all the fields populated. > > But my shipping page fields are all empty. I have stored > the shipping > > information in session . But in EditShipping.jsp i do not > > use any of the > > session attributes to display the values. Go over my edit > > shipping.jsp > > file and let me know i fi am missing something. > > Doesn't look like it. You have the form beans as session. > Whenever you go > back to the page, you should see it populate... my only > thought is what is > going on inside the action? Last time I ran into this > problem I stupidly > was clearing out the form. > > You might try dumping the form to system.out on each jsp and > action in the > process, and see if it's still there and populated. > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 02, 2004 6:58 PM > > To: Struts Users Mailing List > > Subject: RE: Data not
RE: Data not being populated from database on form jsp
thanks, that might help. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 3:51 PM To: Struts Users Mailing List Subject: RE: Data not being populated from database on form jsp > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 12:35 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated from database on form jsp > > > Thi soptions looks better to me, > "Alternatively when you get the shipping information from the datbase > initially, copy it to an ActionForm, and use that for display > everywhere. > THis would mean setting the name and validation fields in the > strutsconfig > for each action that uses the form. Display only should have > validation > off." > > But how can i copy the database info to Action Form is there > any struts API > to do that...and also how can i make the validation off .. i > am a starter in > Struts, can u give the code snippets for this.. >From http://struts.apache.org/userGuide/building_controller.html section 4.8.1 <Change this to false To do the copy, I highly recommend http://jakarta.apache.org/commons/beanutils/ BeanUtils.copyProperties(into, from); will do most conversions... if you have special conversions then you can register your conversion classes and it will use your custom conversion > > Thanks. > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 3:30 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated from database on form jsp > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 03, 2004 12:22 PM > > To: Struts Users Mailing List > > Subject: RE: Data not being populated from database on form jsp > > > > > > I retrieve some shipping information from database and this > > information is > > displayed in OrderSummary.jsp . > > There is a link on orderSummary.jsp file to go to Shipping > > page and edit it. > > I am not able to populate the shipping form when the edit > > button is clicked > > on OrderSummary Page. > > > > This is what i am doing -- > > 1) checkCustomer.jsp -- user enters email address in a text > > box. when the > > submit button is clicked here, > > checkCustomerAction class is called and retrieves the > entire shipping > > information from database and stores the shipping object in session. > > > > 2) OrderSummary.jsp -- displays the shipping information from > > the session. > > There is an additional link to Edit Shipping form. i have > > used html:link to > > go to shipping.jsp like below > > " > > > > " > > The class for editShipping.do should probably copy the > shipping information > to a form, and then forward to the shipping.jsp page. If the > user modifies > the shipping information, then validate and copy back to the > session object. > > Alternatively when you get the shipping information from the datbase > initially, copy it to an ActionForm, and use that for display > everywhere. > THis would mean setting the name and validation fields in the > strutsconfig > for each action that uses the form. Display only should have > validation > off. > > > > > > > 3) shipping.jsp -- when the user click on edit button from > > OrderSummary, > > shipping.jsp is populated all blank.fields. > > > > My question is how and where should i populate the > > shippingForm bean. i have > > a class called ShippingForm.java which has all the getters > > and setters for > > shipping. Should the html link take any parameters? or should i do > > something in editShippingAction class Please help > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Monday, August 02, 2004 7:50 PM > > To: Struts Users Mailing List > > Subject: RE: Data not being populated on edit in my jsp file... > > > > > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Monday, August 02, 2004 4:08 PM > > > To: Struts Users Mailing List > > > Subject: RE: Data not being populated on edit in my jsp file... > > > > > > > > > Let me make it clear.. > > > > > > I have a jsp file called OrderSummary.jsp which has a link > > > called "EDIT", > > > which should take me to Edi
RE: Data not being populated from database on form jsp
i still have problem, i did as per ur instructions. can u please help... Below is my action class. public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { HttpSession session = request.getSession(); String isOrderPage = (String)session.getAttribute("ORDERPAGE"); ShippingForm address = (ShippingForm)form; // Populate the user registration form if (form == null || isOrderPage.equals("true")) { if (log.isTraceEnabled()) { log.trace(" Creating new Shipping Form from DB " + mapping.getAttribute()); } form = new ShippingForm(); ShippingForm shipForm = (ShippingForm )form; Shipping ship = (Shipping)session.getAttribute("SHIPPING"); try { PropertyUtils.copyProperties(shipForm, ship); } catch (InvocationTargetException e) { Throwable t = e.getTargetException(); if (t == null) t = e; log.error("shippingInfo.populate", t); throw new ServletException("shippingInfo.populate", t); } return (mapping.findForward("failure")); } } === And this is my Editshipping.jsp New York New Hampshire New Jersey UNITED STATES OF AMERICA == And strutsconfig.xml = And the OrderSummary page wher i have link to edit. Shipping Address <%=(String)shipInfo.getFirstName() %> 400 columbus ave <%=(String)shipInfo.getCity() %>, <%= (String)shipInfo.getState()%> <%=(String)shipInfo.getZip() %> ==== == -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 4:00 PM To: Struts Users Mailing List Subject: RE: Data not being populated from database on form jsp thanks, that might help. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 3:51 PM To: Struts Users Mailing List Subject: RE: Data not being populated from database on form jsp > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 12:35 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated from database on form jsp > > > Thi soptions looks better to me, > "Alternatively when you get the shipping information from the datbase > initially, copy it to an ActionForm, and use that for display > everywhere. > THis would mean setting the name and validation fields in the > strutsconfig > for each action that uses the form. Display only should have > validation > off." > > But how can i copy the database info to Action Form is there > any struts API > to do that...and also how can i make the validation off .. i > am a starter in > Struts, can u give the code snippets for this.. >From http://struts.apache.org/userGuide/building_controller.html section 4.8.1 <Change this to false To do the copy, I highly recommend http://jakarta.apache.org/commons/beanutils/ BeanUtils.copyProperties(into, from); will do most conversions... if you have special conversions then you can register your conversion classes and it will use your custom conversion > > Thanks. > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 03, 2004 3:30 PM > To: Struts Users Mailing List > Subject: RE: Data not being populated from database on form jsp > > > > > > -Original Mes
FW: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) -Original Message- From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 11:53 AM To: Tomcat Users List Subject: application not working on unix. I am trying to deploy my prototype shoppingcart application onto linux environment , i am using apache tomcat4.0.4, and struts 1.1. The same application was deployed successfully on windows. I have copied prototype.war into /var/lib/tomcat4/webapps. restarted tomcat as /etc/init.d/tomcat4 restart and it does not work. I have the following errors in catalina.out and local_host.log ..please help. I get this error in catlina.out Aug 6, 2004 3:32:25 AM org.apache.commons.digester.Digester getParser SEVERE: Digester.getParser: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :269) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.ClassLoader.getParent(ClassLoader.java:1034) at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java :888) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34 2) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134) at org.apache.commons.digester.Digester.getFactory(Digester.java:512) at org.apache.commons.digester.Digester.getParser(Digester.java:686) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 8) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343) at org.apache.catalina.core.StandardService.start(StandardService.java:388) at org.apache.catalina.core.StandardServer.start(StandardServer.java:506) at org.apache.catalina.startup.Catalina.start(Catalina.java:781) at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) at org.apache.catalina.startup.Catalina.process(Catalina.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) = And i get this error in log file :...localhost_log.2004-08-06.txt == 2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw load() exception javax.servlet.ServletException: Servlet.init() for servlet action threw exceptio n at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:946) at org.apache.catalina.core.StandardWrapper.load
RE: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
where to check path names, is it in struts config... -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 12:33 PM To: Struts Users Mailing List Subject: RE: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Friday, August 06, 2004 9:23 AM > To: Struts Users Mailing List > Subject: FW: null pointer > --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > > > > - Root Cause - > java.lang.NullPointerException > at > org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > at I've seen this when the Digester can't find the xml file it's trying to read.. I would check path names and make sure they are not windows specific. - 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: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
i don't think my path names are windows specific... here's web.xml - Struts Prototype Application action org.apache.struts.action.ActionServlet config /WEB-INF/struts-config.xml debug 2 detail 2 2 and struts-config... do you think of anything else -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 12:41 PM To: Struts Users Mailing List Subject: RE: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Friday, August 06, 2004 9:36 AM > To: Struts Users Mailing List > Subject: RE: null pointer > --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > > > where to check path names, is it in struts config... There.. web.xml.. all your config files.. I would guess it's in the web.xml where you specify where the strutsconfig.xml file is. > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Friday, August 06, 2004 12:33 PM > To: Struts Users Mailing List > Subject: RE: null pointer > --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Friday, August 06, 2004 9:23 AM > > To: Struts Users Mailing List > > Subject: FW: null pointer > > > --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > > > > > > > > - Root Cause - > > java.lang.NullPointerException > > at > > org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) > > at > > I've seen this when the Digester can't find the xml file it's > trying to > read.. I would check path names and make sure they are not > windows specific. > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
digester.getparser error...
I am getting this error when i start my Tomcat 4.0.4 insatance, with struts application. what exactly is this? Aug 6, 2004 8:02:11 AM org.apache.commons.digester.Digester getParser SEVERE: Digester.getParser: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at java.security.AccessControlContext.checkPermission(AccessControlContext.java :269) at java.security.AccessController.checkPermission(AccessController.java:401) at java.lang.SecurityManager.checkPermission(SecurityManager.java:524) at java.lang.ClassLoader.getParent(ClassLoader.java:1034) at org.apache.catalina.loader.WebappClassLoader.toString(WebappClassLoader.java :888) at java.lang.String.valueOf(String.java:2131) at java.lang.StringBuffer.append(StringBuffer.java:370) at javax.xml.parsers.FactoryFinder.findJarServiceProvider(FactoryFinder.java:34 2) at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:226) at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:134) at org.apache.commons.digester.Digester.getFactory(Digester.java:512) at org.apache.commons.digester.Digester.getParser(Digester.java:686) at org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) at org.apache.commons.digester.Digester.parse(Digester.java:1567) at org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java:1433) at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91 8) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:810) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java: 3279) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3421) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) at org.apache.catalina.core.StandardHost.install(StandardHost.java:738) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:232) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor t.java:155) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at org.apache.catalina.core.StandardHost.start(StandardHost.java:638) -- INSERT -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: FW: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902)
I am pretty much sure that none of the permissions have changed. But i thought this is more relavant to the null pointer --getXMLReader exception, for some reason the application is not reading the config parameters in web.xml. Let me know if i am wrong. -Original Message- From: Kishore Senji [mailto:[EMAIL PROTECTED] Sent: Friday, August 06, 2004 4:30 PM To: Struts Users Mailing List Subject: Re: FW: null pointer --org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) You don't have the required Rumtime Permission for getting the context ClassLoader. You might have to set the right permissions in the catalina.policy file. I guess, By default, these permissions are granted. Are you overriding these permissions? Thanks, Kishore Senji. On Fri, 6 Aug 2004 12:23:01 -0400, Shilpa Nalgonda <[EMAIL PROTECTED]> wrote: > > I am trying to deploy my prototype shoppingcart application onto linux > environment , i am using apache tomcat4.0.4, and struts 1.1. The same > application was deployed successfully on windows. I have copied > prototype.war into /var/lib/tomcat4/webapps. > restarted tomcat as /etc/init.d/tomcat4 restart and it does not work. I > please help. > And i get this error in log file :...localhost_log.2004-08-06.txt > > == > 2004-08-06 03:32:25 StandardContext[/prototype]: Servlet /prototype threw > load() > exception > javax.servlet.ServletException: Servlet.init() for servlet action threw > exceptio > n >at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. > java:946) >at > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81 > 0) >at > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex > t.java:3279) >at > org.apache.catalina.core.StandardContext.start(StandardContext.java:3 > 421) >at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78 > 5) >at > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:478) > >at > org.apache.catalina.core.StandardHost.install(StandardHost.java:738) >at > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:324 > ) >at org.apache.catalina.startup.HostConfig.start(HostConfig.java:389) >at > org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java > :232) >at > org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl > eSupport.java:155) >at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) > >at > org.apache.catalina.core.StandardHost.start(StandardHost.java:638) >at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) > >at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:343 > ) >at > org.apache.catalina.core.StandardService.start(StandardService.java:3 > 88) >at > org.apache.catalina.core.StandardServer.start(StandardServer.java:506 > ) >at org.apache.catalina.startup.Catalina.start(Catalina.java:781) >at org.apache.catalina.startup.Catalina.execute(Catalina.java:681) >at org.apache.catalina.startup.Catalina.process(Catalina.java:179) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. > java:39) >at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces > sorImpl.java:25) >at java.lang.reflect.Method.invoke(Method.java:324) >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243) > - Root Cause - > - Root Cause - > java.lang.NullPointerException >at > org.apache.commons.digester.Digester.getXMLReader(Digester.java:902) >at org.apache.commons.digester.Digester.parse(Digester.java:1567) >at > org.apache.struts.action.ActionServlet.initServlet(ActionServlet.java > :1433) >at > org.apache.struts.action.ActionServlet.init(ActionServlet.java:466) >at javax.servlet.GenericServlet.init(GenericServlet.java:258) >at > org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. > java:918) >at > org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:81 > 0) >at > org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex > t.java:3279) >at > org.apache.catalina.core.StandardContext.start(StandardContext.java:3 > 421) >at > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:78 > 5) >at > org.apach
org.apache.jasper.JasperException
I am getting this error, what could be the reason... 2004-08-09 09:32:08 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: File "/tags/struts-html" not found at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java :214) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java :174) at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspP arseEventListener.java:1170) at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve ntListener.java:765) at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList ener.java:125) at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255) at org.apache.jasper.compiler.Parser.parse(Parser.java:1145) at org.apache.jasper.compiler.Parser.parse(Parser.java:1103) at org.apache.jasper.compiler.Parser.parse(Parser.java:1099) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:214) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:176) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:188) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: java.net.ConnectException: Connection refused
I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux environment. And i am unable to connect to mysql db. Below is the url i am using in server.xml file. and also i have the jdbc driver under WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was successfully able to deploy the same application on Windows, using the same server.xml file. please help. factory org.apache.commons.dbcp.BasicDataSourceFactory url jdbc:mysql://localhost:3306/prototypedb?autoReconnect=true driverClassName org.gjt.mm.mysql.Driver org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory, cause: java.sql.SQLException: Server connection failure during transaction. Due to underlying exception: 'java.net.ConnectException: Connection refused'. ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused STACKTRACE: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) at java.net.Socket.connect(Socket.java:452) at java.net.Socket.connect(Socket.java:402) at java.net.Socket.(Socket.java:309) at java.net.Socket.(Socket.java:124) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:121) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:220) at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) at com.mysql.jdbc.Connection.(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS ource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) at com.ecommerce.DAO.UserDAO.(Unknown Source) at com.ecommerce.action.PlaceOrderAction.execute(Unknown Source) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:484) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) Attempted reconnect 3 times. Giving up. at com.mysql.jdbc.Connection.createNewIO(Connection.java:1952) at com.mysql.jdbc.Connection.(Connection.java:440) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400) at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConne ctionFactory.java:82) at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnect ionFactory.java:300) at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataS ource.java:838) at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav a:821) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.ecommer
RE: java.net.ConnectException: Connection refused
This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. I have tried 127.0.0.1, but even this does not work gives same error, can you think of any other solution... Also changed driver class name to com.mysql.jdbc.Driver, didn't work > url > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > rue > > > > driverClassName > org.gjt.mm.mysql.Driver > -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 12:26 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 9:17 AM > Cc: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux > environment. And i > am unable > to connect to mysql db. Below is the url > i am using in server.xml file. and also i have the jdbc driver under > WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was > successfully able to deploy the same application on Windows, > using the same > server.xml file. please help. This is a well known problem regarding MySQL and Linux. One of two has a screwy implementation of resolving host names. WHich one depends on who you talk to. Known solutions include using 127.0.0.1. You will also have issues with authenticating to the server if you limit mysql logins by server. > > > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > > url > jdbc:mysql://localhost:3306/prototypedb?autoReconnect=t > rue > > > > driverClassName > org.gjt.mm.mysql.Driver > > > org.apache.commons.dbcp.SQLNestedException: Cannot create > PoolableConnectionFactory, cause: > java.sql.SQLException: Server connection failure during > transaction. Due to > underlying exception: 'java.net.ConnectException: Connection refused'. > > ** BEGIN NESTED EXCEPTION ** > > java.net.ConnectException > MESSAGE: Connection refused > > STACKTRACE: > > java.net.ConnectException: Connection refused > at java.net.PlainSocketImpl.socketConnect(Native Method) > at > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) > at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) > at java.net.Socket.connect(Socket.java:452) > at java.net.Socket.connect(Socket.java:402) > at java.net.Socket.(Socket.java:309) > at java.net.Socket.(Socket.java:124) > at > com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac > tory.java:121) > at com.mysql.jdbc.MysqlIO.(MysqlIO.java:220) > at com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) > at com.mysql.jdbc.Connection.(Connection.java:440) > at > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv > er.java:400) > at > org.apache.commons.dbcp.DriverConnectionFactory.createConnecti > on(DriverConne > ctionFactory.java:82) > at > org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(P > oolableConnect > ionFactory.java:300) > at > org.apache.commons.dbcp.BasicDataSource.validateConnectionFact > ory(BasicDataS > ource.java:838) > at > org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic > DataSource.jav > a:821) > at > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat > aSource.java:5 > 18) > at com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) > at com.ecommerce.DAO.UserDAO.(Unknown Source) > at > com.ecommerce.action.PlaceOrderAction.execute(Unknown Source) > at > org.apache.struts.action.RequestProcessor.processActionPerform > (RequestProces > sor.java:484) > at > org.apache.struts.action.RequestProcessor.process(RequestProce > ssor.java:274) > at > org.apache.struts.action.ActionServlet.process(ActionServlet.j > ava:1482) > at > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:760) > at > javax.servlet.http.HttpServlet.service(HttpServl
RE: java.net.ConnectException: Connection refused
Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. ---thanks a lot, i'll try to refer mysql docs. > Also changed driver class name to com.mysql.jdbc.Driver, didn't work > > > > url > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > rue > > > > > > > > driverClassName > > org.gjt.mm.mysql.Driver > > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 12:26 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 9:17 AM > > Cc: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux > > environment. And i > > am unable > > to connect to mysql db. Below is the url > > i am using in server.xml file. and also i have the jdbc driver under > > WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was > > successfully able to deploy the same application on Windows, > > using the same > > server.xml file. please help. > > > This is a well known problem regarding MySQL and Linux. One > of two has a > screwy implementation of resolving host names. WHich one > depends on who you > talk to. > > Known solutions include using 127.0.0.1. You will also have > issues with > authenticating to the server if you limit mysql logins by server. > > > > > > > > > factory > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > url > > jdbc:mysql://localhost:3306/prototypedb?autoReconnect=t > > rue > > > > > > > > driverClassName > > org.gjt.mm.mysql.Driver > > > > > > org.apache.commons.dbcp.SQLNestedException: Cannot create > > PoolableConnectionFactory, cause: > > java.sql.SQLException: Server connection failure during > > transaction. Due to > > underlying exception: 'java.net.ConnectException: > Connection refused'. > > > > ** BEGIN NESTED EXCEPTION ** > > > > java.net.ConnectException > > MESSAGE: Connection refused > > > > STACKTRACE: > > > > java.net.ConnectException: Connection refused > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at > > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) > > at > > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) > > at > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) > > at java.net.Socket.connect(Socket.java:452) > > at java.net.Socket.connect(Socket.java:402) > > at java.net.Socket.(Socket.java:309) > > at java.net.Socket.(Socket.java:124) > > at > > com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFac > > tory.java:121) > > at com.mysql.jdbc.MysqlIO.(MysqlIO.java:220) > > at > com.mysql.jdbc.Connection.createNewIO(Connection.java:1884) > > at com.mysql.jdbc.Connection.(Connection.java:440) > > at > > com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriv > > er.java:400) > > at > > org.apache.commons.dbcp.DriverConnectionFactory.createConnecti > > on(DriverConne > > ctionFactory.java:82) > > at > > org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(P > > oolableConnect > > ionFactory.java:300) > > at > > org.apache.commons.dbcp.BasicDataSource.validateConnectionFact > > ory(BasicDataS > > ource.java:838) > > at > > org.apache.commons.dbcp.BasicDataSource.createDataSource(Basic > > DataSource.jav > > a:821) > > at > > org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDat > > aSource.java:5 > > 18) > > at > com.ecommerce.DAO.DAOFactory.getConnection(Unknown Source) > > at com.ecommerce.DAO.UserDAO.(Unknown Source) > > at > > com.ecommerce.action.PlaceOrderAction.execute(Un
RE: java.net.ConnectException: Connection refused
Hi Jim, I have tried all different options for the jdbc url, but everything leads to same error, :java.net.ConnectException: Connection refused -- i tried to get connection from DriverManager.getConnection() instead from datasource and even that doen't work. I was able to use the same configuration on my desktop, so its something to do with the linux environment. I am not able to figure it out, can you send me guildelines on how u were able to make it work, whenever u got time. i am using mysql4.0, Tomcat 4.0, and struts1.1. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 1:17 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 10:10 AM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > This is a well known problem regarding MySQL and Linux. One > of two has a > screwy implementation of resolving host names. WHich one > depends on who you > talk to. > > Known solutions include using 127.0.0.1. You will also have > issues with > authenticating to the server if you limit mysql logins by server. > > I have tried 127.0.0.1, but even this does not work gives > same error, can > you think of any other solution... Unfortunately I'm not at home, which is where my MySQL implementation is, so I can't show you what I'm doing for another 7-8 hours :( On the other hand the MySQL folk have some great documentation and help forums that could probably help you more, if no one else has any solutions for you here. > Also changed driver class name to com.mysql.jdbc.Driver, didn't work > > > > url > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > rue > > > > > > > > driverClassName > > org.gjt.mm.mysql.Driver > > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 12:26 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 9:17 AM > > Cc: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux > > environment. And i > > am unable > > to connect to mysql db. Below is the url > > i am using in server.xml file. and also i have the jdbc driver under > > WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was > > successfully able to deploy the same application on Windows, > > using the same > > server.xml file. please help. > > > This is a well known problem regarding MySQL and Linux. One > of two has a > screwy implementation of resolving host names. WHich one > depends on who you > talk to. > > Known solutions include using 127.0.0.1. You will also have > issues with > authenticating to the server if you limit mysql logins by server. > > > > > > > > > factory > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > url > > jdbc:mysql://localhost:3306/prototypedb?autoReconnect=t > > rue > > > > > > > > driverClassName > > org.gjt.mm.mysql.Driver > > > > > > org.apache.commons.dbcp.SQLNestedException: Cannot create > > PoolableConnectionFactory, cause: > > java.sql.SQLException: Server connection failure during > > transaction. Due to > > underlying exception: 'java.net.ConnectException: > Connection refused'. > > > > ** BEGIN NESTED EXCEPTION ** > > > > java.net.ConnectException > > MESSAGE: Connection refused > > > > STACKTRACE: > > > > java.net.ConnectException: Connection refused > > at java.net.PlainSocketImpl.socketConnect(Native Method) > > at > > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) > > at > > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) > > at > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) > > at java.net.Socket.connect(Socket.java:452) > > at java.net.Socket.connect(Socket.java:402) > > at java.net.Socket.(Socket.java:309) > >
RE: java.net.ConnectException: Connection refused
No there is no firewall on Linux box. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:24 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 1:13 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > Hi Jim, > I have tried all different options for the jdbc url, but > everything leads to > same error, > :java.net.ConnectException: Connection refused -- i tried to > get connection > from > DriverManager.getConnection() instead from datasource and > even that doen't > work. > I was able to use the same configuration on my desktop, so > its something to > do with the linux environment. > I am not able to figure it out, can you send me guildelines > on how u were > able to make it work, whenever u got time. > i am using mysql4.0, Tomcat 4.0, and struts1.1. Does your linux box have a firewall? If so, is it blocking the port? > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 1:17 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 10:10 AM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > This is a well known problem regarding MySQL and Linux. One > > of two has a > > screwy implementation of resolving host names. WHich one > > depends on who you > > talk to. > > > > Known solutions include using 127.0.0.1. You will also have > > issues with > > authenticating to the server if you limit mysql logins by server. > > > > I have tried 127.0.0.1, but even this does not work gives > > same error, can > > you think of any other solution... > > > Unfortunately I'm not at home, which is where my MySQL > implementation is, so > I can't show you what I'm doing for another 7-8 hours :( > > On the other hand the MySQL folk have some great > documentation and help > forums that could probably help you more, if no one else has > any solutions > for you here. > > > > > > > Also changed driver class name to com.mysql.jdbc.Driver, didn't work > > > > > > > url > > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > > rue > > > > > > > > > > > > driverClassName > > > org.gjt.mm.mysql.Driver > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 12:26 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 9:17 AM > > > Cc: Struts Users Mailing List > > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > > I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux > > > environment. And i > > > am unable > > > to connect to mysql db. Below is the url > > > i am using in server.xml file. and also i have the jdbc > driver under > > > WEB-INF/lib - > mysql-connector-java-3.0.14-production-bin.jar...I was > > > successfully able to deploy the same application on Windows, > > > using the same > > > server.xml file. please help. > > > > > > This is a well known problem regarding MySQL and Linux. One > > of two has a > > screwy implementation of resolving host names. WHich one > > depends on who you > > talk to. > > > > Known solutions include using 127.0.0.1. You will also have > > issues with > > authenticating to the server if you limit mysql logins by server. > > > > > > > > > > > > > > > factory > > > > > org.apache.commons.dbcp.BasicDataSourceFactory > > > > > > > > > url > > > jdbc:mysql://localhost:3306/prototypedb?autoReconnect=t > > > rue > > > > > > > > > > > >
RE: java.net.ConnectException: Connection refused
All the below 4 are working on my Linux box but still i have the same problem networking on the linux box is up and running? mysql is up and running? netstat --listen shows the 3306 port for mysql open and listening? Can you get the mysql admin tools to connect from commandline? -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:39 PM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 1:29 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > No there is no firewall on Linux box. Okay I'm going to down a mental list you've probably already checked, and I'm assuming a moderate level of linux understanding. networking on the linux box is up and running? mysql is up and running? netstat --listen shows the 3306 port for mysql open and listening? Can you get the mysql admin tools to connect from commandline? If all of these are yes, I'll have to wait until I get home to post my config... unless anyone can post theirs > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 4:24 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 1:13 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > Hi Jim, > > I have tried all different options for the jdbc url, but > > everything leads to > > same error, > > :java.net.ConnectException: Connection refused -- i tried to > > get connection > > from > > DriverManager.getConnection() instead from datasource and > > even that doen't > > work. > > I was able to use the same configuration on my desktop, so > > its something to > > do with the linux environment. > > I am not able to figure it out, can you send me guildelines > > on how u were > > able to make it work, whenever u got time. > > i am using mysql4.0, Tomcat 4.0, and struts1.1. > > > Does your linux box have a firewall? If so, is it blocking the port? > > > > > > > > > -Original Message----- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 1:17 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 10:10 AM > > > To: Struts Users Mailing List > > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > > This is a well known problem regarding MySQL and Linux. One > > > of two has a > > > screwy implementation of resolving host names. WHich one > > > depends on who you > > > talk to. > > > > > > Known solutions include using 127.0.0.1. You will also have > > > issues with > > > authenticating to the server if you limit mysql logins by server. > > > > > > I have tried 127.0.0.1, but even this does not work gives > > > same error, can > > > you think of any other solution... > > > > > > Unfortunately I'm not at home, which is where my MySQL > > implementation is, so > > I can't show you what I'm doing for another 7-8 hours :( > > > > On the other hand the MySQL folk have some great > > documentation and help > > forums that could probably help you more, if no one else has > > any solutions > > for you here. > > > > > > > > > > > > > Also changed driver class name to com.mysql.jdbc.Driver, > didn't work > > > > > > > > > > url > > > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > > > rue > > > > > > > > > > > > > > > > driverClassName > > > > org.gjt.mm.mysql.Driver > > > > > > > > > > > > > -Original Message- > > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 12:26 PM > > > To: Struts Users Mailing List > > > Subject: RE: jav
RE: java.net.ConnectException: Connection refused
I am able to get it work with org.gjt.mm.mysql.Driver itself. -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 6:03 PM To: [EMAIL PROTECTED] Subject: RE: java.net.ConnectException: Connection refused Sounds like you may have a different classloader best to use the class loader that the DriverManangerConnectionFactory uses e.g. Class.forName("com.mysql.jdbc.Driver", true, DriverManagerConnectionFactory.class.getClassLoader()); Let me know how you make out, Martin Gainty >From: "Jim Barrows" <[EMAIL PROTECTED]> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Subject: RE: java.net.ConnectException: Connection refused >Date: Tue, 10 Aug 2004 10:16:42 -0700 >MIME-Version: 1.0 >Received: from mail.apache.org ([209.237.227.199]) by mc12-f11.hotmail.com >with Microsoft SMTPSVC(5.0.2195.6824); Tue, 10 Aug 2004 10:17:13 -0700 >Received: (qmail 16184 invoked by uid 500); 10 Aug 2004 17:16:45 - >Received: (qmail 16166 invoked by uid 99); 10 Aug 2004 17:16:44 - >Received: from [12.34.77.106] (HELO SSSC-MAIL-2.internal.sssc.com) >(12.34.77.106) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 10 Aug 2004 >10:16:44 -0700 >X-Message-Info: JGTYoYF78jHjm9i5WASZbo4Un9bGokO1 >Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm >Precedence: bulk >List-Unsubscribe: <mailto:[EMAIL PROTECTED]> >List-Subscribe: <mailto:[EMAIL PROTECTED]> >List-Help: <mailto:[EMAIL PROTECTED]> >List-Post: <mailto:[EMAIL PROTECTED]> >List-Id: "Struts Users Mailing List" >Delivered-To: mailing list [EMAIL PROTECTED] >X-ASF-Spam-Status: No, hits=0.0 required=10.0tests= >X-Spam-Check-By: apache.org >content-class: urn:content-classes:message >X-MimeOLE: Produced By Microsoft Exchange V6.0.6487.1 >Message-ID: ><[EMAIL PROTECTED]> >X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: >java.net.ConnectException: Connection refused >Thread-Index: AcR+/Raevrqm1LFhRiC9L2lugobangAAEiFg >X-Virus-Checked: Checked >Return-Path: [EMAIL PROTECTED] >X-OriginalArrivalTime: 10 Aug 2004 17:17:13.0578 (UTC) >FILETIME=[E0C0E4A0:01C47EFD] > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 10:10 AM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > This is a well known problem regarding MySQL and Linux. One > > of two has a > > screwy implementation of resolving host names. WHich one > > depends on who you > > talk to. > > > > Known solutions include using 127.0.0.1. You will also have > > issues with > > authenticating to the server if you limit mysql logins by server. > > > > I have tried 127.0.0.1, but even this does not work gives > > same error, can > > you think of any other solution... > > >Unfortunately I'm not at home, which is where my MySQL implementation is, >so I can't show you what I'm doing for another 7-8 hours :( > >On the other hand the MySQL folk have some great documentation and help >forums that could probably help you more, if no one else has any solutions >for you here. > > > > > > > Also changed driver class name to com.mysql.jdbc.Driver, didn't work > > > > > > > url > > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > > rue > > > > > > > > > > > > driverClassName > > > org.gjt.mm.mysql.Driver > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 12:26 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 9:17 AM > > > Cc: Struts Users Mailing List > > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > > I am using Tomcat4.0, struts1.1, mysql 4.0.18 , on Linux > > > environment. And i > > > am unable > > > to connect to mysql db. Below is the url > > > i am using in server.xml file. and also i have the jdbc driver under > > > WEB-INF/lib - mysql-connector-java-3.0.14-production-bin.jar...I was > > > successfully able to deploy the same
RE: java.net.ConnectException: Connection refused
Thanks Jim, I got it, now my application is working, i am using loaclhost:3306 though. But i turned off the security option, it is "no", if i make it "yes" i still have accesControlException on getClassLoader. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 11, 2004 11:13 AM To: Struts Users Mailing List Subject: RE: java.net.ConnectException: Connection refused Sorry, I was supposed to do this last night, but here' my config. hibernate.connection.username=test dao.type=hibernate hibernate.connection.password=test hibernate.dialect=net.sf.hibernate.dialect.MySQLDialect hibernate.connection.url=jdbc\:mysql\://localhost/VirtualVillage?autoReconne ct\=true&useUnicode\=true&characterEncoding\=utf-8 hibernate.connection.driver_class=com.mysql.jdbc.Driver hibernate.connection.show_sql=true > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 1:29 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > No there is no firewall on Linux box. > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 4:24 PM > To: Struts Users Mailing List > Subject: RE: java.net.ConnectException: Connection refused > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 1:13 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > Hi Jim, > > I have tried all different options for the jdbc url, but > > everything leads to > > same error, > > :java.net.ConnectException: Connection refused -- i tried to > > get connection > > from > > DriverManager.getConnection() instead from datasource and > > even that doen't > > work. > > I was able to use the same configuration on my desktop, so > > its something to > > do with the linux environment. > > I am not able to figure it out, can you send me guildelines > > on how u were > > able to make it work, whenever u got time. > > i am using mysql4.0, Tomcat 4.0, and struts1.1. > > > Does your linux box have a firewall? If so, is it blocking the port? > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 1:17 PM > > To: Struts Users Mailing List > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 10:10 AM > > > To: Struts Users Mailing List > > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > > > > > This is a well known problem regarding MySQL and Linux. One > > > of two has a > > > screwy implementation of resolving host names. WHich one > > > depends on who you > > > talk to. > > > > > > Known solutions include using 127.0.0.1. You will also have > > > issues with > > > authenticating to the server if you limit mysql logins by server. > > > > > > I have tried 127.0.0.1, but even this does not work gives > > > same error, can > > > you think of any other solution... > > > > > > Unfortunately I'm not at home, which is where my MySQL > > implementation is, so > > I can't show you what I'm doing for another 7-8 hours :( > > > > On the other hand the MySQL folk have some great > > documentation and help > > forums that could probably help you more, if no one else has > > any solutions > > for you here. > > > > > > > > > > > > > Also changed driver class name to com.mysql.jdbc.Driver, > didn't work > > > > > > > > > > url > > > > jdbc:mysql://127.0.0.1:3306/prototypedb?autoReconnect=t > > > > rue > > > > > > > > > > > > > > > > driverClassName > > > > org.gjt.mm.mysql.Driver > > > > > > > > > > > > > -Original Message- > > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 12:26 PM > > > To: Struts Users Mailing List > > > Subject: RE: java.net.ConnectException: Connection refused > > > > > > > > >
form submit problem...
I am trying to submit a form with users email and password, such that when the user ckicks on next the checkCustomer.do action is executed. I am using html:submit to display the next button as below:" " But i do not want to use html:submit as i have to display a img button . How can i do that. I have tried to use : -- but it does not work as the form attributes are never set. And also i tried to write a javascript as function gotoNext(){ document.forms[0].action=checkCustomer.do; document.forms[0].submit(); } and in jsp use a link to call javascript function, even that does not work. Below is my jsp file... Enter your password: Any help is greatly appreciated. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: form submit problem...
Thanks for the references, but just replacing html:submit with the below line worked for me -Original Message- From: Michael McGrady [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 18, 2004 12:50 PM To: Struts Users Mailing List Subject: Re: form submit problem... Jim Barrows wrote: > > >>-Original Message----- >>From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] >>Sent: Wednesday, August 18, 2004 9:15 AM >>To: Struts Users Mailing List >>Subject: form submit problem... >> >> >>I am trying to submit a form with users email and password, >>such that when >>the user ckicks on next the checkCustomer.do action is executed. >>I am using html:submit to display the next button as below:" >> >value="next"/> " >> >>But i do not want to use html:submit as i have to display a >>img button . >>How can i do that. >> >> I would also suggest: http://wiki.apache.org/struts/StrutsCatalogMultipleImageTagsSimplified Michael - 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]
can a non struts application be called from inside stuts application.
i have a shopping cart struts application, when update button of a jsp is clicked, some action is performed and after the successful excution of that action, a servlet which takes certain parameters should be called from the action class. The servlets which i am talking about are non-struts based and are already implemented, and it would take much time to redo those using struts, so i am wondering if there is any way to reuse those and call those servlets from actions class. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 10, 2004 4:33 PM To: Struts Users Mailing List Subject: RE: Servlet help for a Struts programmer > -Original Message- > From: Michael McGrady [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 1:22 PM > To: Struts Users Mailing List > Subject: Re: Servlet help for a Struts programmer > > > At 12:57 PM 8/10/2004, you wrote: > >Yes, Struts is based on Servlets, but you don't have to know > >anything about Servlets to make a useful Struts webapp. > > I wonder if this is true. I cannot imagine that it could be. > Maybe it > is. I am beginning to think so. ///;-) Try it yourself no JSP's. No struts, and basic CRUD operations on an address book. Now today, you would probably be smart. You would have a CRUD servlet for the "actions", that would redirect to a servlet for generating HTML. That's 4 serlvets handling CRUD, one servlet to generate the add/edit form page, one servlet to generate the list address page. And no, you don't get to use jakarta's ECS either!!! Nope. Not at all.. you can however drool over it :) out.println( ""); out.println( ""); out.println( "THis is the title of my page."); "); Or: out.println( "" +"" +" This is the title of my page."); +""); - 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: can a non struts application be called from inside stuts application.
Servlets are accessed by URLs, action classes forward to URLs. So you can forward to them, but call them directly akin to a method call... I don't think so... not without a lot of handwaving and chanting anyway. >> so you mean to say that i have to rewrite my old servlet class into an action class. My old servlet class which takes httprequest and httpresponse and calls do post should be converted to an action class execute method having the functionality of do post method. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 1:43 PM To: Struts Users Mailing List Subject: RE: can a non struts application be called from inside stuts application. > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 10:37 AM > To: Struts Users Mailing List > Subject: can a non struts application be called from inside stuts > application. > > > i have a shopping cart struts application, when update > button of a jsp is > clicked, some action is performed and after the successful > excution of that > action, a servlet which takes certain parameters should be > called from the > action class. > > The servlets which i am talking about are non-struts based > and are already > implemented, and it would take much time to redo those using > struts, so i am > wondering if there is any way to reuse those and call those > servlets from > actions class. Servlets are accessed by URLs, action classes forward to URLs. So you can forward to them, but call them directly akin to a method call... I don't think so... not without a lot of handwaving and chanting anyway. > > > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 4:33 PM > To: Struts Users Mailing List > Subject: RE: Servlet help for a Struts programmer > > > > > > -Original Message- > > From: Michael McGrady [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 1:22 PM > > To: Struts Users Mailing List > > Subject: Re: Servlet help for a Struts programmer > > > > > > At 12:57 PM 8/10/2004, you wrote: > > >Yes, Struts is based on Servlets, but you don't have to know > > >anything about Servlets to make a useful Struts webapp. > > > > I wonder if this is true. I cannot imagine that it could be. > > Maybe it > > is. I am beginning to think so. ///;-) > > Try it yourself no JSP's. No struts, and basic CRUD > operations on an > address book. > > Now today, you would probably be smart. You would have a > CRUD servlet for > the "actions", that would redirect to a servlet for > generating HTML. That's > 4 serlvets handling CRUD, one servlet to generate the > add/edit form page, > one servlet to generate the list address page. > > And no, you don't get to use jakarta's ECS either!!! Nope. > Not at all.. > you can however drool over it :) > > out.println( ""); > out.println( ""); > out.println( "THis is the title of my > page."); > "); > > Or: > > out.println( "" > +"" > +" This is the title of my page."); > +""); > > > - > 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: can a non struts application be called from inside stuts application.
O.k thats great, but i have make a 3 different servlet calls one by one in my action class. Like gotoservlet1 then gotoServlet2 and then gotoServlet3, how can i achieve that in one action forward... -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 2:01 PM To: Struts Users Mailing List Subject: RE: can a non struts application be called from inside stuts application. > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 10:53 AM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > > > > Servlets are accessed by URLs, action classes forward to > URLs. So you can > forward to them, but call them directly akin to a method > call... I don't > think so... not without a lot of handwaving and chanting anyway. > > >> so you mean to say that i have to rewrite my old servlet > class into an > action class. > My old servlet class which takes httprequest and httpresponse > and calls do > post should be converted to an action class execute method having the > functionality of do post method. Not really... if your forward can be the URL /gotoMyServlet, then your okay... it will still work as is. If in your code you want to do something like gotoMyServlet.doPut(blah), then your going to have to do some work to set up the environment that the servlet expects to run in. > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 1:43 PM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 10:37 AM > > To: Struts Users Mailing List > > Subject: can a non struts application be called from inside stuts > > application. > > > > > > i have a shopping cart struts application, when update > > button of a jsp is > > clicked, some action is performed and after the successful > > excution of that > > action, a servlet which takes certain parameters should be > > called from the > > action class. > > > > The servlets which i am talking about are non-struts based > > and are already > > implemented, and it would take much time to redo those using > > struts, so i am > > wondering if there is any way to reuse those and call those > > servlets from > > actions class. > > Servlets are accessed by URLs, action classes forward to > URLs. So you can > forward to them, but call them directly akin to a method > call... I don't > think so... not without a lot of handwaving and chanting anyway. > > > > > > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, August 10, 2004 4:33 PM > > To: Struts Users Mailing List > > Subject: RE: Servlet help for a Struts programmer > > > > > > > > > > > -Original Message- > > > From: Michael McGrady [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 10, 2004 1:22 PM > > > To: Struts Users Mailing List > > > Subject: Re: Servlet help for a Struts programmer > > > > > > > > > At 12:57 PM 8/10/2004, you wrote: > > > >Yes, Struts is based on Servlets, but you don't have to know > > > >anything about Servlets to make a useful Struts webapp. > > > > > > I wonder if this is true. I cannot imagine that it could be. > > > Maybe it > > > is. I am beginning to think so. ///;-) > > > > Try it yourself no JSP's. No struts, and basic CRUD > > operations on an > > address book. > > > > Now today, you would probably be smart. You would have a > > CRUD servlet for > > the "actions", that would redirect to a servlet for > > generating HTML. That's > > 4 serlvets handling CRUD, one servlet to generate the > > add/edit form page, > > one servlet to generate the list address page. > > > > And no, you don't get to use jakarta's ECS either!!! Nope. > > Not at all.. > > you can however drool over it :) > > > > out.println( ""); > > out.println( ""); > > out.println( "THis is the title of my > > page."); > > "); > > > > Or: > > > > out.println( "" > > +&
RE: can a non struts application be called from inside stuts application.
No the three servlets do not forward each other in the old application, now there is a new requirement where i have to combine all the 3 servlets functionality. So i guess i can write helper classes as u suggested. -Original Message- From: Jim Barrows [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 2:13 PM To: Struts Users Mailing List Subject: RE: can a non struts application be called from inside stuts application. > -Original Message- > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 11:03 AM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > > O.k thats great, but i have make a 3 different servlet calls > one by one in > my action class. > Like gotoservlet1 then gotoServlet2 and then gotoServlet3, > > how can i achieve that in one action forward... Not in one action forward... Are these three servlets forwarding to each other now? Is this a new requirement. If this is a new requirement, I'm wondering if it might not be a better (from and engineering point of view only) to refactor these somehow If you are already using these servlets as is, and now need to combine them for a new action, you could create a helper class something like: public class DuhHelperClass{ public static void servlet1CommonFunctionality(blahRequest req, blahResponse resp) { copy and paste appropriate code here. } public static void doTheSameThingForServlet2( blah, blah){ blah } etc } Then in your servlets, call the appropriate static, and in your action class you could call all three. There might be a better way to re-factor the code, I would tend to doubt this is the right way. > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 2:01 PM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 10:53 AM > > To: Struts Users Mailing List > > Subject: RE: can a non struts application be called from > inside stuts > > application. > > > > > > > > > > Servlets are accessed by URLs, action classes forward to > > URLs. So you can > > forward to them, but call them directly akin to a method > > call... I don't > > think so... not without a lot of handwaving and chanting anyway. > > > > >> so you mean to say that i have to rewrite my old servlet > > class into an > > action class. > > My old servlet class which takes httprequest and httpresponse > > and calls do > > post should be converted to an action class execute method > having the > > functionality of do post method. > > Not really... if your forward can be the URL /gotoMyServlet, then your > okay... it will still work as is. If in your code you want > to do something > like gotoMyServlet.doPut(blah), then your going to have to do > some work to > set up the environment that the servlet expects to run in. > > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 1:43 PM > > To: Struts Users Mailing List > > Subject: RE: can a non struts application be called from > inside stuts > > application. > > > > > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, August 26, 2004 10:37 AM > > > To: Struts Users Mailing List > > > Subject: can a non struts application be called from inside stuts > > > application. > > > > > > > > > i have a shopping cart struts application, when update > > > button of a jsp is > > > clicked, some action is performed and after the successful > > > excution of that > > > action, a servlet which takes certain parameters should be > > > called from the > > > action class. > > > > > > The servlets which i am talking about are non-struts based > > > and are already > > > implemented, and it would take much time to redo those using > > > struts, so i am > > > wondering if there is any way to reuse those and call those > > > servlets from > > > actions class. > > > > Servlets are accessed by URLs, action classes forward to > > URLs. So you can > > forward to them, but call them directly akin to a method &
RE: can a non struts application be called from inside stuts application.
from where do i get this package, and where exactly will doPost method go...i have never used httpClient Package, so can you point me to the correct resource.. -Original Message- From: Pingili, Madhupal [mailto:[EMAIL PROTECTED] Sent: Thursday, August 26, 2004 2:17 PM To: 'Struts Users Mailing List' Subject: RE: can a non struts application be called from inside stuts application. How about using HTTP Client package like this: public static String getUrlResponse(String url) { String result = null; HttpClient client = new HttpClient(); // Create a method instance. HttpMethod method = new GetMethod(url); // Execute the method. try { int statusCode = client.executeMethod(method); } catch (HttpRecoverableException e) { //log the error } catch (IOException e) { //log the error } // Read the response body. byte[] responseBody = method.getResponseBody(); if( result == null ) { result = new String(responseBody); } // Release the connection. method.releaseConnection(); return result; } In your case, have 3 methods method1, method2 and method3 for 3 servlets and execute them one after the other. Just try and see if it solves your problem. Reddy Pingili > -Original Message- > From: Shilpa Nalgonda [SMTP:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 2:03 PM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > O.k thats great, but i have make a 3 different servlet calls one by one in > my action class. > Like gotoservlet1 then gotoServlet2 and then gotoServlet3, > > how can i achieve that in one action forward... > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Thursday, August 26, 2004 2:01 PM > To: Struts Users Mailing List > Subject: RE: can a non struts application be called from inside stuts > application. > > > > > > -Original Message- > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 10:53 AM > > To: Struts Users Mailing List > > Subject: RE: can a non struts application be called from inside stuts > > application. > > > > > > > > > > Servlets are accessed by URLs, action classes forward to > > URLs. So you can > > forward to them, but call them directly akin to a method > > call... I don't > > think so... not without a lot of handwaving and chanting anyway. > > > > >> so you mean to say that i have to rewrite my old servlet > > class into an > > action class. > > My old servlet class which takes httprequest and httpresponse > > and calls do > > post should be converted to an action class execute method having the > > functionality of do post method. > > Not really... if your forward can be the URL /gotoMyServlet, then your > okay... it will still work as is. If in your code you want to do > something > like gotoMyServlet.doPut(blah), then your going to have to do some work to > set up the environment that the servlet expects to run in. > > > > > > > > > > -Original Message- > > From: Jim Barrows [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 26, 2004 1:43 PM > > To: Struts Users Mailing List > > Subject: RE: can a non struts application be called from inside stuts > > application. > > > > > > > > > > > -Original Message- > > > From: Shilpa Nalgonda [mailto:[EMAIL PROTECTED] > > > Sent: Thursday, August 26, 2004 10:37 AM > > > To: Struts Users Mailing List > > > Subject: can a non struts application be called from inside stuts > > > application. > > > > > > > > > i have a shopping cart struts application, when update > > > button of a jsp is > > > clicked, some action is performed and after the successful > > > excution of that > > > action, a servlet which takes certain parameters should be > > > called from the > > > action class. > > > > > > The servlets which i am talking about are non-struts based > > > and are already > > > implemented, and it would take much time to redo those using > > > struts, so i am > > > wondering if there is any way to reuse those and call those > > > servlets from > > > actions class. > > > > Servlets are accessed by URLs, action classes forward to > > URLs. So you can > > forward to them, but call them directly akin to a method > > call... I don't &
RE: can a non struts application be called from inside stuts application.
The old servlets takes lots of parameters, how and where can i pass those parameters in struts config... -Original Message- From: news [mailto:[EMAIL PROTECTED] Behalf Of Bill Siggelkow Sent: Thursday, August 26, 2004 1:59 PM To: [EMAIL PROTECTED] Subject: Re: can a non struts application be called from inside stuts application. Well, you can't call a servlet from an Action with a Java method call but you can easily forward the request to the servlet from the action. I suggest creating a local or global forward element for the servlet. Then in the MyAction.execute() ... // business logic //... // now forward to old servlet return mapping.findForward("LegacyServlet"); } Comprande? Shilpa Nalgonda wrote: > i have a shopping cart struts application, when update button of a jsp is > clicked, some action is performed and after the successful excution of that > action, a servlet which takes certain parameters should be called from the > action class. > > The servlets which i am talking about are non-struts based and are already > implemented, and it would take much time to redo those using struts, so i am > wondering if there is any way to reuse those and call those servlets from > actions class. > > > > > > -Original Message- > From: Jim Barrows [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 10, 2004 4:33 PM > To: Struts Users Mailing List > Subject: RE: Servlet help for a Struts programmer > > > > > >>-Original Message- >>From: Michael McGrady [mailto:[EMAIL PROTECTED] >>Sent: Tuesday, August 10, 2004 1:22 PM >>To: Struts Users Mailing List >>Subject: Re: Servlet help for a Struts programmer >> >> >>At 12:57 PM 8/10/2004, you wrote: >> >>>Yes, Struts is based on Servlets, but you don't have to know >>>anything about Servlets to make a useful Struts webapp. >> >>I wonder if this is true. I cannot imagine that it could be. >> Maybe it >>is. I am beginning to think so. ///;-) > > > Try it yourself no JSP's. No struts, and basic CRUD operations on an > address book. > > Now today, you would probably be smart. You would have a CRUD servlet for > the "actions", that would redirect to a servlet for generating HTML. That's > 4 serlvets handling CRUD, one servlet to generate the add/edit form page, > one servlet to generate the list address page. > > And no, you don't get to use jakarta's ECS either!!! Nope. Not at all.. > you can however drool over it :) > > out.println( ""); > out.println( ""); > out.println( "THis is the title of my page."); > "); > > Or: > > out.println( "" > +"" > +" This is the title of my page."); > +""); > > > - > 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]
FW: cannot compile resource bundle files...illegal character error:
I am not able to compile resource bundle classes, which are .java files that require unicode settings. I am using ant scrpit to compile the files. my ant scrpit look slike this: I am using jdk1.4 and ant 1.4 to compile the files. Should i chane any unicode setting? please suggest... - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
dynamically change the dropdown list from a database...
I am having problem dynamically display the dropdown list from database. There are two dropdown list boxes A and B, when the user changes options in dropdown A, the dropdown B should also change dynamically from databse. Both A and B use html select tag. Dropdown A and B are inside the shipReprt.jsp. I am trying to submit to the same jsp on change event of dropdown A .. It does not work, can anyone plesae suggest. I am not struts though...below is the code for Dropdown A.. I have to pass the vendor parameter to dropdown B so that i can query database with this parameter... "> MP BookMaker ADOBE <% String partner = request.getParameter("vendor"); out.println("Size : " + partner); %> - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause:
Hi, I am getting the timeout exception for connection pooling, i am using Tomca 4.1 and datasource to retrieve connections. I am attaching all the soure code and configuration files used in my application, please suggest where iam doing wrong... SEVERE: getConnection()--SQLException org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, cause: java.util.NoSuchElementException: Timeout waiting for idle object at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPoo l.java:801) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.ja va:140) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:5 18) at com.mypublisher.oemapi.DAO.DBAccess.getConnection(DBAccess.java:47) at com.mypublisher.oemapi.DAO.Persister.(Persister.java:46) at com.mypublisher.oemapi.SubmitOrder.SubmitOrder(SubmitOrder.java:61) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.xmlrpc.Invoker.execute(Invoker.java:168) at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:123) at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:185) at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:151) at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:128) at com.mypublisher.oemapi.xmlrpc.XmlRpcServlet.doPost(XmlRpcServlet.java === server.xml - factory org.apache.commons.dbcp.BasicDataSourceFactory maxActive 5 maxIdle 2 maxWait 1 username ioeadmin password ioeadmin driverClassName oracle.jdbc.driver.OracleDriver url jdbc:oracle:thin:@ipaddress:1521:MYDB === DatasourceFactory is a singleton class used to retrieve the datasource from tomcat using JNDi..and connection is obtained from datasource... public static DataSource getInstance() throws SystemException { if (!isDataSrcAvaliable) { if (dataSource == null) { new DataSourceFactory(); doLookUp(); isDataSrcAvaliable = true; } //end if (dataSource == null) }// end if (!isDataSrcAvaliable) return dataSource; } /* end getInstance() */ doLookUp method does this: Context ctx = new InitialContext(); String dataSrc = msgResource.getMessage(OEMAPIConstants.DATA_SOURCE_NAME); Context env = (Context)ctx.lookup("java:comp/env"); dataSource = (DataSource) env.lookup(dataSrc); public static Connection getConnection() throws DAOException { DataSource ds = (DataSource) DataSourceFactory.getInstance(); Connection con = ds.getConnection(); return ds.getConnection(); } and every database lookup class, gets this connection and closes the connection after the query to database... - 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]
Internationalization of characters --UTF8 encoding
Hi, I am using Tomcat4.1, Oracle 8i , and XmlRpc to write an application which is supposed to take japanese characters an insert them into database. Is there any setting in Tomcat4 where i should be giving the encoding option. And aslo i get the request from the client in the form of xml and pass that request via xmlrpc and insert into oracle database. The client sends japanese characters in Unicode , our database has caracter set of US7ASCII. select * from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET'; PARAMETER VALUE -- -- NLS_CHARACTERSET US7ASCII The data is being inserted as all brackets in database.'{{{' Is there any conversion i need to do while inserting in the database. Please suggest if anyone has any opinions. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Internationalization of characters --UTF8 encoding
thanks. i tried converting data but nothing works, maybe i should try UTF-7 and see.. but can u send me examples ... -Original Message- From: Jason Lea [mailto:[EMAIL PROTECTED] Sent: Friday, October 29, 2004 5:29 PM To: Struts Users Mailing List Subject: Re: Internationalization of characters --UTF8 encoding Shilpa Nalgonda wrote: >Hi, > >I am using Tomcat4.1, Oracle 8i , and XmlRpc to write an application which >is supposed to take japanese characters an insert them into database. Is >there any setting in Tomcat4 where i should be giving the encoding option. >And aslo i get the request from the client in the form of xml and pass that >request via xmlrpc and insert into oracle database. >The client sends japanese characters in Unicode , our database has caracter >set of US7ASCII. > >select * from NLS_DATABASE_PARAMETERS where parameter = 'NLS_CHARACTERSET'; > >PARAMETER VALUE >-- -- >NLS_CHARACTERSET US7ASCII > >The data is being inserted as all brackets in database.'{{{' >Is there any conversion i need to do while inserting in the database. > >Please suggest if anyone has any opinions. > >- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > If you can't change the database to Unicode/UTF-8 encoding then you would have to convert strings going into and coming out of the database. This would be the best option for reading/writing the database. Everything else takes a lot of extra work. You maybe able to dump the database and recreate a new one as Unicode/UTF-8 and then reload the data. There may be functions in Oracle 8i has any functions that might do this for you, or perform string conversions. Another option which would be full of difficulty would be converting the strings into UTF-7 (http://www.free-definition.com/UTF-7.html) before inserting into the database, and then converting from UTF-7 to Unicode when you read from the database. -- Jason Lea - 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]
Locale problem...
Hi All, I have an application which is used in US, Europe and Asia. The application should show the date in each regions own local time. I have to create the time and store it in databsae in GMT and again while displaying the date back to the browser convert The GMT into the local timezone. What Is the besy way to achieve this, My application is Struts based. Can I capture the browsers locale in the jsp and pass it to the backend and convert it into GMT to insert into database... Thanks for any suggestions. -Original Message- From: Tamas Szabo [mailto:[EMAIL PROTECTED] Sent: Monday, January 23, 2006 11:56 AM To: Struts Users Mailing List Subject: Re: Validation Security Hole? But what do you guys mean by lookin for a canceled method in the Action. I think that the best would be to implement a Cancelable interface if your Action is cancelable. You would have to do this in all kind of Actions (DispatchAction too) by the way. Or is having interfaces very unstrutsish? Tamas On 1/24/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote: > > On Mon, January 23, 2006 9:54 am, Rick Reumann said: > > The solution I would like to see is if the canceled param is passed > > to the Action, it tries to look for a "canceled" method in the > > Action. I know this makes the Action like a DispatchAction but in > > this regard I don't think the non-Dispatch folks would disapprove > > too much. In other words, execute is never performed (not is a > > dispatch method performed) only the 'cancelled' method is looked > > for. Validation is skipped as usual for this cancelled method. This > > is better than having to use the current "isCancelled" since you are > > never in the your Action's execute or Action dispatch method. > > I'm in the non-DispatchAction camp myself (although who knows, I may > be the only one in that camp!) and I don't have a problem with this. > > > What do you guys think about just making sure a "cancelled' method > > is looked for when canceling? The problem will be that this won't be > > backward compatible now that I think about it. Blah oh well. I > > tried:) > > That would be my only concern is backwards-compatibility. Then again, > simply adding the method to the Action class should deal with it > always being present. I would also suggest a default implementation > that returned null but that rendered a response like so: > > cancel() not present No > cancel() method found in requested Action > > At least that way it's not just a blank screen, the hole is plugged, > and a developer will know what's going on pretty quickly and easily (a > nice log message in the default implementation saying what the > requested Action was would be nice too). > > Anyone legitimately using isCancelled() functionality would have to > move that related code to cancelled() now to have it all still work, > but I tend to think that's a relatively small group of people being > hurt... I for one would find this solution acceptable. > > Frank > > > The description by Laurie below is > > On 1/22/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > >> [Moved to a top-level thread, as this doesn't have anything to do > >> with (either of) the thread(s) it was nested in! :-)] > >> > >> > >> I think this thread deserves discussion on the dev list, but before > >> I move it over I thought I'd post a summary to make sure I've > >> captured > all > >> the arguments. I've also added preliminary thoughts in how to > >> resolve the issue at the end of this post, though that discussion > >> definitely ought to proceed on the dev list I guess. > >> > >> I'll re-post this message to the dev list later today if I haven't > >> missed anything important below: > >> > >> > >> > >> * Issue: addition of a 'org.apache.struts.action.CANCEL' parameter > >> to any request will cause validation to be skipped, but the rest of > >> the request processing / action invocation cycle to proceed > >> normally > >> > >> * Consequence: any action which proceeds assuming that validation > >> has completed successfully and which doesn't explicitly check > >> isCanceled() is proceeding on a broken assumption > >> > >> * Questions: > >> > >> - why doesn't Struts call validate() on a cancelled request? > >> > >> If a request is canceled it usually means validations don't > >> apply since the implication is that any user input will be > >> thrown away. Users shouldn't be required to supply valid > >> inputs for actions they are canceling. > >> > >> - why does Struts still call Action.execute() for a canceled request? > >> > >> Since you may still want to act on a canceled request (e.g. > >> to clean up resources stored in the session). (Some of?) the > >> DispactAction variants dispatch to a special method and aren't > >> subject to the consequences listed above, but most action > >> implementations don't. > >> > >> - why does Struts still populate the action form on a cancelled > reque
Struts using iframes...
Hi , I am having problem populating the form with the selected checkboxes values. Tere is a parent (newclient.jsp) form. This form makes a call to the iframes. like this iframes src is pointing to another jsp( cleintChecked.jsp) which has the html:checkboxes. Now when the user selcts the checkboxes and sumits the form, the checkboxes are not being populated. Since the checkboxes are in another jsp, the form is not being forwarded properly i guess, can some one suggest how to solve this population of checkboxes.. i want to use only frames, because we want the ability to scroll the data in the frames... Any help much appreciated. Thanks. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts using iframes...
Thanks a lot using Div works for me... -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 21, 2005 12:06 PM To: Struts Users Mailing List Subject: Re: Struts using iframes... The trick with iFrames, or regular frames for that matter, is to realize that what you are looking as it two separate browser windows. Think of it like tabs in Firefox... they are completely separate entities. If I understand what your trying to do correctly, you want the checkboxes submitted in the iFrame to appear in the checkboxes in the parent documemt. To do this you will need to submit in the iFrame, and then refresh the parent. But of course, this would only work if the form was session-scoped. I think there is a better answer though... simply use a instead of an iFrame. To make it scroll like an iFrame, add: style="overflow:scroll;" ...to the . You might want to set the value to auto instead of scroll, which will only put scrollbars there if the content needs it. This will give you the srolling window you want, without the need for frames, and things will work more "normally", as far as Struts goes. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com AIM: fzammetti Yahoo: fzammetti MSN: [EMAIL PROTECTED] On Wed, December 21, 2005 10:23 am, Martin Gainty said: > I thought you one had to specify the target attribute target="_self" along > with attribute src="AssumeFullOrRelativeURI" to render within same page. > Take a look at > http://www.htmlhelp.com/reference/html40/special/a.html#target > I am relatively certain this is O/T as it does not relate to struts but to > implemention characteristics of iframe > The more common way to include items as part of a form is to use OBJECT > instead of iframe > I would suggest looking at > http://www.w3.org/TR/REC-html40/struct/objects.html#edef-OBJECT > Anyone else? > Martin- > - Original Message - > From: <[EMAIL PROTECTED]> > To: > Sent: Wednesday, December 21, 2005 8:21 AM > Subject: Struts using iframes... > > > Hi , > I am having problem populating the form with the selected checkboxes > values. > Tere is a parent (newclient.jsp) form. This form makes a call to the > iframes. like this > > width="100%" height="180" > scrolling="yes"> > > iframes src is pointing to another jsp( cleintChecked.jsp) which has the > html:checkboxes. > > Now when the user selcts the checkboxes and sumits the form, the > checkboxes are not being populated. > > Since the checkboxes are in another jsp, the form is not being forwarded > properly i guess, > > can some one suggest how to solve this population of checkboxes.. > i want to use only frames, because we want the ability to scroll the data > in the frames... > > Any help much appreciated. > > Thanks. > > > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. > > E-mail transmission cannot be guaranteed to be secure or error-free > as information could be intercepted, corrupted, lost, destroyed, > arrive late or incomplete, or contain viruses. The sender therefore > does not accept liability for any errors or omissions in the contents > of this message which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities or > related financial instruments. > > > - > 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] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed
Checkboxes...
Hi All, I am using struts checkboxes. When the checkboxes are populated i make some of them as checked by default. But the user submits the page there might be cases when default ones will be unchecked... Even though teh default boxes are unchecked, they are coming as selected in the java code. How can i unselect them... i am using the below code ... " value="true" /> Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Checkboxes...
If i make them false in reset method, i cannot set any checkboxes by defalut to checked.. everytime the checkboxes are uncheckedif i add reset method... -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 10:54 PM To: Struts Users Mailing List Subject: Re: Checkboxes... On 12/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Even though teh default boxes are unchecked, they are > coming as selected in the java code. > > How can i unselect them... Are you setting them to false in the 'reset' method of your form bean, as described in the documentation? http://struts.apache.org/struts-taglib/tagreference-struts-html.html#html:checkbox "WARNING: In order to correctly recognize unchecked checkboxes, the ActionForm bean associated with this form must include a statement setting the corresponding boolean property to false in the reset() method." -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Checkboxes...
Thanks. Yeah i did that i have reset the default values in my Action code, but the problem is reset method gets called everytime... That is after the default is set, the reset is called before the form is populated and all teh default values again gets set to false. Below is my code, i don't understand why this reset gets called so many times... public void reset(ActionMapping mapping, HttpServletRequest request) { this.selectedClient[0] = false; } -Original Message- From: Leahy, Kevin [mailto:[EMAIL PROTECTED] Sent: Friday, December 23, 2005 10:52 AM To: 'Struts Users Mailing List' Subject: RE: Checkboxes... The reset() method is called first. Then the form is populated from the request and then your Action code executes. You can set them false in reset() method and then reset the default values in the Action code. The reason you have to do this for check boxes is that HTML forms don't submit anything when the checkbox is off. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 23 December 2005 15:27 To: user@struts.apache.org Subject: RE: Checkboxes... If i make them false in reset method, i cannot set any checkboxes by defalut to checked.. everytime the checkboxes are uncheckedif i add reset method... -Original Message- From: Wendy Smoak [mailto:[EMAIL PROTECTED] Sent: Thursday, December 22, 2005 10:54 PM To: Struts Users Mailing List Subject: Re: Checkboxes... On 12/22/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Even though teh default boxes are unchecked, they are coming as > selected in the java code. > > How can i unselect them... Are you setting them to false in the 'reset' method of your form bean, as described in the documentation? http://struts.apache.org/struts-taglib/tagreference-struts-html.html#html:ch eckbox "WARNING: In order to correctly recognize unchecked checkboxes, the ActionForm bean associated with this form must include a statement setting the corresponding boolean property to false in the reset() method." -- Wendy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The information contained herein is confidential and is intended solely for the addressee. Access by any other party is unauthorised without the express written permission of the sender. If you are not the intended recipient, please contact the sender either via the company switchboard on +44 (0)20 7623 8000, or via e-mail return. If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to http://www.drkw.com/disc/email/ or contact the sender. 3166 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy v
Clear the Action Form..
How can i clear the Action form when i have saved all the information i want, is there any method in Struts which does that, or do i have explicitly clear the form. -Original Message- From: Greg Reddin [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 11:56 AM To: Struts Users Mailing List Subject: Re: Using an attribute defined in tiles-defs.xml in a JSP as a JAVA var On Dec 29, 2005, at 9:40 AM, Andreas B. Thun wrote: > <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %> > > classname="java.lang.String" name="selectedCountry"/> > > <% > String country = selectedCountry + "something"; > %> Try this: <% String country = (String) pageContext.findAttribute ("selectedCountry") + "something"; %> I'm pretty sure Tiles places these attributes in page context and does not create JSP variables for them. Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bean scope...
Hi All, I keep getting this error , I have defined this bean in config file... Also... -Cannot find bean StatusSearchActionForm in any scope Do I have to define it somewhere else??? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 10:00 AM To: user@struts.apache.org Subject: RE: [EMAIL PROTECTED] Hello I am new to struts. Can you please tell me where could I get the basic information regarding the same. Some of the basic books or pdf files for the basic understanding of struts -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 8:17 PM To: user@struts.apache.org Subject: RE: [EMAIL PROTECTED] Hello I am new to struts. Can you please tell me where could I get the basic information regarding the same. Some of the basic books or pdf files for the basic understanding of struts -Original Message- From: »-(¯` Janarthan ´¯)-» [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 8:15 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: [EMAIL PROTECTED] Could not understand the meaning of this mail :( struts-user <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] Best Regards, »-(¯` Janarthan ´¯)-» "The difference between Dreams and Achievements is purely Desire" - Yahoo! Photos - Showcase holiday pictures in hardcover Photo Books. You design it and we'll bind it! The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to use logic iterate...
Hi All, I have the below logic , and I need to loop thriugh the Dmamarket Array using struts and Set the form attribute.. My form has dmaMarket[] as an attribute. <% DmaMarket[] dmaArray = (DmaMarket[])session.getAttribute(Constants.ATTRIBUTE_EU_DMAMARKET_LIST) ; if( dmaArray == null){ out.println("ArrayIsNull");} else{ for (int i=0; i < dmaArray.length; i++) { DmaMarket dma = dmaArray[i]; out.println( dma.getCountry()); } }%> I am using this struts code ... but it doesn't work can anyone tell me where I am doing wrong. <% String name = "newClientForm.dmaMarket["+ rowIndex + "]"; %> " property="country" />" > Thanks. Sn Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use logic iterate...
Thanks, But I have a different problem.. I have an ArrayList which has dmaMarket Objects... dmaMarket has getters and setters...like getCountry etc., I have to loop through the arrayList and get the dmaMarket object and display the attributes like country etc. But the problem is I have to set the attributes (country) also at the same time.. Can I use nested tags... -Original Message- From: Gary Feidt [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 12:31 PM To: user@struts.apache.org Subject: Re: How to use logic iterate... If you have a getDmaMarket and setDmaMarket property on your form, I would do the following: This will display your data, but it looks like you are trying to edit the list by displaying it in tags. You may want to rethink that, and use another page to edit each item individually. Just my 2 cents, Gary >>> [EMAIL PROTECTED] 1/10/2006 10:39:33 AM >>> Hi All, I have the below logic , and I need to loop thriugh the Dmamarket Array using struts and Set the form attribute.. My form has dmaMarket[] as an attribute. <% DmaMarket[] dmaArray = (DmaMarket[])session.getAttribute(Constants.ATTRIBUTE_EU_DMAMARKET_LIST) ; if( dmaArray == null){ out.println("ArrayIsNull");} else{ for (int i=0; i < dmaArray.length; i++) { DmaMarket dma = dmaArray[i]; out.println( dma.getCountry()); } }%> I am using this struts code ... but it doesn't work can anyone tell me where I am doing wrong. <% String name = "newClientForm.dmaMarket["+ rowIndex + "]"; %> " property="country" />" > Thanks. Sn Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Confidentiality Statement: This email/fax, including attachments, may include confidential and/or proprietary information and may be used only by the person or entity to which it is addressed. If the reader of this email/fax is not the intended recipient or his or her agent, the reader is hereby notified that any dissemination, distribution or copying of this email/fax is prohibited. If you have received this email/fax in error, please notify the sender by replying to this message and deleting this email or destroying this facsimile immediately. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. -
RE: How to use logic iterate...
Thanks. That was veru helpful, I got my problem solved.. -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 3:21 PM To: Struts Users Mailing List Subject: Re: How to use logic iterate... Shilpa, Look at the lessons By Rick http://www.reumann.net/struts/main.do You'll find the answer.Thanks Rick for your lessons. On 1/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks, But I have a different problem.. > I have an ArrayList which has dmaMarket Objects... dmaMarket has > getters and setters...like getCountry etc., > > I have to loop through the arrayList and get the dmaMarket object and > display the attributes like country etc. > > But the problem is I have to set the attributes (country) also at the > same time.. Can I use nested tags... > > -Original Message- > From: Gary Feidt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, January 10, 2006 12:31 PM > To: user@struts.apache.org > Subject: Re: How to use logic iterate... > > If you have a getDmaMarket and setDmaMarket property on your form, I > would do the following: > > type="com.ubs.eq.na.lynx.model.client.DmaMarket"> > > > This will display your data, but it looks like you are trying to edit > the list by displaying it in tags. You may want to rethink > that, and use another page to edit each item individually. > > Just my 2 cents, > > Gary > > >>> [EMAIL PROTECTED] 1/10/2006 10:39:33 AM >>> > Hi All, > I have the below logic , and I need to loop thriugh the Dmamarket > Array using struts and Set the form attribute.. > My form has dmaMarket[] as an attribute. > <% >DmaMarket[] dmaArray = > (DmaMarket[])session.getAttribute(Constants.ATTRIBUTE_EU_DMAMARKET_LIS > T) > ; >if( dmaArray == null){ >out.println("ArrayIsNull");} >else{ >for (int i=0; i < dmaArray.length; i++) >{ > DmaMarket dma = dmaArray[i]; > out.println( dma.getCountry()); >} > }%> > > I am using this struts code ... but it doesn't work can anyone tell me > where I am doing wrong. > > > length="2" > > type="com.ubs.eq.na.lynx.model.client.DmaMarket[]" >name="<%= > Constants.ATTRIBUTE_EU_DMAMARKET_LIST %>"> ><% >String name = > "newClientForm.dmaMarket["+ rowIndex + "]"; >%> > > > > name="<%=name %>" property="country" /> > onfocus="this.select()" size="10" >value=" name="<%=name %>" property="country" />" > > > > > > > > > Thanks. > Sn > > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please notify > the sender immediately by e-mail if you have received this e-mail by > mistake and delete this e-mail from your system. > > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive > late or incomplete, or contain viruses. The sender therefore does not > accept liability for any errors or omissions in the contents of this > message which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities or > related financial instruments. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __ > > Confidentiality Statement: > This email/fax, including attachments, may include confidential and/or > proprietary information and may be used only by the person or entity > to which it is addressed. If the reader of this email/fax is not the > intended recipient or his or her agent, the reader is hereby notified > that any dissemination, distribution or copying of this email/fax is > prohibited. If you have received this email/fax in error, please > notify the sender by replying to this message and deleting this email > or destroying this facsimile immediately. > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the n
Form has Inner Object..
Hi All, My struts form (newClientForm) have an Object(dmaClient) and I want to set the Objects methods.. Like this ... But it cannot recognize the Object...java.lang.NoSuchMethodException: Unknown property 'dmaClient' Any suggestions. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Form has Inner Object..
Thanks for the reply, I also noticed , I had a typo in my method name... now the below code works.. -Original Message- From: Srinivas Jadcharla [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 11, 2006 11:08 AM To: Struts Users Mailing List Subject: Re: Form has Inner Object.. *NoSuchMethodException *Thrown when a particular method cannot be found. Your Object (dmaClient) may not be having the methods required..that is getters and setters On 1/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi All, > > My struts form (newClientForm) have an Object(dmaClient) and I want to > set the Objects methods.. Like this ... > > But it cannot recognize the Object...java.lang.NoSuchMethodException: > Unknown property 'dmaClient' > > > Any suggestions. > > > name="newClientForm" property="dmaClient.allOrders" >onfocus="this.select()" size="10" > /> > name="newClientForm" property="dmaClient.orderQty" >onfocus="this.select()" size="10" > /> > name="newClientForm" property="dmaClient.orderValue" >onfocus="this.select()" size="10" > /> > name="newClientForm" property="dmaClient.totalBuy" >onfocus="this.select()" size="10" > /> > name="newClientForm" property="dmaClient.totalSell" >onfocus="this.select()" size="10" > /> > name="newClientForm" property="dmaClient.totalThreshold" >onfocus="this.select()" size="10" > /> > > > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please notify > the sender immediately by e-mail if you have received this e-mail by > mistake and delete this e-mail from your system. > > E-mail transmission cannot be guaranteed to be secure or error-free as > information could be intercepted, corrupted, lost, destroyed, arrive > late or incomplete, or contain viruses. The sender therefore does not > accept liability for any errors or omissions in the contents of this > message which arise as a result of e-mail transmission. If > verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities or > related financial instruments. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Thanks & Regards Srinivas 732-648-9421(Cell) Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to use nested iterate...through ArrayList
Hi I am trying to nested:iterate fro looping through am hashMap of Hashmap of ArratList But I get property "cnt" cannot be found error. When looping through the object of arrayList, I was able to loop through the forst two hashmaps & print out their keys, but printing out the values in ArrayList is a problem. Below Is the code. Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]