I had similar problem in the past...
Do you have any request attributes /session attributes /appcontext
attributes
That you are using in that page?
Regards
marco
-Original Message-
From: andy wix [mailto:[EMAIL PROTECTED]
Sent: 07 June 2005 11:08
To: user@struts.apache.org
Hi,
I am getting an exception when loading a page of Tiles.
The error shown in the jsp page is:
javax.servlet.jsp.JspException: ServletException in '/footer.jsp': null
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:921)
at org.apache.struts.taglib.ti
Hi,
I am having trouble redirecting users from index.jsp to a Tile layout.
In index.jsp I have:
<%@ taglib uri="struts/logic" prefix="logic" %>
and in struts-config.xml:
type="com.xyz.app.actions.PreLoadViewTreeAction">
The error msg in the browser is:
404 Not Found
Resource /app
Hi,
I am having difficulty trying to write a web app without session state (not
my choice).
As an example, my normal approach, say, to delete a user from a list is:
in the 'pre display' action:
- fill an arraylist of user objects from the db and set it in the session
in the jsp
- this arrayl
Hi,
Rick Reumann's rather splendid resource has been down for the last few days.
I had not visited the site for a while so can't say how long it's been this
way.
Does anyone know if this is a permanent loss?
regards,
Andy
_
Be th
Hi,
I am trying to set a string variable in page scope and thought the following
would work:
I was hoping that I would then be able use the variable as in the following:
but it doesn't work.
If I just use:
the css attributes are seen as expected.
regards,
Andy
___
Hi,
I am working at a place that doesn't use session state for their web apps.
The reason given is that they have 2 physical servers and 2 Oracle
Application Servers running on each of these machines for failover. From
the little I know about clustering, I thought that if everything in the
se
Hi,
I am trying to output a many-to-many mapping using JSTL or Struts tags.
My app will manage a user authorization database and so has a table of
Applications, Roles, Users and a link table. For each Application there can
be many Roles, and for each Role there can be many Users.
The data model
Hi,
This is now fixed. It was because I didn't have a 'default' method
specified in the form tag. I.e.,
Regards,
andy
_
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
Hi,
I am extending the above class and all submissions when the user clicks the
relevant button work OK, but if the user presses enter (CR) on the keyboard
to submit the form the following exception is thrown:
StandardWrapperValve[action]: Servlet.service() for
servlet action threw exception
jav
Hi,
The shutdown command now works OK.
There have been a few issues with this that I didn't have in the right
combination.
The Tomcat service must have suitable permissions. To do this:
- Under control panel select Admin tools -> Services
- Right click Apache Tomcat service and select properties
Hi,
Still can't get this to work.
There must be some reason why this won't run under Tomcat but does work
stand-alone. I have also tried the Tomcat list to no avail.
To recap, I am trying to execute the following code on an Xp box with Tomcat
5.0.27:
Process proc = runtime.exec("cmd.exe /C shut
Hi,
I am trying to use select and options tags in the simplest way where I have
an ArrayList of Strings in the request (Logs) and I wish the one selected to
end up in the form's logName variable.
According to page 296 of Struts in action I think this should work:
but I get:
[ServletExceptio
Hi,
I get the same results when Tomcat is not run as a service. Does this mean
it must be the Tomcat security policy?
Cheers
Andy
_
Stay in touch with absent friends - get MSN Messenger
http://www.msn.co.uk/messenger
-
Hi,
I have now set up the Tomcat service to run as administrator (temporarily)
but this doesn't resolve the problem.
I am now only trying to run notepad from the exec command:
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("C:\\WINDOWS\\system32\\notepad.exe");
This code work
Thanks for the input David.
It sounds like this must be the reason. I am running Xp with Tomcat 5.0.27
and Struts 1.1.
I run Tomcat as a service - how do I find out (or set up) the permissions?
Thanks,
Andy
_
Use MSN Messenger to se
http://www.reumann.net/struts/main.do
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
-
To unsubscribe, e-mail: [EMAI
Hi,
I have a requirement to allow a privelidged user to reboot the server(WinXP
OS).
I have code as follows:
Runtime runtime = Runtime.getRuntime();
Process proc = runtime.exec("cmd.exe /C shutdown -r -f -t 10");
int exitVal = proc.waitFor();
When called, the server does not shut down (although I
Hi,
I have resolved this now.
The action code is:
File f = new File("test.log");
BufferedReader in = new BufferedReader(new FileReader(f));
String str;
while ((str = in.readLine()) != null) {
buf.append("\n" + str);
}
in.close();
request.setAttribute("FILE", buf.toString());
and the jsp code (not
Hi,
Still can't get anything sensible to work. I've gone with the approach of
setting a variable in scope for the 'body' tile jsp to output, as I have to
use Tiles so that the user can still see the menu etc after the operation.
My code is:
File f = new File("C:/test/logs/test.txt");
StringBu
Hi,
I have a requirement to allow the user to view log files in the main body
tile when they click a certain menu item in the 'menu tile'.
I see on the archives that the normal way to do this is to stream the file
to the response and then return null from the action. What's the approach
taken
Hi,
I have now fixed this issue by setting a parameter in the request with
javascript when the user clicks a 'stop' button.
Andy
_
Use MSN Messenger to send music and pics to your friends
http://www.msn.co.uk/messenger
Hi,
Thanks for the tips - that javascript works perfectly.
The only issue is that once I start the onload event, any attempts to
navigate away from the page are ignored. Is there a way I can use the
unload functions to break out of the loop if I were to include a stop
button?
Thanks,
Andy
Hi,
I have a page which I would like frequently reloaded into the browser and
was going to use javascript. The issue is that using Tiles I only have the
on-load event available for the layout.jsp file and I only want one of my
pages to have this functionality.
Is there a work-around?
Thanks,
A
Hi,
I am wondering if there is a standard Struts approach to having system help
files.
I am using an image button and javascript to create a nice small chromeless
windows in which to display my help text (I don't use the struts framwork),
but would like the help text to come from the resource f
Thanks for the input - i've had a play and can't get it to work and now my
patience has timed out so i'll use the logic:iterate method instead.
Thanks,
Andy
_
Use MSN Messenger to send music and pics to your friends
http://www.msn.c
Hi,
Thanks for the input Robert, but the array will be shorter than the
arraylist whenever a checkbox is not selected.
I've had a look at Rick Reumann's Struttin with Struts lesson 3 which does
something similar and now have:
This is a step in the right direction but still
Hi,
All the examples I've seen of using the above tag use the logic:iterate tag
to output to the page.
Does anyone have an example of how to this with JSTL?
My attempt is:
where services is an ArrayList in session with all available services and
selectedServices is the array of St
Hi,
If I have a class Person which has id and name instance vars and have a
collection of these in a page how can I access the name if I have the id
available?
So I have:
where each wrap object has the id for a collection in the session scope
called Persons from which I wish to grab the name.
Hi,
I iterate through a collection and the following line yeilds the full path
of a file:
where messages is a Map and MSG1 is the key.
The issue is that I would like only to display the file name, not the full
path.
Can this be done with JSTL or should I revert to good old fashioned Java?
Rega
Hi,
Does anyone know of a mailing list similar to this one for html problems?
cheers,
Andy
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
--
Hi,
I have some links to sounds in a jsp page that play in the default media
player under windows when the user clicks the link. This works ok when the
sounds exist under the web context and are referenced as relative paths.
But I now have a requirement to play files that exist at an arbitrary
Hi,
My Tiles layout page sets 'the daddy' table to be width and height 100% with
cellspacing="0" and cellpadding="0", and yet when the page displays there is
a border approx. 10 pixels wide between the table and the edge of the
browser window. DO browsers add this spacing?
Regards,
Andy
__
Hi,
I am trying to implement a 'please wait' page and have seen the stuff in the
archives.
The method of choice seems to be:
* The Action that is currently doing the work should instead fire off a
background thread to do it. It then forwards to a "Please Wait" page.
* The background thread d
Hi,
That source forge Security Filter stuff looks pretty good, but I only have a
basic requirement (nothing so posh as realms).
I can't seem to get my (very basic) filter to work with Struts though.
I have the following in my doFilter method:
HttpServletRequest req = (HttpServletRequest) request;
Hi,
What is the best approach for the above? I don't use container security -
when a user logs in I store a User object in the session and each page
should then check that the User is not null before proceding.
You seem to get a real mix of opinions reading about the subject - the
Servlet 2.3 s
Hi,
Just for the record the following javascript works (in the body tag of the
html page):
It's not pretty, but it works.
Regards,
Andy
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
Hi,
As usual I think I must be missing something fundamental!
It would be pretty serious to leave the back functionality - someone could
delete a contact, then press back and see the name again. If they
subsequently do another delete, there's trouble!
I'm thinking this problem is not simply due
Hi,
Thanks, that explains why I see the deleted name. Is there a standard way
to overcome this - some way to override the back button's functionality?
Regards,
Andy
_
It's fast, it's easy and it's free. Get MSN Messenger today!
htt
Hi,
I have the following on the view page so I don't think I'm seeing the cached
version of the page:
response.setHeader("Cache-Control","no-cache"); // HTTP 1.1
response.setHeader("Pragma","no-cache"); // HTTP 1.0
response.setDateHeader ("Expires", -1); // Prevents caching at a proxy
server
Al
Hi,
The delete action does delete it from the arraylist in the session (as well
as the db). That's why I think it must somehow grab the old copy when
doing a 'back'.
Regards,
Andy
_
It's fast, it's easy and it's free. Get MSN Mess
Hi,
Where my pages show a view of data, I have had to implement caching due to
the amount of data that needs to be gathered (i.e., I don't go to the
database - I can get away with the dirty read risk in this case).
A page might show:
name group
fredreddelete
john blue
Hi,
Thanks - requestScope.create works.
I was copying from page 12 of Core JSTL - can't belive all you read!
Cheers,
Andy
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
---
Hi,
The following expression always evaluates to true even though I can see the
create parameter in the request.
<%@ taglib uri="jstl/c" prefix="c" %>
hello
goodbye
I set the parameter up in the previous action with:
request.setAttribute("create","create");
Any ideas?
Thanks,
Andy
___
Hi,
It's probably better to store them in the session rather then passing from
page to page.
In Login action:
HttpSession session = request.getSession();
session.setAttribute("YourParams", params);
and get them in the next page:
YourClass xxx = (YourClass)session.getAttribu
Hi,
I am trying to use an html:link tag in place of the 'a' tag in the code
below so that I can use the transacation=true attribute to allow tokens to
work. The code sits within a jstl forEach loop so thats how it gets the
index.
// working code
test
// end working code
From the html tags ap
Hi,
Ah, that will be why... I use a link to submit. Is there any way to force
this to happen without a form?
Thanks,
Andy
_
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
--
Hi,
I have a screen which lists some names in a table and has a delete option
which calls an action to delete the associated name and then the view page
shows the updated list.
If you do a delete and then select refresh on the browser, the resulting
request is for another delete which is clearly
Hi,
Both these solutions come close but I don't always wish to have 'select' as
the default, just as a 'nothing selected' option.
If I modify an existing message then I wish to use the id of the sound from
the ActionForm (i.e., a sound may already be selected for this message):
So the issue
Hi,
I am wondering if there is a neat way to overcome a typical problem when
offering a drop-down menu to a user. It is common to have a default option
called say 'select'. The drop down objects in my case are an arraylist
which are the result of a trip to the db.
So far, my contrived solutio
Hi,
I am a little surprised that having a class variable imported into a page
isn't seen by JSTL contructs.
For example if i have a class that defines:
package com.company.test
public final class MyClass
{
public static final String TEST = "test";
}
and my JSP page has:
<[EMAIL PROTECTED] impo
Hi,
A bit of an obscure one this, but if you'll indulge me...
I am iterating through an Arraylist of HashMap objects that are in the
session so I have:
The problem is that I get no output. The issue is with the fact that the
map is keyed on a typesafe enum pattern (e.g.,):
public final cla
Hi,
I have been trying for about 4 hours to get something to work that would
take about 4 minutes using scriplets! (and I can find no reference to this
in my Core Jstl book).
Basically, I have an arraylist of sound objects in the session and when the
user clicks one - it should play. The obje
Hi,
I am going to implement a file upload facility and, from the archives, see
that Jakarta commons file upload will do the trick.
Does anyone know of any 'file select' functionality for the client side?
Cheers,
Andy
_
It's fast, it'
Hi,
I can't get struts tags to accept expressions.
There was the previous example I wrote to the list about (Re:
tag) and now I am trying to get the focus attribute of the tag
take an expression such that I can identify which text element should get
focus following a validation error.
If I i
Hi,
Just for the record, I have contrived a particularly nasty work-around for
this problem and share it in case anyone ever ends up as desperate as me!
To recap, I have 3 buttons on a form including a cancel button for which
there should be no validation.
Because I have implemented a LookupDis
Hi,
I have an interface containing all my field size definitions and wish to use
this info for setting the size of tags, so that I don't have
this hardcoded.
I get an error saying that this tag won't accept expressions if I do it the
'old fashioned' way with a scriptlet expression (i.e.,
size=
Hi,
Sorry to harp on about this but I am sure html:cancel must work, as it is
fundamental to the way sites flow!
It says the following about the html:cancel 'property' attribute in the Html
Tag Developer Guide:
"WARNING - If you set this attribute to a value other than the default, this
will N
Hi,
Has anyone else had a problem with this?
I am using Struts 1.1 but presume it has worked in this and previous
versions as it must come up in almost every project.
I cannot switch validation to false as my submit button does require
validation.
I suppose I could put the cancel and submit butto
Hi,
When using the following tag, my form still gets validated when I click the
cancel button.
The cancel method gets called correctly in my LookupDispatchAction class.
The tag is within an html:form tag as I believe it should be.
Does anyone have a working example of this tag or know of a d
Hi,
Sorry, my heading was a little mis-leading. The problem is that I get
validation carried out when I click the html:cancel button and I don't want
validation carried out in this case.
Thanks,
Andy
_
Express yourself with cool ne
Hi,
I have a form with 2 buttons (one html:submit, the other html:cancel) and
have implemented a LookupDispatchAction class to handle them.
The 'save' button needs to validate the user entry and the 'cancel' button
does not.
From reading the html:cancel tag's API, I thought this would auto-magica
Hi,
I am using Log4j for my web app logging.
Does anyone know how to set it up such that the Struts output goes to one
file and my own log statements go to another file.
Thanks,
Andy
_
Want to block unwanted pop-ups? Download the fre
Hi,
In trying to resolve another (more Struts related!) problem someone
suggested using a
<%@ taglib uri="jstl/c" prefix="c" %>
<%
Test con1 = new Test();
Test con2 = new Test();
con1.setName("Fred");
con2.setName("Dog");
ArrayList xxx = new ArrayList();
xxx.add(con1);
xxx.add(con2);
%>
Hi,
I am trying to follow the advice given yesterday but am now baffled by the
basic jstl stuff.
I have cut it down to basics and still get no output actually written to the
page. I've tried all variations on the theme (have the arraylist in the
session, use c:outs in the "" tags etc).
The code
Hi,
I have tried most of the code in the replies and, alas, fear my brain is too
small to get any working.
I am persevering with Rick Reumann's method (because I liked the Struttin'
with Struts stuff!) but I don't get a session parameter in my next page
after the link is followed (I have changed
Hi,
In my jsp page I have an ArrayList of contact objects and I use this to
build an html table; one contact per row. At the end of each table row I
have edit and delete links such that the form looks roughly like:
Name Number
Fred1234edit delete
Barney
Hi,
My tiles pages (for testing) are straight forward jsp pages.
Main
Hello
Regards,
Andy
_
Want to block unwanted pop-ups? Download the free MSN Toolbar now!
http://toolbar.msn.co.uk/
-
Hi,
I'm not sure if this is the correct way to continue a thread, but here
goes...
I have tried what Ruben suggested and I can get this to work ok. In his
example the 2 tags are formatted dependant on which CSS style is
selected.
I cannot get mine to work where the bit inside the tag is a Til
Hi,
I have a trypical layout and each tile has its own style sheet and is well
formed html.
My problem is that only 1 style sheet is being used for the whole page. I
saw in the mail archives that someone suggested using tags but this
doesn't seem to work for me (I've tried both in the tiles an
Hi,
I am (still!) trying to set up Tiles in my Struts app.
I am hoping to use Tiles definitions, but can't find any usable (working)
simple examples to build from. Even the one at Cedric Dumoulin's site
doesn't use this (best practice?) feature.
I have tried a 'cut n shut' from the stuff bundled
Hi,
I am (still!) trying to set up Tiles in my Struts app.
I am hoping to use Tiles definitions, but can't find any usable (working)
simple examples to build from. Even the one at Cedric Dumoulin's site
doesn't use this (best practice?) feature.
I have tried a 'cut n shut' from the stuff bundled
72 matches
Mail list logo