domain name used soehow as "namespace"

2007-11-20 Thread Ivan Žučenko
Hi all,
title of my question may sound a bit wired.. but.. I want to run my
service for web but also on .mobi
and so.. I want one package in struts.xml dedicated to mobi actions...
in other worlds
I have myDomain.com which is handled by actions of one package + tiles

then myDomain.com/ajax for obvious purpose... easily defined by namespace

AND THEN I would like to map myDomain.mobi to completly different package.

I run Apache + tomcat5 + S2

PLS ADVICE for best practise?

Thanks Ivan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: changing template for s:text

2007-10-30 Thread Ivan Žučenko
Hi Tom,
not yet... but I have no experience contributing to project like this, so I
am afraid that my bothering this mail group would overweight the benefit...
Also there is  one big "?" what is the best way how to share "debug" flag
across the all session/page or any scope...  also since I am quite new to
the s2.. I am afraid of itroducing ineficiency into the code...
..anyway I will try to solve it and then come back with proposal on this
improvement... and... may be you or someone else may help me out to convert
it into "patch"
Ivan

On 10/30/07, Tom Schneider <[EMAIL PROTECTED]> wrote:
>
>
> The s:text tag is considered a data tag, not a UI tag, so there is no ftl
> template backing that take.  Your only option is to extend the tag to add
> the functionality that you describe.  The functionality you describe
> sounds
> like it might be useful to others.  Have you considered creating a patch
> to
> add this functionality to the existing text tag?
> Tom
>
>
> Ivan Žučenko wrote:
> >
> > Hi all,
> > I have an intention to enabel debug mode in my application and one of
> the
> > features should be that it shows resource name in front of every
> localized
> > text in jsp retrieved by 
> > For example This is resource  would
> > render in html page as: [RESOURCE_1]This is resource.
> > I thought of making my custom tag with same fubctionality as in *
> > org.apache.struts2.components.Text *or try to extend  *
> > org.apache.struts2.components.Text   *or just modify text template. My
> > first
> > idea was just to create custom theme for it but it is not possible since
> > text i snot UI tag.. So which way would you recomand t go?
> > Thanks Ivan
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/changing-template-for-s%3Atext-tf4719322.html#a13491483
>
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


changing template for s:text

2007-10-30 Thread Ivan Žučenko
Hi all,
I have an intention to enabel debug mode in my application and one of the
features should be that it shows resource name in front of every localized
text in jsp retrieved by 
For example This is resource  would
render in html page as: [RESOURCE_1]This is resource.
I thought of making my custom tag with same fubctionality as in *
org.apache.struts2.components.Text *or try to extend  *
org.apache.struts2.components.Text  *or just modify text template. My first
idea was just to create custom theme for it but it is not possible since
text i snot UI tag.. So which way would you recomand t go?
Thanks Ivan


how Action Tag may access actionContext of the surrounding Action?

2007-10-30 Thread Ivan Žučenko
Hi all,
I am quite new to s2 but like the framework but can not find the right way
how ActionTag may cooperate with surrounding Action. Well more exactly I
want Interceptors mapped to ActionTag use some objects prepared by
Interceptors of the Action. May be example would be best.
I have Interceptor which opens and later closes JDBC or Hibernate
connection.
This is maped to action (and if this Action implements some cusom interface
like.. ConnectionAware eg it injects reference to connection there...). Then
action is forwarded to jsp which contains several ActionTags.
I want those tags to use this connection too and in similar way by being
injected into tham.. so they implement this "flag" interface too. AND here
is core of problem, I want to create interface which would be lightweight
version of previous connection opening/closing one. It just FINDS that
connection .. somewhere in ValueStack (THIS IS I DO NOT KNOW HOW) and
injects it into actionTag's Action..

I hope I have explained this right... I really tryed several hours google
around for solution... so sorry for bothering
BR
Ivan


Re: Help posting a form with an anchor and targets

2007-08-29 Thread Ivan Fontanals
I've finally found an answer to my question searching in the mail list.

Here is the explanation about what is going on and the solution:

http://www.mail-archive.com/user@struts.apache.org/msg54844.html


Basically the solution consists in not showing the "loadingText" in the
target div, because it removes the form elements when setting this text
inside the div.

Bests regards,

Ivan Fontanals


Help posting a form with an anchor and targets

2007-08-29 Thread Ivan Fontanals
Hi,

I'm trying to send a form from an anchor tag, but I've only archieved to
send the form without the "targets" attribute.

When I put the target ID, the form is not sended but the page redirects
correctly.
Otherwise it works well but the page is not redirected.

My code is:







<%-- BUTTONS --%>
 
 

SAVE
 


Please, could you give me any ida about what is happening?

Thank you very much for your time!


Ivan Fontanals


Help posting a form with an anchor and targets

2007-08-29 Thread Ivan Fontanals
Hi,

I'm trying to send a form from an anchor tag, but I've only archieved to
send the form without the "targets" attribute.

When I put the target ID, the form is not sended but the page redirects
correctly.
Otherwise it works well but the page is not redirected.

My code is:







<%-- BUTTONS --%>
 
 

SAVE
 


Please, could you give me any ida about what is happening?

Thank you very much for your time!


Ivan Fontanals


Redirect by button

2007-03-26 Thread Ivan Babanin
Hi All!

I have a simple button. It may be  or .
If user click this button it will redirect to page /add.jsp. So how
can i do this? At this time i know only one way..
1) Create Action
2) Create ActionBean
3) Write in struct-config.xml such thing:



















4) Write such form:

   


But it is bad way. Please advice me a good way? Thank you.

--- 
One must be something in order to do something. (Johann Wolfgang von Goethe)
by SkyStar.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem with Action

2007-03-26 Thread Ivan Babanin
I have such struts-config.xml:


http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>






















   ...
  


File DeleteActionBean.java:
package ru.delete;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.naming.*;
import ru.database.DataBaseHandler;

public class DeleteActionBean extends org.apache.struts.action.ActionForm {

private String id;
private String name;
private String email;
private String gender;
private ResultSet personsList;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getGender() {
return gender;
}

public void setGender(String gender) {
this.gender = gender;
}

public ArrayList getPersonsList() throws SQLException {
ArrayList list = new ArrayList();

while(personsList.next()) {
int id = personsList.getInt("id");
String name = personsList.getString("name");
String email = personsList.getString("email");
boolean gender = personsList.getBoolean("sex");

list.add(new PersonEntry(id, name, email, gender));
}

return list;
}

public DeleteActionBean() throws NamingException, SQLException {
super();
DataBaseHandler db = new 
DataBaseHandler("java:/comp/env/jdbc/postgres");
personsList = (ResultSet) db.returnQuery("SELECT * FROM persons");
}

public ActionErrors validate(ActionMapping mapping, HttpServletRequest 
request) {
ActionErrors errors = new ActionErrors();
if (getName() == null || getName().length() < 1) {
errors.add("name", new ActionMessage("error.name.required"));
}
return errors;
}
}

File DeletePersonAction.java:
package ru.delete;

import java.util.*;
import java.io.*;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForward;

import ru.database.DataBaseHandler;

public class DeletePersonAction extends Action {

/* forward name="success" path="" */
private final static String SUCCESS = "successDelete";

public DeletePersonAction() throws IOException {
// Test code
PrintWriter out = new PrintWriter(new FileWriter("c:/hello.txt"));
out.print(String.valueOf(new Random().nextInt()));
out.close(); 
// End of test code
}

/**
 * This is the action called from the Struts framework.
 * @param mapping The ActionMapping used to select this instance.
 * @param form The optional ActionForm bean for this request.
 * @param request The HTTP Request we are processing.
 * @param response The HTTP Response we are processing.
 * @throws java.lang.Exception
 * @return
 */
public ActionForward execute(ActionMapping mapping, ActionForm  form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

// Test code
PrintWriter out = new PrintWriter(new FileWriter("c:/hello.txt"));
out.print(String.valueOf(new Random().nextInt()));
out.close();
 // End of test code
   
Iterator it = request.getParameterMap().entrySet().iterator();

DataBaseHandler db = new 
DataBaseHandler("java:/comp/env/jdbc/postgres");
db.voidQuery("delete from persons where id=" + it.next());
db.close();

return mapping.findForward(SUCCESS);

}
}

File list.jsp:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"; prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"; prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"; prefix="logic" %>



List





Name
E-mail
Gender
Action











render output

2007-02-04 Thread Ivan
Hi all,

is there a way to avoid that the   action property is
rendered with the application name (e.g 
-->  ) ? 

What i need for a special case is that the output is . 

If this is not possible , is it possible to use  the normal html-form
() tag and bind it to an actionForm ?

regards

ivan

--- Begin Message ---
Hi all,

is there a way to avoid that the   action property is
rendered with the application name (e.g 
-->  ) ? 

What i need for a special case is that the output is . 

If this is not possible , is it possible to use  the normal html-form
() tag and bind it to an actionForm ?

regards

ivan

--- End Message ---
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: i18n recommendation

2005-09-15 Thread Ivan Rodriguez

What I use:

First I store the ArrayList in the application context, with the locale 
identifies concatenated.

And other useful localized strings that are constants.

context.setAttribute(lang + "_" + Constants.YEAR_MONTHS, ym);


And in the action where there is a forward that will display that data, 
I pass the arraylist stored at context to the request scope.


ServletContext sctx = servlet.getServletContext();
ArrayList countriesList = new ArrayList();
countriesList = (ArrayList) sctx.getAttribute(getLanguage(request) +
   "_" + Constants.COUNTRIES);
 request.setAttribute(Constants.COUNTRIES, countriesList);


This is what I do. But I wanna know too, if people are using other methods.
Thanks

Jadeler escribió:


Im using a struts plugin to populate application wide
data such list of values, etc from the database and
then stored in a session.  I also use the application
resources bundles for text messages, labels, etc on my
jsp pages.  


For displaying data pertaining to the locale the user
has selected (data Im tring to display is a drop down
of products), I've built a list of products from the
db and stored it in 2 sessions (one for french and one
for english).  Im planning to use the logic struts
tags to display these based on the locale.  Is this
recommended or are there other solutions?  


Thanks.
Jadeler

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts and DisplayTag CSS?

2005-09-15 Thread Ivan Rodriguez
OOps, i didn t checked the welcome-file directive. I didn t found a 
situation where you want to access your forward jsp directly. :-[



Holshausen, Ron escribió:


Hi,

You're using an relative path to your css file (css/screen.css), so the
user page with path /user/... does it find it as it expects it in
/user/css/screen.css.

One way to solve it is to use a tag to render the full path to the css
file, e.g,


"
type="text/css"
media="screen, print" />

With jsp 2.0, you don't need the  tag.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 15 September 2005 17:09

To: Struts Users Mailing List
Subject: Struts and DisplayTag CSS?

For this link, http://localhost:8080/erp/
displaytag is okay to display with css beautifully.

For this link, http://localhost:8080/erp/addUserProfile.do
all the css effect disappear.

my web.xml
 
   /user/addUserProfile.jsp
 

my jsp file has a css line
 
 
 

my struts mapping is
   
 
   

Any hints to solve?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

E-Mail Disclaimer 

Aus Rechts- und Sicherheitsgruenden ist die in dieser E-Mail gegebene 
Information nicht rechtsverbindlich. Eine rechtsverbindliche Bestaetigung 
reichen wir Ihnen gerne auf Anforderung in schriftlicher Form nach. 
Beachten Sie bitte, dass jede Form der unautorisierten Nutzung, 
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser 
E-Mail nicht gestattet ist. Diese Nachricht ist ausschliesslich fuer 
den bezeichneten Adressaten oder dessen Vertreter bestimmt. Sollten Sie 
nicht der vorgesehene Adressat dieser E-Mail oder dessen Vertreter sein, 
so bitten wir Sie, sich mit dem Absender der E-Mail in Verbindung zu setzen.



For legal and security reasons the information provided in this e-mail is not 
legally binding. Upon request we would be pleased to provide you with a legally 
binding confirmation in written form. Any form of unauthorised use, publication, 
reproduction, copying or disclosure of the content of this e-mail is not permitted. 
This message is exclusively for the person addressed or their representative. 
If you are not the intended recipient of this message and its contents, please 
notify the sender immediately.


-
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: Struts and DisplayTag CSS?

2005-09-15 Thread Ivan Rodriguez
You have distinct code in both url's. It is imposible that one work and 
the other doesnt work if you have the *same* displaytag configuration 
and css and other needed files declared in both jsp. Because they are at 
same url level ( /erp/ )



梁炳場 escribió:


For this link, http://localhost:8080/erp/
displaytag is okay to display with css beautifully.

For this link, http://localhost:8080/erp/addUserProfile.do
all the css effect disappear.

my web.xml
 
   /user/addUserProfile.jsp
 

my jsp file has a css line
 
 
 

my struts mapping is
   
 
   

Any hints to solve?

-
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: Some i18n issues

2005-09-15 Thread Ivan Rodriguez
I think the *cleanest* way is to format data at presentation layer 
(jsp). Last example from Laurie is quite correct and clean, if it is too 
long code let get a try with JSTL and

Struts-EL taglibs ()

Michael Ewers escribió:


Hi,

To avoid misunderstandings: My goal is to have a DynaActionForm 
definition's "initial"-value translated in a locale specific manner so 
that e.g. the -tag displays a initial="1,001.00" as a 
"1.001,00" in German locale Browsers.
After reading some struts-code I think that the best (meaning 
"cleanest") way to do it ist to change the classes that prepopulate 
DynActionForms from the "initial" attribute. That won't be easy 
because the forms are populated when the modules are configured. That 
means there's no locale available by then. That's why I might have to 
change some more classes.

I'll try to do those changes and offer the patches on the dev-list.

Michael.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-15 Thread Ivan Rodriguez
I suggest to check the file _index.java at line 215. Look up for it at 
your .jsps precompile dir, or IAS deployment dir. The only way to get 
any hint is to see the precompile jsp code.

Compare that line both development and production.

EROL TEZCAN escribió:


We dont use ADF, Martin. But this application works fine in local app server 
(oracle 10g ias).

Ivan, we dont use tomcat server for development. We use same server oracle 10g 
ias.

Also this app works fine in my OC4J of JDeveloper 10g .  


In where automatic string-number castin

Any suggestion?

Erol

Ivan Rodriguez <[EMAIL PROTECTED]> wrote:
Martin, Oracle ADF Runtime needs to be installed...but if it is used ;) 
I think Erol is not using ADF.


Erol, keep in mind that tomcat and IAS are *different*. I saw a similar 
error with tomcat doing automatic string-number cast, and IAS not.


Martin Gainty escribió:

 

Be mindful that Oracle ADF Runtime needs to be installed on the target 
webapp server check out
http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html 


HTH,
Martin-
- Original Message - From: "Laurie Harper" 
To: 
Sent: Wednesday, September 14, 2005 11:25 AM
Subject: Re: 
JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( 
URGENT !! )



   

I don't have the 1.1 source code checked out so I don't know exactly 
what it's failing on but I would suggest checking two things:


1) make sure all the attribute values you're passing into the tag are 
valid, and


2) make sure the form bean for the enclosing form tag is being found 
(i.e. that you have your form-bean / action mappings setup right.


L.

EROL TEZCAN wrote:

 


Hi,
We want to deploy an struts application to live server (oracle 10g 
IAS). This application is working properly on our local server. But 
when we want to deploy and start this app. it gives an error like this.

500 Internal Server Error
java.lang.NullPointerException
at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) 


at _index._jspService(_index.java:215)
[SRC:/index.jsp:61]
at com.orionserver[Oracle Application Server Containers for 
J2EE 10g 
(9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at 
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
at 
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)

at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 

   

 

at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793) 

at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) 

at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) 

at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 


at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. 
files are in the right place. How can we solve this ? It is very 
urgent solving this problem. Thanks,

Erol


-
Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.
   



-
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]


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Some i18n issues

2005-09-14 Thread Ivan Rodriguez
">



Michael Ewers escribió:


The problem is that the  tag doesn't have a formatKey-attribute
and I want the initial value to be displayed in a text-field, not as a pure
html-output.
In other words: I need struts to make a "" out of a "...initial="1000" with
German locale set in browser.

Thans,
Michael.

 


You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:

   


Hi,

I'm new to this group so first of all I'm pleased to have the opportunity
 


to
   


ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I
 


use
   


DynaActionForm for my forms, so I defined them with initial values, e.g.:

   



initial="1.000"
   


/>

I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing rules
 


of
   


double values but "1,00" is not a valid double value for Validator, even
 


if
   


the browser's Locale is set to German.
Is there a solution?

Bye,
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]

   



-
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: JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( URGENT !! )

2005-09-14 Thread Ivan Rodriguez
Martin, Oracle ADF Runtime needs to be installed...but if it is used ;) 
I think Erol is not using ADF.


Erol, keep in mind that tomcat and IAS are *different*.  I saw a similar 
error with tomcat doing automatic string-number cast, and IAS not.


Martin Gainty escribió:

Be mindful that Oracle ADF Runtime needs to be installed on the target 
webapp server check out
http://www.oracle.com/technology/products/jdev/howtos/10g/adf_runtime_update_howto.html 


HTH,
Martin-
- Original Message - From: "Laurie Harper" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, September 14, 2005 11:25 AM
Subject: Re: 
JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) ( 
URGENT !! )



I don't have the 1.1 source code checked out so I don't know exactly 
what it's failing on but I would suggest checking two things:


1) make sure all the attribute values you're passing into the tag are 
valid, and


2) make sure the form bean for the enclosing form tag is being found 
(i.e. that you have your form-bean / action mappings setup right.


L.

EROL TEZCAN wrote:


Hi,
 We want to deploy an struts application to live server (oracle 10g 
IAS). This application is working properly on our local server. But 
when we want to deploy and start this app. it gives an error like this.

 500 Internal Server Error
java.lang.NullPointerException
  at 
org.apache.struts.taglib.html.JavascriptValidatorTag.doStartTag(JavascriptValidatorTag.java:309) 


  at _index._jspService(_index.java:215)
  [SRC:/index.jsp:61]
  at com.orionserver[Oracle Application Server Containers for 
J2EE 10g 
(9.0.4.1.0)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
  at 
oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:349)
  at 
oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)

  at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765) 




  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:793) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:208) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:125) 

  at com.evermind[Oracle Application Server Containers for J2EE 
10g 
(9.0.4.1.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) 


  at java.lang.Thread.run(Thread.java:536)

We use struts 1.1 ( old versiyon not 1.2.7 )and all xml, jar .. 
files are in the right place. How can we solve this ? It is very 
urgent solving this problem. Thanks,

 Erol


-
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort.




-
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: Some i18n issues

2005-09-14 Thread Ivan Rodriguez

You have to use an initial value of "1000".








Then where you print this initial value, at your jsp, use formatting 
options:


formatKey="format.number" />


format.number is an entry in you MessageResources.properties

For german MessageResources_de.properties:
format.number=#0.000,00

For english MessageResources_en.properties:
format.number=#0,000.00


Michael Ewers escribió:


Hi,

I'm new to this group so first of all I'm pleased to have the opportunity to
ask questions here.

My question(s):
1) I'm trying to write an application that supports i18n with Struts. I use
DynaActionForm for my forms, so I defined them with initial values, e.g.:




I have German and English users. My problem is that it seems to be
impossible to definie initial values for different languages. "1.000" in
Germany means 1000, in UK it means 1. For German users the initial value
should be "1,000".
Is there a solution for this problem?

2) If I use the Validator framework to validate double form values, it's
basically the same problem: Validator seems to know English writing rules of
double values but "1,00" is not a valid double value for Validator, even if
the browser's Locale is set to German.
Is there a solution?

Bye,
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]



Re: AW: Problem with characters

2005-09-07 Thread Ivan Rodriguez
I think you are right. I use too a filter from springframework to force 
UTF-8 encoding:



   encodingFilter
   
org.springframework.web.filter.CharacterEncodingFilter

   
   encoding
   UTF-8
   
   
   forceEncoding
   true
   
   

And the <%page%> stuff and others.


Martin Kindler escribió:


Thank you Dave!

My problem is now solved.
But I had to do a bit more than just say that the pages are UTF-8. I think
it does not matter whether I use the configuration of the Struts controller
to do this or write it explicitly into each jsp.

As several people today had similar problems today here my solution (built
on advice from many people):

first I configured Struts to use UTF-8 (struts-config.xml: 
then I told my forms to accept UTF-8 (html:form with acceptCharset="utf-8")
(this is probably not necessary as the browser will send form data with the
same encoding as the page, but is good for documentation)
at last I installed a little filter on my container (Tomcat 5.0.x) which
explicitly sets the encoding for each request and response to UTF-8. This
proved to be the real solution.

The filter was taken from Mike Gavaghan's very helpful article on End-to-end
internationalization of Web applications
(http://www.javaworld.com/javaworld/jw-05-2004/jw-0524-i18n.html)

Martin

 


-Ursprüngliche Nachricht-
Von: Harland, David [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 7. September 2005 12:15

An: Struts Users Mailing List; [EMAIL PROTECTED]
Betreff: RE: Problem with characters


Make sure the jsp doing the posting has 


<%@ page language="java" contentType="text/html; charset=UTF-8" %>

Dave. 


-Original Message-
From: Martin Kindler [mailto:[EMAIL PROTECTED] 
Sent: 07 September 2005 10:47

To: 'Struts Users Mailing List'
Subject: AW: Problem with characters

David,

could you please be a bit more specific?

Just now I have a very similar problem as LuKe.
I am using MySQl 4.1.10 and all tables are UTF-8.
Struts is configured to use UTF 8 (i. e. the controller 
element in struts-config.xml says 
contentType="text/html;charset=UTF-8").


This seems to work. My browsers (Firefox and IE6) decode the 
pages as UTF-8.



BUT: when I enter text using a form (this is configured using 
the charSet-attribute to html:form to accept

ISO-8859-1) IE6 garbles it while Firefox seems to work OK.

Any hints?

Martin

   


-Ursprüngliche Nachricht-
Von: Harland, David [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 7. September 2005 10:35
An: Struts Users Mailing List
Betreff: RE: Problem with characters


Change you encoding to UTF-8.

What database are you using?

Dave.

-Original Message-
From: lk [mailto:[EMAIL PROTECTED]
Sent: 07 September 2005 09:23
To: user@struts.apache.org
Subject: Problem with characters

Hi,

I have a problem with some characters.

My application reads some forms and writes them in a db.

On my test and developing environment everything works well.

The problem comes out when I deploy the application on the 
 


production
   


server.

When I fill in the form non English characters (for example
the typical 
characters of the Italian language) they are read as "?".


The strange thing is that in the same tomcat context there is an old
no-struts application that works well.

On this server Apache and Tomcat work together and this is the only
difference from my test server.

In both struts-config.xml and web.xml I put this encoding version="1.0" encoding="ISO-8859-1" ?>


Furthermore I use a tiles layout and in it I put:



What could be the problem?

LuKe



--
Email.it, the professional e-mail, gratis per te:
http://www.email.it/f

Sponsor:
Vuoi risparmiare sino al 70% sugli acquisti? Oliviero non
teme confronti!  Clicca qui: 
http://adv.email.it/cgi-bin/foclick.cgi?mid=3849&d=7-9



 


-
   


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



This e mail is from DLA Piper Rudnick Gray Cary UK LLP.

The contents of this email and any attachments are
confidential to the intended recipient. They may not be 
disclosed to or used by or copied in any way by anyone other 
than the intended recipient. If this email is received in 
error, please contact DLA Piper Rudnick Gray Cary UK LLP on 
+44 (0) 8700 11 quoting the name of the sender and the

email address to which it has been sent and then delete it.

Please note that neither DLA Piper Rudnick Gray Cary UK LLP
nor the sender accept any responsibility for viruses and it 
is your responsibility to scan or otherwise check this email 
and any attachments. 


DLA Piper Rudnick Gray Cary UK LLP is a limited liability
partnership registered in England and Wales (registered 
number OC307847) which provides services from offices in 
England, Belgium, Germany and the People's Republic of China. 
A list of members is open for inspection at its regi

Re: Problem with characters

2005-09-07 Thread Ivan Rodriguez

Check your production default table charset. It must be latin1 or similar.

lk escribió:


Hi,

I have a problem with some characters.

My application reads some forms and writes them in a db.

On my test and developing environment everything works well.

The problem comes out when I deploy the application on the production 
server.


When I fill in the form non English characters (for example the 
typical characters of the Italian language) they are read as "?".


The strange thing is that in the same tomcat context there is an old 
no-struts application that works well.


On this server Apache and Tomcat work together and this is the only 
difference from my test server.


In both struts-config.xml and web.xml I put this encoding


Furthermore I use a tiles layout and in it I put:



What could be the problem?

LuKe



--
Email.it, the professional e-mail, gratis per te: http://www.email.it/f

Sponsor:
Vuoi risparmiare sino al 70% sugli acquisti? Oliviero non teme confronti!
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3849&d=7-9

-
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: CSS not working with JSF

2005-08-26 Thread Ivan Rodriguez

[EMAIL PROTECTED] escribió:


Rick, classes seem to work.  Thank You.  But the requirement is to use ID.  May 
be I can convince my team.  I will go try Geeta's idea now to see how fun that 
is...:=)
 

Keep in mind that ID must be unique in the same HTML page. You can`t 
write for example, 2 links  with the same ID.

( XHTML mode of course)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts 1.2 v 1.3

2005-07-14 Thread Ivan Rodriguez

Maven is for building projects, like Ant does.

Access Denied escribió:

I've seen Maven listed amongst the Apache projects and read a little. 
Is it supposed to replace CVS and SVN?  Is this something we should be

using routinely?

tia,
buddy
 




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: and Struts 1.2.7 possible bug?

2005-07-08 Thread Ivan Rodriguez
I have the same situation that yours. My solution is to save the static 
part of validator in an static .js file




...and replace all ocurrences of
   var formName = form.getAttributeNode("name");
with
   var formName = form.getAttributeNode("id");


My previous setup was
"> 



Inside validator.jsp there was:

<%@ page language="java" contentType="javascript/x-javascript" %>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>


Like this you can save the javascript functions, pointing your browser 
to http://host/context/scripts/validador.jsp



Niall Pemberton escribió:


Its a bug in Version 1.2.7 caused by the changes for Bug 34027. It has been
reported in Bug 35127 and a fix has been applied

I have upated the upgrade notes on the wiki to make a note of this:

http://wiki.apache.org/struts/StrutsUpgradeNotes124to127

Niall

- Original Message - 
From: "Eduardo José Hernández Cisneros" <[EMAIL PROTECTED]>

Sent: Friday, July 01, 2005 5:04 PM


 


Hi everybody,

   I recently upgrade my struts libraries to 1.2.7 from 1.2.4. I am using
the   tag with:


.



In 1.2.4 version the html:form tag renders correctly the form name
attribute, but when a I changed to 1.2.7 the form name disappeared and
   


this
 


causing trouble with a javascript client-side validation that I am using.
The funny part is that when I remove  tag with 1.2.7 version
the form name appears again.

Am I using wrongly the   tag or could it be a bug?

Thank you for your time.

--Eduardo
   





-
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: swith to struts-el

2005-07-04 Thread Ivan Rodriguez

So if it doesnt work for you, try





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: swith to struts-el

2005-07-04 Thread Ivan Rodriguez



Dewitte Rémi escribió:

I'd like to switch all my callic struts tags to struts-el in order to not mix 
all tags. How do you switch logic.equal to c:if ?

For example :


Thanks again...

-
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]



html:option tag

2005-04-20 Thread IVAN CORVILLO
Hi there,

Is it possible to pre-select a value from a dropdownlist htm:option 
tag?
  
Thanks

Iván Corvillo
Iconic, SL
Molinot 53
Pol.Ind.El Camí Ral
08860 Castelldefels
Tel: 902 195 962 / 93 419 54 45
Fax: 93 636 21 42
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Collections in ActionForm

2004-10-18 Thread Ivan Vasquez
Have you ever deployed them in a clustered environment? Yes, all
underlying objects are serializable and session replication is properly
configured.

-Original Message-
From: Michael McGrady [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 18, 2004 10:06 AM
To: Struts Users Mailing List
Subject: Re: Collections in ActionForm

Ivan Vasquez wrote:

>Is is OK to use Collections (or sets, lists, maps for that matter)
>inside an ActionForm? We are trying to represent fairly complex
>multiple-choice items in our forms.
>
>Ivan
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>  
>
Yes.  I recommend you check out Ted Husted's book on struts if you need 
to know more.

Michael McGrady


-
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]



Collections in ActionForm

2004-10-18 Thread Ivan Vasquez
Is is OK to use Collections (or sets, lists, maps for that matter)
inside an ActionForm? We are trying to represent fairly complex
multiple-choice items in our forms.

Ivan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Dissapearing items in cluster

2004-10-14 Thread Ivan Vasquez
Our application has a form with a multiple-selection item. We implemented it by 
including a List in the ActionForm. Each item in the List is a plain-old object, added 
from the corresponding Action.

When this application runs in a 2-node cluster, items in the List dissappear at 
random. Session replication in the cluster is working properly. When either server is 
put down, the application works normally.

Is it OK to use Lists in ActionForms as described? 
Has anybody seen this behavior in a cluster?

Environment:
Tomcat 5.0.28 (cluster)
Struts 1.2.4

Ivan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Where Is the Best Place To Store Files?

2004-10-13 Thread Ivan Vasquez
Unless the tomcat server(s) has fileserver capabilities, you can create
an NFS mount to a fileserver share and have your code create Files
there.

Better yet (IMO), store them in the database as BLOBs so all your data
lives at a single location. The decision depends on what use is given to
those files (are they likely to be modified? ready only? etc)

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 13, 2004 11:30 AM
To: [EMAIL PROTECTED]
Subject: Where Is the Best Place To Store Files?

I am using the Struts to build a web application.  I
am going to store some files (the files can be .doc,
.txt, .pdf, .jpg, whatever) on the server; e.g.
somewhere in my web application.

Where is the proper and best place to store files? 
$TOMCAT\webapps\MyApplication\

Thanks for suggestions.



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.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]



Repost: File upload but outside session

2004-10-04 Thread Ivan Vasquez
Our users need to upload a file as part of a form submission. We use
struts-upload FormFile, but the application breaks when run in a tomcat
cluster. 

Since the form is session-scoped, FormFile has to be serialized for
sessions to be replicated but we get a NotSerializableException for 

org.apache.commons.fileupload.DeferredFileOutputStream

Any ideas are welcome. 
Thanks in advance,
Ivan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



File upload but outside session

2004-10-01 Thread Ivan Vasquez
Hi,

Our users need to upload a file as part of a form submission. First we
used struts-upload FormFile as one of the fields of the ActionForm. It
worked well until we tested it in a Tomcat cluster. 

Since the form is session-scoped, the FormFile has to be serialized for
sessions to be replicated. However we get a NotSerializableException for


org.apache.commons.fileupload.DeferredFileOutputStream

So now I'm trying to keep the file upload outside the session. I tried
using commons fileupload from my Action, but when I parse the
HttpServletRequest I get no items!

Any ideas?
Thank you.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: xml as a datasource?

2004-10-01 Thread Ivan Vasquez
> Also, what are the benefits to using xml as a datasource instead of a
> db like mysql?

Unless you have existing data that cannot be migrated to a relational DB
(or other good reason to keep it as XML), I would advise against using
XML as data source. Simply put, parsing XML is always comparatively
slower to the performance any rdbms can offer.

Ivan.

-Original Message-
From: joe a. [mailto:[EMAIL PROTECTED] 
Sent: Friday, October 01, 2004 2:04 PM
To: [EMAIL PROTECTED]
Subject: xml as a datasource?

I am in need of a document covering how to use xml as a data source
with struts.  If someone could post a link I would appreciate it. 

Thanks,
Joe

-
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: [OT] GMail invites

2004-09-21 Thread Ivan Pechorin
I have 5 invites available.
Please, send me requests off list.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: How to prevent directory listing?

2004-09-02 Thread Ivan Vasquez
Thanks Jason,

I already did, but it seems to override ActionServlet and none of my
pages work. I also tried by changing the startup order to 3 (after
ActionServlet), but still no luck!

Ivan.

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 02, 2004 6:40 PM
To: Struts Users Mailing List
Subject: Re: How to prevent directory listing?

I think (haven't tried this myself) you can override it in your own 
application's web.xml

eg add this to your web.xml in the appropriate place


default

  org.apache.catalina.servlets.DefaultServlet


debug
0


listings
false

    1


Ivan Vasquez wrote:

>Is it possible to prevent a particular Struts webapp from displaying
>directory listings? That is, global /conf/web.xml has its
DefaultServlet
>with listings set to true, thus enabling dir listing for all apps. Can
I
>then prevent a particular Struts webapp from doing so by setting
>something in the local web.xml?
>
>Thank you. 
>Ivan.
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>  
>


-- 
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]



How to prevent directory listing?

2004-09-02 Thread Ivan Vasquez
Is it possible to prevent a particular Struts webapp from displaying
directory listings? That is, global /conf/web.xml has its DefaultServlet
with listings set to true, thus enabling dir listing for all apps. Can I
then prevent a particular Struts webapp from doing so by setting
something in the local web.xml?

Thank you. 
Ivan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Classloading problem

2004-08-31 Thread Ivan Vasquez
Also, the name under which it gets to conf/Catalina/localhost is
.xml

Inside, path and docBase are untouched. No war extensions anywhere.

BTW, these are tomcat 5.0.16, just in case.

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 5:17 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

[eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war

. . .

META-INF/context.xml
META-INF/MANIFEST.MF

. . .

Right?

Erik


Ivan Vasquez wrote:

>Erik, here goes my context.xml, Tomcat renames it the same as the app's
>directory. I assume your Tomcat has autodeploy enabled.
>
>
>
>reloadable="true" crossContext="true">
>   
>   type="javax.sql.DataSource"/>
>   
>   
>   
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>   
>   
>   
>  url
>   
>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC
O
>L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=
1
>521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
>   
>   
>  username
>  *
>   
>   
>  password
>  *
>   
>   
>  maxActive
>  10
>   
>   
>  maxIdle
>  10
>   
>   
>  maxWait
>  -1
>   
>   
>  removeAbandoned
>  true
>   
>   
>  removeAbandonedTimeout
>  60
>   
>   
>  logAbandoned
>  true
>   
>   
>
>
>-Original Message-
>From: Erik Weber [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, August 31, 2004 4:30 PM
>To: Struts Users Mailing List
>Subject: Re: Classloading problem
>
>I have tried this repeatedly. I am using the same Foo.xml file that
does
>
>work when placed in conf/Catalina/localhost/. I have tried with and 
>without the path and docBase attributes to the Context element. I have 
>renamed the file to context.xml and it is in META-INF in my war file. I

>have also tried putting Foo.xml or context.xml within a 
>META-INF/context.xml/ *directory* as the documentation suggests.
>
>DBCP throws an Exception on startup that it cannot create a JDBC driver

>of class '' for connect URL 'null'. I am supposing that the context
file
>
>is never loaded. Also Tomcat creates a Foo.xml directory inside of 
>conf/Catalina/localhost with nothing in it. If I try restarting the 
>server, I also get a FileNotFoundException on Foo.xml, saying it "is a 
>directory" (good grief). I have tried hot deploy and deploying via the 
>manager web app as well.
>
>I basically observed the same behavior that Ivan described.
>
>I would love to see that example if you can find it.
>
>Erik
>
>
>Kris Schneider wrote:
>
>  
>
>>Hang on, my bad - it should be /META-INF/context.xml. So, rename
>>
>>
>Foo.xml to be
>  
>
>>context.xml and place it in *META-INF*.
>>
>>Quoting Erik Weber <[EMAIL PROTECTED]>:
>>
>> 
>>
>>
>>
>>>Kris, this is from context.html in the Tomcat 5 docs:*
>>>
>>>Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT 
>>>recommended to place  elements directly in the server.xml 
>>>file.* Instead, put them in the META-INF/context.xml directory of
your
>>>  
>>>
>
>  
>
>>>WAR file or the conf directory as described above.
>>>
>>>So here I am, stupidly trying to put my Foo.xml file within 
>>>/META-INF/context.xml/ (and various variations of that) of my web
app.
>>>
>>>So should I rename Foo.xml to context.xml (I ask because in the conf 
>>>directory I have been naming it Foo.xml, not context.xml), and put it
>>>  
>>>
>in 
>  
>
>>>*WEB-INF*?
>>>
>>>Could you show me where you found how to do this in the docs? Am I
>>>  
>>>
>just 
>  
>
>>>completely misreading the above sentence?
>>>
>>>Thanks for your help,
>>>Erik
>>>
>>>
>>>Kris Schneider wrote:
>>>
>>>   
>>>
>>>  
>>>
>>>>Can you provide some more detail on the problems you're running into
>>>>
>>>>
>with
>  
>
>>>> 
>>>>
>>>>
>>>>
>>>using
>>>

RE: Classloading problem

2004-08-31 Thread Ivan Vasquez
Yes. And I just deployed a war with my config to another server to
double-check.

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 5:17 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

[eweber]$ jar tf $TOMCAT_HOME/webapps/Foo.war

. . .

META-INF/context.xml
META-INF/MANIFEST.MF

. . .

Right?

Erik


Ivan Vasquez wrote:

>Erik, here goes my context.xml, Tomcat renames it the same as the app's
>directory. I assume your Tomcat has autodeploy enabled.
>
>
>
>reloadable="true" crossContext="true">
>   
>   type="javax.sql.DataSource"/>
>   
>   
>   
>  factory
>  org.apache.commons.dbcp.BasicDataSourceFactory
>   
>   
>  driverClassName
>  oracle.jdbc.driver.OracleDriver
>   
>   
>   
>  url
>   
>jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOC
O
>L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=
1
>521))(CONNECT_DATA=(SERVICE_NAME=orcl)))
>   
>   
>  username
>  *
>   
>   
>  password
>  *
>   
>   
>  maxActive
>  10
>   
>   
>  maxIdle
>  10
>   
>   
>  maxWait
>  -1
>   
>   
>  removeAbandoned
>  true
>   
>   
>  removeAbandonedTimeout
>  60
>   
>   
>  logAbandoned
>  true
>   
>   
>
>
>-Original Message-
>From: Erik Weber [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, August 31, 2004 4:30 PM
>To: Struts Users Mailing List
>Subject: Re: Classloading problem
>
>I have tried this repeatedly. I am using the same Foo.xml file that
does
>
>work when placed in conf/Catalina/localhost/. I have tried with and 
>without the path and docBase attributes to the Context element. I have 
>renamed the file to context.xml and it is in META-INF in my war file. I

>have also tried putting Foo.xml or context.xml within a 
>META-INF/context.xml/ *directory* as the documentation suggests.
>
>DBCP throws an Exception on startup that it cannot create a JDBC driver

>of class '' for connect URL 'null'. I am supposing that the context
file
>
>is never loaded. Also Tomcat creates a Foo.xml directory inside of 
>conf/Catalina/localhost with nothing in it. If I try restarting the 
>server, I also get a FileNotFoundException on Foo.xml, saying it "is a 
>directory" (good grief). I have tried hot deploy and deploying via the 
>manager web app as well.
>
>I basically observed the same behavior that Ivan described.
>
>I would love to see that example if you can find it.
>
>Erik
>
>
>Kris Schneider wrote:
>
>  
>
>>Hang on, my bad - it should be /META-INF/context.xml. So, rename
>>
>>
>Foo.xml to be
>  
>
>>context.xml and place it in *META-INF*.
>>
>>Quoting Erik Weber <[EMAIL PROTECTED]>:
>>
>> 
>>
>>
>>
>>>Kris, this is from context.html in the Tomcat 5 docs:*
>>>
>>>Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT 
>>>recommended to place  elements directly in the server.xml 
>>>file.* Instead, put them in the META-INF/context.xml directory of
your
>>>  
>>>
>
>  
>
>>>WAR file or the conf directory as described above.
>>>
>>>So here I am, stupidly trying to put my Foo.xml file within 
>>>/META-INF/context.xml/ (and various variations of that) of my web
app.
>>>
>>>So should I rename Foo.xml to context.xml (I ask because in the conf 
>>>directory I have been naming it Foo.xml, not context.xml), and put it
>>>  
>>>
>in 
>  
>
>>>*WEB-INF*?
>>>
>>>Could you show me where you found how to do this in the docs? Am I
>>>  
>>>
>just 
>  
>
>>>completely misreading the above sentence?
>>>
>>>Thanks for your help,
>>>Erik
>>>
>>>
>>>Kris Schneider wrote:
>>>
>>>   
>>>
>>>  
>>>
>>>>Can you provide some more detail on the problems you're running into
>>>>
>>>>
>with
>  
>
>>>> 
>>>>
>>>>
>>>>
>>>using
>>>   
>>>
>>>  
>>>
>>>>WEB-INF? I've got a simple one ly

RE: Classloading problem

2004-08-31 Thread Ivan Vasquez
Erik, here goes my context.xml, Tomcat renames it the same as the app's
directory. I assume your Tomcat has autodeploy enabled.









   factory
   org.apache.commons.dbcp.BasicDataSourceFactory


   driverClassName
   oracle.jdbc.driver.OracleDriver



   url

jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCO
L=TCP)(HOST=node1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1
521))(CONNECT_DATA=(SERVICE_NAME=orcl)))


   username
   *


   password
   *


   maxActive
   10


   maxIdle
   10


   maxWait
   -1


   removeAbandoned
   true


   removeAbandonedTimeout
   60


   logAbandoned
   true




-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 4:30 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

I have tried this repeatedly. I am using the same Foo.xml file that does

work when placed in conf/Catalina/localhost/. I have tried with and 
without the path and docBase attributes to the Context element. I have 
renamed the file to context.xml and it is in META-INF in my war file. I 
have also tried putting Foo.xml or context.xml within a 
META-INF/context.xml/ *directory* as the documentation suggests.

DBCP throws an Exception on startup that it cannot create a JDBC driver 
of class '' for connect URL 'null'. I am supposing that the context file

is never loaded. Also Tomcat creates a Foo.xml directory inside of 
conf/Catalina/localhost with nothing in it. If I try restarting the 
server, I also get a FileNotFoundException on Foo.xml, saying it "is a 
directory" (good grief). I have tried hot deploy and deploying via the 
manager web app as well.

I basically observed the same behavior that Ivan described.

I would love to see that example if you can find it.

Erik


Kris Schneider wrote:

>Hang on, my bad - it should be /META-INF/context.xml. So, rename
Foo.xml to be
>context.xml and place it in *META-INF*.
>
>Quoting Erik Weber <[EMAIL PROTECTED]>:
>
>  
>
>>Kris, this is from context.html in the Tomcat 5 docs:*
>>
>>Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT 
>>recommended to place  elements directly in the server.xml 
>>file.* Instead, put them in the META-INF/context.xml directory of your

>>WAR file or the conf directory as described above.
>>
>>So here I am, stupidly trying to put my Foo.xml file within 
>>/META-INF/context.xml/ (and various variations of that) of my web app.
>>
>>So should I rename Foo.xml to context.xml (I ask because in the conf 
>>directory I have been naming it Foo.xml, not context.xml), and put it
in 
>>*WEB-INF*?
>>
>>Could you show me where you found how to do this in the docs? Am I
just 
>>completely misreading the above sentence?
>>
>>Thanks for your help,
>>Erik
>>
>>
>>Kris Schneider wrote:
>>
>>
>>
>>>Can you provide some more detail on the problems you're running into
with
>>>  
>>>
>>using
>>
>>
>>>WEB-INF? I've got a simple one lying around here somewhere...
>>>
>>>WEB-INF/context.xml:
>>>
>>>
>>>   
>>>   
>>>
>>>
>>>Seems to work fine with TC 5...
>>>
>>>Quoting Erik Weber <[EMAIL PROTECTED]>:
>>>
>>> 
>>>
>>>  
>>>
>>>>Also, since you appear to be trying to follow the documenation, have
you 
>>>>ever gotten a Context XML file placed within the META-INF directory
of 
>>>>your web app to work? I can't get this to work (I have gotten them
to 
>>>>work when placed in the conf directory -- though I had to learn the
hard 
>>>>way to take write permissions away from Tomcat after it very rudely 
>>>>deleted one). The documentation is confusing, and the example web
app 
>>>>mysteriously does not include a Context XML file at all, despite
that 
>>>>pretty much any serious web app is going to need one (unless you
declare 
>>>>everything in server.xml).
>>>>
>>>>If you have an example of this working, please share it with me.
>>>>
>>>>Erik
>>>>
>>>>
>>>>Ivan Vasquez wrote:
>>>>
>>>>   

RE: Classloading problem

2004-08-31 Thread Ivan Vasquez
Thanks for your answer, that explains it all. 

Yes, we were trying to clean server.xml and to avoid server restarts
every time something changes (e.g. db connection pool info). Context was
directly cut and pasted into the local META-INF/context.xml. 

But Tomcat gets it only when you create a .war and then deploy it. If
you have a deployed application, create META-INF/context.xml and delete
its context entry from server.xml, the context is lost. The only way to
make the app work again is to place context.xml in
conf/Catalina/localhost/ (that must be part of Tomcat's auto deployment
feature).

Hope that helps, let me know if that doesn't work for you.
Thanks!
Ivan.

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 3:10 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

Also, since you appear to be trying to follow the documenation, have you

ever gotten a Context XML file placed within the META-INF directory of 
your web app to work? I can't get this to work (I have gotten them to 
work when placed in the conf directory -- though I had to learn the hard

way to take write permissions away from Tomcat after it very rudely 
deleted one). The documentation is confusing, and the example web app 
mysteriously does not include a Context XML file at all, despite that 
pretty much any serious web app is going to need one (unless you declare

everything in server.xml).

If you have an example of this working, please share it with me.

Erik


Ivan Vasquez wrote:

>Sure, in common/lib it works well. But from Tomcat docs:
>http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
>
>The following rules cover about 95% of the decisions that application
>developers and deployers must make about where to place class and
>resource files to make them available to web applications:
>
>* For classes and resources specific to a particular web
>application, place unpacked classes and resources under
/WEB-INF/classes
>of your web application archive, or place JAR files containing those
>classes and resources under /WEB-INF/lib of your web application
>archive.
>* For classes and resources that must be shared across all web
>applications, place unpacked classes and resources under
>$CATALINA_BASE/shared/classes, or place JAR files containing those
>classes and resources under $CATALINA_BASE/shared/lib.
>
>--Then goes on...---
>
>Common - This class loader contains additional classes that are made
>visible to both Tomcat internal classes and to all web applications.
>Normally, application classes should NOT  be placed here. All unpacked
>classes and resources in $CATALINA_HOME/common/classes, as well as
>classes and resources in JAR files under the
>$CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib
>directories, are made visible through this class loader.
>
>Shared - This class loader is the place to put classes and resources
>that you wish to share across ALL  web applications (unless Tomcat
>internal classes also need access, in which case you should put them in
>the Common  class loader instead). All unpacked classes and resources
in
>$CATALINA_BASE/shared/classes, as well as classes and resources in JAR
>files under $CATALINA_BASE/shared/lib, are made visible through this
>class loader.
>
>
>
>In our case we want to share jars common to all applications, but none
>of them are required by Tomcat.
>
>Ivan.
>
>-Original Message-
>From: Erik Weber [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, August 31, 2004 12:52 PM
>To: Struts Users Mailing List
>Subject: Re: Classloading problem
>
>I have been using 5.0.27, putting my JDBC drivers in common/lib, and my

>struts jars in WEB-INF/lib of each application, and haven't had any 
>problems. Why do you say "incorrectly"?
>
>Erik
>
>
>Ivan Vasquez wrote:
>
>  
>
>>We have Tomcat 5.0.16 and were incorrectly placing common jars (such
as
>>JDBC drivers) in /common/lib. 
>>
>>Now we just moved them to /shared/lib (for truly common stuff) and
>>WEB-INF/lib, but now all applications complain giving a
>>java.lang.ClassNotFoundException, just like if things weren't in
>>Tomcat's classpath anymore. Apps and Tomcat restarts have been done
>>several times.
>>
>>Is there anything in web.xml, server.xml, etc that needs to be set?
>>
>>
>What
>  
>
>>are we possibly missing? Tomcat docs are pretty straightforward about
>>
>>
>it
>  
>
>>and everything seems right.
>>
>>Once again, thanks in advance.
>>Ivan.
>>
>>-
>>To unsubscribe, e-mail: [

RE: Classloading problem

2004-08-31 Thread Ivan Vasquez
Sure, in common/lib it works well. But from Tomcat docs:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html

The following rules cover about 95% of the decisions that application
developers and deployers must make about where to place class and
resource files to make them available to web applications:

* For classes and resources specific to a particular web
application, place unpacked classes and resources under /WEB-INF/classes
of your web application archive, or place JAR files containing those
classes and resources under /WEB-INF/lib of your web application
archive.
* For classes and resources that must be shared across all web
applications, place unpacked classes and resources under
$CATALINA_BASE/shared/classes, or place JAR files containing those
classes and resources under $CATALINA_BASE/shared/lib.

--Then goes on...---

Common - This class loader contains additional classes that are made
visible to both Tomcat internal classes and to all web applications.
Normally, application classes should NOT  be placed here. All unpacked
classes and resources in $CATALINA_HOME/common/classes, as well as
classes and resources in JAR files under the
$CATALINA_HOME/commons/endorsed and $CATALINA_HOME/common/lib
directories, are made visible through this class loader.

Shared - This class loader is the place to put classes and resources
that you wish to share across ALL  web applications (unless Tomcat
internal classes also need access, in which case you should put them in
the Common  class loader instead). All unpacked classes and resources in
$CATALINA_BASE/shared/classes, as well as classes and resources in JAR
files under $CATALINA_BASE/shared/lib, are made visible through this
class loader.



In our case we want to share jars common to all applications, but none
of them are required by Tomcat.

Ivan.

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 31, 2004 12:52 PM
To: Struts Users Mailing List
Subject: Re: Classloading problem

I have been using 5.0.27, putting my JDBC drivers in common/lib, and my 
struts jars in WEB-INF/lib of each application, and haven't had any 
problems. Why do you say "incorrectly"?

Erik


Ivan Vasquez wrote:

>We have Tomcat 5.0.16 and were incorrectly placing common jars (such as
>JDBC drivers) in /common/lib. 
>
>Now we just moved them to /shared/lib (for truly common stuff) and
>WEB-INF/lib, but now all applications complain giving a
>java.lang.ClassNotFoundException, just like if things weren't in
>Tomcat's classpath anymore. Apps and Tomcat restarts have been done
>several times.
>
>Is there anything in web.xml, server.xml, etc that needs to be set?
What
>are we possibly missing? Tomcat docs are pretty straightforward about
it
>and everything seems right.
>
>Once again, thanks in advance.
>Ivan.
>
>-
>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]



Classloading problem

2004-08-31 Thread Ivan Vasquez
We have Tomcat 5.0.16 and were incorrectly placing common jars (such as
JDBC drivers) in /common/lib. 

Now we just moved them to /shared/lib (for truly common stuff) and
WEB-INF/lib, but now all applications complain giving a
java.lang.ClassNotFoundException, just like if things weren't in
Tomcat's classpath anymore. Apps and Tomcat restarts have been done
several times.

Is there anything in web.xml, server.xml, etc that needs to be set? What
are we possibly missing? Tomcat docs are pretty straightforward about it
and everything seems right.

Once again, thanks in advance.
Ivan.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Clustering

2004-08-27 Thread Ivan Vasquez
I assume you ask about an Oracle RAC database. 

In that case, the mode is "kind-of" ACTIVE/ACTIVE: What you get is a
single database mounted by as many instances as cluster nodes you have
configured. So every time your application establishes a db connection,
it may be served by either cluster node.

The data files can be in a clustered file system (like OCFS), in raw
partitions or even in NFS mounts.

There are a few guidelines to develop apps meant to run in a clustered
database:
http://www.cise.ufl.edu/help/database/oracle-docs/rac.920/a96598/design.
htm

Ivan.

-Original Message-
From: Viral_Thakkar [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 27, 2004 7:35 AM
To: Struts Users Mailing List
Subject: [OT] Clustering

Hi All,

 

I am developing a J2EE application using Oracle 9iAS. I am looking for
clustering information.

 

I am looking for info on database side.

 

* Are Database servers clustered in an ACTIVE/ACTIVE or
ACTIVE/PASIVE mode?

 

* Is the Oracle database supposed to reside on a file system or
on a RAW partition?

 

TIA.

 

Regards,

Viral

 

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Uploading files to a database

2004-08-20 Thread Ivan Vasquez
Hi,

What's the preferred way to upload files into a database in a J2EE Web
application? 

Is there any way to stream the file straight from the HttpServletRequest
to the database without staging it in the server's filesystem? 

Thank you,
Ivan.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Not Logged in with the same loggin-password if it is already registered.

2004-07-28 Thread Ivan Vasquez
It may not be as easy as the current session (for the new login) and the session that 
you want to invalidate are different objects.

The main issue would be how to get a reference to all active sessions via some session 
id. Apache Axis, for example, keeps track of them with a list of ActiveSessions. 

Ivan Vasquez
(Compatriota :-)
 
-Original Message-
From: Geeta Ramani [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 28, 2004 4:05 PM
To: Struts Users Mailing List
Subject: RE: Not Logged in with the same loggin-password if it is already registered.

Ricardo:

Not sure where you are having problems..? Why wouldn't something like this 
(pseudocode) work?

if (isLoggedIn(user)) {
session.invalidate();
}
//now proceed normally with login with un/pw...


Regards,
Geeta


> -Original Message-
> From: Ricardo Andres Quintero [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 28, 2004 3:04 PM
> To: [EMAIL PROTECTED]
> Subject: Not Logged in with the same loggin-password if it is already
> registered.
> 
> 
> Hello Guys
> I need not to let users to login in my app simultaneosly.
> I mean if a login-password is actually logged in, i need to
> invalidatye that session and then let the new login-password 
> to work in, after invalidating the old session.
> 
> Any ideas? and of course any examples?  
> 
> --
> Ricardo Andrés Quintero R.
> Ubiquando Ltda.
> 
> 
> -
> 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: How to read from web.xml?

2004-07-16 Thread Ivan Vasquez
Thanks Craig & Jason,

Yes, the string in  can be queried via

this.getServlet().getServletContext().getServletContextName()

from any Struts Action.

Thanks very much.
Ivan.

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 12, 2004 5:09 PM
To: Struts Users Mailing List
Subject: Re: How to read  from web.xml?

Ivan Vasquez wrote:

>Hi,
> 
>How can I read from web.xml, say, the application's display name? I've
>tried several things, but no luck. This isn't really Struts-specific,
>but I'm sure this is an easy one for many of you.
> 
>Thanks,
>Ivan.
>
>  
>
The web.xml file is available as a resource that can be accessed via the

ServletContext for your webapp.  For example, you can say something
like:

  ServletContext context = ...; // Get a reference to our servlet
context
  InputStream stream = context.getResourceAsStream("/WEB-INF/web.xml");

Now you've got an input stream to read the contents ... you'll probably 
want to use an XML parser to parse the contents -- google for JAXP to 
see the API that Java provides for this purpose.  Or, you might consider

using the Commons Digester package (included with Struts), which is what

Struts itself uses to parse this very resource, in order to figure out 
how the controller servlet is mapped.  Looking at the source code for 
ActionServlet should give you some useful clues.

Craig


-
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]



How to read from web.xml?

2004-07-12 Thread Ivan Vasquez
Hi,
 
How can I read from web.xml, say, the application's display name? I've
tried several things, but no luck. This isn't really Struts-specific,
but I'm sure this is an easy one for many of you.
 
Thanks,
Ivan.


RE: Strange double-submissions

2004-07-07 Thread Ivan Vasquez
Thanks Jim,

Yes, we found it to be an oddity in IE6 but mostly an error on our part.
The html:submit onchange method was actually submitting the form (as any
other control does). Doing this is wrong to begin with, and it turns out
that Mozilla and IE handle it differently.

Now the page contains a default value of "submit" in the hidden field
that onchange updates. That way submit does not have to call any js, and
the action is still able to determine what to do.

Thanks again.
Ivan

-Original Message-
From: Jim Barrows [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 07, 2004 3:02 PM
To: Struts Users Mailing List
Subject: RE: Strange double-submissions


> -Original Message-
> From: Ivan Vasquez [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 07, 2004 11:31 AM
> To: [EMAIL PROTECTED]
> Subject: Strange double-submissions
> 
> 
> Hi, 
> 
> We have a form whose last two controls are an html:select and a submit
> button. The form posts to an Action to insert records into a database.
> Changing the select control causes a page refresh (posting to the same
> Action) in order to display other options. 
> 
> We notice that, if the user submits the form immediately 
> after changing
> the select control (say, in less than 1sec), two records (instead of
> one) are inserted into the database. The problem appears depending on
> how fast the user hits the submit button after the form refreshes, if
> you submit 5secs after refresh, there's no problem. 
> 
> The code has been checked and there is no possibility for an 
> html:select
> onchange to cause a database insert. Even though both trigger the same
> Action, they are well differentiated.
> 
> To make things more confusing, even though it is a 
> server-side problem,
> we can reproduce it only using IE6.0! Besides the js for 
> submitting the
> form onchange, there's no client-side code.
> 
> Any clues?

Just the big one you provided, IE 6.  I would put some debugging code of
some sort in your JS and
see if IE6 is calling it even when it's not supposed to.  I've also
experienced some other oddities with IE 6 that don't happen elsewhere.

> 
> Thanks in advance.
> Ivan
> 
> 
> -
> 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]



Strange double-submissions

2004-07-07 Thread Ivan Vasquez
Hi, 

We have a form whose last two controls are an html:select and a submit
button. The form posts to an Action to insert records into a database.
Changing the select control causes a page refresh (posting to the same
Action) in order to display other options. 

We notice that, if the user submits the form immediately after changing
the select control (say, in less than 1sec), two records (instead of
one) are inserted into the database. The problem appears depending on
how fast the user hits the submit button after the form refreshes, if
you submit 5secs after refresh, there's no problem. 

The code has been checked and there is no possibility for an html:select
onchange to cause a database insert. Even though both trigger the same
Action, they are well differentiated.

To make things more confusing, even though it is a server-side problem,
we can reproduce it only using IE6.0! Besides the js for submitting the
form onchange, there's no client-side code.

Any clues?

Thanks in advance.
Ivan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validator - not passing params to message

2004-05-18 Thread Ivan
correction :^)

2)
  
 ---> Password
  ---> 6
 
 minlength
 6
 
 ...
 


> - Original Message - 
> From: "Henrique VIECILI" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Tuesday, May 18, 2004 3:24 PM
> Subject: Validator - not passing params to message
>
>
> Hi,
>
> I am testing the commons-validator and I have two questions:
>
> 1º) How to generate client side (javascript) validation using the
Validator?
> Do I have to put some special tag?
>
> 2º) I put all the messages like 'errors.required' in my app resources
> properties file, but Validator seems not to be passing the params to
> complete the message´s fields ( like {0} and {1} etc)
>
> Example:
>
> in ApplicationResources.properties
> errors.minlength={0} can not be less than {1} characters.
>
> but the message is being displayed like this:
> Password can not be less than null characters
>
> in the validation.xml
> ...
> 
> ...
> 
> minlength
> 6
> 
> ...
> 
> ...
>
> Debugging my application I realized that the Object[] passed as param to
> ActionMessage() has only the first [0] value different from null (in this
> case, "Password").
>
> Henrique Viecili
>
>
> -
> 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: Validator - not passing params to message

2004-05-18 Thread Ivan
1) 

2)
 
   



minlength
6

...



- Original Message - 
From: "Henrique VIECILI" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, May 18, 2004 3:24 PM
Subject: Validator - not passing params to message


Hi,

I am testing the commons-validator and I have two questions:

1º) How to generate client side (javascript) validation using the Validator?
Do I have to put some special tag?

2º) I put all the messages like 'errors.required' in my app resources
properties file, but Validator seems not to be passing the params to
complete the message´s fields ( like {0} and {1} etc)

Example:

in ApplicationResources.properties
errors.minlength={0} can not be less than {1} characters.

but the message is being displayed like this:
Password can not be less than null characters

in the validation.xml
...

...

minlength
6

...

...

Debugging my application I realized that the Object[] passed as param to
ActionMessage() has only the first [0] value different from null (in this
case, "Password").

Henrique Viecili


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Date Time field validation

2004-05-17 Thread Ivan
Ok thanks, we can see there is a problem with date and mask validation
-There is no date(time) validators
-Java regular expressions are not escaped for javascript logic.



- Original Message - 
From: "Dean A. Hoover" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, May 17, 2004 2:52 PM
Subject: Re: Date Time field validation


> I'm not sure if this will help but how about escaping the forward
> slashes;
>
> ^\d{2}\/\d{2}\/\d{4} \d{2}:\d{2}$
>
> you may have to escape the backslashes as well (you have to
> do this when constructing a RE in C:
>
> ^\\d{2}\\/\\d{2}\\/\\d{4} \\d{2}:\\d{2}$
>
> don't know about javascript... just a thought.
>
> Dean Hoover
>
>
> Ivan wrote:
>
> >Hi,
> >
> >I have a form field representing a date in the format dd/MM/ HH:mm
(14/05/2004 13:03)
> >My problem is that validator cannot handle time in its date validations
rutines.
> >
> >Neither using mask validation with the regular expression
^\d{2}/\d{2}/\d{4} \d{2}:\d{2}$ works, because it throw a javascript error
(!)
> >
> >date doens t work
> >mask doesn t work
> >
> >any viable solution?
> >
> >
> >regards,
> >ivan
> >
> >
>
>
>
> -
> 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]



Date Time field validation

2004-05-17 Thread Ivan
Hi, 

I have a form field representing a date in the format dd/MM/ HH:mm (14/05/2004 
13:03)
My problem is that validator cannot handle time in its date validations rutines.

Neither using mask validation with the regular expression ^\d{2}/\d{2}/\d{4} 
\d{2}:\d{2}$ works, because it throw a javascript error (!)

date doens t work
mask doesn t work

any viable solution?


regards,
ivan

Re: Accessing ResourceBundle items from Action class

2004-05-13 Thread Ivan
I want to share mine :^)


[...]

 /* Guardo los mensajes */
 PropertyMessageResources messages =
(PropertyMessageResources)request.getAttribute("org.apache.struts.action.MES
SAGE");
 Locale locale = (Locale)session.getAttribute(Globals.LOCALE_KEY);

[...]

 this.seleccio =
messages.getMessage(locale,"etiqueta.enregistramentPersonal.intern");


is it correct?

- Original Message - 
From: "None None" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 12, 2004 10:11 PM
Subject: Re: Accessing ResourceBundle items from Action class


> (in my best StrongBad voice)... That's right, bow to my awesome
> superiorityness ;)
>
> Seriously though, I've been getting a ton of help from people on this list
> the past few days as I go through the exercise of learning Struts, so if I
> can give back even a little, that's very cool in my book.
>
> >From: Riyad Kalla <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Re: Accessing ResourceBundle items from Action class
> >Date: Wed, 12 May 2004 13:05:50 -0700
> >
> >On Wednesday 12 May 2004 01:04 pm, None None wrote:
> > > Thank you for that answer Riyad.  I think I actually found another
> > > (better?) way in my stumbling about trying to solve it on my own...
> >
> >No you didn't, mine is the BEST :*D
> >
> > >
> > > All I did is in my Action, after all my real processing, is this:
> > >
> > > MessageResources mr = getResources(request);
> > > lpcaf.setMessage(mr.getMessage("messages.deleteFailed"));
> > >
> > > where lpcaf is the ActionForm from the form submission.  That seems to
> >do
> > > precisely what I want.
> >
> >oh... yea your way IS better! Thanks for sharing, now I know.
> >
> >Best,
> >Riyad
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> Getting married? Find tips, tools and the latest trends at MSN Life
Events.
> http://lifeevents.msn.com/category.aspx?cid=married
>
>
> -
> 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: Validation - can i use multiple properties ?

2004-05-04 Thread Ivan
Take a look at

JSTL format with multiple Resource Bundles
http://www.cheblogs.com/roller/page/princeamin/20031104



   



- Original Message - 
From: "johannes Schwarz" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 2004 3:54 PM
Subject: AW: Validation - can i use multiple properties ?


I know this and i use this language files.

XXX_de.properties
XXX_en.properties

AND

YYY_de.properties
YYY_en.properties

I use a action to set the language:
-
String lang = httpServletRequest.getParameter("language");
Locale newlang = new Locale(lang);
this.setLocale(httpServletRequest, newlang);
-

And in all jsp-Pages i can use the properties.



But why isn't it possible to use different properties between the
validation file?

If i use three different forms (html-formular), than i would like to use
also

-> three different validationfiles
it works, i use between struts-config:


X-Validation.xml is defined for formular 1
Y-Validation.xml is defined for formular 2 and so on

-> three different configfiles
it works, i use between struts-config:
[ ] and at the
position i write &actions;

MyActions1.xml is defined for formular 1 (all actions for this
fields...)
MyActions2.xml is ...


-> three different properties-files
it works between the jsp-pages, but NOT between VALIDATION.

//The defenition between config



//My jsp-Pages:
Page1.jsp: ...:
:



nested tags and java.util.List

2004-04-23 Thread Ivan De La Pena
i have extended DynaValidatorForm and created form bean that holds a List.

It looks like this :


 

  


beans is a List of type Bean  which has only two variables name , age
 and the getter/setters for these two variables.

I am using lazy list to populate this List.

The business requirement is that the user wants to be able to dynamically
add Beans(which represent a  with two text boxes) from the html page. I
have already implemented that using row cloning using javascript.

But i have hardcoded one row on the page already..which looks like this






now the user can add more rows and i would rename the next row to 





..


This way i can succesfully pass all rows to the action class..but i
would get stuck if there are already Beans in the database , in that case i
would have to render those beans as rows having indexed names.

What i am looking for is a way to the following :

1.)Use nested tag to render the html elements with my naming convention ex.
beans[0].name...etc

2.)If possible initialize my "myForm" to have a List of size 1 , so that i
dont have hardcode the initial .
Also if there are any Beans in the database...then i could replace the List
of size 1 with the new one.

Hope i was clear enoughplease help






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: in <%include> not working

2004-04-21 Thread Ivan
if you can use tiles, usend the TileControllerClass you can
include-on-the-fly any file specified in a variable.

- Original Message - 
From: "Pani R" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, April 21, 2004 5:05 PM
Subject:  in <%include> not working


> Hi All:
>
> When I use <%@ include file='' %>,
> the  tag doesn't seem to  pull the corresponding resource from the
App.Resource file. Instead, its looking for a file "
> I tried using . Also, tried various combination of
single and double quotes. But nada. It picks the file name as such in ''
>
> I'm sure I'm including the correponding TLD (struts-beans) in the page.
>
> I appreciate any help.
>
> Thanks,
> Pani
>
>
>
> 
> Find what you are looking for with the Lycos Yellow Pages
>
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
>
> -
> 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]