Thanks for helping.
Sure, here are all my settings.
I use MySQL 5.0.37, Tomcat 5.5.17 and Windows XP SP2 and MySQL Connector/J
5.0.5.
The name of the database that I'd like to connect to is called akr_db and the
name of my web-application is called SZTGKR.
1) I have a context.xml file in my
How to do this in struts 2 ?
In struts 1 i had:
MessageResources resources = (MessageResources)
getServlet().getServletContext().getAttribute(org.apache.struts.Globals.MESSAGES_KEY);
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
Michał Letyński napisał(a):
How to do this in struts 2 ?
In struts 1 i had:
MessageResources resources = (MessageResources)
getServlet().getServletContext().getAttribute(org.apache.struts.Globals.MESSAGES_KEY);
-
To
hi,
i just had a look, i think your url is wrong.
where is the DB name?
eg:- you have it like jdbc:mysql://localhost:3306
but should be like: jdbc:mysql://localhost:3306/akr_db
Thanks,
Nuwan
- Original Message -
From: Balazs Michnay [EMAIL PROTECTED]
To: Struts Users Mailing
Still the same error message and the same symptoms: the url and the driverclass
properties are still null: :-((
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of
class '' for connect URL 'null'
ohhh... what am I missing ??!!
- Original Message
From: Nuwan
hi,
ServletActionContext.getServletContext();
Thanks,
Nuwan
- Original Message -
From: Michał Letyński [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, May 22, 2007 7:06 AM
Subject: Re: Access to MessageResource from action.
Michał Letyński
Hi,
I want to use the redirect after post pattern in order to have a web app that
is well behaved when the user hits back, refresh etc etc
I also want to use the Struts 2 validation framework.
At first glance though, the two seem incompatible:
If I have a form that I want to submit with a
I forgot that I also have a resource-ref entry in my web.xml file... just in
case it counts...
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/akr_db/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
Hi,
Anyone has idea about how can be wrapped the text when we use bean:write
name=... property=
. I tried to use wrap attribute of text area. But it doesn't work because I
am using struts html:textarea/
It can be done if there is an attribute to break lines.
It works if i enter data and
2007/5/22, Sourabh Chandan [EMAIL PROTECTED]:
Hi,
Anyone has idea about how can be wrapped the text when we use bean:write
name=... property=
. I tried to use wrap attribute of text area. But it doesn't work because
I
am using struts html:textarea/
What do you mean with wrapped?
Hi,
Sorry mate, i think you should ask this from another group like tomcat..,
hope this link would give you some help
http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
Thanks,
Nuwan
- Original Message -
From: Balazs Michnay [EMAIL PROTECTED]
To: Struts
hi,
are you sure you have the applicationContext.xml file inside the WEB-INF
directory of the .ear file?
http://www.springframework.org/docs/api/org/springframework/web/context/support/XmlWebApplicationContext.html
hope this would help you.
Thanks,
Nuwan
- Original Message -
A form of approximately 1800 form elements is causing
java.lang.OutOfMemoryError: Java heap space. When 1000 form elements
are used, no such error.
The environment:
- JBoss 4.0.5
- Struts 1.1
- A jsp page using struts html:form tags to start and end the form
block. Then insidethe form, xslt is
Firstly, I hope you are only using request scope for these forms.
Session scope would kill your application.
Have you tried experimenting with the JVM options?
(http://blogs.sun.com/watt/resource/jvm-options-list.html)
In particular -Xms (initial Java heap size) and -Xmx (maximum Java heap
Hi
To set up connection pooling in struts which is the recommended way whether and
please explain the benifts
1) Configure through struts-config
2) Configure through Server (like in tomcat data-source configuration)
Thanks Regards,
Saravanan Vijayappan,
+91 9448833571.
Hi,
Struts way (not good)
Connection pooling is not available in latest version of struts
1 and
struts 2. So if you upgrade your application to latest struts
then you
will be in trouble.
Server (JNDI) very good
All application servers provide
optiontransferselect includes the doubleId attribute for the second
select. Your CSS can reference that ID.
To change the order of the buttons you'll need to create your own
optiontransferselect.ftl template based on the existing one.
Vijay Prajapati wrote:
Hi,
This is Vijay and
Hello,
Since there is some problem with ajax validation, i'm trying to validate my
self my dates with topics.
But I can't get the value of the component in JS,.
Is someone know how to get the value of a datetimepicker ?
Julien
Jeromy,
In which version it includes doubled attribute for second select. I am
using Struts 2.0.6 and it doesn't allow it. Even in Struts blogs it shows
Bug in Optiontransferselect in version 2.0.6.
please send me code for it.
Vijay
On 5/22/07, Jeromy Evans [EMAIL PROTECTED] wrote:
I can not get datetimepicker to work.
Here's my Code:
s:datetimepicker name=date label=Date Completed
displayFormat=#-#MM-#dd /
and here's the html output:
script type=text/javascript
dojo.require(dojo.widget.DatePicker);
/script
div
dojoType=dropdowndatepickerid=date
Out of curiosity, why wouldn't you use:
ResourceBundle.getBundle(propFile, Locale, getClass().getClassLoader());
Z.
hi,
ServletActionContext.getServletContext();
Thanks,
Nuwan
- Original Message -
From: Michał Letyński [EMAIL PROTECTED]
To: Struts Users Mailing List
Many thanks for your help, I managed to set connection pooling up (however, I
don't know whether it uses conn. pooling or not...)
To help others, here are all the configurations that need to be done:
(This works with Tomcat 5.5, MySQL 5.0, Win XP SP2)
1) Place your database driver in your
Hi,
I have just downloaded NetBeans Profiler to see how my web-app performs and
realized that it produces serious memory leaks... The interesting part is that
I have nothing on my JSP but static struts tags (no dynamic content at all) and
it turned out that the leaks are not made by my
Yeah, i'm sure.
It's very strange. I already opened the EAR file a thousand times to see if
antything could be wrong.
I have done this procedure (create EAR file) many times for other app. But
for Struts 2 + Spring is the first one.
My guess is that the Jdeveloper sets a lot o of environments
Assuming that datePicker is the id of the datetimepicker tag:
to get an string value (RFC 3339):
dojo.widget.byId(datePicker).getValue();
to get a Date object:
dojo.widget.byId(datePicker).getDate();
musachy
On 5/22/07, Julien Leonard [EMAIL PROTECTED] wrote:
Hello,
Since there is some
Hello
Try to had s:head theme=ajax / at the begining of your jsp.
Julien
2007/5/22, Mansour [EMAIL PROTECTED]:
I can not get datetimepicker to work.
Here's my Code:
s:datetimepicker name=date label=Date Completed
displayFormat=#-#MM-#dd /
and here's the html output:
script
2007/5/22, Balazs Michnay [EMAIL PROTECTED]:
Hi,
I have just downloaded NetBeans Profiler to see how my web-app performs and
realized that it produces serious memory leaks... The interesting part is that
I have nothing on my JSP but static struts tags (no dynamic content at all) and
it
Thanks !
I've just saved the validation of my application !
Julien
2007/5/22, Musachy Barroso [EMAIL PROTECTED]:
Assuming that datePicker is the id of the datetimepicker tag:
to get an string value (RFC 3339):
dojo.widget.byId(datePicker).getValue();
to get a Date object:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Balazs,
Balazs Michnay wrote:
Thanks for helping.
Sure, here are all my settings.
I think you have more configuration than you need. Here is exactly what
I have for a similar setup (MySQL 5.x, Connector/J 5.x, Tomcat 5.5.x):
Context
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Balazs,
Balazs Michnay wrote:
2) open your server.xml and put the following lines between
GlobalNamingResources/GlobalNamingResources tags (this is what I
missed...)
(Modify it properly...)
Although this is possible, most will recommend
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Balazs,
Balazs Michnay wrote:
I have just downloaded NetBeans Profiler to see how my web-app
performs and realized that it produces serious memory leaks...
[snip]
What I discovered was that
a simple page reload leads to eating up my memory and
So, if the action properties are pushed onto the stack via OGNL, then what
from below would be preventing me from seeing the values that should be
there? Displaying a list worked just find, the Dept object seems to be
unavailable. I have getter and setter, according to documentation, I
shouldn't
You could also try to run jmap -histo PID when you get the
OutOfMemoryError; you'll probably see the same as in the NetBeans
profiler but maybe it helps to reveal the memory eater anyway.
Torsten
Balazs Michnay wrote:
Hi,
I have just downloaded NetBeans Profiler to see how my web-app
Hi All ,
i am developing a struts based web-application with JBoss 4.0.5 as
Application Server and Oracle 10g Express edition .
I am configuring my application for connection pooling .
I have tried following methods :
1. Oracle Connection Pooling following thius link
Hmm... I use 2.0.6.
The wiki at http://struts.apache.org/2.x/docs/optiontransferselect.html
lists doubleId as an attribute, it's definitely included in the
OptionTransferSelect class and OptionTransferSelectTag class (in
AbstractDoubleListTag) and it's definitely referenced in the
Dear All,
I'm sorry about the double posting but haven't received any feedback to
my first posting.
I am writing a Struts 1.3.8 web application with tiles. In one of the
JSPs (participating a tiles definition), the tiles processor throws a
path-not-found-exception upon finding an applet tag,
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Jasdeep,
jasdeep wrote:
2. Configuring Jboss's Internal Container Level Connection pooling simply
creating the datasources
This is the right way to do things.
The application works OK with Second method but When it is being hit with
200
Hi Michał,
Although that approach will work, if you're creating a new message
resource bundle you may prefer the new Struts2 approach described at
http://struts.apache.org/2.x/docs/localization.html and demonstrated at
http://www.planetstruts.org/struts2-mailreader/Tour.do.
Essentially you
Thanks, That helped. But the whole page now is a mess. As is it's
popping up in another page, with new header and footer !
I don't understand how the layout goes with this, but I 'll try to
figure it out.
If any one faced before, please let me know.
Julien Leonard wrote:
Hello
Try to had
Roger Varley roger.varley at googlemail.com writes:
Is dynamic method invocation turned on?
As an aside, why is dynamic method invocation turned off by default.
From experience this suggests that either the functionality is
experimental, or is not the sort of thing you should be using
I'm using html:optionsCollection tag in my jsp to display options for
multiple dropdowns.
see my code snippet below:
logic:iterate id=availableServiceGroups
property=availableGroupsByService name=adminUserProfileForm
html:select property=assignedGroupIdsByService size=1
styleClass=wide
I'm trying to use DWR with Struts2. The problem is when I'm trying to build the
row of a table with a a href= link to an action class, I'm not able to send
any params in that link.
eg: var getUname = function( user ) { return 'a
href=UserEdit.action?uname='+ user.uname +' onClick=' +
I'm not 100% sure of your intent as this line is a bit strange - trying
to set the deptId to the deptName
s:hidden name=dept.deptId value=dept.deptName /
but anyway, the documentation on the wiki around the expressions for
some tags is a bit confusing and I suspect the problem is that
You could use jsp tags to create a hidden template row.
Client side you can clone the template row using dwr.util.cloneNode()
then tweak the appropriate bits.
newtostruts struts wrote:
I'm trying to use DWR with Struts2. The problem is when I'm trying to build the row of a table
with a a
Thanks Lance,
I don't know what I was doing wrong with my old method, but it is working
fine now.
Lance [EMAIL PROTECTED] wrote:
You could use jsp tags to create a hidden template row.
Client side you can clone the template row using dwr.util.cloneNode()
then tweak the appropriate
Simple question;
Is there any way to retain messages added with addActionError or
addActionMessage during a redirect?
More complex explanation of my setup;
ActionA gets data and has uses a jsp to display the data (using
resultmy_jsp.jsp/result).
my_jsp.jsp has a comment field which
Redirect looses all data .. this is how it is to work
One thing you can do is store it as a session attribute :) ... not the
best way but one of the way
Regards
Guru
-Original Message-
From: Al Sutton [mailto:[EMAIL PROTECTED]
Sent: 22 May 2007 17:22
To: 'Struts Users Mailing
I tried to check and output an attribute of session in a jSP page, which I
had set in an action by using logic:present and bean:out tagas, but I
coulnd't. It seems like those are not a right tag.
--
View this message in context:
Hi,
if its struts2, take a look at this...
http://struts.apache.org/2.x/docs/message-store-interceptor.html
Thanks,
Nuwan
- Original Message -
From: Al Sutton [EMAIL PROTECTED]
To: 'Struts Users Mailing List' user@struts.apache.org
Sent: Tuesday, May 22, 2007 4:21 PM
Subject: [s2]
You could forward rather than redirect.
Another option is to use flash scope which has been discussed on this
list previously. My understanding of this is that a filter manages a map
on the session and requests have access to attributes added by the
previous request.
I have never implemented
Thanks for the reply, Jeromy. That is exactly what has not been working.
Unfortunately, the s:property does not work either.
dept is a Department domain object, with two field, deptId: short; and
deptName: String. Both have getters and setters.
The DepartmentAction retrieves the dept object
Hi,
I would go for JSTL tags, but i dont really get what you trying to say!
Thanks,
Nuwan
- Original Message -
From: hk [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Tuesday, May 22, 2007 4:37 PM
Subject: How can I access an attribute of session using JSP tags?
I tried to
I am saying the standard struts tags do check session scope if
scope=session or no scope is provided, so it's probably a bug in your
code.
Nuwan Chandrasoma wrote:
Hi,
I would go for JSTL tags, but i dont really get what you trying to say!
Thanks,
Nuwan
- Original Message - From:
Thanks for the suggestions. It just felt a little weird that the recommended
method of dealing with POSTed data (i.e. post and redirect) whacks out the
standard provided method of passing user messages (addActionError and
addActionMessage).
Is this something which could be improved in future
--- shadman [EMAIL PROTECTED] wrote:
The DepartmentAction retrieves the dept object from
DB, and has getters and setters for the domain
dept
object in the action.
s:property value=dept.deptId /
This is the proper syntax; I do it all over the place.
If the action has a getDept() and the
In my JSP page, I have a code like below,
logic:present name=netblockflixter.Login scope=session
logic:equal value=Boolean.TRUE property=netblockflixter.Login
scope=session
Logout
/logic:equal
logic:notEqual value=Boolean.TRUE property=netblockflixter.Login
scope=session
Unfortonutalely,
I don't have any class that invokes System.exit() nor Spring scheduler.
Nothing particular happens before tomcat shutdown (see logs).
And No database is backed up or restarted during this time.
This is really strange (and critical) and I suspect that it comes from
Struts.
Tan
Hi All,
I have a jsp with a radio tag setup like so:
s:radio name=answer id=answerlist=game.question.answers
listKey=idlistValue=answeronclick=document.getElementById('CheckAnswer').submit()
/s:radio
What I display in the radio buttons are answers, once the userclicks on an
answer
Thanks for the reply, Dave. So I have the following:
struts2test1.xml
action name=findDeptId
class=com.att.etpi.eval.struts2.actions.DepartmentAction
result name=inputjsps/edit_list.jsp/result
result name=successjsps/edit_dept.jsp/result
interceptor-ref name=crudStack/
hi,
if the attribute netblockflixter is a bean and thinking that it has a
property called Login
Hi,
you can check it like this
logic:present name=netblockflixter property=Login
/logic:present
your equal comparison is wrong., based on what you have your checking if the
Login property of
Hi,
Add to what i said, equal tag only check values which are double,long or
string only.
Thanks,
Nuwan
- Original Message -
From: hk [EMAIL PROTECTED]
To: user@struts.apache.org
Sent: Tuesday, May 22, 2007 5:30 PM
Subject: Re: How can I access an attribute of session using JSP
I've recently started exploring the possibility of using Freemarker
templates to render my views. One of the things I like about the idea
is that it's easy to execute my Actions and merge them with result
templates without deploying to a servlet container. Is anyone doing
this successfully with
I set up a new work station with MyEclipse 5.1, Weblogic 8, and jdk
1.4.11
I set it up exactly the same as a workstation that is working well.
However, when trying to create a simple test app to verify the
installation I get the following error
javax.servlet.jsp.JspException: Exception
I don't see the tabPanel, assuming this is the jsp without it. Compare the
generated html with/without the tabPanel, there should be a validation
function in both.
musachy
On 5/22/07, jdemic [EMAIL PROTECTED] wrote:
Hey All,
I'm attempting to perform ajax validation in a tabbedPanel and I'm
--- shadman [EMAIL PROTECTED] wrote:
private Department getDept() { return dept; }
private void setDept(Department department) {
*dingdingding*
Private, huh?
;)
s:textfield name=dept.deptName
label=Dept Name
value=dept.deptName
--- Braun, James F [EMAIL PROTECTED] wrote:
However, when trying to create a simple test app to
verify the installation I get the following error
javax.servlet.jsp.JspException: Exception creating
bean of class test.form.TestForm: {1}
[... stack trace ...]
I hate to waste people's time but
Worked around this, putting this piece of code before
the end of my body tag
in the jsp page:
s:if test=task == 'showAnswer'
SCRIPT type=text/javascript
document.getElementById('answers:property
value=answer/').checked=true;
/SCRIPT
/s:if
However I don't like it.
How do I get the value of this tag in a JSP variable on the same page.
s:property value=role / .
This prints fine on the page but I'm not able to get this value assigned to a
JSP variable.
Thanks
-
Get your own web address.
Have a HUGE year through
Thanks for the pointer Musachy. I compared the html of both and it seems
like the following was missing with the jsp displayed in the tabbedPanel:
script src=/ood/struts/validationClient.js/script
script src=/ood/dwr/interface/validator.js/script
script src=/ood/dwr/engine.js/script
script
I have 2 beginners questions that I can't seem to figure out:
- How can I make tags like s:radio not to create any label and create
my own label (using for example the s:label tag)?
- What is the easiest way to re-select the selected tab of a
s:tabbedPanel when redisplaying the form? I have a
Those scripts are included by the head tag if I don't remember wrong, so set
theme=xhtml or css_xhtml (on the head tag). I haven't use DWR before so
I can't help you much. Did you configure it on web.xml?
Rest assured that ajax validation is way easier in 2.1 (just add an
interceptor to your
To select the tab, use the selectedTab attribute on tabbedPannel. For your
label question check this FAQ:
http://cwiki.apache.org/WW/why-do-the-form-tags-put-table-tags-around-controls.html
musachy
On 5/22/07, Torsten Römer [EMAIL PROTECTED] wrote:
I have 2 beginners questions that I can't
Hi
the struts version is 1.3.8, and tomcat 4.1.27
i'm newbee with struts menu,
i'm have
*my Struts-menu.xml*
?xml version=1.0 encoding=UTF-8 ?
MenuConfig
Displayers
Displayer name=TabbedMenu
type=net.sf.navigator.displayer.TabbedMenuDisplayer/
/Displayers
Menus
Menu name=contactMenu
Hi,
I want to use the redirect after post pattern in order to have a web app that
is well behaved when the user hits back, refresh etc etc
I also want to use the Struts 2 validation framework.
At first glance though, the two seem incompatible:
If I have a form that I want to
Hi,
thanks for the reply,
Yes we tried that, also tried #testID.actionName both
doesnt seem to work, It looks like it doesnt evaluate
what is inside the action = it prints the
expression values as it is without evaluating.
One other thing which I want to note is that, this is
a portlet, Should
Thanks, Musachy, for the quick answer.
I should have mentioned, that I already set theme=simple but s:radio
would still create a label:
s:radio theme=simple name=car list={'BMW M5'}/
yields:
input type=radio name=car id=reservation_carBMW M5 value=BMW
M5/label for=reservation_carBMW M5BMW
Assuming you're using an s:div theme=ajax for the tab that contains
your form, the scripts are 'stripped out' due to this bug:
https://issues.apache.org/struts/browse/WW-1766
Your work-round to include the scripts manually should work if you
include ALL the missing embedded javascript.
jdemic
I'm not quite clear what your code looks like, but based on what you say
it sounds like you may be putting the wrong value in your 'answer' property.
s:radio name=answer id=answer
list=game.question.answers
listKey=id listValue=answer
onclick=...
This
Thank you for the greate information.
By the way, my Netbeans gives me an error message saying netsted:write is
not defined.
nuwan chandrasoma-2 wrote:
Hi,
if you are using struts 1.x you can use nested tags, look at this link for
a
sample
Either:
- create your own theme for the radio button. Use simple/radiomap.ftl
tyo create mytheme/radiomap.ftl to exclude the label that's always
included (recommended); or
- do a hack: you can use html inputs in your form directly in your
JSP. These are also included as parameters for your
Thanks Jeromy, is there anywhere that points out what all the embedded
javascript is? I suspect i might be missing an include which is causing the
validation errors not to render...
Jeromy Evans - Blue Sky Minds wrote:
Assuming you're using an s:div theme=ajax for the tab that contains
Hi,
I just wanted to integrate some JSTL features to my
existing S2 application,
I followed the following steps
1)copied jstl-1.1.2.jar to WEB-INF lib directory
2)had following in the jsp
%@ taglib prefix=c
uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fmt
Best option:
The dojo version in 2.0.6 supports the 'separateScripts' attribute, so
you can create your own div.ftl template that always includes this
attribute set to true for the div (that's what I did) . Just modify the
existing ajax div template and create your own theme containing just
you also need standard.jar:
http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
musachy
On 5/22/07, tom tom [EMAIL PROTECTED] wrote:
Hi,
I just wanted to integrate some JSTL features to my
existing S2 application,
I followed the following steps
1)copied jstl-1.1.2.jar
Hi, I'm sure this has probably been beaten to death, but I can't seem to
find a viable solution without using spring.
I just switched over to using hibernate from ibatis (so much better now),
and I'm having trouble working my actions around hibernate's transaction
model. With ibatis you had to
--- Will Smith [EMAIL PROTECTED] wrote:
[session stuff]
If you were already okay with manually loading
non-lazy loaded stuff, why not just:
Hibernate.initialize(rootObject.getNameOfLazyCollection());
Otherwise:
- Set lazy=false in the mapping, and load it all the
time, or
- Use an
Maybe it is a typo, shouldn't it say:
nested:write
I do them all the time.
Regards
-Cesar
-Original Message-
From: hk [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2007 6:47 PM
To: user@struts.apache.org
Subject: Re: How can I access a collection of object
using struts tags?
Hi Will,
A simple approach is to use an S2 interceptor that opens the hibernate
session before calling the action and closes it afterwards.
This is the open-session-in-view pattern that's well described at the
hibernate site http://www.hibernate.org/43.html.
You don't need Spring or any
eclise Editor still gives a warning as Unknown tag
c:out also at runtime the expression is not getting
evaluated.
I got jstl.jar and standard.jar in the WEB-INF/lib and
got the following in the top part of the jsp
%@ taglib prefix=c
uri=http://java.sun.com/jsp/jstl/core; %
%@ taglib prefix=fmt
I am trying to use dateTimePicker on one of my pages. When ever it pops
out it shows in a new page (header, footer, navigation .. etc). As if
it's another page by its self. I am using siteMesh in my project and
it's using the layout for the rest of the pages. I thought may be I am
doing
Hi,
We are experiencing that action attribute of the
s:url tag is not evaluating the expressions.
For e.g Inside a interator if we want to get dynamic
action names from the interator and assign into the
action tag of the s:url tag it just prints the text
as it is without evaluating.
Even tried
Hi Christropher ..
Yes this is peek load actualy ..
The requests are through SMS's which is forwarded by kannel server to my
application .
actually we are in development phase and we are testing it as per client
specifications.
So this was the load client specified ...
i had
struts 2 datetimepicker is not working fine, for FF,
i have releaseDate field as datetimepicker and in action releasedate as
string , but when i am using FF, that releasedate value is null in action ,
but IE browser works fine.
and one more thing is that while editing some page, i am
93 matches
Mail list logo