I think you can use the setters after you initialize your class
i.e.instead of
MyType mt = new MyType(...parameters...);
to do :
MyType mt = new MyType();
mt.setParam1()
e.t.c. I am not exactly sure if this is what you are after though
Why do you want to do this ?
Leon
red
Firstly,create a empty dynamic web project. That needs some plug-ins to
support,you can try Lomboz
sencondly,copy/import the following 5 essential jars to the /WEB-INF/lib
folder
struts2-core.jar
xwork.jar
ognl.jar
freemarker.jar
commons-logging.jar
you can find these jars in the strtus pack you
I know your meaning,but the question I want to Initialize in struts
action,not in common class,because I want to get WebApplicationContext in
struts action,and then I will transfer WebApplicationContext into dao to get
data. I don't know if there is a init method in struts2 action?
Any idea will
You may try the static block, a no-arg constructor is needed to initialize a
Action object by struts
static
{
//doSomeInit,this only run once
}
2007/8/16, red phoenix [EMAIL PROTECTED]:
I know your meaning,but the question I want to Initialize in struts
action,not in common class,because I
dude,
Let me try then I let you know quickly. :), but before that would you answer
my questions :
That needs some plug-ins to support,you can try Lomboz
how to install Lomboz ? should i only get it and put it in a eclipse plugins
dir ?
thirdly,configure the web.xml , below is a sample
So you're using Spring? In that case, maybe parts of this tutorial can
help: http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html
And here's the documentation for the Spring-plugin:
http://struts.apache.org/2.x/docs/spring-plugin.html
Nils-H
On 8/16/07, red phoenix [EMAIL
static
{
//doSomeInit,this only run once
}
above code can't run in struct2 action,it will say can't use in non-static
class
I use Struts2+spring2.1+hibernate3.2,I am puzzled with it for many many
days! I am looking for an example,but I don't find it,would you give me an
example project which
It's more likely that you are using the wrong public identifier in your
document type declaration. With the wrong public identifier, the
resource (DTD file) won't be resolved locally and the parser will try to
use the system identifier to locate the resource, as a fall back.
Check that the
In OGNL, how can I assert that a String property is not null or empty?
I would like this functionality:
${!empty bean.string}
kuvera
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
That needs some plug-ins to support,you can try Lomboz
how to install Lomboz ? should i only get it and put it in a eclipse
plugins
dir ?
*A:just download it and put it in the eclipse plug-in, you can google it
with key words: eclipse Lomboz for details*
thirdly,configure the web.xml ,
I tested it,it works fine. Note that static block can only refer to static
fields and static methods
Don't put the static block in any method, just put it alone like a function.
2007/8/16, red phoenix [EMAIL PROTECTED]:
static
{
//doSomeInit,this only run once
}
above code can't run in
Struts 2 - Is there a way by which I can configure a form submission to use
https?
Thanks
SN
--
View this message in context:
http://www.nabble.com/-S2--How-to-use-https-on-form-submissions--tf4277986.html#a12176662
Sent from the Struts - User mailing list archive at Nabble.com.
Dear Friend
I have tried this example while i was waiting for your reply :
http://struts.apache.org/2.0.9/docs/struts-2-spring-2-jpa-ajax.html
i have done the whole things and steps, but when i wanted to publish the
project to Tomcat it did not publish it, and gave me no error, seems that
tomcat
My static content does not get served by Tomcat, either with relative or
absolute paths:
link href=css/alap.css rel=stylesheet type=text/css /
script type=text/javascript src=js/prototype.js/script
...
img src=/minta3/img/check.gif
Struts 2 filter is configured for /* url pattern and there are
I downloaded the plugin from sourceforge is this the one ?
com.objectlearn.jdt.j2ee ???
is this the plugin ? Ok i now only put it in the eclipse plugins dir and
follow your steps and let you know what happens. if any error or something I
let you know.
Thank you
On 8/16/07, Andvar Woo [EMAIL
sorry made a mistake :p
apologize the driver is this:
org.objectweb.lomboz-all-in-one-R-3.2.2-200706042126-win32.ziphttp://forge.objectweb.org/project/download.php?group_id=97file_id=8406
is it really big ?
in its web site its written its an IDE itself, not only a plugin, its almost
245 MB :o
am i wrong ?
On 8/16/07, Andvar Woo [EMAIL PROTECTED] wrote:
That needs some plug-ins to support,you can try Lomboz
how to install Lomboz ? should i only get it and put it in a
Here is the web site : http://lomboz.objectweb.org/index.php do you mean
this friend ?
Thank you
On 8/16/07, Andvar Woo [EMAIL PROTECTED] wrote:
That needs some plug-ins to support,you can try Lomboz
how to install Lomboz ? should i only get it and put it in a eclipse
plugins
dir ?
*Download Plug-ins*
Tomcat plug-in *check the parent link for the newest version.*
http://www.sysdeo.com/eclipse/tomcatPluginV3.zip
lomboz plug-in needs two parts,one is emf,the other is lomboz
emf *check the parent link for the newest version.*
Hi,
you can too download Eclipse (Europa) distribution *Eclipse IDE for
Java EE
Developershttp://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/20070702/eclipse-jee-europa-win32.zipr=1protocol=http
* into http://www.eclipse.org/downloads/.
There is several plugin
My static content does not get served by Tomcat, either with relative or
absolute paths:
link href=css/alap.css rel=stylesheet type=text/css /
script type=text/javascript src=js/prototype.js/script
...
img src=/minta3/img/check.gif
Struts 2 filter is configured for /* url pattern and there are
I tend to use
empty eq null
To test if it's null and;
empty neq null
For non-null
-Original Message-
From: Laszlo Borsos [mailto:[EMAIL PROTECTED]
Sent: 16 August 2007 08:04
To: Struts Users Mailing List
Subject: empty operator
In OGNL, how can I assert that a String property is
Thank you. Does that mean that under OGNL I must do two checks?
bean.string neq null and bean.string.length neq 0
instead of
${!empty bean.string}
Tiresome...
Al Sutton wrote:
I tend to use
empty eq null
To test if it's null and;
empty neq null
For non-null
-Original
*Just see the download specification carefully*
The file you choose may be a full pack with the necessary plugins such as
eclipse,just choose the only lomboz to download 2007/8/16, meisam
sarabadani [EMAIL PROTECTED]:
is it really big ?
in its web site its written its an IDE itself, not only a
Well it's more complicated than that, I guess. Exactly is to compare two ID
attribute between two objects (the rest of the attributes may be different),
so I'm thinking in create the external OGNL variable and set it to true
when the element is found (as I said in my previous post).
...
Ok.
I have downloaded these up to now;
1. emf-sdo-runtime-M200708142030.zip (latest version) --- but i suppose
there must be no difference between emf-sdo-xsd-SDK-2.3.0.zip and
emf-sdo-runtime-M200708142030.zip
page--http://download.forge.objectweb.org/lomboz/
the eclipse website itself when i tried
It was due to struts.action.extension set to empty string.
I guess it is compulsory then.
kuvera
Laszlo Borsos írta:
My static content does not get served by Tomcat, either with relative or
absolute paths:
link href=css/alap.css rel=stylesheet type=text/css /
script type=text/javascript
the com.sysdeo.eclipse.tomcat_3.2.1 (latest version) just downloaded,
from this website-- http://www.eclipsetotale.com/tomcatPlugin.html#A3
On 8/16/07, Andvar Woo [EMAIL PROTECTED] wrote:
*Just see the download specification carefully*
The file you choose may be a full pack with the
Hi,
I'm trying to implement 'open session in view pattern' using Struts2
and feeling difficulties.
First, I have prepared the following interceptor:
public String intercept(ActionInvocation invocation) throws Exception {
Strung ret = null;
try {
ret =
I'm using struts 2.0.9.
Where do i read about action mappings and how to configure them?
Is there any detailed documentation? Right now i'm doing something like
this...but i don't really know why i need the result name=input tag
and couldn't find any info about it on my own:
action
can i forward an action to another action using the result tag in action
mappings?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
can i forward an action to another action using the result
tag in action mappings?
Yes; result type is redirect-action [1] ([2] for all types).
See [3] regarding action mapping configuration.
d.
[1] http://struts.apache.org/2.x/docs/redirect-action-result.html
[2]
can anybody tell me the differences between Spring and Struts ?
Im confused over here :((
On 8/16/07, Dave Newton [EMAIL PROTECTED] wrote:
can i forward an action to another action using the result
tag in action mappings?
Yes; result type is redirect-action [1] ([2] for all types).
See
Hi all,
I have some problem with date conversion.
Is struts automatically converts String in to date format?
if the answer is YES How to do that
regards
Vamsi Krishna
Hi all,
I have some problem with date conversion.
Is struts automatically converts String in to date format?
if the answer is YES How to do that
regards
Vamsi Krishna
Dave Newton wrote:
can i forward an action to another action using the result
tag in action mappings?
Yes; result type is redirect-action [1] ([2] for all types).
See [3] regarding action mapping configuration.
d.
[1] http://struts.apache.org/2.x/docs/redirect-action-result.html
[2]
Struts is a web application framework.
Spring's functionality runs the gamut; its primary use in Struts is as a
dependency injection mechanism.
Looking at the Spring website [1] might be a good place to learn about Spring.
d.
[1] http://www.springframework.org/
- Original Message
Neither is working/generating content. In the case of the JBossPortal,
a portlet window is rendered with the appropriate title, but nothing in
it - not even an error, just a wide short box. Before I fixed some
other problems, I had seen what a portlet looks like when there is an
error, as
What does your pom.xml look like?
Going back to your original problem, are you sure you don't get any
exceptions while running or starting up the portlet? Check your logs
to see if you find any exceptions. Also, try deploying the
struts2-portlet example portlet and see if that works.
Nils-H
On
I´m using css_xhtml theme in my application. Each CRUD screen has a error
area(in the bottom). When a error occurs I need to disable the error message
showed for each field(near the field) that is provided by the css_xhtml
theme. I don´t like to create my own theme.
Thanks
--
View this message
If you wanna compare them which one do u like the most ? and why? can we say
which one s better ? or this is a wrong question may be ?
thank you
On 8/16/07, Dave Newton [EMAIL PROTECTED] wrote:
Struts is a web application framework.
Spring's functionality runs the gamut; its primary use in
I have a tabbed panel set up as follows
s:tabbedPanel id=questionPanel doLayout=true
cssClass=questionTabPanelDesign
s:div id=questionTab label=Question theme=ajax
Static Content...
/s:div
s:div id=udfTab label=UDF theme=ajax listenTopics=/editUdfs
Static link a
Hi!
Anyone fought a problem with guice plugin not working
with custom converters?
Thanks,
Oleg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Through spring frame work one can integrate other open source framework
(like hibernate, Struts iBatis..) in a flexible way.
Spring provides many other features like DI and AOP.
Also we can add customized code through interceptors and proxy.
DI = No need to create Bean, container knows when and
so you are saying that the tabs work fine before clicking on the link,
but they don't work after that? What are you doing in editUdf()? Is
there any error when you set debug=true on head? (or any javascript
error in general?)
musachy
On 8/16/07, Richard Sayre [EMAIL PROTECTED] wrote:
I have a
Is there an easy way to suppress the parameter exceptions when I use a
model driven action? I know I can add them as exclusions in the
interceptor stack config, but this seems a bit cumbersome and adds
additional maintenance if the form and model change.
Currently, I am using the
Hi all,
I'm developing a test application using Struts 1.3.8 and Java 1.5.0_12 and I
have this problem: when I try to get the value linked to the key
login.title I get this error:
org.apache.jasper.JasperException: Exception in JSP: /index.jsp:6
3: html
4: head
5: title
--- meisam sarabadani wrote:
If you wanna compare them which one do u like the
most ? and why? can we say which one s better ? or
this is a wrong question may be ?
Probably the wrong question.
Spring *does* have an MVC web application framework;
you could compare *that* with Struts (in which
Please check location of property file
It should be in it.francesco.tutorial.utils inside your web root
WEB-INF\classes (i.e classpath)
-Original Message-
From: kokro [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 16, 2007 7:22 PM
To: user@struts.apache.org
Subject: Retriving values
Hey all
I've moved all the static Dojo stuff from the Struts2 jar to an external
location, but my app constantly complains about not finding src.js - as
far as I can see this file isn't even included in the S2 lib. I've tried
googling for the file but can't seem to find it anywhere, any ideas?
--- meeboo [EMAIL PROTECTED] wrote:
but my app constantly complains about not finding
src.js
Never heard of it; are you sure it's related to
Struts?
d.
Sick sense of humor? Visit Yahoo! TV's
The ApplicationResources.properties file is into (being just a simple
application I have just copied the project into the webapps subdir without
creating a .war file):
Tomcat 5.5.23 installation
dir\webapps\GestioneMP3\WEB-INF\classes\it\francesco\tutorial\utils
Is this what you meant Baseer?
Hi,
i've got a StreamResult from a Struts action ( using struts 2.0.9), that
returns an image/jpeg.
Works fine without using ajax(shows the image into the broser, but in a
new window),
but returns only plain text with using ajax.
My Code:
xml:
action name=showPhoto
Here's my struts.xml
struts
package name=noshame extends=struts-default
action name=Register
result/Register.jsp/result
/action
/package
/struts
my web.xml:
web-app
display-nameNoShame/display-name
filter
Yes,
If file is at wrong location or key is missing then error will be
Missing message for key label.title
Cause of error may be different
-B
-Original Message-
From: kokro [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 16, 2007 7:41 PM
To: user@struts.apache.org
Subject: RE:
I seem to have it working now. There was a form wrapped around the
tabbed panel. My Ajax function was setting the inner html of this
form, effectively wiping out the rest of the tab contents. Now I am
wondering if listening to the topics is nessessary? In fact how does
it work? In my function
I have deployed the struts-portlet example, and it works. I continue to
make comparison's between all of its configuration files, my own, and
other examples. For instance, your example does not specify a parent in
your pom.xml. The example does. The example pom.xml has no plugins.
Yours
try changing @RequiredFieldValidator to @RequiredStringValidator
the RequiredFieldValidator only looks for not null and even if the
field is not entered, but is present on the form, it'll be populated
with (empty) and not a java null.
-Joseph
On 8/16/07, David Copeland [EMAIL PROTECTED] wrote:
I'm using struts 2 to create a form whose action links outside of struts
2. The problem is when I set the action parameter in the s:form tag,
the framework is putting the Struts2 context in the URL. For instance:
say I have a struts 2 project called struts2.war, and another project
called
Please check location of property file
It should be in it.francesco.tutorial.utils inside your web root
WEB-INF\classes (i.e classpath)
The ApplicationResources.properties file is on that location and it has the
login.title key; infact I dont get the Missing message for key label.title
Hi,
I want to start the struts2-webconsole with
http://localhost:8080/myStruts2App?debug=console
but got the following stacktrace.
Any hint?
Regards,
SAM
There is no Action mapped for namespace /struts and action name webconsole.
- [unknown location]
mraible wrote:
I'm trying to change from using the old-style URLs to Restful2ActionMapper.
What do you want your URLs to be for the various actions?
If you really just want the view to look restful, you don't need to muck
with the ActionMapper at all:
/user/bob.html to view bob
package
In OGNL, how can I assert that a String property is not null or empty?
This question get's asked A LOT!! I think the OGNL developers ought
to take notice and consider adding an empty operator, or at least
address why this is such a bad idea.
(*Chris*)
There is an open issue for struts2 with the matchingPattern and
excludingPattern
params for the xslt result type.
https://issues.apache.org/struts/browse/WW-1550
Other options/workarounds for this would be to change the accessibility
of your
getUser and getSession methods to something other
Hi all,
Is there any way to submit a ajax form automatically without clicking on the
submit button?
I tried using javascript like document.theForm1.submit();: when I execute
the js, ajax form action is called but there comes another blank page with
the result instead of showing the result in
I got answers by myself: using document.createEvent('MouseEvents') instead of
form.submit :)
--
View this message in context:
http://www.nabble.com/Ajax-form_how-to-submit-a-ajax-form-without-clicking-button--tf4280769.html#a12185842
Sent from the Struts - User mailing list archive at
When I have a syntax error in a tag, I get an Unable to load class for
JSP / ClassNotFoundException, as the JSP file does not get translated
and compiled. But Tomcat 6 logs don't show the original exception, that
would refer to the problem. How can it be logged?
kuvera
You may also be able to use the exposedValue param in the result to get
the xml output that you are looking for.
param name=exposedValuequestionTree/param
John
-Original Message-
From: John Krueger [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 16, 2007 12:16 PM
To: Struts Users
Hi,
I need help regarding correct usage of Scope interceptor
(http://struts.apache.org/2.0.9/docs/scope-interceptor.html)
Before going into details i had couple of qns :
#1. Is this usable we have multiple actions sharing the same model
object ? - i.e each page of the app posts to a different
vamsi wrote:
I have some problem with date conversion.
Is struts automatically converts String in to date format?
if the answer is YES How to do that
http://struts.apache.org/2.x/docs/type-conversion.html
XWork will automatically handle the most common type conversion for you.
Laszlo Borsos wrote:
When I have a syntax error in a tag, I get an Unable to load class for
JSP / ClassNotFoundException, as the JSP file does not get translated
and compiled. But Tomcat 6 logs don't show the original exception, that
would refer to the problem. How can it be logged?
Syntax
Oleg Mikheev wrote:
Anyone fought a problem with guice plugin not working
with custom converters?
I'm working it around by using per field converters
instead of global ones, but it's no good.
Oleg
-
To unsubscribe, e-mail:
I use Eclipse and it does not validate for example OGNL.
Is there really no means to see the exception raised by JSP compiler?
kuvera
Idea validates tag syntax, and I'm sure other IDEs have this
functionality too.
Oleg
-
Eugen Stoianovici wrote:
I'm using struts 2.0.9.
Where do i read about action mappings and how to configure them?
In the Struts2 documentation of course ;-) These pointers may help:
http://struts.apache.org/2.x/docs/action-configuration.html
http://struts.apache.org/2.x/docs/result-types.html
Clement, Steve wrote:
Is there an easy way to suppress the parameter exceptions when I use a
model driven action? I know I can add them as exclusions in the
interceptor stack config, but this seems a bit cumbersome and adds
additional maintenance if the form and model change.
Currently, I am
I suspect this is caused by accessing the JSP directly, without going
through Struts. If you haven't already, try setting up an action mapping
that forwards to the JSP (i.e. add action path='...'
forward='/path/to/jsp'/ to your action-mappings in struts-config.xml)
and requesting the page
You might want to read here:
http://cwiki.apache.org/confluence/display/WW/RestfulActionMapper
http://cwiki.apache.org/confluence/display/WW/Zero+Configuration
http://cwiki.apache.org/confluence/display/WW/Codebehind+Plugin
Brian Mc schrieb:
I want to be able to send this URL:
Indeed there is no way without Javascript. The s2 tag Skip is searching
for is
http://cwiki.apache.org/confluence/display/WW/doubleselect
Zoran Avtarovski schrieb:
Any solution has to be javascript based. The question is wether you want a
server side visit or not. And that is dependant on how
I suppose basser is right, Spring is supporting more frameworks and more
architectures, it is easier to work with.
On 8/16/07, Dave Newton [EMAIL PROTECTED] wrote:
--- meisam sarabadani wrote:
If you wanna compare them which one do u like the
most ? and why? can we say which one s better ?
can somebody tell me why we need the struts.xml and build.xml or
web.xml?what are their duties ?
On 8/16/07, j alex [EMAIL PROTECTED] wrote:
try changing @RequiredFieldValidator to @RequiredStringValidator
the RequiredFieldValidator only looks for not null and even if the
field is not
--- meisam sarabadani wrote:
can somebody tell me why we need the struts.xml and
build.xml or web.xml? what are their duties ?
Google can tell you.
struts.xml is the usual name for the Struts 2
configuration file. build.xml is for Apache Ant.
web.xml is for configuring your web application.
On 8/16/07, Srinivas.N. [EMAIL PROTECTED] wrote:
Struts 2 - Is there a way by which I can configure a form submission to use
https?
Thanks
SN
You should be able to specify the s:form url to point to any URL,
including https
I am using Axis, though, and it doesn't nativaly support https. It
Dave,
How do we use the action-alias XML approach if we've the same alias
but different methods on the same action ?
ex :
action name=abc class=com.mysite.myAction /
say myAction has methodA(), methodB() etc. which are invoked using
different submit buttons in the jsp
s:submit value=button1
On 8/16/07, Steve Sether [EMAIL PROTECTED] wrote:
I'm using struts 2 to create a form whose action links outside of struts
2. The problem is when I set the action parameter in the s:form tag,
the framework is putting the Struts2 context in the URL. For instance:
say I have a struts 2 project
Hi,
New to Struts, I have a need like this:
If my LoginAction verify that the user is valid, it will retrieve a list of
emails addressed to him from model and send all of them to a yourEmail.jsp.
now as I understand from the doc that for every jsp you have to create a
form-bean/ActionForm, so
85 matches
Mail list logo