Great minds think alike. I have chnaged '' with 'amp;' (incase the email is
messed up it is ampersandamp;) yesterday. and it failed..:(
Gareth Evans [EMAIL PROTECTED] wrote:Bob,
I see, are you able to modify the servlet thats generating the xml? Can you
replace the '' with an
'' reference?
Here you go Frank:
AJAX CODE:
function getNewXMLHttpRequest() {
var _req;
// branch for native XMLHttpRequest object (safari/mozilla)
if (window.XMLHttpRequest) {
_req = new XMLHttpRequest();
}
// branch for IE/Windows ActiveX version
else if
try putting a try/catch block around the following code, not the extra alert
e.g.
try {
if (xmlhttp.responseXML != null) {
var items = xmlhttp.responseXML.getElementsByTagName(dataSet);
var culumnname = eval(document.actionForm. + fieldname);
for (var
Ok, two things...
(1) Throw an alert in right before the call to AppendValues() :
alert(items[i].getAttribute('dataID') + = +
items[i].getAttribute('dataValue'));
Make sure you see the ampersand in there.
(2) Assuming you do see the ampersand in that alert, let's see the code
for
Hello friends
I have an EditStudent.jsp page in which I have a form. Before the form
tag I get a request attribute called 'listIndex'. But, when my
validate() method fails on field validation it returns back to the above
mentioned jsp page with an appropriate message. That is o.k. - the
problem
if you store the request attribute in a hidden field on the screen, when the page is submitted the field will be put back into the request. Otherwise, you will need to move the field to the session where it will not be cleared when the request is invalidated after the JSP is displayed.
Rivka
Gareth, try/catch didn't reveal anything.
Frank, after numerous alerts, the problem seems to be in getAttribute(...)
function of AJAX:
for (var i = 0; i items.length; i++) {
alert(ID: + items[i].getAttribute('dataID'));
alert(Value: + items[i].getAttribute('dataValue'));
}
Hi,
I don't know but... Can you put a hidden field into form with the
value of attribute? Maybe solve your problem...
Rivka
Tomcat user list was very helpful :-)
As I know struts commiters, they will refuse to add an utility to
syncronize access to session attributes, someone else interested?
regards
Leon
On Tue, 2005-09-06 at 11:24 +0200, Leon Rosenberg wrote:
Hi,
I know this is quite OT but maybe someone has a
Is the ampersand part of the XML message being sent
back to the browser from the servlet? If so, you need
to escape the ampersand in the servlet before it is
sent in the servlet response. The ampersand is a
special character in XML.
-Richard
--- Frank W. Zammetti [EMAIL PROTECTED] wrote:
I think he said he tried that, buit now I'm thinking... I think he tried
replacing it with an HTML entity... how about using the URL encoded
version (%27 I think?). Is there maybe an XML-specific way to encode it?
(I would have thought the amp; entity would have worked frankly, but he
said it
Can you set the listIndex as an attribute of your form
in the EditStudentAction? You can then retrieve it as
part of your formBean.
-Richard
--- Rivka Shisman [EMAIL PROTECTED] wrote:
Hello friends
I have an EditStudent.jsp page in which I have a
form. Before the form
tag I get a
Hi all:
I thought I was finally getting the hang of Shale/JSF/tiles/ till now,
when it seems like something which *ought* to work, isn't. I have a
commandLink in my jsp page and clicking on it does not go to the the
showSurvey method of my backing bean worklist - instead I return to an
Thank you Gareth, Frank and Richard. It worked...
I replaced with %26 in my servlet and used javascript unescape to to get is
back they way it should
I tried URLEncoder.encode() the values in servlet but it seems that the unscape
is not converting + to spaces. In any case, it works.
You should be using URLEncoding.encode() to encode the
response. This will replace ampersands with %26. The
only problem is that the space character is also
converted to a '+'. You then need to replace '+' with
%20 on the server after using URLEncoder.encode() so
that the JavaScript can decode it
Richard Yee wrote:
You should be using URLEncoding.encode() to encode the
response. This will replace ampersands with %26. The
only problem is that the space character is also
converted to a '+'. You then need to replace '+' with
%20 on the server after using URLEncoder.encode() so
that the
The issues that are being encountered here are that
XML has some special characters that need to be
encoded in order for parsing to work correctly.
Namely, these are the '','', '', '', and '''
characters. The URLEncoder class is meant to perform
URL encoding and decoding which has a different set
I thought I was finally getting the hang of Shale/JSF/tiles/ till now,
when it seems like something which *ought* to work, isn't. I have a
commandLink in my jsp page and clicking on it does not go to the the
showSurvey method of my backing bean worklist - instead I return to an
empty
David,
The escape() JavaScript function can't be used to
solve this problem b/c it occurs when the response is
being retrieved in the JavaScript callback function if
req.responseXML is used.
-Richard
--- David Durham [EMAIL PROTECTED] wrote:
Richard Yee wrote:
You should be using
Thank you so much. I got it working. What I had to do is remove the
background attribute from the body tag in the header file.
body background=header_background.gif
and add Div tag surrounding my header file with the image attribute added.
div style=background-image:url(%=
I am trying to use tiles with JSF but I just get the following error:
INFO: Initializing TilesServlet
06.sep.2005 14:16:38 org.apache.tiles.servlets.TilesServlet readFactoryConfig
INFO: CONFIG FILES DEFINED IN WEB.XML
06.sep.2005 14:16:38 org.apache.tiles.servlets.TilesServlet
The error suggests it cannot read your tiles definitions. Did you define
your tile configuration file to be an actual file? It must be defined in
your web.xml like this (looked up the exact syntax via a Google link).
s
web-app
servlet
servlet-nameTiles Servlet/servlet-name
On Sep 6, 2005, at 1:40 PM, David G. Friedman wrote:
web-app
servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.struts.tiles.TilesServlet/servlet-class
init-param
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles.xml/param-value
/init-param
Yes, I have the following in my web.xml..:
servlet
servlet-nameTiles Servlet/servlet-name
servlet-classorg.apache.tiles.servlets.TilesServlet/servlet-class
init-param
param-namedefinitions-config/param-name
param-value/WEB-INF/tiles.xml/param-value
/init-param
[EMAIL PROTECTED] (Gary VanMatre) wrote on 09/06/2005 01:16:00 PM:
I thought I was finally getting the hang of Shale/JSF/tiles/ till
now,
when it seems like something which *ought* to work, isn't. I have a
commandLink in my jsp page and clicking on it does not go to the the
Okay, since you received an IO error and you are sure the file exists, is it
(the file) located on some sort of network-shared file system? Ex: NFS,
SAMBA, etc.
Regards,
David
-Original Message-
From: Bjørn T Johansen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 06, 2005 3:00 PM
If you are behind a firewall or access the Internet via a proxy
server the problem may be due to Tiles trying to load the DTDs. I've
found on at least one occasion that setting the registrations for
Digester does not seem to prevent Tiles from trying to go to the
Internet to resolve the
Do you have:
h:messages/
on the top of your page? I noticed that I was once getting odd bean
conversion errors and was being redirected to the page and they showed
up in the messages. Maybe some properties are trying to be converted in
your datatable? Also does it matter that you have lower
Rick Reumann [EMAIL PROTECTED] wrote on 09/06/2005 03:49:25 PM:
Do you have:
h:messages/
I pared my jsf down to bare bones to debug this so I don't have any need
for messages.
But after googling I found this link:
http://forum.java.sun.com/thread.jspa?threadID=549675messageID=2794166
Nope.. All files are on my local filesystem...
BTJ
David G. Friedman wrote:
Okay, since you received an IO error and you are sure the file exists, is it
(the file) located on some sort of network-shared file system? Ex: NFS,
SAMBA, etc.
Regards,
David
-Original Message-
From:
Nope, I access the internet without any problems, so that is not the case
here...
BTJ
Greg Reddin wrote:
If you are behind a firewall or access the Internet via a proxy server
the problem may be due to Tiles trying to load the DTDs. I've found on
at least one occasion that setting the
Or it might
What is the correct uri for the dtd? The one I am using, is not working..
(http://apache.org/dtds/tiles-config_1_2.dtd)
BTJ
Bjørn T Johansen wrote:
Nope, I access the internet without any problems, so that is not the case
here...
BTJ
Greg Reddin wrote:
If you are
Here's more on the problem from the myfaces user list - and these are
dated just last month (:(
http://www.mail-archive.com/users@myfaces.apache.org/msg07151.html
Briefly, here's what is the solution:
If I have a commandLink inside of a dataTable tag then the only way I can
make the link work
Bjørn T Johansen [EMAIL PROTECTED] wrote on 09/06/2005 04:33:40 PM:
Nope, I access the internet without any problems, so that is not the
case here...
BTJ
Not sure if this will help, but I have a trivial tiles/jsf war here which
you could download and see if it works for you:
Hey all,
As I had mentioned in a previous post, our team is looking to move
towards a more well defined web framework. From my limited experience
using Shale (ran the shale-use-cases) I'm not feeling very confident
that we could use it *right away*.
I wanted to ask for opinions on what would be
..and here's a good explanation of the problem, why it occurs and why
setting scope=session works:
http://www.groundside.com/blog/content/DuncanMills/?month=6day=7year=2005
Geeta
I am not sure of the relevance to my question but
BTJ
[EMAIL PROTECTED] wrote:
..and here's a good explanation of the problem, why it occurs and why
setting scope=session works:
http://www.groundside.com/blog/content/DuncanMills/?month=6day=7year=2005
Geeta
*Sorry!! I wrote on the wrong thread... need a break...
Bjørn T Johansen [EMAIL PROTECTED] wrote on 09/06/2005 05:25:22 PM:
I am not sure of the relevance to my question but
BTJ
[EMAIL PROTECTED] wrote:
..and here's a good explanation of the problem, why it occurs and why
setting
On 9/6/05, Walton, Kaleb (ISS Southfield) [EMAIL PROTECTED] wrote:
Hey all,
As I had mentioned in a previous post, our team is looking to move
towards a more well defined web framework. From my limited experience
using Shale (ran the shale-use-cases) I'm not feeling very confident
that we
Does this one work?
http://struts.apache.org/dtds/tiles-config_1_1.dtd
I still don't understand why the registration feature of Digester
wouldn't get around this issue.
Greg
On Sep 6, 2005, at 3:35 PM, Bjørn T Johansen wrote:
Or it might
What is the correct uri for the dtd? The one I
Thanks for the suggestion Mark but I'm still not quite sure how you work this.
Considering an end date for a product how would you code the input text box on
the
editProduct JSP form?
Normally:
html:text name=attname property=endDate /
If the value of endDate is null the page fails with
If the value of endDate is null the page fails with an error message from
beanutils.
I think if the endDate is null, the html:text/ would silently put empty
string as the value. Wondering if the exceptions you are seeing are causing
by something else. What is the exception by the way?
I know there are a number of folks in both the Struts and Tomcat
communities using Java Web Parts now, so it might not be all *that*
off-topic...
v.9 was just released. There is one new piece in the mix that, I think,
might be of interest to some... it's called the DependencyFilter. It's
Hello all,
I have problem with struts. Is struts XHTML compliant ? I mean that html
lang=en is not allowed in XHTML and in example this snippet of struts code
html:radio property=answer value=answerbean:write name=question_item
property=question //html:radiobr/
is translated to the html as
Whether you store nulls in your database is really a design decision you
should be making based on your requirements.
Taking the date example for a moment. If the date is required then it
shouldn't be able to be null in the database and a record shouldn't be
created until you have a valid
Hi all
I got my app storing and retrieving images from MySQL database - what a mistake!
A simple image of 130k took 8 seconds to appear on the page. This is a huge
time to
sit and stare at a large blank space on the screen.
I can't help thinking that this is a bug (performance problem)
At first I thought prerender would be really cool, and I'm sure in some
cases it is, but I still find myself writing prepareForSearch or
prepareForEdit methods. To make it makes sense to have those kind of
methods in backing beans for your commandLinks or buttons on menus to
call. The reason
[EMAIL PROTECTED] wrote the following on 9/6/2005 9:39 PM:
I think we are maybe supposed to have one (most probably very lightweight) backing
bean for each page you see. Thus you have a prerender or not depnding on
what your page has to do... What do you think..?
Well you might be right, but
On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
At first I thought prerender would be really cool, and I'm sure in some
cases it is, but I still find myself writing prepareForSearch or
prepareForEdit methods. To make it makes sense to have those kind of
methods in backing beans for your
Craig McClanahan wrote the following on 9/6/2005 9:57 PM:
If you use prerender() the way it's intended to be used (on the destination
page, not the origin page -- and not trying to share them across multple
pages) you'll quickly discover that you really do want it called every time.
Ok, let
Craig McClanahan wrote the following on 9/6/2005 9:57 PM:
ch_action}/
And, in the EmployeeDetails.java class (the backing bean for this page),
you'd have an action method that navigated to the right place, based on data
currently on this form:
public String search_action() {
; // A missing
On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
Craig McClanahan wrote the following on 9/6/2005 9:57 PM:
If you use prerender() the way it's intended to be used (on the
destination
page, not the origin page -- and not trying to share them across multple
pages) you'll quickly
Craig McClanahan wrote the following on 9/6/2005 10:13 PM:
If you did perform both kinds of searches on the same JSP page, and
therefore had a shared prerender() method, you would indeed need conditional
logic inside prerender() that knew which scenario was being shown. You would
need to pass
Hi all (Gosh, I'm starting to feel like a regular on this list...)
After my experiences below I have rewritten my application to store the images
in a
local sub-directory, however when I ran this new version the sub-directory was
created
under the Tomcat/bin directory - not really
I guess it depends if you are trying to restrict access to these images.
To make all images available for anyone, put them into /images, for example.
If you want to not allow any direct access to them, you could create a
directory under /WEB-INF and put them there. You would then have to
How do I find the path actual path to /images assuming of course that
/images is a
url reference?
Is there something like $STRUTS_ROOT?
Kind regards
mc
On 7 Sep 2005 at 14:50, Jason Lea wrote:
I guess it depends if you are trying to restrict access to these images.
To make all images
Oh right, you need to discover the location automatically.
Something like this might work:
request.getSession().getServletContext().getRealPath(/images);
That should give you the full path to /images.
Murray Collingwood wrote:
How do I find the path actual path to /images assuming of
I'm sure my Sun JSF book covers this some where but I'm looking over the
navigation chappers and I'm still not sure how do something REALLY simple...
All I want is a link that will go to employeesSearch.jsp
Currently employeeSearch.jsp will fire off the prerender because I have
Thanks Jason
I'm having a strange issue with serving up these images. I'm getting a socket
write
error from the following code. There are 3 images, the details follow the
code. The
first two images appear, the third fails to appear.
response.setContentLength((int)
On Wed, 2005-09-07 at 14:16 +1000, Murray Collingwood wrote:
Thanks Jason
I'm having a strange issue with serving up these images. I'm getting a
socket write
error from the following code. There are 3 images, the details follow the
code. The
first two images appear, the third fails
Hi Richard
Yes I can do that - but the problem is that 'listIndex' does not
logically belong to the Student ActionForm - it is more an external
info.
Rivka
-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 06, 2005 6:20 PM
To: Struts Users Mailing
On 9/6/05, Rick Reumann [EMAIL PROTECTED] wrote:
I'm sure my Sun JSF book covers this some where but I'm looking over the
navigation chappers and I'm still not sure how do something REALLY
simple...
Yep ... this is ***really*** JSF 101 level stuff.
All I want is a link that will go to
Ciao Wendy,
Thanks for your answer!
we are using JDeveloper 10:
This is the part of my web-xml:
taglib
taglib-uri/WEB-INF/struts-bean.tld/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
/taglib
taglib
taglib-uri/WEB-INF/struts-layout.tld/taglib-uri
In my sub class for the action.java , I want to return a ActionForward
created by myself (use new ActionForward(path)) in the function execute.
(because I want forward a URL which is not declared in the
struts-config.xml. can I ? )
But it throw a Exception.
I don't know why ?
Using FO i am generating a pdf report.
The code for this is in a JSP (which is obviously generated dynamically).
Now i want to save a copy of this generated pdf on server.
Any idea how this can be done??
Hello to everyone in the struts user-group!
In our productive environment we have a problem concerning struts redirects
behind our load balanced servers. Queries to the running struts applications
are sent by https protocol towards the load balancer which receives the query,
terminates ssl
On Tue, 2005-09-06 at 06:19 +, d d wrote:
Using FO i am generating a pdf report.
The code for this is in a JSP (which is obviously generated dynamically).
Now i want to save a copy of this generated pdf on server.
Any idea how this can be done??
Just guessing but if I understand you
I would do number 3
Look at
logic/nested isPresent /
A few comments on the others.
IF a database value is NULL keep it that way. A NULL is a permissible value,
and you should not attempt to correct it, with empty strings etc.
Consider an end date for a product. You may never have one, and a
Sounds very similar to what we do, even the number of systems (develop,
integration, test, live), besides we are loadbalancing the test system
too, because there are a lot of possible bugs which only occur in
loadbalanced environment (cookie rewriting, ssl, and so on).
However, we never use
I looked at Struts 1.2.4 source code and it appears to me that both
integer and intRange treat empty strings as valid (Although I might be
wrong as well). Are you using Struts 1.1? I would give it a shot using
validWhen combination to your validations
field property=year
Hello Leon!
Thanks for your answer! That was our first idea, too. We now changed the
redirects to forwards, but we are not sure if we will run into troubles with
some struts extensions which might use redirects. Furthermore you know,
developers love their programming liberty ;-)
I found the
If you are using struts tags you could use, bean:write/ takes a format
property. You can also use JSTLs fmt tags to do the same.
On 9/5/05, Iyanu, Rajasekaran [EMAIL PROTECTED] wrote:
Hi All,
Though this question is not applicable to this forum, thought,
some of our struts champs will
On Tue, 2005-09-06 at 10:48 +0200, Fritsch, Andre wrote:
Hello Leon!
Thanks for your answer! That was our first idea, too. We now changed the
redirects to forwards, but we are not sure if we will run into troubles with
some struts extensions which might use redirects. Furthermore you know,
Hi,
I know this is quite OT but maybe someone has a cool idea.
We are currently experiencing stange behaviour of tomcat (or the VM).
Our tomcat hangs (not reproduceable, but probably on parallel requests
to similar methods) in session.getAttibute():
here some of the stacktraces:
I guess u r right i must try this out..
But i am doubtful if the pdf to be grnerated will be fully generated when we
enter in Filter or will it get generated AFTER passing through Filter??
On Tue, 06 Sep 2005 [EMAIL PROTECTED] wrote :
On Tue, 2005-09-06 at 06:19 +, d d wrote:
Using
Hi!
In our application we wanted to change the taglib-definisjon from
?xml version = '1.0' encoding = 'windows-1252'?
jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=1.2
xmlns:bean=http://jakarta.apache.org/struts/tags-bean;
I have a link in a JSP :
html:link action=myAction
Click here
/html:link
On Clicking this link, an action is performed and another JSP (forwarded by
the Action) opens up.
Instead of opening the whole JSP , I want it to open in a window , by
calling the a javascript
Hello Björn,
That sounds good. But how do I realise it?
Kind regards,
André
-Original Message-
From: Eickvonder Bjoern [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 6. September 2005 13:05
To: user@struts.apache.org
Subject: AW: Struts in loadbalanced enviroment
Hello,
we solved this
Hallo Leon!
Bei der Sache mit den Regeln stimme ich mit dir überein!
Das Problem ist nur, wie man dafür sorgt, dass sich alle an die Regeln halten?
:-) Wir betreuen auch Anwendungen die über unser Test und Integration System
laufen aber dann auf ein anderes Produktiv System gehen, welches nicht
I have a frameset with two included jsp's.
frameset rows=15%,85%
html:frame frameName=search page=/jsp/awp/search.jsp /
html:frame frameName=display page=/jsp/awp/empty.jsp /
/frameset
/head
/html
this is the first jsp inside the frameset with validation
and errors should be displayed
fenris [EMAIL PROTECTED] wrote on 09/06/2005 02:13:44 AM:
In my sub class for the action.java , I want to return a ActionForward
created by myself (use new ActionForward(path)) in the function execute.
(because I want forward a URL which is not declared in the
struts-config.xml. can I ? )
Hi guys,
I know that this is not the AJAX list but I know people like Frank Z. et all
worked on it before. I am seeing problem with populating a dropdown using ajax
when the data contains ampersand.
For example:
My collection works when I have two values for the country field: 'United
Anuradha S.Athreya [EMAIL PROTECTED] wrote on 09/06/2005
07:56:19 AM:
I have a link in a JSP :
html:link action=myAction
Click here
/html:link
On Clicking this link, an action is performed and another JSP (forwarded
by
the Action) opens up.
Instead of opening
I take it your adding the value of your drop down to part of the query string that makes the
xmlhttprequest, something along the lines of:
'myajaxpage.do?value=' + document.myForm.myDropdown.value;
try using the javascript escape function:
'myajaxpage.do?value=' + escape(
DISCLAIMER: I'm new to Struts. I've read a bunch of stuff, I've checked FAQs,
etc., so if my question happens to be covered in TFM I apologize. It wasn't
for lack of trying.
I have an application that I'm now supporting (didn't do any of the original
development) that uses Struts. Good for
Hi,
Just a follow question to a similar scenario, what's the recomended approach
with Struts-Tiles to handle the different modes in which a JSP may be
displayed. i.e. Add/Edit/View especially for say a JSP page which has multiple
sections.
e.g. Dish.jsp which can be composed of multiple
Actually no. I am modifying legacy jsp/servlet code and not using Struts.
What happens is, when the users selects a state from the dropdown, I make an
ajax call to my servlet that returns a list of values to be populated in the
dropdown. Does this help?
Gareth Evans [EMAIL PROTECTED]
That is a nice little tip Lilianne. It total works. I will definitely
commit this tip to my own personal Kbase for Struts.
Thanks
Jim
-Original Message-
From: Lilianne E. Blaze [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 04, 2005 12:34 PM
To: Struts Users Mailing List
Subject:
Hi Bob,
Even so, the request that your making to your 'ajax servlet', the url depends on the value of the
first select box. Somthing like 'myajaxservlet?firstvalue=Australia'
are you building this url in javascript before making the request? thats the point at which you want
to encode it.
So popular in fact that there is a Wiki entry for it :)
http://wiki.apache.org/struts/StrutsSolutions
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Tue, September 6, 2005 9:03 am, [EMAIL PROTECTED] said:
Anuradha S.Athreya [EMAIL
Gareth, you are correct abut ajax being independent. In my case, the
interesting thing is that the servlet is using database to look up the data and
requires where cause as a parameter so that it can generate a query, retrieve
data from database, create xml to be passed to the calling .jsp
Hi;
I need some advice on how to implement something. I have two websites,
windwardreports.com and windward.net. When someone comes to
windwardreports.com, I need to save a cookie in windward.net. This cookie is
then used on windward.net to identify them as the same person on
windwardreports.com.
Hi,
This isn't really a Struts issue per se, it's a frames issue.
When you set the target of the form to display, the response from the
server is going to go into the bottom frame, regardless of what the
outcome is (i.e., whether there are errors or not). This is just how
frames work.
You can
Let me see if I'm all caught up here (I'm just back to work from vacation
today, so my brain isn't fully engaged yet)...
Everything works as expected up until the point you try to populate the
dropdown on the client, correct? The XML you get back from the servlet is
correct, so the problem lies
Bob,
I see, are you able to modify the servlet thats generating the xml? Can you replace the '' with an
'amp;' reference? Presumably whatever your using to parse this xml on the client side is reading
this invalid. If your using javascript have you tried catching the exception and displaying
Dharmendra,
Honestly, I can't think of a better way to do this than what you
describe below. However, you could use extension to streamline it a
bit...
This is your main wrapper tile:
definition name=main.dish path=/jsp/layout/classicLayout.jsp
put name=header
96 matches
Mail list logo