hi all!
i am using log4j in my application but am a bit confused about it. what r the
steps to use log4j in my application.
why do we need to create log4jservlet class in the application.
is it necessary? if no, why do we create it?
also, how does logfactory get to know that we are using log4j in
hi;
i think u don't need such a specific log4jservlet servlet. you can use any
servlet to initialize log4j
here is a filter to init logger, you will need a logger property file in
that case.
public void doFilter( ServletRequest servletRequest, ServletResponse
servletResponse, FilterChain
thanks,
but the question is why do we need log4jservlet. why do we code it?
Regards,
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Mobile : +91 9819510090
- Original Message -
From: abdurrahman sahin [EMAIL PROTECTED]
To: 'Struts Users Mailing List' user@struts.apache.org
Sent: Wednesday,
Hi Koul,
If you wanna simply use log4j in Struts application. You can just import
log4j and create a Logger instance in your source files, something like:
import org.apache.log4j.Logger;
Logger logger = Logger.getLogger(YourClassName.class);
...
Then you can just use logger to log your
Hi,
I have a form bean than it's use in two windows. Per example:
window1.
html:button: search Employers
window2
list Employers
html:select property=employers
html:button close
The button search
Hello, Jose!
Depending on your application requirement, you should choose one of the
following solutions:
1. in window2: after the user selects some employers, save the selected
employers in DB and in window1 retrieve the saved employers from the DB.
2. in form-bean put a
i wanted start programming with shale...
so i tried to integrate the shale blank war into eclipse as a new tomcat project
because i was not able to configure maven2 and shale into eclipse i'm using ant.
in the web-inf/src folder is my build.xml wich is working...
project name=BuildProject
Very thanks Emilia.
I use the second option, work whith form-bean. Is possible show in the firs
windows the selected employers and don't refresh all the window?.
Thank you.
-Mensaje original-
De: Emilia Ipate [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 14 de junio de 2006 8:49
Yes, Jose, it is possible!
But then you won't have 2 actions!
Here a detailed explaination of the solutons I see now:
A. use the form-bean with an selectedEmplyers array as I have explained
in the previous mail, but this involves having 2 requests to the server. Here
is the requests
Hello
I am using eclipse ide for developing my project .How can I use an
already existing modules functionality into my module.
with regards
Mano
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Abhimanyu Koul wrote:
but the question is why do we need log4jservlet. why do we code it?
You really don't need such a servlet. You need it if you decide to
configure log4j programmatically. If you decide you do not need such a
servlet (i never
Hi, I want to add an image that works as a reset button -
I got:
html:img src=cancel.gif onclick=document.myForm.reset(); border=0 /
Unfortunatelly, this only works initially - when the user has submitted
the page once
it doesn't seem to work anymore.
Any idea, what's wrong?
Thx,
Marcus
hi
there is a small requirement - when the form is submitted at the
time of processing a dialogbox should be shown with the processing message
and the dialogbox should be closed when the processing of the request is
completed. Can this be possible.
Thanks Regards
I have created a new action class and written:
/**
* Add Editors to Domains
*
* @struts.action name=domainAdminEditorForm
path=/admin/domainAdminEditor scope=request parameter=method
*
* @struts.action-forward name=domainAdminEditor.page
path=.domainAdminEditor
*
* @author Shervin Asgari
*
I actually found the page you were mentioning before. But that doesn't
resolve my problem:
In Dynamic Indexes for Indexed Properties there is an example for
using a text-field
to alter a String value:
html:text name=stringbean property='%= labelValue[ + ctr +
].label %' /
Looks very nice,
Again, very thanks
I think that the second option es better that our needs.
When the uses press teh button search a pop-up it's open. This pop-up
contains the list whith the employers and a close button. The fist windows
is always visible and it's possible to interact whith the controls. When the
Hello,
I'm trying to use validator framework but the aplication don't works.
In the struts-config.xml i have:
form-bean name=seguimientoComercialForm
type=org.apache.struts.action.ValidatorForm/
then mapping:
action
Hi,
I have a struts 1.1 application with an Action that processes a file
obtained using an ActionForm containing a
org.apache.struts.upload.FormFile parameter, I want to use this action
from a java application and would be really grateful if someone could
give me pointers on how to do this using
How can I specify a default value for a text field and also read it from
application resources. I dont want to read it from form bean though.
regards,
Pankaj
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
input name=someName value=fmt:message
key=AppProperties.defaultText /
type=text
I think this might work. If it doesn't you may have to change the to '
Shervin Asgari - System Consultant
M: +47 918 64 148, @: [EMAIL PROTECTED]
Linpro AS - Leading on LinuxTel: +47 21 54 41 00/02
Hi,
I am using a list backed action form and need some advice on how to get the
value from the html:text box so I can do some logic with it in a javascript
function.
In my case I have the following:
html:text property=%=benefits[+index.intValue()+].value% size=20
onblur=%=jsFunction%/
My
Shervin Asgari ha scritto:
Have I forgotten something??
Did you run XDoclet???
I am asking this because it seems that you wrote some XDoclet tags.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
Hi,
I am a newbie in ajax. I want to use ajax in my application. Let me
explain my requirement :
when I enter a character in the text field i have to call an action.
Inside my action i have to load all the users and send it back to jsp
so that I can display.
I am able to call the action
Hm...Maybe I should explain better. I have already a full working
application, with a couple of action classes and a few jsp pages. I
wanted to add one more action class and one more jsp page, but suddenly
it didn't work, and I can't remember if I have forgotten to do something.
I thought I
Check this: http://java.sun.com/developer/EJTechTips/2005/tt1122.html
This has a simple example on how to return the list of employee(Ajax
way).
Note: This does not use the tags you mentioned. But would give one more
perspective. Ignore if does not help.
Chandra
-Original Message-
Shervin Asgari ha scritto:
I thought I was runnign XDoclet. How can I check this?
XDoclet is a tool that must be run at build time! So you need to execute
it before you deploy your webapp.
Anyway I am not a wizard with XDoclet and this is not the right list to
ask (sorry).
Ciao
Antonio
José María Tristán wrote:
Hello,
I'm trying to use validator framework but the aplication don't works.
In the struts-config.xml i have:
form-bean name=seguimientoComercialForm
type=org.apache.struts.action.ValidatorForm/
Your form-bean should be referencing your own
Florian Barth wrote:
Looks very nice, but the textfield accesses the getter and setter of
the LabelValueBean
that is returned from the StrinBean. My Bean just returns the the
String-object that has
actually no getter and setter for it's value.
Let me get this straight: you're iterating over
Shervin Asgari wrote:
I thought I was runnign XDoclet. How can I check this?
Look at your console when you run the Ant build. Look at your Ant build
file. Remember what you do when you build the project and see if at any
time you run XDoclet.
Dave
José María Tristán wrote:
java.lang.NullPointerException
seda.coffeenet.SeguimientoComercial.struts.action.IndexSeguiComerAction.exe
cute(IndexSeguiComerAction.java:25)
I would start by looking at IndexSeguiComerAction.java line 25.
Dave
The list of strings is actually part of an ActionForm.
On load of display I kinda like to decompose the list to a bunch of
text-fields, that are recomposed to a list of string on submit
c:forEach items=${listOstrings} var=s
input type=text name=${s}
/c:forEach
I'll try this, maybe the
Hi
You are not setting any values in the request - How can the list be populated
if you don't supply any values
Hermod
-Original Message-
From: Sony Thomas [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 14, 2006 1:09 PM
To: user@struts.apache.org
Subject: ajax:autocomplete tag
Hi,
Hi Hermod,
I am setting the value entered in the textbox
parameters=username={username}
username is my textfield name.
The problem is How will I return the username list back to jsp from action.
It is very very urgent. can anyone help me please
sony
[EMAIL PROTECTED] wrote:
Hi
You are
Hi
That was what I ment - You don't return any values from your action. You need
to write the values to the response (supplied by the action), and then return
null. The documentation at http://ajaxtags.sourceforge.net shows you how, or
search for Struts and returning a file for instance.
hi
I am developing an struts application in which the user enters some
information in screen A. After processing this information, I display the
same screen A or may be another screen B. But the processing sometimes takes
a while, so I want to display a dialogbox on the screen A that says Please
Yes I run XDoclet. Because all of my other forwards are working
correctly. It is only this one that seems to not work. What I have done
to come around this issue is including data in an already existing
actionform class. This is not feasible, but works temporary until I
figure out what I am
Shervin Asgari wrote:
Yes I run XDoclet. Because all of my other forwards are working correctly.
But they already existed, and this is a new one.
Are you certain you are running it again to capture the new class's
annotations?
Dave
I tried to do it with your piece of code, but that didn't quite work
I think one solution would be to write a StringWrapper with a
String-Value and the according getter/setter (e.g. getVal, setVal) and
fill the list with this StringWrappers instead of Strings, so html:text
You can forward to a JSP from your action rather than coding tags into
your action, then generate XML in your JSP rather than HTML.
Your JSP (aside from taglib directives etc) may look like this:
?xml version=1.0 encoding=UTF-8?
ajax-response
response
c:forEach var=user
need hep with this please. Thanks.
From: fea jabi [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List user@struts.apache.org
To: user@struts.apache.org
Subject: html:image with LookupDispatchAction
Date: Tue, 13 Jun 2006 14:48:39 -0400
Trying to use html:image with LookupDispathAction. how
Please tell me in Struts context. What do I need to write in my
html:text tag?
Shervin Asgari wrote:
input name=someName value=fmt:message
key=AppProperties.defaultText /
type=text
I think this might work. If it doesn't you may have to change the to '
Shervin Asgari - System
On 6/14/06, stephan opitz [EMAIL PROTECTED] wrote:
i wanted start programming with shale...
so i tried to integrate the shale blank war into eclipse as a new tomcat project
because i was not able to configure maven2 and shale into eclipse i'm using ant.
If you'd like to try Maven 2 again, we
Hello:
I hava a html:select optionscollection:
html:select property=unidades multiple=true size=6
styleClass=control
html:optionsCollection property=unidadesSelect/
/html:select
and in the form-bean the method:
public void
Ok.
I've included the log4j.jar in my WEB-INF/lib directory and created a
log4j.xml file based on an example I found online (rather then a
log4j.properties file). The application deploys error free and executes -
however my log files are not created.
I can think of two reasons this could be
Yes, in this line I pass a String to a method set of the form-bean. I
suppose that it's owed that the form-bean It does not exist.
-Mensaje original-
De: Dave Newton [mailto:[EMAIL PROTECTED]
Enviado el: miércoles, 14 de junio de 2006 13:36
Para: Struts Users Mailing List
Asunto: Re:
(continued from previous msg)
HERE is the log4j.xml file I'm using (I forgot to include it in my last
message).
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd
log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/;
appender name=event_file
[REPOST under correct thread]
(continued from previous msg)
HERE is the log4j.xml file I'm using (I forgot to include it in my last
message). Also, I'vd tried creating the logs directory under the
[CATALINA_HOME]/bin directory, and still no log files have been created.
?xml version=1.0
Thanks for all who helped me to solve this problem. I made it work in my
application.
Once again thanks a lot
sony :-)
Samere, Adam J wrote:
You can forward to a JSP from your action rather than coding tags into
your action, then generate XML in your JSP rather than HTML.
Your JSP (aside
On 6/13/06, Eric Rank [EMAIL PROTECTED] wrote:
I know that ApplicationResources and MessageResources do similar
things, but I'm confused about how to understand their individual
roles
1. What are the similarities and differences between MessageResources
and ApplicationResources in a struts
I need to call a method from the action class that periodically
refreshes my page in struts application automatically. Can someone
please suggest how to do it?
regards,
Pankaj
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
You should use javascript to post your form from time to time using
the function window.setInterval(function, milliseconds) that you can
read about at http://www.w3.org/TR/Window/#timers.
If ou don't want the flickering effect that it causes, you could also
use Ajax with the timer.
On 6/14/06,
From: Wendy Smoak [EMAIL PROTECTED]
On 6/14/06, stephan opitz wrote:
i wanted start programming with shale...
so i tried to integrate the shale blank war into eclipse as a new tomcat
project
because i was not able to configure maven2 and shale into eclipse i'm using
ant.
If
Darren Hall wrote:
(continued from previous msg)
HERE is the log4j.xml file I'm using (I forgot to include it in my last
message).
Whew, I knew there was a reason I almost always use the properties file.
Java + XML: Like crack for people that like to type.
Dave
Darren Hall asked:
I've included the log4j.jar in my WEB-INF/lib directory and
created a log4j.xml file based on an example I found online
(rather then a log4j.properties file). The application
deploys error free and executes - however my log files are
not created.
I can think of two
Hey George,
Interesting problem with that console...
I'm deploying my war file through Tomcat 5.5 manager (web based interface).
Since Tomcat is running as a service on Windows, there really is no console
per se. In the past, I've started tomcat from the command line, and I was
able to see output
Hi all,
I need some advice here.
I have developed my application using 2.4 specifications but the deployment
server is only up to 2.3 specifications.
So i have to make some changes in web.xml as the following.
!DOCTYPE web-app PUBLIC
-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN
Darren Hall wrote:
I'm not starting it from the command line any longer. Therefore, I can't see
any console output from Tomcat.
Try using a ConsoleAppender and tail -f the log file in the tomcat log
directory.
Dave
-
To
chuanjiang lo wrote:
bean:define id=biz_link type=String name=Biz_Bean
property=business_id/
html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link}
You need to use the EL-enabled tag libs (struts-el or something like
that) when you don't have JSP 2.0 available.
Dave
On 6/14/06, Dave Newton [EMAIL PROTECTED] wrote:
chuanjiang lo wrote:
bean:define id=biz_link type=String name=Biz_Bean
property=business_id/
html:link action=/viewBiz/ViewBusinessDetail?business_id=${biz_link}
You need to use the EL-enabled tag libs (struts-el or something like
that) when
i have some other pages that uses c:if and etc etc..
I've read on the net and realize that the 2.3 specifications supports only
JSTL 1.0 and it would not evaluate the EL expressions.
So how do i make it evaluate the EL expression without changing my
implementation.
On 6/14/06, Rahul Akolkar
You need to use the 1.0 JSTL implementation as you said.
Your taglib directives will then need to use the 1.0 uri, for example:
[EMAIL PROTECTED] uri=http://java.sun.com/jstl/core; prefix=c % (no /jsp/
in
the path)
-Adam
-Original Message-
From: chuanjiang lo [mailto:[EMAIL PROTECTED]
Ok, I tried the following which was using a input tag as normal:
input type=text name=%=value[+index.intValue()+].value% size=20
onblur=calculate(this.value,
'bean:write name=benefit property=benMaxRange/',
'bean:write name=benefit property=benMinRange/',
I'd like to expand the message translation with a few things. I was
wondering where I should look for plugging in my own processing of
keys-message text.
Thanks,
Scott
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
Pankaj Gupta wrote:
Please tell me in Struts context. What do I need to write in my
html:text tag?
input name=someName value=fmt:message
key=AppProperties.defaultText /
type=text
Not sure how well that works... if you're using a JSP 2.4-compliant
container and the JSTL (which you
José María Tristán wrote:
Again, very thanks
I think that the second option es better that our needs.
When the uses press teh button search a pop-up it's open. This pop-up
contains the list whith the employers and a close button. The fist windows
is always visible and it's possible to interact
Hello
I read through several discussions about this problem but havent come to a
conclusion on how to resolve it.
A very simple explanation of my problem
I have two JSP pages. On page 1 - several account numbers are displayed.
When a user selects a particular account, in my action class, I'm
One option might be a static HashTable in some class... key the table by
some calculated ID representing the request.. for that, see the
RequestHelpers.generateGUID() method in Java Web Parts:
http://javawebparts.sourceforge.net/javadocs/javawebparts/request/RequestHelpers.html
If a have a shared html template how can I parameterize component ids
such that the template can be used more than once within the view?
For example, if I have a
input id=myField jsfid=inputText type=text value=@binding/
within a reusable template, and I used the template twice in a view, I
Frank W. Zammetti wrote:
One option might be a static HashTable in some class... key the table
by some calculated ID representing the request.. for that, see the
RequestHelpers.generateGUID() method in Java Web Parts:
Scott Van Wart wrote:
Sonu S wrote:
I can not store bean in request or
hello
it works in eclipse...
next important problem is...
i can define lifecycles like
compile
package
cargo:start
etc..
if i do this in eclipse it does not work...
compile works
but if i use
package or cargo:start
eclipse throws
[ERROR] project-execute :
Newbie,
I'm using Shale with tiger.
JSP, subscribe (example from somewhere) that does a save. All this
works fine, but I made a change so that the return should send it to a
Success page.
navigation-rule
from-view-id/subscribe.jsp/from-view-id
navigation-case
Struts uses MessagesResources to perform the key--text translation.
The default implementation used is PropertyMessageResources (both in
the org.apache.struts.util package).
If you want to use your own MessageResources implementation then you
need to create two classes - the custom
Hi
The problem lies with the eclipse plugin and the maven embedder. This is
fixed in the next version of the plugin
Hermod
-Opprinnelig melding-
Fra: stephan opitz [mailto:[EMAIL PROTECTED]
Sendt: 14. juni 2006 19:16
Til: Struts Users Mailing List
Emne: Re: [shale] using the eclipse
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Newbie,
I'm using Shale with tiger.
JSP, subscribe (example from somewhere) that does a save. All this
works fine, but I made a change so that the return should send it to a
Success page.
navigation-rule
Oh, I agree... this is only the kind of solution I'd dream up with some
crazy requirement, as there seems to be in the OP :) I can't imagine
what design criteria would say you can't put an object in ANY scope!
But, if that's the case, it's time for some creative/wacky (depending on
your
I tried that. There is no output from log4j to the daily catalina.log files.
However, taking another path, I created a new (and much simpler) log4j.xml
file. Using this new file, I now see the following log file created
'C:\Program Files\Apache Group\Tomcat 5.5\logs\uwaf-debug.log'.
So...
Here you go. Again this is Shale with Tiger.
13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces
threw exception
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
at
I'm working on getting logging up on struts with Log4J right now as
well. I'm also new to struts. I am using the following log4j.xml file
(in my WEB-INF/classes) directory and getting a log file successfully.
My XML:
?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM
Cassio Pereira wrote:
You should use javascript to post your form from time to time using
the function window.setInterval(function, milliseconds) that you can
read about at http://www.w3.org/TR/Window/#timers.
If ou don't want the flickering effect that it causes, you could also
use Ajax with
Comments interspersed below.
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Here you go. Again this is Shale with Tiger.
13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces
threw exception
java.lang.IllegalStateException: No WebApplicationContext found: no
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Here you go. Again this is Shale with Tiger.
13:27:47,796 ERROR [faces]:253 - Servlet.service() for servlet faces
threw exception
java.lang.IllegalStateException: No WebApplicationContext found: no
ContextLoaderListener registered?
...
You can't do it without changing your JSPs. It isn't as simple as
wrapping everything with c:out value=${someVariable}/ as JSP tags
cannot be nested within attributes. Also, to my knowledge there is no
way to just include some jar file to enable EL exprs.
A suggestion too, your code:
bean:define
I'm working on a slightly more flexible way of getting messages out of
the .properties file, and am posting this to the list for a few reasons:
1) To make sure it hasn't already been done
2) To see if it's useful to anyone else
3) If this is the right approach to whatever it is I seem to think
Removed spring and it works. Thanks for the pointer.
So, if I use spring you must have managed beans for all JSP's? Not sure
if Im actually going to use spring.
Wendy Smoak wrote:
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Here you go. Again this is Shale with Tiger.
13:27:47,796
I tried every permutation last night and couldn't get it to work without
the managed bean.
f:view included.
Thanks for the pointers. Seems to be with spring. I removed it and it
works now.
Craig McClanahan wrote:
Comments interspersed below.
On 6/14/06, Marty Phee [EMAIL PROTECTED]
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Removed spring and it works. Thanks for the pointer.
So, if I use spring you must have managed beans for all JSP's? Not sure
if Im actually going to use spring.
It appears that this is the effective state of the current implementation.
But I
Done: http://issues.apache.org/struts/browse/SHALE-192
Craig McClanahan wrote:
On 6/14/06, Marty Phee [EMAIL PROTECTED] wrote:
Removed spring and it works. Thanks for the pointer.
So, if I use spring you must have managed beans for all JSP's? Not sure
if Im actually going to use spring.
Is there anyway in J2EE to get how many active sessions are in the system?
Thanks in advance.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I'm not sure about using 'DEBUG' as the name of an appender. Why not
try something like 'logfile'?
I'm not very familiar with configuring Log4j using XML. A simple
.properties file has always done everything I need.
-Original Message-
From: Darren Hall [mailto:[EMAIL PROTECTED]
Hey Carl-
if you contextObject.getManager().getActiveSessions()
you should be able to get the count of Active Sessions..
Anyone else
Martin--
*
This email message and any files transmitted with it contain confidential
I'm maintaining and upgrading an existing Struts application (written by
someone else long ago, with no chance of contacting the authors).
I just discovered that our custom tag class variables have global scope - when
a tag class (derived from javax.servlet.jsp.tagext.TagSupport) is used, an
On 6/14/06, Calvin G. Dodge [EMAIL PROTECTED] wrote:
I'm maintaining and upgrading an existing Struts application (written by
someone else long ago, with no chance of contacting the authors).
I just discovered that our custom tag class variables have global scope -
when a tag class (derived
George/Darren
public class SomeAction extends Action
{
ActionForward execute(..
{
//get a category
static Category cat =
Category.getInstance(StrutsServletClass.class.getName());
// From here on, log away! Methods are: cat.debug(your_message_string),
// cat.info(...), cat.warn(...),
hi,
pls help me solve the following.
1)paging using struts
2) need to open a popup window within another pop up window.
regards
ceena
Send instant messages to your online friends http://in.messenger.yahoo.com
Stay connected with your friends even when away from PC.
Hello Ceena,
These requirements are not Struts specific.
1. paging using struts
Ans: I believe that you are trying to develop pagination in your screens.
This totally depends on your business requirement.
2) need to open a popup window within another pop up window.
Ans: This is Javascript
You could probably include some Javascript in an onSubmit event to open
a new window as your dialogbox, and a corresponding piece of Javascript
in the resulting page to close the dialogbox window.
I generally try to avoid Javascript, so I'm not aware of any such
functionality being provided
96 matches
Mail list logo