RE: [OT ]Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
> even if it would work, how can you guarantee it resolves the proper > hostname? the default linux installation resolves > InetAdress.getLocalhost() to "localhost" until you remove the > 127.0.0.1 line from your etc/hosts. Right now the port was the problem. We are not using name-based virtual ho

RE: [OT ]Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
I didn't expect to trigger such an elaborate discussion ;-) > Personally, I still think that parsing the server.xml and the > context.xml or whatever config files the webserver is using is the > second best option. There is another problem - how can you get path to tomcat root directory? It's no

Re: [OT ]Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
OK, thank you all. I thought that it's possible in some easy way through J2EE/Struts API. If not we will try to work around it somehow... Reagards, Wojtek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-

Re: [OT ]Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
Hehe, don't feel bad... I was *this* close to replying with pretty much the same thing you did, I realized I would have been wrong just before I clicked Send :) So may be I should apologize for lack of precision in initial post :-) Absolutely no offense taken anyway and thanks for will to as

Re: [OT ]Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
[EMAIL PROTECTED] wrote: Assuming all of the "slaves" know the id of the "master", then maybe you have a RegisterServlet that's called by a slave processing servers during their init? http://javaalmanac.com/egs/javax.servlet/GetReqUrl.html -Dennis The problem is that slaves know master's

Re: obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
I need to find URL to my application (http://myhost:8080/myAppContext) from within init() method of struts plugin (implementing PlugIn interface). Any ideas how can I do this programatically without specifying it explicitly in one of application configuration files? You can't do it, in any

Re: newbie guestion: JSTL Expression language

2006-03-16 Thread Wojciech Ciesielski
Morten Andersen wrote: I want to use JSTL to check the role of the user (it can be one of many) I'm new to JSTL so even the simplest things gives me problems: I've set the role using request.setAttribute("role" , role); This tag: Prints out the role fine While the following statements are

obtaining server URL (or ip and port) from plugin

2006-03-16 Thread Wojciech Ciesielski
Hi there, I need to find URL to my application (http://myhost:8080/myAppContext) from within init() method of struts plugin (implementing PlugIn interface). Any ideas how can I do this programatically without specifying it explicitly in one of application configuration files? Thanks in advan

RE: SOLVED:RE: Please help! I have been looling at this problem for two days

2005-09-22 Thread Wojciech Ciesielski
> Hi Vijaya, > > It turn out that I did not put the jbossall-client.jar in the lib/ > directory of myApplication. After I put the jbossall-client.jar in the > lib/ directory, thing works fine. I really don't know why none of the log > statements were never printed when my action class execute meth

JSF Vs Struts

2005-09-21 Thread Wojciech Ciesielski
Hi there, I am quite experienced with Struts - I've started learning it when JSF where just in development phase... Right now JSF became java standard - and it's supported by tools like MyEclipse and Exadel Studio. So - I've got two questions: 1. is it difficult to switch from Struts to JSF for

RE: Please help! I have been looling at this problem for two days

2005-09-20 Thread Wojciech Ciesielski
What's the appserver? Jboss or Tomcat? It seems that you do not have libraries containing javax.ejb.* packages in server lib directory... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

Default locale in VM

2005-09-20 Thread Wojciech Ciesielski
How can I set default locale within my JVM (Jboss server instance) ? Wojtek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Validator and locale

2005-09-20 Thread Wojciech Ciesielski
Hi there, Where can I specify what locale should Validator use? I have problems with float numbers which in Poland are represented as ##,## while Validator float rule is complaining about ##.## format... I have session scope LOCALE set by request filter to pl_PL already but it doesn't help :-/ T

RE: Validate array

2005-09-20 Thread Wojciech Ciesielski
> Hello, > Actually yes there is a validate method if your actionform extends > dynaActionform > the 'bad side' will be that you have declared all properties, (I suppose > to > avoid writing java code) and then you end upt writing code for > validation.. > > probably It won't be a nice solu

RE: Validate array

2005-09-20 Thread Wojciech Ciesielski
> i use DynaActionForm and i think there is not validate method. > Should i use ActionForm ? I think you may use MyActionForm extends DynaActionForm, just override validate method and you're OK. - To unsubscribe, e-mail: [EMAIL

RE: Parameters and URL

2005-09-20 Thread Wojciech Ciesielski
> I've got a little question regarding the -Tag. > > Is it correct when I have this in a jsp: > paramName="objekt" paramId="objekteId" paramProperty="objekteId"> No, it's not correct. In action parameter should be ONLY the actio (ie "/admin_objekte_new.do"). NO PARAMS. If you want to add params

RE: Validate array

2005-09-20 Thread Wojciech Ciesielski
> how can i validate an array of Long and check that addNumber[] is > 0 > and < 99.99 ? > > type="org.apache.struts.action.DynaActionForm"> > > What kind of validation do you use? FormValidator and XML validation rules? Still - you can override validate() method, call super.validate() and

RE: HTML-Reset-botton works only before submit

2005-09-19 Thread Wojciech Ciesielski
> thank you very much for your answer! > But when I validate and I've have a error > I would like that the wrong typing is still > displayed that the user can see what was wrong! > Only after the reset button is clicked the values should be > cleared! > Is there a good possibility? Reset button us

RE: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
> You can try use the SimpleDateFormat class in java.text to parse the > time string. That's what I am doing: > > Java.sql.Timestamp toReturn; > > SimpleDateFormat dateFormatTime("HH:mm"); > > Calendar cal = new GregorianCalendar(); > > cal.setTime(dateFormatTime.parse(timeString)); > > toReturn =

RE: a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
> I try to parse some input from HTML form with > > Java.sql.Timestamp toReturn; > SimpleDateFormat dateFormatTime("HH:mm"); > Calendar cal = new GregorianCalendar(); > cal.setTimeInMillis(0); > cal.setTime(dateFormatTime.parse(timeString)); > toReturn = new Timestamp(cal.getTimeInMillis()); > >

RE: HTML-Reset-botton works only before submit

2005-09-19 Thread Wojciech Ciesielski
> So my question is: > > Do I jave to use a javascript function? > Is it possible to map > with the reset-method in the ActionForm? > I didn't manage this.Thanks for any advice > > Nice greetings You need to reset form - after submiting form instance with data is still in the request when it's

RE: Validator woes, modifying the input forward on the fly?

2005-09-19 Thread Wojciech Ciesielski
> Hi I have a situation like this: > User clicks on /viewUser.do?id=4 action, which loads the specific user > with > id4 to be viewed. > On that page is a form, the form is submitted, if some part of the xml > validation fails I need to return back to /viewUser.do?id=4. It would be > ideal if the

a little bit OT: Calendar misbehaviour

2005-09-19 Thread Wojciech Ciesielski
Hi there, I try to parse some input from HTML form with Java.sql.Timestamp toReturn; SimpleDateFormat dateFormatTime("HH:mm"); Calendar cal = new GregorianCalendar(); cal.setTimeInMillis(0); cal.setTime(dateFormatTime.parse(timeString)); toReturn = new Timestamp(cal.getTimeInMillis()); The poi

RE: Timezone

2005-09-18 Thread Wojciech Ciesielski
I've found out that the problem was with default timezone when JBoss was started within Eclipse. If I run it standalone with run.bat - everything works OK... I didn't have time to look for reason of this strange behaviour - I've added -Duser.timezone=Europe/Warsaw to my JRE VM params in Eclipse and

Timezone

2005-09-18 Thread Wojciech Ciesielski
Hi there, I have web-app deployed on JBoss and I am having some problems with date objects :-/ I am trying to set login time to some bean and display this info on page. In my LoginAction I do: UserSession us = new UserSession(loggedUser); TimeZone tz = TimeZone.getTimeZone("Europe/Warsaw")

RE: how to show data on jsp from bean

2005-09-17 Thread Wojciech Ciesielski
And one more thing - get yourself some good book/manual/tutorial on Struts. There's plenty of them on o'reilly/amazon/direct connect/emule etc... It's gonna be much easier ;-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For ad

RE: how to show data on jsp from bean

2005-09-17 Thread Wojciech Ciesielski
> I am new to struts and have a basic question regarding bean > > I am collecting some data(its a plain java bean) in an 'Action' > from database and want to show that data on a jsp page from where > it can be edited and submitted to some other 'Action' in the form > of 'ActionForm' > > I

A little bit OT: unicode escape editor

2005-09-15 Thread Wojciech Ciesielski
Hi there, It's a bit off topic ;-) Does any of you know of some free/shareware editor or eclipse plug-in allowing transforming Unicode text into ISO-8859-1 escaped strings? TIA Wojtek - To unsubscribe, e-mail: [EMAIL PROTECTE

RE: Newbie: html:link with action taken from bean

2005-09-14 Thread Wojciech Ciesielski
Thank you - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Newbie: html:link with action taken from bean

2005-09-14 Thread Wojciech Ciesielski
Hi there, I am quite new to JSP and struts. So - as I suppose - quite "lame" question ;-) In order to implement bread crumbs feature I have a collection bean, containing simple PathElement objects in request scope. Each PathElement contains two attributes: - titleKey (for resource ke

RE: Adding parameters to redirected forwards

2005-09-13 Thread Wojciech Ciesielski
THX :] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Adding parameters to redirected forwards

2005-09-13 Thread Wojciech Ciesielski
Hi there, How can I add some parameters to redirected forwards? I have situation like this: saveItem.do saves some object to the database and redirects to showSavedItem.do, which is based on itemId in request parameter (passed usually by URL). I want to make this as a redirect to prevent strang

Character encoding...

2005-09-11 Thread Wojciech Ciesielski
Hi, I had problem with character encoding in my web application. I was trying to display Polish characters using UTF-8 but data from forms was not getting in proper format to the business layer. I managed to solve this by setting filter which does request.setCharacterEncoding(encoding); But th