I have thought about this myself, just a rough guess
but you could modify the struts input tags (such as
the textfield) to do:
1. Search through the errors vector to see if it
applies to the current property
2. Set background color to the text field to red or
something like that.
scott.
--- Mi
Hi,
I have a situation where I want to load a list of the
database tables into a dropdown at server startup and
then use the list on a jsp page.
This is how I did it:
Step 1. Load the table into a collection and store it
as a session variable:
public static void loadTableNames(Connection conn,
Look into the web.xml file. Since a JSP page is a
servlet, you can setup a tag for the JSP
page (instead of specifiying servlet-class, use
jsp-file). You will then create a
to specify the url to listen on.
scott.
--- Mikkel Bruun <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> Is it possible to ma
In regards to your first problem.
I believe the button that was pressed would be in the
request header so you can use getParameter() (passing
th name of the button) from the request object in the
Action class to determine which button was pressed.
If the call to getParameter() does not return n
just set the property attribute on the struts submit
tag.
scott.
--- Neil Blue <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am planning a struts app and I would like to know
> please if there is a
> way to set the text of a submit button, based on a
> key from the
> ApplicationResources.propertie
verify that struts.jar is NOT in your classpath.
I don't have the technical reason why, buy struts.jar
cannot be in your classpath. It's not needed anyways,
since it it located in the web-inf/lib directory and
the web container will find it.
scott.
--- Andreas Dejung <[EMAIL PROTECTED]> wrote:
remove struts.jar from your claspath.
--- Maik Mrazovic <[EMAIL PROTECTED]> wrote:
> Hi Klaus,
>
> thanks for your help, but as I already wrote it´s
> always the first key of
> the propertiesfile, in my case the "index.title" -
> key. I assume Struts
> don´t find any keys, and I dont know why.
>
Hi,
I have a general question concerning cookies with
Struts. From page1.jsp I call a Struts action called
"removecookie.do". The action basically sets a cookie
max expiration date to zero (to delete the cookie).
When the action is completed the request if forwarded
back to page1.jsp.
Howeve
Is it possible to use the without having
it use the errors.header and errors.footer in certain
circumstances?
thanks.
=
~~~
Scott
__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
I have created a servlet where I do not code the
doGet() or doPost(), only the init() method. This
allows me to get around the fact that the 2.2 servlet
api doesn't have a server startup event.
Then within the init() method I setup my arraylist of
values where each object in the arraylist is of
I have never been able to get that to work, I think
it's an issue with either tomcat of the java spec.
The way I have been able to get around this is to
write my own tag and have the tag set page context
attributes via a tag extra info class.
scott.
--- Maya Muchnik <[EMAIL PROTECTED]> wrote:
>
In my opinion the performance of Tomcat is pretty
good. However most j2ee apps servers have very good
performance including weblogic, iplanet, silverstream,
etc.
scott.
--- James Howe <[EMAIL PROTECTED]> wrote:
> If Tomcat's performance is pretty awful, what are
> some JSP implementations
> (co
You could use the JSP error handling mechanism to
display a friendly message instead of the stacktrace.
Within the error handling page you could log the
exception to the file system or a database.
Look into the page directive tag, in particular the
isErrorPage and errorPage attributes.
scott.
-
Hi,
I am trying to setup a connection pool using the
GenericDataSource, however I am getting a class not
found on javax.sql.DataSource?
I know this is part of the jdbc 2.0 optional package,
but do not know where to get it? Any clues
thanks,
scott.
=
~~
Never mind, I found it at:
http://javasoft.com/products/jdbc/download.html
--- Scott Walter <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I am trying to setup a connection pool using the
> GenericDataSource, however I am getting a class not
> found on javax.sql.DataSource?
>
I have used the CacheRowSet however I get the
connection from GenericDataSource manually and
associate it with the CachedRowSet.
You might want to do a search at JavaWorld, there was
an article within the last 5 months that talks all
about the CachedRowSet.
--- Christophe Thiébaud <[EMAIL PROTE
Although I don't like to place Java code in my JSP
pages, this is how I accomplished this:
<% if(index%2==0) { %>
<% } else { %>
<% } %>
index++;
--- Anthony Martin <[EMAIL PROTECTED]> wrote:
> I'm sure I'll get to this in my project. Why not
> make it a read property of
> the bean?
>
You aren't having thread errors, Java just can't find
your class. If the SimpleTransform class is in
current directory make sure "." is in your classpath.
scott.
--- TODD HARNEY <[EMAIL PROTECTED]> wrote:
> Also, do you need the package information on the
> SimpleTransform class? Does it have a
I have implemented a dynamic generated form. In my
case I wanted to have a user profile page, where the
questions were stored in the database and could be
updated at any time.
The way I did this was when I dynamically generated
the form field elements I had a consistent name always
starting with
Does anybody know how to get rid of all those messages
when struts starts up that are like:
Set org.apache.struts.action.ActionFormBean properties
Call
org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[storyForm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.a
Good idea! My thoughts are:
1. Custom tag to be able to loop through and display
the contents of the shopping cart
2. Standard Java Bean that represents the shopping
cart with methods such as emptyCart(), addItem(),
remoteItem(), updateItem(), calcTotal(), saveCart(),
retrieveCart()
3. Indepe
if(classinstance.Columns()==null)
//do something
else
//do something
NOTE: There is a difference between checking if an
array is null and checking if the elements within the
array are null. The above example checks the array
itself.
scott.
--- Alex Colic <[EMAIL PROTECTED]> wrote:
> Hi,
You should just have to put it somewhere in the
classpath (i.e. web-inf/classes)
scott.
--- Matthew O'Haire <[EMAIL PROTECTED]> wrote:
>
> Where should I put .properties file(s) in my WAR ?
>
> Should they be in the application .jar (where I put
> the classes that use the
> properties files, ie
With the checkboxes only the checkboxes that are
checked will be sent to the http header. In other
words only checked checkboxes will have values from a
request.getParameter("") call.
To pass a value onto the next page you could either
store in a hidden field on the first page or pass it
on the
I ran into this same issue. I accomplished this by
creating a custom tag (in my case called, PageLoader).
The PageLoader tag will expose a scripting variable
called contextRoot, which is basically
pageContext.getRequest()).getContextPath()
scott.
--- Nathan Coast <[EMAIL PROTECTED]> wrote:
> Hi
Hi,
I have created a dynamic html form using struts.
Bascially I have a user preference page and want to
dynamically show text input fields based on preference
names (i.e. favorite color, age, etc.) stored inside a
database table.
Since my page would have both dynamic and non dynamic
input fiel
Basically you will want to call getInputStream or
getFileData off of the FileForm class.
On your PreparedStatement you can call setBlob or
setBytes depending on the datatype in the database to
hold the binary data.
scott.
--- "Fischer, Thomas" <[EMAIL PROTECTED]>
wrote:
> Hello!
> Can anybody
Hi,
I have a page using Struts tags that I want to be able
to make the page editable in certain cases and display
only in others.
Is there an easy way to be able to have a display only
version of a struts-powered page without having to
write a second page?
=
ot;, which you can set
> to True/False depending on your requirement. While
> displaying your page,
> check for the value of the session variable
> "allowEdit". Set the value
> of session variable in Action class of your page.
>
> Pritika
>
> -Original Message-
29 matches
Mail list logo