Session attributes in JRUN

2001-04-26 Thread Gogineni, Pratima

Hi,

I have a webapp based on struts that seems to be working perfectly in tomcat
- when I deploy it on JRUN3.0 SP2
Some of the session attributes are lost: this is what is happening - I place
an attributes "X" & "Y" in the session (in an action class). I am accessing
these attributes in JSP page without any problem. Then the control is sent
to the next action class I get a null when I ask the session for attribute
"X" but i get the correct value for "Y". 

If I place only "Y" in the session - then "Y" returns null. 

Also this problem doesnt occur everytime I start a session - it occurs for
the first session in a new browser (that too not always).

I am beginning to suspect this is a JRUN bug since this problem doesnt
happen with tomcat

...was wondering if anyone has had similar problems/know what the problem
could be ...

Thanks
Pratima




connection pool problem (with Beta release)

2001-05-15 Thread Gogineni, Pratima

I have a very odd problem - I was hoping the symptoms sound familiar to
someone on the list... 

I display a database table to the user in the jsp page
the user can insert/delete or update into this table - this is sent to an
action class that uses the struts connection pool and executes the
appropriate sql statement
After executing the sql statement I go back to jsp page that displays the
data in the table.

my problem is that I need to query the database twice before the new data is
shown (for example if I add row#11). I see only 10 rows the first time I
query the database after the insert statemetn is executed. The second time I
query the database I get all 11 rows. 

I have autoCommit set to false. I call the commit() method on the connection
after the insert statement is executed and I have the transaction isolation
set to TRANSACTION_READ_COMMITTED.

Another symptom is that I dont always see this problem - only in some runs,
which leads me to suspect that this is a threading issue? 

Does anyone know what the problem could be / what I should check/lookout
for?

Thanks
Pratima

-Original Message-
From: Roy Truelove [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 7:51 PM
To: [EMAIL PROTECTED]
Subject: Web design forum / listserv


Hey guys,

I'd like to know if anyone knows of a listserv / forum / newsgroup that
deals solely with web application design philosophies, and not necessarily
with their implementations.  I read several lists (this one, Turbine, JSP,
barracuda,) and most of the traffic is geared toward problems *using* the
framework.  A place where people could go and discuss things like MVCm2,
push/pull etc. I believe would be very beneficial.  If someone knows of a
forum like this, please let me know.

Thanks!
-Roy



RE: connection pool problem (with Beta release)

2001-05-15 Thread Gogineni, Pratima


Okay another symptom - the problem persists even when i set the isolation to
read_uncommitted.

-Original Message-
From: Gogineni, Pratima 
Sent: Tuesday, May 15, 2001 3:35 PM
To: '[EMAIL PROTECTED]'
Subject: connection pool problem (with Beta release)


I have a very odd problem - I was hoping the symptoms sound familiar to
someone on the list... 

I display a database table to the user in the jsp page
the user can insert/delete or update into this table - this is sent to an
action class that uses the struts connection pool and executes the
appropriate sql statement
After executing the sql statement I go back to jsp page that displays the
data in the table.

my problem is that I need to query the database twice before the new data is
shown (for example if I add row#11). I see only 10 rows the first time I
query the database after the insert statemetn is executed. The second time I
query the database I get all 11 rows. 

I have autoCommit set to false. I call the commit() method on the connection
after the insert statement is executed and I have the transaction isolation
set to TRANSACTION_READ_COMMITTED.

Another symptom is that I dont always see this problem - only in some runs,
which leads me to suspect that this is a threading issue? 

Does anyone know what the problem could be / what I should check/lookout
for?

Thanks
Pratima

-Original Message-
From: Roy Truelove [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 7:51 PM
To: [EMAIL PROTECTED]
Subject: Web design forum / listserv


Hey guys,

I'd like to know if anyone knows of a listserv / forum / newsgroup that
deals solely with web application design philosophies, and not necessarily
with their implementations.  I read several lists (this one, Turbine, JSP,
barracuda,) and most of the traffic is geared toward problems *using* the
framework.  A place where people could go and discuss things like MVCm2,
push/pull etc. I believe would be very beneficial.  If someone knows of a
forum like this, please let me know.

Thanks!
-Roy



RE: Splitting up struts-config.xml

2001-05-19 Thread Gogineni, Pratima

 Hi,

I needed to have my data-sources in a different file from the rest of the
connection pool. Since the rest of the file was static but the connection
information was varying between different users. I ended up modifying the
actionservlet to load this from a separate file. which can be inside the war
file or even specified as an initialization parameter. 

pratima

-Original Message-
From: Mikkel Bruun
To: 'Doug Way '; '[EMAIL PROTECTED] '
Sent: 5/19/01 12:32 AM
Subject: RE: Splitting up struts-config.xml

 WE ran in to similar problem a couple of months ago (just not with
struts,
another mvc framework)...

We simply recodede our xml properties loading method to grab it from a
central http url...
So now all delopers would have to work on ONE xml, which was placed
centrally, and managed by Visual Source Safe...

Thats how we avoided having to merge several config files...

Mikkel

-Original Message-
From: Doug Way
To: [EMAIL PROTECTED]
Sent: 19-05-2001 01:11
Subject: Splitting up struts-config.xml


I'm working as part of a team on a large-ish web application using
struts.

There are several of us currently working on the struts/jsp side of
things, and there's now quite a bit of stuff (action mappings, etc.) in
the struts-config.xml file, so each of us has to change this file fairly
often, and we're often in conflict with each other.  (I guess part of
the problem is that we're using a source code management tool
(SourceOffSite) with a pessimistic check-in/check-out system, without
automated merging.)

Anyway, is there some way to split up the contents of struts-config.xml,
so that it's not one huge file?  (Maybe with includes, or something
similar?)

- Doug Way
  [EMAIL PROTECTED]



RE: Oracle Driver

2001-05-19 Thread Gogineni, Pratima

I assumed that the driver is registered with the application server it will
be able to find it. Is this not true across all app servers? I think I
remember testing this with JRUN and it worked.

Because I may have the same war file but would want it to work with
different databases and everytime I change my DB I wouldnt want to repackage
the war file with the new driver (note: that i have modified the action
servlet to read the data-sources from outside the war file).

-Original Message-
From: Turgay Zengin
To: [EMAIL PROTECTED]
Sent: 5/18/01 7:45 AM
Subject: Re: Oracle Driver

I put classes12.zip (and any other archive the web application needs) in

WEB-INF/lib directory. Don't forget to change the name of the file to 
classes12.jar
This works for me.

HTH,
Turgay.

---
>Hi all,

>Where I have to put the Oracle Driver ?

>If I put it under the directory /classes I recieve this error message :

>Error: 500
>Location: /struts-client/logon.jsp
>Internal Servlet Error:
...
...

_
Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.



RE: Where's the best place to do authentication

2001-05-22 Thread Gogineni, Pratima

The example application has security coded in the application itself -
probably because more control was essential since they were setting the user
subscription info in the session upon this action. The other option if you
dont require this kind of control is to use the security provided by the
appserver.

Actually I have a related question - is it possible to do something upon
logon - even though we use the appsever provided security. In the example
application can use the appserver provided security and when the user logs
in put the user info in the session? 

Pratima

-Original Message-
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 1:56 AM
To: [EMAIL PROTECTED]
Subject: RE: Where's the best place to do authentication


Hi Shogo,

Have a look at the 'example' webapp provided with struts, this uses a taglib
to check the user is logged on, I'm sure you could use/amend it to fit your
purpose.

Jon.

-Original Message-
From: Ito, Shogo [mailto:[EMAIL PROTECTED]]
Sent: 21 May 2001 20:11
To: [EMAIL PROTECTED]
Subject: Where's the best place to do authentication


Where would be the best place/way to authenticate every user's request?  I
want to avoid inserting "code to authenticate" in all of my classes which
extend Action class.  Should I create a class like MyAction to put this sort
of code, then extends this new class?  Any better way?
 
Any suggestion greatly appreciated.
Shogo



RE: Where's the best place to do authentication

2001-05-22 Thread Gogineni, Pratima

Gregor the example application has the tag to check for logged in user in
the jsp page. 

But in addition to this - they also check if the user is logged in in each
action class. 

Another thing is the tag is not really authenticating the user but just
checkign if the user has been authenticated, so that the user cant even see
the jsp rather than find out upon performing some action in the page that he
is not authenticated.

pratima

-Original Message-
From: Gregor Rayman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 22, 2001 3:59 AM
To: [EMAIL PROTECTED]
Subject: Re: Where's the best place to do authentication


"Jon.Ridgway" <[EMAIL PROTECTED]> writes:

> Hi Shogo,
>
> Have a look at the 'example' webapp provided with struts, this uses a
taglib
> to check the user is logged on, I'm sure you could use/amend it to fit
your
> purpose.
>
> Jon.

I am not very happy with taglibs checking for logged in user. Taglibs can be
used
only in JSP and JSP should implement the View part of the MVC pattern.
Authenticating users is bussiness logic and so it shoud be done somewhere in
the actions.

--
gR



html:select

2001-05-22 Thread Gogineni, Pratima

Hi,

I want to use the html:select tag to display a drop-down. I was wonderign if
there was a way around having to create a bean per item displayed in the
drop-down - i.e. get the tag to read the values from a vector of strings. I
feel that having a bean/obj per element in the drop-down is not a good idea
in my case because the number and the values in teh list in my case could
vary quite often in the same session - in additon I am worried about the
proliferation of little objects.

thanks
pratima



RE: tool for the struts-config.xml

2001-05-23 Thread Gogineni, Pratima

Hi,

This could be done similar to the way they serialize the user database xml
file in the struts example but this is what I saw under the changes and bug
fixes section of the struts example application:

"Removed any attempt to save the pseudo-database at application shutdown,
because there is no portable mechanism to accomplish this task. "

a. does anyone know why the mechanism is not portable?
b. if above is true we will face the same problem when you try to serialize
the struts-config.xml file? 

pratima

-Original Message-
From: Mikkel Bruun
To: '[EMAIL PROTECTED]'
Sent: 5/23/01 12:56 AM
Subject: SV: tool for the struts-config.xml

It wouldnt be too hard, considering the already implemented admin
actions...

Give it a try!!!

Mikkel

-Oprindelig meddelelse-
Fra: Alexander Jesse [mailto:[EMAIL PROTECTED]]
Sendt: 23 May 2001 09:55
Til: struts-user
Emne: RE: tool for the struts-config.xml


Hi,

somehow that would make a nice and usefull demo-app (a web-app using
struts to setup the config-struts.xml)

Maybe when I have some time...(too much ideas and too less time)

Alexander

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 23, 2001 7:11 AM
To: [EMAIL PROTECTED]
Subject: Re: tool for the struts-config.xml



Hi Lorena

You could use XMLSpy to show and edit xml-Files and their dtd.

regards

Mike





LORENA MASSIMO <[EMAIL PROTECTED]> on 22.05.2001 14:45:28

Please respond to [EMAIL PROTECTED]

To:   "'[EMAIL PROTECTED]'"
<[EMAIL PROTECTED]>
cc:
Subject:  tool for the struts-config.xml




Hi
does anybody know if exists a tool (better if visual) to manage the
struts-config.xml file?

thanks Max







more connection pool problems ....

2001-05-24 Thread Gogineni, Pratima

I see the following strange behavior or JRUN and *Not* on TOMCAT.

I have an access database that is registered as an ODBC "user dsn" - the
connection pool finds the datasource the runs fine in tomcat but when the
same war file is running in JRUN a URI not found exception is thrown. But if
create a "system dsn" both tomcat and jrun find the datasource without any
problem.

would anyone happen to have an idea as to why this should occur? I am using
the JDBC-ODBC bridge as the driver ..

thanks
pratima 



RE: more connection pool problems ....

2001-05-24 Thread Gogineni, Pratima
Title: more connection pool problems 



Thanks 
- there is no problem with running under the system dsn - I was just 
wondering why I should see different behavior on the two 
appservers.
 
I 
didnt see anything in the documentation but the JRun news groups seems to have 
several threads and which ended with an answer from the JRun engineers saying 
that they should use a system dsn rather than user dsn, since user dsn's are not 
detected under certain circumstances. No reason given for 
this.
 
Could 
you as you said it runs under system account ...
 
Thanks
Pratima

  -Original Message-From: Roman Fail 
  [mailto:[EMAIL PROTECTED]]Sent: Thursday, May 24, 2001 5:28 
  PMTo: [EMAIL PROTECTED]Subject: RE: more 
  connection pool problems 
  The most likely reason is that Jrun runs under the SYSTEM account or some 
  other account besides the one you are logged in with.  A "User" DSN works 
  with one specific account only.  I guess Tomcat runs under the currently 
  logged in user.  Consult the JRun docs to find out what account it runs 
  under - it may even run under several accounts at different times, including 
  the IUSR Internet Guest Account.  You would have to set up a User DSN for 
  each of these accounts if that is the case.
   
  What the problem with running it as a System DSN anyway?  
  Security issues?
   
  Roman
  
-Original Message- From: Gogineni, 
Pratima Sent: Thu 5/24/2001 3:49 PM To: 
'[EMAIL PROTECTED]' Cc: Subject: more 
connection pool problems 
I see the following strange behavior or JRUN and *Not* on 
TOMCAT.I have an access database that is registered as an ODBC "user 
dsn" - theconnection pool finds the datasource the runs fine in tomcat 
but when thesame war file is running in JRUN a URI not found exception 
is thrown. But ifcreate a "system dsn" both tomcat and jrun find the 
datasource without anyproblem.would anyone happen to have an 
idea as to why this should occur? I am usingthe JDBC-ODBC bridge as the 
driver 
..thankspratima


RE: connection pool problem (with Beta release)

2001-05-25 Thread Gogineni, Pratima

Hi,

sorry for the long gap/delay... I had been looking into other
issues/problems for a while.

Yes I have debugged through it and it looks like I am getting the old values
from the connection it self (havent tried tracing throught the struts
implementation of the connection) as yet.

Another thing is as I mentioned - I get the updated values sometimes and
sometimes I dont. Which leads me to suspect that it is a threading issue
/race condition? (note that I see this problem with a/in a single session
...)

So here is my design: I have a "Singleton" class "GetDBResult" that is the
interface to the connection pool. All my action classes call methods on this
to update/delete/insert into the database. The arguments to the methods are
the dsn key and sql query. I am not maintaining any class/instance variables
in GetDBResult.

thansk
pratima

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 16, 2001 3:16 AM
To: [EMAIL PROTECTED]
Subject: RE: connection pool problem (with Beta release)


Debug through it and look what kind of rows are really selected from the db
the first time.
I have seen this behaviour many times but it was always a caching problem at
the browser site. Because the selected data was right the first time.

johan


> -Original Message-
> From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 16, 2001 2:11 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: connection pool problem (with Beta release)
>
>
>
> Okay another symptom - the problem persists even when i set the
> isolation to
> read_uncommitted.
>
> -Original Message-
> From: Gogineni, Pratima
> Sent: Tuesday, May 15, 2001 3:35 PM
> To: '[EMAIL PROTECTED]'
> Subject: connection pool problem (with Beta release)
>
>
> I have a very odd problem - I was hoping the symptoms sound familiar to
> someone on the list...
>
> I display a database table to the user in the jsp page
> the user can insert/delete or update into this table - this is sent to an
> action class that uses the struts connection pool and executes the
> appropriate sql statement
> After executing the sql statement I go back to jsp page that displays the
> data in the table.
>
> my problem is that I need to query the database twice before the
> new data is
> shown (for example if I add row#11). I see only 10 rows the first time I
> query the database after the insert statemetn is executed. The
> second time I
> query the database I get all 11 rows.
>
> I have autoCommit set to false. I call the commit() method on the
> connection
> after the insert statement is executed and I have the transaction
> isolation
> set to TRANSACTION_READ_COMMITTED.
>
> Another symptom is that I dont always see this problem - only in
> some runs,
> which leads me to suspect that this is a threading issue?
>
> Does anyone know what the problem could be / what I should check/lookout
> for?
>
> Thanks
> Pratima
>
> -Original Message-
> From: Roy Truelove [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 14, 2001 7:51 PM
> To: [EMAIL PROTECTED]
> Subject: Web design forum / listserv
>
>
> Hey guys,
>
> I'd like to know if anyone knows of a listserv / forum /
> newsgroup that
> deals solely with web application design philosophies, and not necessarily
> with their implementations.  I read several lists (this one, Turbine, JSP,
> barracuda,) and most of the traffic is geared toward problems *using* the
> framework.  A place where people could go and discuss things like MVCm2,
> push/pull etc. I believe would be very beneficial.  If someone knows of a
> forum like this, please let me know.
>
> Thanks!
> -Roy



RE: Scratch RowSets

2001-06-07 Thread Gogineni, Pratima

Hi Ted,

I remember playing with cached rowsets sometime ago. It is probably useful
to standardize your tags/code etc. based on the cached rowset rather than
create your own data-structure - but I found that particularly the
update/delete/insert into the rowset doesnt work properly for all but the
simplest tables.

 I am currently implementing my own web-app(struts-based) that could handle
more cases - one thing with this is that the user can specify the
update/insert/delete in an xml file to configure my rowset - since I think
it is not possible to anticipate in all cases what statements they would
want to use. This also allows them to fire off multiple statements (for
data-integrity reasons or something else) in a transaction for each of the
actions update/insert/delete ...

Pratima

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 07, 2001 4:39 AM
To: [EMAIL PROTECTED]
Subject: Re: Scratch RowSets


Ted Husted wrote:
> Now, the next step is to create a RowSet from scratch to insert a new
> record to a new table. Given this, there doesn't seem to be any reason
> to have a seperate value object bean for a data set that is coming from
> or going to a persistent store.

In case anyone is interested, all I did was select a record that wasn't
there (primary key=0), and, bingo-bango, CachedRowSet created an empty
but valid RowSet, ready to receive new rows. 

So, now instead of duplicating the data in my own set of properties, I'm
using the CachedRowSet's storage locations directly through a thin
wrapper with conventional mutators and accessors. This reduces the
overhead of redundant storage, retains all the flexibility of a standard
value object, is compatible with existing code bases, and can also
leverage the type casting built into RowSets. 

[ DBMS ] -> [ RowSet ] -> [ ActionForm -> RowSet ] -> 
[ DBMS ] -> [ RowSet ] -> [ JSP or ActionForm ]

And, of course, a RowSet can be treated just like a ResultSet in a JSP,
but without the overhead of an open connection.

A full treatment will follow, but here are some snippets.

ResultValue.java 
// a RowSet Iterator wrapper subclassed as a 
// value object wrapper around a CachedRowSet (whew!)

 /**
  * Return the account
  */
 public String getAccount() {
 try {
 return values.getString("account");
 }
 catch (SQLException sqle) {
 return null;
 }
 }

// .. more property wrappers

 /**
  * Bulk mutator for data transfer from another object
  */
public void set(
String bid, String lot, String amount, String account,
String precedence, String  bidType, String bidFrom, String
pickup
) throws SQLException {

 values.updateString("bid_key",bid);
 values.updateString("lot",lot);
 values.updateString("amount",amount);
 values.updateString("account",account);
 values.updateString("bidder_key",precedence);
 values.updateString("bidType",bidType);
 values.updateString("bidFrom",bidFrom);
 values.updateString("pickup",pickup);
}

 /**
  * Convenience constructor to set internal RowSet
  */
public ResultValue(RowSet values) {
super(values);
}

Result.java 
// encapsulates instance of ResultValue with other 
// helper properties and serves as a data access object

public int insert() throws SQLException {

ResultValue resultValue = (ResultValue) getRows();

  // MySQL can't insert via a RowSet, so use a Statement instead
return Statements.bidInsert(
resultValue.getLot(),
resultValue.getAmount(),
resultValue.getAccount(),
resultValue.getPrecedence(),
resultValue.getBidType(),
resultValue.getBidFrom(),
resultValue.getPickup()
   );
}


Access.java (an Action)
// selects appropriate classes and 
// methods for given request task

// -- INSERT --
if (task.equals("insert")) {

// Instantiate blank RowSet
result = thisResult.select(); // key=0
resultValue =
(ResultValue) thisResult.getRows();

// Create new row in empty set
resultValue.moveToInsertRow(); 

// Transfer data
resultValue.set(
   thisForm.getBid(),
   thisForm.getLot(),
   thisForm.getAmount(),
   thisForm.getAccount(),
   thisForm.getPrecedence(),
   thisForm.getBidType(),
   thisForm.getBidFrom(),
   thisForm.getPickup()
);

// Execute insert command for this Result object
result = thisResult.insert();

// Analyze outcome
if (result==0) {
message = "error.database

app server authentication - frames

2001-06-08 Thread Gogineni, Pratima

Hi,
I have a question I hoping some one might have some ideas on how to
accomplish this ...
I am using the appsever based authentication - so I have a html page that
login.html. 
now my welcome page is a frame that has two jsp pages in it. unfortunately
when I logon I see the login page in both the frames.

The only way I can think of around this is to have a hidden jsp page as a
welcome page so that this page just redirects to the frames based page if
you are logged on else to the logon page... Does anyone know of any other
way around this?

thanks
pratima

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 08, 2001 1:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Scratch RowSets


Just as an aside, Oleg:

When I use RowSets as value object beans, the type is determined by the
JDBC metadata. I've been putting some wrappers around that so the
properties have ordinary getters and setters. 

I see that BeanFactory includes code to create tables, but what about
reading tables to create beans?

Oleg V Alexeev wrote:
> 
> Hello Ted,
> 
> Thank for good stub. Now I am trying to implement such approach in my
> extension to struts - BeanFactoryServlet.



more strange JRUN behavior

2001-06-09 Thread Gogineni, Pratima


I have  a webapp that I have been testing under both tomcat and JRUN for
sometime now. About a month ago I decided to go with app server provided
form based security.
I tested my app on JRUN,Tomcat and Resin and it worked fine. 

Since then I had been working only on tomcat - now when I tested with JRUN
the login screen comes up, I enter the name and password and the screen just
hangs and the progress bar tells me "opening page j_security-check"  - now
to check if it was the application that was causing the problem. I created a
dummy page that does nothing as the welcome page and I CAN login. 

So something in my application is causing JRUN to hang at the security check
- doesnt make too much sense to me. Another thing is that I disabled the
authentication totally and the application works fine on JRUN.

Now the question is - has anyone had similar problems with JRUN or have an
idea why something like this should occur? Surely my app should not
interfere with the appserver authentication - it should atleast authenticate
me and then show an error page. Also works fine in tomcat No error
messages in the log files... My init servlets (both Action servlet and my
own custom servlet) seem to be starting up fine.

Does anyone have good/bad experiences with JRUN? I have had extremely flaky
behavior from JRUN.
Things seem to work great on Tomcat and Resin.

pratima



RE: more strange JRUN behavior

2001-06-09 Thread Gogineni, Pratima

sadly - I see this in 3.0 as well as 3.1 which was very recently released. I
havent tested the basic authentication as yet. I thought I would have more
control using the form based authentication. I need to evaluate and see if
the basic authentication works fine - else I should probably go with custom
authentication  

I went through their forums too and found messages about the form based
authentication.

Pratima

-Original Message-
From: George Craig [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 09, 2001 7:28 PM
To: [EMAIL PROTECTED]
Subject: Re: more strange JRUN behavior


I, too, have observed this intermittent quirkiness in its authentication
behavior.

After reading all of their forum posts, the consensus is to use Basic
authentication. I concur that it has been the most stable for container
authentication in J-Run. I would shy away from Form-based authentication
until Macromedia has stabilized it in the next release (to some extent IIRC,
even they acknowledge its shortcomings.) However, I realize this might not
be an option for you.

For us, we've opted to use SiteMinder.

george


- Original Message -
From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 09, 2001 8:16 PM
Subject: more strange JRUN behavior


>
> I have  a webapp that I have been testing under both tomcat and JRUN for
> sometime now. About a month ago I decided to go with app server provided
> form based security.
> I tested my app on JRUN,Tomcat and Resin and it worked fine.
>
> Since then I had been working only on tomcat - now when I tested with JRUN
> the login screen comes up, I enter the name and password and the screen
just
> hangs and the progress bar tells me "opening page j_security-check"  - now
> to check if it was the application that was causing the problem. I created
a
> dummy page that does nothing as the welcome page and I CAN login.
>
> So something in my application is causing JRUN to hang at the security
check
> - doesnt make too much sense to me. Another thing is that I disabled the
> authentication totally and the application works fine on JRUN.
>
> Now the question is - has anyone had similar problems with JRUN or have an
> idea why something like this should occur? Surely my app should not
> interfere with the appserver authentication - it should atleast
authenticate
> me and then show an error page. Also works fine in tomcat No error
> messages in the log files... My init servlets (both Action servlet and my
> own custom servlet) seem to be starting up fine.
>
> Does anyone have good/bad experiences with JRUN? I have had extremely
flaky
> behavior from JRUN.
> Things seem to work great on Tomcat and Resin.
>
> pratima



JSP translated to Tags???

2001-06-09 Thread Gogineni, Pratima

Speaking of JRUN - I was playing with their latest version 3.1 and they have
a very strange concept/tool ..

You can write jsp pages and name them with a *.jst extension and they get
translated to a custom tag instead of to a servlet. I thought it was not a
good idea - jsp to create tags to use in jsp? and i guess you lose quite a
bit of control on how it is translated etc. and I dont see why writing the
code  as  scriptlets in the jsp page is better than writing the tag handler
classes your self? 

Does any one see any merits in this approach?

pratima
-Original Message-
From: Gogineni, Pratima 
Sent: Saturday, June 09, 2001 9:24 PM
To: '[EMAIL PROTECTED]'
Subject: RE: more strange JRUN behavior


sadly - I see this in 3.0 as well as 3.1 which was very recently released. I
havent tested the basic authentication as yet. I thought I would have more
control using the form based authentication. I need to evaluate and see if
the basic authentication works fine - else I should probably go with custom
authentication  

I went through their forums too and found messages about the form based
authentication.

Pratima

-Original Message-
From: George Craig [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 09, 2001 7:28 PM
To: [EMAIL PROTECTED]
Subject: Re: more strange JRUN behavior


I, too, have observed this intermittent quirkiness in its authentication
behavior.

After reading all of their forum posts, the consensus is to use Basic
authentication. I concur that it has been the most stable for container
authentication in J-Run. I would shy away from Form-based authentication
until Macromedia has stabilized it in the next release (to some extent IIRC,
even they acknowledge its shortcomings.) However, I realize this might not
be an option for you.

For us, we've opted to use SiteMinder.

george


- Original Message -
From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 09, 2001 8:16 PM
Subject: more strange JRUN behavior


>
> I have  a webapp that I have been testing under both tomcat and JRUN for
> sometime now. About a month ago I decided to go with app server provided
> form based security.
> I tested my app on JRUN,Tomcat and Resin and it worked fine.
>
> Since then I had been working only on tomcat - now when I tested with JRUN
> the login screen comes up, I enter the name and password and the screen
just
> hangs and the progress bar tells me "opening page j_security-check"  - now
> to check if it was the application that was causing the problem. I created
a
> dummy page that does nothing as the welcome page and I CAN login.
>
> So something in my application is causing JRUN to hang at the security
check
> - doesnt make too much sense to me. Another thing is that I disabled the
> authentication totally and the application works fine on JRUN.
>
> Now the question is - has anyone had similar problems with JRUN or have an
> idea why something like this should occur? Surely my app should not
> interfere with the appserver authentication - it should atleast
authenticate
> me and then show an error page. Also works fine in tomcat No error
> messages in the log files... My init servlets (both Action servlet and my
> own custom servlet) seem to be starting up fine.
>
> Does anyone have good/bad experiences with JRUN? I have had extremely
flaky
> behavior from JRUN.
> Things seem to work great on Tomcat and Resin.
>
> pratima



Re: Idle timeout Handling

2001-06-12 Thread Gogineni, Pratima

>A completely different approach is to use container-managed security, as
described in the Servlet API Specification >>
><>. Here, you are
relying on the servlet container to manage user logon, so that you do not
have to check 
>anything on a per-request basis. > > Thanks, > Shiraz
> Craig McClanahan 
When you use the servlet container basic authentication - the session is
automatically refreshed (because the user info is sent directly from the
browser) but you still may need to refresh the data/warn the user that the
data has been refreshed since the user may think he is continuing from the
the place he left off  but ends up operating on a form-bean in the initial
state.
Could someone correct me if my assumption is wrong?
pratima




Pratima Gogineni
Core Technology

Selectica, Inc.
3 West Plumeria Drive
San Jose CA 95134.2111
www.selectica.com

Direct: 408.545.2615
Main:   408.570.9700
Mobile: 408.315.6380
Fax:408.570.2167

See our Internet Selling Systems in action:
http://www.selectica.com/iss_in_action/





RE: Form-based Authentication

2001-06-12 Thread Gogineni, Pratima

yes I did this. It works perfectly on tomcat also on resin. JRUN seems to
have some problems with this.



-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 12, 2001 3:14 PM
To: [EMAIL PROTECTED]
Subject: Form-based Authentication


Has anyone implemented form-based authentication and Struts as defined by
the J2EE Blueprints?

http://java.sun.com/j2ee/blueprints/packaging_deployment/descriptors/index.h
tml#1035772

If so, any lessons learned from the appserver you deployed in?

Thanks,

Matt


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



RE: Declarative security constraints

2001-06-14 Thread Gogineni, Pratima

I have a general question regarding security constraints - if you are using
the form based authentication - is the login page allowed to match one of
the url-patterns in the security constraints.

I found that this kind of set up goes into an infinite loop -
understandably.
The question is - it should be possible to detect this & not go into an
infinite loop?
I couldnt find anything in the servlet spec 2.2 regarding this...

thanks
pratima
-Original Message-
From: Geddes, Mark (ANTS) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 5:42 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Declarative security constraints


Craig wrote:

>Have you tried a URL pattern like this?

>  /action1.do

>The syntax of URL patterns used in security constraints is exactly like
>that used in servlet mappings, and this would be an exact match pattern
>for path "/action1" (assuming you are using the usual *.do mapping for the
>controller servlet).

Well I thought I had, but obviously I hadn't, as it works fine. Thanks.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: 13 June 2001 18:04
To: Struts-User@Jakarta. Apache. Org (E-mail)
Subject: Re: Declarative security constraints




On Wed, 13 Jun 2001, Geddes, Mark (ANTS) wrote:

> I am using the  tag in web.xml to protect access to
my
> pages.
> I have been unable to use this method to restrict access to specific
> requests, say 'action1.do'. I assume this is because only the resources
are
> protected (i.e. the actual JSPs).
> The upshot is that I am protecting the whole web-app using
> /*.
> This is fine. It is an intranet site and it means that I can use
> request.isUserInRole() and request.getUserPrincipal() in the confidence
that
> I know the user has been forced to authenticate themselves.
> The problem comes when I want to restrict certain actions based upon the
> user's role. In the perform() method of my Action class I have to use
> request.isUserInRole(). I would like to be able to do this declaratively
> rather than programmatically, either using the 
> declaration in web.xml, or possibly as part of the  declaration in
> struts-config.xml.
>  
> Question1: Have I missed something obvious in my use of the
>  mechanism?

Have you tried a URL pattern like this?

  /action1.do

The syntax of URL patterns used in security constraints is exactly like
that used in servlet mappings, and this would be an exact match pattern
for path "/action1" (assuming you are using the usual *.do mapping for the
controller servlet).

> Question2: If not, would this make a useful extension to the Struts
> framework?
>  

I've thought about the idea of incorporating role-based checking into the
controller servlet itself, but it seems like a duplication of what you can
already do in the container (such as the above).  However, a place where
it might be useful is if you have a scripted workflow of some sort, and
certain steps would be executed or skipped based on the roles possessed by
the authenticated user.

> Thanks in advance.
>  
> Mark
> 

Craig McClanahan



***
This email message contains confidential information for the above addressee
only.  If you are not the intended addressee you must not disclose or use
the information in any manner whatsoever.

Any opinion or views contained in this email message are those of the
sender, do not represent those of the Company in any way and reliance should
not be placed upon its contents.

Unless otherwise stated this email message is not intended to be
contractually binding.  Where an Agreement exists between our respective
companies and there is conflict between the contents of this email message
and the Agreement then the terms of that Agreement shall prevail.

Abbey National Treasury Services plc. Registered in England. Registered
Office:  Abbey House, Baker Street, London NW1 6XL.  Company Registration
No: 2338548.  Regulated by the SFA
***



RE: Declarative security constraints

2001-06-14 Thread Gogineni, Pratima

Okay that answers my question I guess - I tried this on tomcat3.2

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 14, 2001 12:17 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Declarative security constraints




On Thu, 14 Jun 2001, Gogineni, Pratima wrote:

> I have a general question regarding security constraints - if you are
using
> the form based authentication - is the login page allowed to match one of
> the url-patterns in the security constraints.
> 

Yes it's allowed.  Otherwise, you could not use a URL pattern like "/*" to
protect the entire web application.

> I found that this kind of set up goes into an infinite loop -
> understandably.
> The question is - it should be possible to detect this & not go into an
> infinite loop?
> I couldnt find anything in the servlet spec 2.2 regarding this...
> 

Tomcat 3.2, if I remember correctly, has problems with this.  Tomcat 4.0
(and I'm sure other servers do to) handles it correctly.

> thanks
> pratima

Craig



logic tags

2001-06-19 Thread Gogineni, Pratima


Hi,

I am trying to see if there is a less clumsy way of doing the following ...
I have a boolean bean property - I was trying to use one of the logic tags
to test if this value is true.
my question is why do I need to supply a "value" attribute even for bean
properties that are boolean? 

I guess I am looking for an logic:if tag.
Or have I not read the manual/guide properly & missed something?

Would the fact that there is no tag - that assumes a bean property is
boolean mean that - having boolean properties is discouraged/restricted to
using in special cases? 

for example I have to do something like this:


  

I was hoping to do something like:


  

Thanks
Pratima



HttpSessionListener

2001-06-25 Thread Gogineni, Pratima

Hi,

This question is more to do with servlets & not directly related to struts
(other than that I am using struts) to develop this application.

I was trying to find a way to detect when a session was destroyed either
because the user logged out or because of a session time out or something
else. 

I looked at the API and found that 2.3 has lifecycle events, one of them a
HttpSessionListener. I am working with 2.2 I was wondering if there is an
alternative to this in 2.2 & how people handled this when these events didnt
exist. 

Does one have to write a thread that continuously monitors if a session
still exists?

Thanks
Pratima



RE: HttpSessionListener

2001-06-25 Thread Gogineni, Pratima

Thanks - that helps.

-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 25, 2001 11:32 AM
To: '[EMAIL PROTECTED]'
Subject: Re: HttpSessionListener




On Mon, 25 Jun 2001, Gogineni, Pratima wrote:

> Hi,
> 
> This question is more to do with servlets & not directly related to struts
> (other than that I am using struts) to develop this application.
> 
> I was trying to find a way to detect when a session was destroyed either
> because the user logged out or because of a session time out or something
> else. 
> 
> I looked at the API and found that 2.3 has lifecycle events, one of them a
> HttpSessionListener. I am working with 2.2 I was wondering if there is an
> alternative to this in 2.2 & how people handled this when these events
didnt
> exist. 
> 
> Does one have to write a thread that continuously monitors if a session
> still exists?
> 
> Thanks
> Pratima
> 

In servlet 2.2, the most common approach to this problem involves the use
of the HttpSessionBindingListener interface.

Basically, you need to arrange that, as part of your user logon
processing, you create a session attribute that implements this
interface.  The valueBound() method will be called at this time.

Now, when the session is invalidated or times out, one of the things that
happens is that all session attributes are removed.  Thus, the
valueUnbound() method of your bean will be called, so that you can do
whatever processing is required.

Craig




RE: Frustrated, can anyone help?

2001-06-26 Thread Gogineni, Pratima

Can you try moving the application.properties file under web-inf/classes.

Also I remember reading that the strut.jar file should be under struts
example\web-inf\lib
and there were errors when you try to put it into the appserver classpath
...

-Original Message-
From: Wes Bramhall [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 9:31 AM
To: '[EMAIL PROTECTED]'
Subject: Frustrated, can anyone help?


Ok... I've tried and tried to figure this out, with some help from this
group, to no avail.  I'm just trying to get the example to run.  I'm going
to try some more.
I'm running JRUN on a Win2k box, so any help either needs to be specific to
JRUN so I can use it, or totally generalized, so I can hopefully figure out
how things relate and go from there.
Attached are my web.xml, struts-config.xml, and
ApplicationResources.properties.  They are all located in C:\Program
Files\Allaire\JRun\servers\default\Struts Example\WEB-INF\
Struts.jar is in C:\Program Files\Allaire\JRun\servers\lib, which is in the
classpath of the JRUN server.


This is the error I get:

500 Internal Server Error
/struts-example/:

Exception thrown processing JSP page.
javax.servlet.jsp.JspException: Missing message for key index.title
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242)
at jrun__index2ejspa._jspService(jrun__index2ejspa.java:57)
at
allaire.jrun.jsp.HttpJSPServlet.service(../jsp/HttpJSPServlet.java:39)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:228)
at allaire.jrun.jsp.JSPServlet.service(../jsp/JSPServlet.java:196)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at
allaire.jrun.file.FileServlet.service(../file/FileServlet.java:159)
at
allaire.jrun.servlet.JRunServletPool.service(../servlet/JRunServletPool.java
:90)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
at
allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
at
allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)




RE: Generic handling of properties

2001-06-28 Thread Gogineni, Pratima

www.mail-archive.com

-Original Message-
From: Gangadharappa, Kiran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 9:13 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Generic handling of properties


Hi Niall,
I am kind of new to this mailing list. Any idea where I can find the
archives?
regards
Kiran

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 4:08 AM
To: [EMAIL PROTECTED]
Subject: RE: Generic handling of properties


Wait for dynamic properties to arrive in Struts (might be a while) or do it
yourself.

There are messages in the archive discussing how people have done this.


Niall

> -Original Message-
> From: Gangadharappa, Kiran [mailto:[EMAIL PROTECTED]]
> Sent: 28 June 2001 00:52
> To: '[EMAIL PROTECTED]'
> Subject: Generic handling of properties
>
>
> hi,
> In my application contents of the "Form" are database driven. Is there
> anyway I could use Struts here?
> What I mean is I can not pre-define a custom "Form" class since getter and
> setters are not completely known initially.
> Any ideas?
> Regards
> Kiran
>



validation

2001-06-29 Thread Gogineni, Pratima

Hi,

I have a design question about validation in struts. So far I had been doing
most of my validation in my action classes rather than in my actionform.

I was just looking into moving some of the validation into the validate
method of the action form and find that I have to access some information in
the servlet context to do this since the action form itself does not have
all the information to do the complete validation.

I was thinking that this has a couple of problems - 
1. performance since I have to access the same info again in the action
classes. 
2. I feel it is messy because I am making my actionform which is just a
piece/view of the whole picture access information that is outside the view
itself ...

All of the above leads me to believe that most of the heavy duty validation
should happen in the action class. The actionform only does some minor
validation like maybe checking for null (basically just using the
information it knows).

I which case should we not have a validate method in the action classes too?

Please let me know if I am missing something / got something wrong ...

Thanks
Pratima



RE: validation

2001-06-29 Thread Gogineni, Pratima

On second thoughts ...I guess if there is some validation common to all the
actions its probably better to place it in the actionform even if it means
looking at information outside the view/form itself?

-Original Message-
From: Gogineni, Pratima 
Sent: Friday, June 29, 2001 9:41 AM
To: '[EMAIL PROTECTED]'
Subject: validation


Hi,

I have a design question about validation in struts. So far I had been doing
most of my validation in my action classes rather than in my actionform.

I was just looking into moving some of the validation into the validate
method of the action form and find that I have to access some information in
the servlet context to do this since the action form itself does not have
all the information to do the complete validation.

I was thinking that this has a couple of problems - 
1. performance since I have to access the same info again in the action
classes. 
2. I feel it is messy because I am making my actionform which is just a
piece/view of the whole picture access information that is outside the view
itself ...

All of the above leads me to believe that most of the heavy duty validation
should happen in the action class. The actionform only does some minor
validation like maybe checking for null (basically just using the
information it knows).

I which case should we not have a validate method in the action classes too?

Please let me know if I am missing something / got something wrong ...

Thanks
Pratima



RE: validation

2001-07-02 Thread Gogineni, Pratima

When I say I have my validation logic in the perform method - I just mean
that this is where I am doing the validation. But the logic (most of it) is
in separate classes. I would guess this is upto the user to decide whether
to put in the perform method directly or use classes of their own for
validation.

Did you mean something else when you say validation in separate classes?
Also I image the business logic validation is highly specific to the
situation and I cant think what kind of framework you can provide for this -
other than just call a validate method ...

thanks
pratima

-Original Message-
From: Rey Francois [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 9:48 AM
To: '[EMAIL PROTECTED]'
Subject: RE: validation



Ted,

Do you think this approach of splitting validation between both the
ActionForm.validate() and the Action.perform() is the most desirable?
Somehow I have the feeling that by extracting these validations into
separate classes is a better approach because it makes it easier to reuse
the validation logic, which is one of the benefit of having validation
framework. The real question then is whether this framework should only do
the domain-type checking or should also support the business logic checking.
I think it should support both, especially if you can also separate them
within the same framework.

Fr.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2001 18:04
To: [EMAIL PROTECTED]
Subject: Re: validation


The general thinking is that there are at least two levels of
validation. First, there is the simple domain-type checking, such as
fields that are suppose to be numeric should contain only numerals.
Second, there is business-logic checking, like invoice numbers are all
greater than 1000 or no start dates should occur before 1984, or that
the username and password match. 

The first type is easy to automate and doesn't require access to the
business logic, so we have a standard method that you can override if
you want to do that as part of your ActionForm. With that method, there
would not be a good place for you to plug-in simple validations.

The second type gets to be application specific, and is usually handled
in the Action perform method. Since you are already overriding perform,
there didn't seem to be much value in providing a yet another method to
override here. 

-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/


"Gogineni, Pratima" wrote:
> Please let me know if I am missing something / got something wrong ...
>
>I which case should we not have a validate method in the action classes
too?
>
> On second thoughts ...I guess if there is some validation common to all
the
> actions its probably better to place it in the actionform even if it means
> looking at information outside the view/form itself?
> I which case should we not have a validate method in the action classes
too?
> 
> Thanks
> Pratima


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***



RE: validation

2001-07-02 Thread Gogineni, Pratima

thanks Ill take a look at both these tonight.

pratima

-Original Message-
From: Rey Francois [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 02, 2001 5:02 AM
To: '[EMAIL PROTECTED]'
Subject: RE: validation


Don't forget as well the validation framework from David, which normally
should be integrated into Struts at some point.
Fr.

-Original Message-
From: Rey Francois 
Sent: 02 July 2001 13:58
To: '[EMAIL PROTECTED]'
Subject: RE: validation



There would a few pros and cons for each of the approaches you mention,
making the choice difficult.

A third approach is to have the validation extracted into another set of
classes, so that neither the ActionForm nor the Action itself contain the
real validation logic. The mapper framework I'm working on does such a
thing. I've made an early release available on Ted Husted site
(http://www.husted.com/about/struts/resources.htm#extensions) if you're
curious.

Fr.


-----Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: 29 June 2001 18:45
To: '[EMAIL PROTECTED]'
Subject: RE: validation


On second thoughts ...I guess if there is some validation common to all the
actions its probably better to place it in the actionform even if it means
looking at information outside the view/form itself?

-Original Message-
From: Gogineni, Pratima 
Sent: Friday, June 29, 2001 9:41 AM
To: '[EMAIL PROTECTED]'
Subject: validation


Hi,

I have a design question about validation in struts. So far I had been doing
most of my validation in my action classes rather than in my actionform.

I was just looking into moving some of the validation into the validate
method of the action form and find that I have to access some information in
the servlet context to do this since the action form itself does not have
all the information to do the complete validation.

I was thinking that this has a couple of problems - 
1. performance since I have to access the same info again in the action
classes. 
2. I feel it is messy because I am making my actionform which is just a
piece/view of the whole picture access information that is outside the view
itself ...

All of the above leads me to believe that most of the heavy duty validation
should happen in the action class. The actionform only does some minor
validation like maybe checking for null (basically just using the
information it knows).

I which case should we not have a validate method in the action classes too?

Please let me know if I am missing something / got something wrong ...

Thanks
Pratima


The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***



RE: Any more suggestions (Action Classes) WON'T COMPILE.

2001-07-10 Thread Gogineni, Pratima



put 
the ApplicationMapping under 
classes/org/apache/struts/action
the 
package declaration is "package org.apache.struts.action; "
when 
compiling the classes directory & struts.jar should be in the 
classpath.
 

  -Original Message-From: Chuck Amadi 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, July 10, 2001 
  7:31 AMTo: Craig R. McClanahanSubject: Any more 
  suggestions (Action Classes) WON'T COMPILE.Hi all , well 
  i have tried everthing in the book/doc's to no avail, I would like to know 
  that say for instance if one declare a full classpath name i.e package 
  classes/org/apache/struts/action; dir or does on just say declare package 
  action; As i am still having problems with the Action Classes errors 
  below.Also i have a modified Action class as per visual Pls check it out . 
  note briefly i am unable to compile the .java classes.   
  WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] 
  Class ActionMapping not found in type declaration or import. public final 
  class ApplicationMapping extends ActionMapping { 
    
  ^ WEB-INF/classes/org/apache/struts/action/ActionMapping.java [85:1] 
  Public class action.ApplicationMapping is defined in 
  C:\jakarta-tomcat-3.2.2\webapps\bbnpa\WEB-INF\classes\org\apache\struts\action\ActionMapping.java 
  and must be defined in a file called "ApplicationMapping.java". public 
  final class ApplicationMapping extends ActionMapping { 
     
  ^ 3 errors Errors compiling ActionMapping. 
  -- The views expressed by the sender of this message don't 
  necessarily represent those of Brecon Beacons National Park Authority. 
  This message is intended for the addressee(s) only and is sent in 
  confidence; if you receive it in error, please can you let us know (at 
  [EMAIL PROTECTED]) and then destroy all copies. Nid yw'r farn a fynegir 
  gan anfonwr y neges hon o anghenraid yn adlewyrchu barn Awdurdod Parc 
  Cenedlaethol Bannau Brycheiniog. Neges yw hon a fwriadwyd ar gyfer y 
  derbynnydd/derbynyddion yn unig ac fe'i hanfonir yn gyfrinachol; os ydych 
  yn ei dderbyn mewn camgymeriad, a fyddech gystal â rhoi gwybod i ni 
  (yn [EMAIL PROTECTED]) ac yna dilëwch bob copi.   



would transactional token help in this case? (could be a threading issue?)

2001-07-10 Thread Gogineni, Pratima

Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan




transactional token

2001-07-11 Thread Gogineni, Pratima

Hi,

I find that I would like to include transactional tokens from my jsp page -
I see that there is a transaction=true on the html:link tag but not on the
html:form tag. I am planning to add this on the html:form tag as well.

I just wanted to check with people on this list if there was a
reason/problem why this wasnt done in the implementation of struts itself.
Also is it considered a bad practise to saveTokens from the JSP pages at
request time rather than in an action?

Thanks
Pratima

-Original Message-
From: Gogineni, Pratima 
Sent: Tuesday, July 10, 2001 9:33 PM
To: '[EMAIL PROTECTED]'
Subject: would transactional token help in this case? (could be a
threadin g issue?)


Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan



RE: transactional token

2001-07-11 Thread Gogineni, Pratima

clearly - I dotn understand the transaction tokens very well ...

I just looked at the html:form tag and it seems they are adding the token in
there if one is present in the session? Why is this behaviour as opposed to
what is done in the html:link tag? so to use a transactional token with a
form I have to set one in the session?

thanks
Pratima

-Original Message-
From: Gogineni, Pratima 
Sent: Wednesday, July 11, 2001 10:22 AM
To: '[EMAIL PROTECTED]'
Subject: transactional token


Hi,

I find that I would like to include transactional tokens from my jsp page -
I see that there is a transaction=true on the html:link tag but not on the
html:form tag. I am planning to add this on the html:form tag as well.

I just wanted to check with people on this list if there was a
reason/problem why this wasnt done in the implementation of struts itself.
Also is it considered a bad practise to saveTokens from the JSP pages at
request time rather than in an action?

Thanks
Pratima

-Original Message-----
From: Gogineni, Pratima 
Sent: Tuesday, July 10, 2001 9:33 PM
To: '[EMAIL PROTECTED]'
Subject: would transactional token help in this case? (could be a
threadin g issue?)


Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan



RE: transactional token

2001-07-11 Thread Gogineni, Pratima

I looked at the saveToken() in the action class -its just saving it in the
session. So I guess that makes sense. 

Sorry for dashing off the previous mail without completely looking at the
code.

Thansk
Pratima
-Original Message-
From: Gogineni, Pratima 
Sent: Wednesday, July 11, 2001 10:30 AM
To: Gogineni, Pratima; '[EMAIL PROTECTED]'
Subject: RE: transactional token


clearly - I dotn understand the transaction tokens very well ...

I just looked at the html:form tag and it seems they are adding the token in
there if one is present in the session? Why is this behaviour as opposed to
what is done in the html:link tag? so to use a transactional token with a
form I have to set one in the session?

thanks
Pratima

-Original Message-----
From: Gogineni, Pratima 
Sent: Wednesday, July 11, 2001 10:22 AM
To: '[EMAIL PROTECTED]'
Subject: transactional token


Hi,

I find that I would like to include transactional tokens from my jsp page -
I see that there is a transaction=true on the html:link tag but not on the
html:form tag. I am planning to add this on the html:form tag as well.

I just wanted to check with people on this list if there was a
reason/problem why this wasnt done in the implementation of struts itself.
Also is it considered a bad practise to saveTokens from the JSP pages at
request time rather than in an action?

Thanks
Pratima

-Original Message-----
From: Gogineni, Pratima 
Sent: Tuesday, July 10, 2001 9:33 PM
To: '[EMAIL PROTECTED]'
Subject: would transactional token help in this case? (could be a
threadin g issue?)


Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan



RE: transactional token

2001-07-11 Thread Gogineni, Pratima

I just figured it today. I looked for the documentation too but couldnt find
any.

Looking at the following methods helped me understand it.

a. saveToken(), resetToken(), isTokenValid() methods in Action class
b. computeURL (& computeParameters) mehtod in requestUtil shows how it is
added into the url of a link
c. look at the FormTag.java and LinkTag.java to see how the transactional
token is added

Hope this helps

Pratima




-Original Message-
From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:40 PM
To: '[EMAIL PROTECTED]'
Subject: RE: transactional token


does anyone know where to find out how to use transactional token in struts?

Thanks,

-Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:30 AM
To: Gogineni, Pratima; '[EMAIL PROTECTED]'
Subject: RE: transactional token


clearly - I dotn understand the transaction tokens very well ...

I just looked at the html:form tag and it seems they are adding the token in
there if one is present in the session? Why is this behaviour as opposed to
what is done in the html:link tag? so to use a transactional token with a
form I have to set one in the session?

thanks
Pratima

-Original Message-
From: Gogineni, Pratima 
Sent: Wednesday, July 11, 2001 10:22 AM
To: '[EMAIL PROTECTED]'
Subject: transactional token


Hi,

I find that I would like to include transactional tokens from my jsp page -
I see that there is a transaction=true on the html:link tag but not on the
html:form tag. I am planning to add this on the html:form tag as well.

I just wanted to check with people on this list if there was a
reason/problem why this wasnt done in the implementation of struts itself.
Also is it considered a bad practise to saveTokens from the JSP pages at
request time rather than in an action?

Thanks
Pratima

-Original Message-
From: Gogineni, Pratima 
Sent: Tuesday, July 10, 2001 9:33 PM
To: '[EMAIL PROTECTED]'
Subject: would transactional token help in this case? (could be a
threadin g issue?)


Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan



RE: struts and Jrun 3.0

2001-07-11 Thread Gogineni, Pratima



I got 
this error a couple of times without any reason too. JRUN 3.0 has jsp cacheing 
problems and shutting down the server, deleteing the cached jsp pages and 
restarting solves this problems in most cases. Our sales rep said these problems 
were fixed in 3.1.
 
If 
your webapp is called testApp it would have created a jsp directory under 
WEB-INF/ just delete all these files and then start the server 
again

  -Original Message-From: Rama Krishna 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 4:02 
  PMTo: [EMAIL PROTECTED]Subject: struts and 
  Jrun 3.0
  is there any problem with JRun 3.0 and struts. 
  cause my development m/c has JRun 3.1 and everything worked fine. when i tried 
  to put it on staging with JRun 3.0 
   
  is it like JRun 3.0 doesn't work with struts or 
  ???
   
   
  it gives me the 
  following error:
   
  javax.servlet.ServletException: 
  nulljava.lang.AbstractMethodErrorat 
  allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)at 
  allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)at 
  allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)at 
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)at 
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)at 
  allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)at 
  allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)at 
  allaire.jrun.ThreadPool.run(ThreadPool.java:267)at 
  allaire.jrun.WorkerThread.run(WorkerThread.java:74)
  thanks,
  rama.


RE: struts and Jrun 3.0

2001-07-11 Thread Gogineni, Pratima



It 
retains but I guess its safer to backup ...

  -Original Message-From: Rama Krishna 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 4:33 
  PMTo: [EMAIL PROTECTED]Subject: Re: struts 
  and Jrun 3.0
   
  you are right. thanks. i did the way you said 
  and that error is gone. now the problem is with setLocale(...) which is a 
  known JRun problem. 
   
  if i upgrade jrun does it retain the existing 
  applications in the current version or should i recreate all 
  those???
   
   
   
  
- Original Message - 
From: 
Gogineni, Pratima 
To: '[EMAIL PROTECTED]' 

Sent: Wednesday, July 11, 2001 4:10 
PM
Subject: RE: struts and Jrun 3.0

I 
got this error a couple of times without any reason too. JRUN 3.0 has jsp 
cacheing problems and shutting down the server, deleteing the cached jsp 
pages and restarting solves this problems in most cases. Our sales rep said 
these problems were fixed in 3.1.
 
If 
your webapp is called testApp it would have created a jsp directory under 
WEB-INF/ just delete all these files and then start the server 
again

  -Original Message-From: Rama Krishna 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, July 11, 2001 
  4:02 PMTo: [EMAIL PROTECTED]Subject: 
  struts and Jrun 3.0
  is there any problem with JRun 3.0 and 
  struts. cause my development m/c has JRun 3.1 and everything worked fine. 
  when i tried to put it on staging with JRun 3.0 
   
  is it like JRun 3.0 doesn't work with 
  struts or ???
   
   
  it gives me the 
  following error:
   
  javax.servlet.ServletException: 
  nulljava.lang.AbstractMethodErrorat 
  allaire.jrun.jsp.JSPServlet.servletNeedsCreating(JSPServlet.java:312)at 
  allaire.jrun.jsp.JSPServlet.loadPage(JSPServlet.java:188)at 
  allaire.jrun.jsp.JSPServlet.service(JSPServlet.java:168)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1747)at 
  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1584)at 
  org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:490)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:740)at 
  javax.servlet.http.HttpServlet.service(HttpServlet.java:865)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)at 
  allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)at 
  allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.java:88)at 
  allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)at 
  allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)at 
  allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)at 
  allaire.jrun.ThreadPool.run(ThreadPool.java:267)at 
  allaire.jrun.WorkerThread.run(WorkerThread.java:74)
  thanks,
  rama.


transaction=true in html:link - bug or feature

2001-07-11 Thread Gogineni, Pratima

Hi,

I was using the transaction= true flag in the html:link tag. What I found
was that the token is not placed in the url params unless there is a either
paramId or name specified - I wanted to do this so I had to use a dummy url
parameter to do this.

I am not sure if this this a bug or if it is as designed ... 
I am using 1.0 release build

Thanks
Pratima

-Original Message-
From: Trieu, Danny [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 1:40 PM
To: '[EMAIL PROTECTED]'
Subject: RE: transactional token


does anyone know where to find out how to use transactional token in struts?

Thanks,

-Original Message-----
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 11, 2001 10:30 AM
To: Gogineni, Pratima; '[EMAIL PROTECTED]'
Subject: RE: transactional token


clearly - I dotn understand the transaction tokens very well ...

I just looked at the html:form tag and it seems they are adding the token in
there if one is present in the session? Why is this behaviour as opposed to
what is done in the html:link tag? so to use a transactional token with a
form I have to set one in the session?

thanks
Pratima

-Original Message-----
From: Gogineni, Pratima 
Sent: Wednesday, July 11, 2001 10:22 AM
To: '[EMAIL PROTECTED]'
Subject: transactional token


Hi,

I find that I would like to include transactional tokens from my jsp page -
I see that there is a transaction=true on the html:link tag but not on the
html:form tag. I am planning to add this on the html:form tag as well.

I just wanted to check with people on this list if there was a
reason/problem why this wasnt done in the implementation of struts itself.
Also is it considered a bad practise to saveTokens from the JSP pages at
request time rather than in an action?

Thanks
Pratima

-----Original Message-
From: Gogineni, Pratima 
Sent: Tuesday, July 10, 2001 9:33 PM
To: '[EMAIL PROTECTED]'
Subject: would transactional token help in this case? (could be a
threadin g issue?)


Hi,

I have an application in which I havent used transactional tokens. I have a
text field where I defined a onchange=preprocess() which sets a value and
then submits the form. Heres the behaviour I see:

a. It works 'perfectly' when I change the value and move the focus out of
this text box (it gets submitted). 

b. It works 'alright' (for some reason this takes longer to process than the
above case) when I hit enter in the text field

c. It sometimes throws an error when I do step (a) followed by step (b)
without waiting for the control to return from step (a). The kind of error I
am getting (I would have to explain my program in detail to exactly say what
this error is) leads me to suspect that two threads are trying to
access/change the data in the form bean. 

Has anyone seen this behaviour before or knows if using transactional tokens
would help in this case? (I am suspecting not from what I know of the way
they work ...)

Also note that this form/application worked well when  I did not use onclick
- i.e. using the default behaviour of submitting the value of the text field
when you hit enter ...

Thanks
Pratima

-Original Message-
From: Ryan Cornia [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 10, 2001 7:49 AM
To: [EMAIL PROTECTED]
Subject: Error-page in web.xml


I'm hoping someone can help me understand this better. In web.xml, I have
the following entries -

java.lang.Exception
/errorpage.jsp

   
javax.servlet.ServletException
/errorpagesrvlt.jsp


>From my understanding, anytime an Exception, or ServletException occurs in
my application, it will call either errorpage.jsp or errorpagesrvlt.jsp. Is
that correct? Does it matter if the exception occurs in a JSP or a servlet?

This seems to work in Tomcat, but with SilverStream, I don't get taken to
the error page, but get the SilverStream generate error message.

In my errorpage.jsp I have -

<%@ page language="Java" isErrorPage="true"%>


is that right?

Thanks for any insite, this is driving me crazy.
Ryan



thread problems?

2001-07-16 Thread Gogineni, Pratima

Hi,

I have been fighting with the following situation and would appreciate any
ideas/suggestions.

I have a session scoped form bean "FBean", a jsp page that displays it
"dispFBean" & an action FBeanAction.

I have inserted transactional tokens to take care of duplicate posting. 

After changing a value in dispFBean, an enter or/and a click work fine &
they do the same thing ie. call FBeanAction.

when the 2 events are done in rapid succession - one event executes fine
while the other event throws an exception because it is trying to access
row#5 where as the previous action changed the number of rows to 4.
Unfortunately the transactional tokens cant take care of this since this
error is being thrown in BeanUtils.populate before it ever reaches an
FBeanAction instance.

I also tried declaring the jsp page threadsafe to check if that is the
problem. 

Also note that the FBeanAction replaces FBean with a new Instance of FBean.

Thanks
Pratima



RE: thread problems?

2001-07-16 Thread Gogineni, Pratima

I just put in an error message saying you are asking for something that
doesnt exist - I never really expected to see this scenario when I put in
this message. The arrayIndexOutofBounds happens if I dont catch htis case. 

Let me put it this way: I am displaying values 1-10 in a page. I post an
action that changes the number of values to be displayed to 5 so a new bean
with just five values is manufactured and put in the session - in the
meanwhile the second click is forwarded by the actionservlet through the
requestUtils to the BeanUtil to look for the accessors and mutators for
values 1-10 but we have now have only 5 values in the bean so this is an
error condition. 

The properties object sent to the BeanUtil seems to be sent from the old
form bean which had 10 values but the new form bean has only 5 values

-Original Message-
From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 11:52 AM
To: [EMAIL PROTECTED]
Subject: Re: thread problems?


It sounds like you are throwing an Exception of some
sort from you ActionForm?  Is that right?  The
ActionForm should just be a container to hold the
values from the form.

David

--- "Gogineni, Pratima" <[EMAIL PROTECTED]>
wrote:
> Hi,
> 
> I have been fighting with the following situation
> and would appreciate any
> ideas/suggestions.
> 
> I have a session scoped form bean "FBean", a jsp
> page that displays it
> "dispFBean" & an action FBeanAction.
> 
> I have inserted transactional tokens to take care of
> duplicate posting. 
> 
> After changing a value in dispFBean, an enter or/and
> a click work fine &
> they do the same thing ie. call FBeanAction.
> 
> when the 2 events are done in rapid succession - one
> event executes fine
> while the other event throws an exception because it
> is trying to access
> row#5 where as the previous action changed the
> number of rows to 4.
> Unfortunately the transactional tokens cant take
> care of this since this
> error is being thrown in BeanUtils.populate before
> it ever reaches an
> FBeanAction instance.
> 
> I also tried declaring the jsp page threadsafe to
> check if that is the
> problem. 
> 
> Also note that the FBeanAction replaces FBean with a
> new Instance of FBean.
> 
> Thanks
> Pratima


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



RE: thread problems?

2001-07-16 Thread Gogineni, Pratima

Hi,

Thanks for your reply - but there doesnt seem to be a lock. The problem is
that the actionservlet is getting a request based on an old form bean but in
the meantime a new form bean is put into the session.

Also I decided to check if declaring the page thread safe (singlethreaded)
would solve the problem, it doesnt.

Pratima

-Original Message-
From: Pathangi, Rao H. [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 12:30 PM
To: '[EMAIL PROTECTED]'
Subject: RE: thread problems?


I have been through this before. Its more like 2 client requests in
succession/ The session seems to be locked at some point in time and the
other request keeps on waiting for ever. Once I made the underlying servlet
implement single thread model it went away. Iam not sure about it in a
struts environment but this is a well known case. 

But experts advise against single thread model usage(A different topic
anyway..)

The Jguru page had the same problem in the very beginning (They use jsp's).
But they somehow unlocked the session  and made it attend the second request
too. As a consequence every bit  of jsp content appeared twice on the page.

later
pathangi r



-Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:44 PM
To: '[EMAIL PROTECTED]'
Subject: thread problems?


Hi,

I have been fighting with the following situation and would appreciate any
ideas/suggestions.

I have a session scoped form bean "FBean", a jsp page that displays it
"dispFBean" & an action FBeanAction.

I have inserted transactional tokens to take care of duplicate posting. 

After changing a value in dispFBean, an enter or/and a click work fine &
they do the same thing ie. call FBeanAction.

when the 2 events are done in rapid succession - one event executes fine
while the other event throws an exception because it is trying to access
row#5 where as the previous action changed the number of rows to 4.
Unfortunately the transactional tokens cant take care of this since this
error is being thrown in BeanUtils.populate before it ever reaches an
FBeanAction instance.

I also tried declaring the jsp page threadsafe to check if that is the
problem. 

Also note that the FBeanAction replaces FBean with a new Instance of FBean.

Thanks
Pratima



RE: thread problems?

2001-07-16 Thread Gogineni, Pratima

No I cant have a static variable - there could be more than one instance of
the bean each with a different number of values.

-Original Message-
From: Rama Krishna [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 16, 2001 1:42 PM
To: [EMAIL PROTECTED]
Subject: Re: thread problems?


may be you can have some static variable pointing to the no. of values and
check this before you construct your bean. if you think two threads access
this to update this then it can be synchronized. this variable need not be
in the same class.




- Original Message -
From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 1:21 PM
Subject: RE: thread problems?


> I just put in an error message saying you are asking for something that
> doesnt exist - I never really expected to see this scenario when I put in
> this message. The arrayIndexOutofBounds happens if I dont catch htis case.
>
> Let me put it this way: I am displaying values 1-10 in a page. I post an
> action that changes the number of values to be displayed to 5 so a new
bean
> with just five values is manufactured and put in the session - in the
> meanwhile the second click is forwarded by the actionservlet through the
> requestUtils to the BeanUtil to look for the accessors and mutators for
> values 1-10 but we have now have only 5 values in the bean so this is an
> error condition.
>
> The properties object sent to the BeanUtil seems to be sent from the old
> form bean which had 10 values but the new form bean has only 5 values
>
> -Original Message-
> From: David Winterfeldt [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001 11:52 AM
> To: [EMAIL PROTECTED]
> Subject: Re: thread problems?
>
>
> It sounds like you are throwing an Exception of some
> sort from you ActionForm?  Is that right?  The
> ActionForm should just be a container to hold the
> values from the form.
>
> David
>
> --- "Gogineni, Pratima" <[EMAIL PROTECTED]>
> wrote:
> > Hi,
> >
> > I have been fighting with the following situation
> > and would appreciate any
> > ideas/suggestions.
> >
> > I have a session scoped form bean "FBean", a jsp
> > page that displays it
> > "dispFBean" & an action FBeanAction.
> >
> > I have inserted transactional tokens to take care of
> > duplicate posting.
> >
> > After changing a value in dispFBean, an enter or/and
> > a click work fine &
> > they do the same thing ie. call FBeanAction.
> >
> > when the 2 events are done in rapid succession - one
> > event executes fine
> > while the other event throws an exception because it
> > is trying to access
> > row#5 where as the previous action changed the
> > number of rows to 4.
> > Unfortunately the transactional tokens cant take
> > care of this since this
> > error is being thrown in BeanUtils.populate before
> > it ever reaches an
> > FBeanAction instance.
> >
> > I also tried declaring the jsp page threadsafe to
> > check if that is the
> > problem.
> >
> > Also note that the FBeanAction replaces FBean with a
> > new Instance of FBean.
> >
> > Thanks
> > Pratima
>
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>



RE: thread problems?

2001-07-17 Thread Gogineni, Pratima

Thanks for your suggestion Martin. I understand that nothing is preserved
between requests.

I have  a fix (that I dont like) temporarily. I can detail below exactly
what is happening and what the three solutions I could think of were and the
one that I choose implement as a temporary fix. Would be glad to knwo what
people think of it.

My form bean has indexed properties that are displayed/modified in the jsp
page. The valid indices on this property can change between requests. When
the ActionServlet recieves a request - it sets all the properties on my form
bean. Now when I manage to send multiple requests from the browser almost
simultaneously - the first request executes properly as a result the valid
indices on my bean have changed. Now the second request is handled by the
actionservlet and it trys to set the same properties as the first one on the
form bean but unfortunately the valid indices have changed and there is an
error.

I was thinking that if the transactional tokens were checked in the
ActionServlet itself this problem would not have occurred.

Another possibility was modify the bean utils so that for indexed propertys
no errors are thrown if the indices have changed (I dont like this very
much). Or alternatively redirect back to the input page from here.

The third possibilty which I used as a temporary fix is this: In actionform
if an indexed proprety value outside its range is being set - dont throw an
error - Just do Nothing.

And the above solution works fine. 

Thanks
Pratima

-Original Message-
From: Martin Cooper [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 12:02 AM
To: Gogineni, Pratima
Cc: [EMAIL PROTECTED]
Subject: Re: thread problems?


I believe your problems are caused by your assumptions about the
preservation (or otherwise) of state between requests. Nothing is guaranteed
to be preserved unless you write code to make those guarantees.

--
Martin Cooper


- Original Message -
From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 16, 2001 11:43 AM
Subject: thread problems?


> Hi,
>
> I have been fighting with the following situation and would appreciate any
> ideas/suggestions.
>
> I have a session scoped form bean "FBean", a jsp page that displays it
> "dispFBean" & an action FBeanAction.
>
> I have inserted transactional tokens to take care of duplicate posting.
>
> After changing a value in dispFBean, an enter or/and a click work fine &
> they do the same thing ie. call FBeanAction.
>
> when the 2 events are done in rapid succession - one event executes fine
> while the other event throws an exception because it is trying to access
> row#5 where as the previous action changed the number of rows to 4.
> Unfortunately the transactional tokens cant take care of this since this
> error is being thrown in BeanUtils.populate before it ever reaches an
> FBeanAction instance.
>
> I also tried declaring the jsp page threadsafe to check if that is the
> problem.
>
> Also note that the FBeanAction replaces FBean with a new Instance of
FBean.
>
> Thanks
> Pratima
>




RE: html:errors tag?

2001-07-18 Thread Gogineni, Pratima

Hi - I just did this in my form.

html:errors itself doesnt do this. My actionform holds the   row and column
index of my error field which are set at the of validation.

what i do is check if the error object exists and if the row and column
indices match one of the fields being displayed - the cell is colored red.

Pratima



-Original Message-
From: Matthias Brahm [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 9:25 AM
To: '[EMAIL PROTECTED]'
Subject: html:errors tag?


Hi,

is it possible to do something like this with struts:

I have a form with labels for the input fields.
These labels have the font color blue.

The Form is validated by the FormBean.
When one or more fields of the form are invalid
and the control is forwarded back to the input form,
the labels of the invalid input fields should have the font color red.

In general, is it possible to output one text and in case of an error 
another one?

Can I do this with the struts-tag-libs (html:errors)?

Thanls



RE: URI is null error on ActionForward

2001-07-19 Thread Gogineni, Pratima

FYI - I usually get this when I have  a datasource configured in the
struts-config.xml but if for some reason the database cant be accessed 

-Original Message-
From: Jon Brisbin [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 7:07 AM
To: Struts List
Subject: URI is null error on ActionForward


I have a really simple action forward just like many I've used in the past.
I am getting this error on JRun 3.1 EE.  I have included an excerpt from my
struts-config.xml and my action class to see if you y'all see something I
just do not...I just added the redirect="true" and it does the same thing.

Thanks for any help you can give me here! :-)

Jon Brisbin
Lamar, MO
[EMAIL PROTECTED]


java.lang.IllegalArgumentException: URI is null
 at
allaire.jrun.servlet.JRunSE.getRequestDispatcher(../servlet/JRunSE.java:1937
)
 at
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
va:1750)
 at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595)
 at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1416)
 at
allaire.jrun.session.JRunSessionService.service(../session/JRunSessionServic
e.java:1082)
 at allaire.jrun.servlet.JRunSE.runServlet(../servlet/JRunSE.java:1270)
 at
allaire.jrun.servlet.JRunRequestDispatcher.forward(../servlet/JRunRequestDis
patcher.java:89)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1552)
 at allaire.jrun.servlet.JRunSE.service(../servlet/JRunSE.java:1542)
 at allaire.jrun.servlet.JvmContext.dispatch(../servlet/JvmContext.java:364)
 at allaire.jrun.http.WebEndpoint.run(../http/WebEndpoint.java:115)
 at allaire.jrun.ThreadPool.run(../ThreadPool.java:272)
 at allaire.jrun.WorkerThread.run(../WorkerThread.java:75)


My struts config excerpt follows:

  
  



 


  


My action class forwards like such:

// Set our utility objects
HttpSession session = request.getSession(true);
MessageResources messages = getResources();
CategoryForm form = (CategoryForm)actionForm;

request.setAttribute("formxml", form.getXml());

getServlet().getServletContext().log("Forwarding to success.");
return (new ActionForward("success"));




Tree

2001-07-19 Thread Gogineni, Pratima

Hi

I have been thinking for a while about making a "tree" jsp component using
struts. I like the idea of having a jsp based tree rather than using the
javascript trees that are normally used. 

I know I will have to write a lot of action classes to support a *Good*
generic tree. But does anyone know of any problems with using a jsp based
tree rather than javascript based?

Thanks
Pratima

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 9:05 AM
To: [EMAIL PROTECTED]
Subject: struts-layout


Hi there!

I am happy to inform you that the 0.3 version of struts-layout has been 
released on . struts-layout is a tag 
library for Struts that allows for fast and easy development of jsp pages.
With 
struts-layout, pages are described with only a small set of special tags.
HTML 
tags are not any more needed (well, nearly), as struts-layout tags generates

the layout. I kindly invite you to have a look on the site for more
information.

struts-layout is now used in my company's projects and in 
, a French site dedicated to information

about application servers. French users can also find an introduction to
Struts 
and struts-layout on this site in the article section.

Please feel free to send me feedbacks and bug reports.

Cheers,

Jean-Noel



RE: Tree

2001-07-19 Thread Gogineni, Pratima

I guess I would have to use a combination of both javascript and JSP since I
would like some actions to go throught the server and some just on the
client side ...

-Original Message-
From: Matt Raible [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 19, 2001 10:34 AM
To: [EMAIL PROTECTED]
Subject: Re: Tree


The problem with a jsp-based three is that you will have to go the server
each
time a user clicks on a node.  If you want anything to change on the screen
without hitting the server, you have to use javascript or dhtml (or the
dom).


--- "Gogineni, Pratima" <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I have been thinking for a while about making a "tree" jsp component using
> struts. I like the idea of having a jsp based tree rather than using the
> javascript trees that are normally used. 
> 
> I know I will have to write a lot of action classes to support a *Good*
> generic tree. But does anyone know of any problems with using a jsp based
> tree rather than javascript based?
> 
> Thanks
> Pratima
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 19, 2001 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: struts-layout
> 
> 
> Hi there!
> 
> I am happy to inform you that the 0.3 version of struts-layout has been 
> released on <http://struts.application-servers.com>. struts-layout is a
tag 
> library for Struts that allows for fast and easy development of jsp pages.
> With 
> struts-layout, pages are described with only a small set of special tags.
> HTML 
> tags are not any more needed (well, nearly), as struts-layout tags
generates
> 
> the layout. I kindly invite you to have a look on the site for more
> information.
> 
> struts-layout is now used in my company's projects and in 
> <http://www.application-servers.com>, a French site dedicated to
information
> 
> about application servers. French users can also find an introduction to
> Struts 
> and struts-layout on this site in the article section.
> 
> Please feel free to send me feedbacks and bug reports.
> 
> Cheers,
> 
> Jean-Noel


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



FW: action as the welcome page

2001-08-15 Thread Gogineni, Pratima



-Original Message-
From: Gogineni, Pratima 
Sent: Wednesday, August 15, 2001 11:59 AM
To: '[EMAIL PROTECTED]'
Subject: action as the welcome page


Hi,

I have seen some messages in the news groups which seem to indicate that it
may be possible to set an action as the welcome page, though a couple of
people were having problems with it.

I tried doing this - set my welcome page to login.do (also tried /login.do).
After authentication I get a 404 error that says ADM/login.do not found (ADM
is my context).

The /login action has been defined in struts-config.xml and I can forward to
it through a jsp page.

Im trying to find out if anyone else has been able to do this, if it is
possible to do this at all, if I am doing something wrong ...

Thanks
Pratima

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 10:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: action mapping not working




...but when you finish going through the Action class (Question), you want
to
then go to the jsp, not the action again, which would give you an infinite
loop!
;-)

Dave





"Larry Maturo" <[EMAIL PROTECTED]> on 08/15/2001
01:23:32 PM

Please respond to [EMAIL PROTECTED];
Please
  respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: action mapping not working



Hi Dave,

You wrote:
Presumably you call your action Question from somewhere, execute it, and
when
it's done, you forward to question.jsp, not to the Question action again!

Actually, I need to go through the Action Class each time, to repopulate
the jsp from the database, since it represents a question, and I want
the answers to contain whatever the user last entered, and I stored in the
database for them.  A breakpoint in my Action Class indeed shows it gets
hit each time I press back or next.

Again, thanks for the help.  I don't need to understand it as long as it
works.  Ah yes, the enigma that is struts. :-)

-- Larry



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 12:13 PM
To: [EMAIL PROTECTED]
Subject: RE: action mapping not working




Larry,

Presumably you call your action Question from somewhere, execute it, and
when
it's done, you forward to question.jsp, not to the Question action again!
Hence
the action has already executed, and you want to go to the jsp page.

With the others, I guess you want to perform the action and then display the
jsp, so the forward here should be another action, and the forward for the
ReviewInstructions action is then a jsp page.

Cheers,

Dave






"Larry Maturo" <[EMAIL PROTECTED]> on 08/15/2001
01:02:57 PM

Please respond to [EMAIL PROTECTED]

To:   "David_Hay/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com,
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: action mapping not working



Hi Dave

You wrote"
If you want the action to be called, you should forward to the action, not
the
jsp eg

  

Below is my new mapping:







I don't understand why it works, but it does.  Thank you.  Any idea
why sucess works even though it is different than the others?

-- Larry
















action as the welcome page

2001-08-15 Thread Gogineni, Pratima

Hi,

I have seen some messages in the news groups which seem to indicate that it
may be possible to set an action as the welcome page, though a couple of
people were having problems with it.

I tried doing this - set my welcome page to login.do (also tried /login.do).
After authentication I get a 404 error that says ADM/login.do not found (ADM
is my context).

The /login action has been defined in struts-config.xml and I can forward to
it through a jsp page.

Im trying to find out if anyone else has been able to do this, if it is
possible to do this at all, if I am doing something wrong ...

Thanks
Pratima

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 10:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: action mapping not working




...but when you finish going through the Action class (Question), you want
to
then go to the jsp, not the action again, which would give you an infinite
loop!
;-)

Dave





"Larry Maturo" <[EMAIL PROTECTED]> on 08/15/2001
01:23:32 PM

Please respond to [EMAIL PROTECTED];
Please
  respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: action mapping not working



Hi Dave,

You wrote:
Presumably you call your action Question from somewhere, execute it, and
when
it's done, you forward to question.jsp, not to the Question action again!

Actually, I need to go through the Action Class each time, to repopulate
the jsp from the database, since it represents a question, and I want
the answers to contain whatever the user last entered, and I stored in the
database for them.  A breakpoint in my Action Class indeed shows it gets
hit each time I press back or next.

Again, thanks for the help.  I don't need to understand it as long as it
works.  Ah yes, the enigma that is struts. :-)

-- Larry



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 15, 2001 12:13 PM
To: [EMAIL PROTECTED]
Subject: RE: action mapping not working




Larry,

Presumably you call your action Question from somewhere, execute it, and
when
it's done, you forward to question.jsp, not to the Question action again!
Hence
the action has already executed, and you want to go to the jsp page.

With the others, I guess you want to perform the action and then display the
jsp, so the forward here should be another action, and the forward for the
ReviewInstructions action is then a jsp page.

Cheers,

Dave






"Larry Maturo" <[EMAIL PROTECTED]> on 08/15/2001
01:02:57 PM

Please respond to [EMAIL PROTECTED]

To:   "David_Hay/Lex/Lexmark.LEXMARK"@sweeper.lex.lexmark.com,
  [EMAIL PROTECTED]
cc:(bcc: David Hay/Lex/Lexmark)
Subject:  RE: action mapping not working



Hi Dave

You wrote"
If you want the action to be called, you should forward to the action, not
the
jsp eg

  

Below is my new mapping:







I don't understand why it works, but it does.  Thank you.  Any idea
why sucess works even though it is different than the others?

-- Larry
















digester question

2001-02-16 Thread Gogineni, Pratima

Hi,

I have been reading the documentation on digester - I was wondering if it
uses XPATH for element pattern matching and if it doesnt why not?

I dont think the documentation mentions this ...

THanks
Pratima



hidden submit button

2001-02-23 Thread Gogineni, Pratima

Hi,

This is probably something very straight forward but ...
I am trying to create a hidden submit button with the struts form tags. The
following doesnt seem to work. Does anyone know how to get this to work? 


Start at row #:



Ive also tried using a hidden field with property as submit & a hidden field
with property as action

Thanks
Pratima



datasources & action servlet

2001-03-09 Thread Gogineni, Pratima


Hi,

I was wondering if I could configure the action servlet to pick up the
datasources from a different file (not struts-config).

I am trying to auto-generate the struts app for different users - the thing
is the action mappings are the same for all of them so I would prefer to use
a constant struts-config file for the action mappings.

but the data sources are dependent on user input and know way of knowing
what they could be ahead of time - I would like to place this info in a
different file. Would anyone happen to know what the best way to do this is?

thanks
Pratima




RE: datasources & action servlet

2001-03-09 Thread Gogineni, Pratima

It looks like one option is to modify the dtd and declare a different entity
that holds all the datasources - is there a less intrusive way/ is this
recommended/strongly discouraged?

thanks
pratima

>  -Original Message-
> From:     Gogineni, Pratima  
> Sent: Friday, March 09, 2001 12:29 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  datasources & action servlet
> 
> 
> Hi,
> 
> I was wondering if I could configure the action servlet to pick up the
> datasources from a different file (not struts-config).
> 
> I am trying to auto-generate the struts app for different users - the
> thing is the action mappings are the same for all of them so I would
> prefer to use a constant struts-config file for the action mappings.
> 
> but the data sources are dependent on user input and know way of knowing
> what they could be ahead of time - I would like to place this info in a
> different file. Would anyone happen to know what the best way to do this
> is?
> 
> thanks
> Pratima
> 



RE: Obtaining multilpe values from dynamically generate textboxes

2001-04-27 Thread Gogineni, Pratima

Hi - I am doing something similar. Dont know if its the best way to do it.

My form bean has an indexed property over a vector of values (so that its
size can change dynamically ..)
The form bean also has a size property which tells me how many values exist
in the indexed property.

in the JSP page 
I loop based on the size property and have  elements that display
the indexed property in a text field.

Pratima

-Original Message-
From: Walker, John H. [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 9:56 AM
To: '[EMAIL PROTECTED]'
Subject: Obtaining multilpe values from dynamically generate textboxes


We have the senereo where we are dynamically generating a number of
textfields. The number of textfields are not a known entity so we cannot
have multiple setTextField1(), setTextField2()..
. methods on the Action Form. How does struts handle this case where you
basically want all the values of the textFields concatenated and passed into
one Action Form method as an Array.

Any ideas.
Thanks
John Walker



RE: Obtaining multilpe values from dynamically generate textboxes

2001-04-27 Thread Gogineni, Pratima

I was suggesting a possible solution :) just wasnt sure it was the best/only
way 

-Original Message-
From: Web Programmer [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 10:30 AM
To: [EMAIL PROTECTED]
Subject: RE: Obtaining multilpe values from dynamically generate
textboxes


See Scott Walker's response to my question earlier
today which worked.  If you can't get it, post again.


--- "Gogineni, Pratima" <[EMAIL PROTECTED]>
wrote:
> Hi - I am doing something similar. Dont know if its
> the best way to do it.
> 
> My form bean has an indexed property over a vector
> of values (so that its
> size can change dynamically ..)
> The form bean also has a size property which tells
> me how many values exist
> in the indexed property.
> 
> in the JSP page 
> I loop based on the size property and have
>  elements that display
> the indexed property in a text field.
> 
> Pratima
> 
> -Original Message-
> From: Walker, John H.
> [mailto:[EMAIL PROTECTED]]
> Sent: Friday, April 27, 2001 9:56 AM
> To: '[EMAIL PROTECTED]'
> Subject: Obtaining multilpe values from dynamically
> generate textboxes
> 
> 
> We have the senereo where we are dynamically
> generating a number of
> textfields. The number of textfields are not a known
> entity so we cannot
> have multiple setTextField1(), setTextField2()..
> . methods on the Action Form. How does struts handle
> this case where you
> basically want all the values of the textFields
> concatenated and passed into
> one Action Form method as an Array.
> 
> Any ideas.
> Thanks
> John Walker


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/



RE: "html:message" tag

2001-05-01 Thread Gogineni, Pratima

 Just checking ... you do have an ApplicationResources.properties file and a
message for the key you are using in the tag in that file?

-Original Message-
From: Sue Deng
To: [EMAIL PROTECTED]
Sent: 5/1/01 11:10 AM
Subject: Re: "html:message" tag

I did not make any changes on the code.  What do you mean the "app
server"?  I am using jakarta-struts-1.0-b1 under Tomcat.  What should I
do now? 

Thanks, 


-Sue 


Jason Chaffee wrote: 


 Have you made any changes to the code?  The ActionServlet should be
creating the resource bundle and storing in the servlet context using
this key. What app server are you using?  There could be a bug in how it
stores objects in the servlet context, thus the ActionServlet can't find
anything that has previously been stored there. 

-Original Message- 
From: Sue Deng [ mailto:[EMAIL PROTECTED]  ]

Sent: Tuesday, May 01, 2001 9:39 AM 
To: [EMAIL PROTECTED] 
Subject: Re: "html:message" tag 
 
Thanks, Jason.  But  when I use bean:message, I got "Cannot find message
resources under key org.apache.struts.action.MESSAGE" error. 

Thanks, 


-Sue 


Jason Chaffee wrote: 


  

it should be bean:message 


-Original Message- 
From: Sue Deng [ mailto:[EMAIL PROTECTED]  ]

Sent: Monday, April 30, 2001 5:26 PM 
To: [EMAIL PROTECTED] 
Subject: "html:message" tag 


Hi, 


I am trying to build form using struts taglib.  But I get "no such tag 
message  ..."error when I use "html:message" tag.  I found that 
struts-html.tld and struts-bean.tld files do not have a tag named 
"message", but the struts example uses that tag.  Why? 


Thanks, 


-Sue





RE: jsp include exception when using struts on weblogic 6

2001-05-01 Thread Gogineni, Pratima



Amarnath,
 
I can 
do include within an include - though I am using struts with tomcat. Maybe 
weblogic doesnt support this?
 
Pratima

  -Original Message-From: Nanduri, Amarnath 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 
  12:38 PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  jsp include exception when using struts on weblogic 6
  Been 
  There . Done That. Still crashes with some other exception.. I was wondering 
  if i am stepping outside the bounds of the jsp specifications. 
  Thanks.
   
  cheers,
  Amar..
  
-Original Message-From: Chen, Yong 
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 
3:14 PMTo: '[EMAIL PROTECTED]'Subject: 
RE: jsp include exception when using struts on weblogic 
6
JSP spec says:
<%@ include is a directive, it is effective in 
the translation-time, it is static

 
Your code is trying to do some dynamic including, 
so use jsp:include instead.
 
Yong 
Chen 

  -Original Message-From: Nanduri, Amarnath 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 
  2001 12:51 PMTo: 
  '[EMAIL PROTECTED]'Subject: jsp include exception 
  when using struts on weblogic 6
  Hi 
  Guys,
   
     This 
  question is irrelevant to struts and more to do with jsp's. My sincerest 
  apologies if i have offended 
  anyone
   
  I am getting a 
  nasty exception when i try to do the 
  following...
   
  I am basically 
  including an 'include' in an 'include'.  Basically page1.jsp includes 
  a page2.jsp. In page2.jsp i make a decision as to whether to include 
  page3.jsp (or) page4.jsp ...
   
  Basically the 
  syntax is...
   
  page1.jsp
  --
   if some 
  condition satisfied 
  <%@ include file="page2.jsp" %> 
  
   
  
  page2.jsp
  --
   if some 
  condition satisfied 
  <%@ include file="page3.jsp" %> 
  
   else  <%@ include file="page4.jsp" %> 
  
   
   
  I am using struts1.0 on weblogic 6. The 
  exception i get is below... I tried changing the include to a 
  . If so i get an other nasty exception. Any help by 
  the gurus is highly 
  appreciated.
   

   <[WebAppServletContext(7292498,onboard.presentation)] 
  Servlet failed with Exceptionjava.lang.RuntimeException: Could not 
  parse embedded JSP code: weblogic.utils.ParsingException: nested 
  TokenStreamException: antlr.TokenStreamException: Could not include 
  include/Mobile_menu.jsp    at 
  weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1090)    
  at 
  weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1065)    
  at 
  weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1058)    
  at 
  weblogic.servlet.jsp.JspLexer.buildTimeInclude(JspLexer.java:855)    
  at 
  weblogic.servlet.jsp.JspLexer.mINCLUDE_DIRECTIVE(JspLexer.java:3733)    
  at 
  weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3506)    
  at 
  weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1807)    
  at 
  weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1648)    
  at 
  weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1530)


RE: "html:message" tag

2001-05-01 Thread Gogineni, Pratima



Jason 
- I assumed that load-on-startup is an optional element and only required to 
specify the order.  i.e. if this is not specified the appserver loads teh 
servlet in any order it likes???
 
if 
this is the case then the actionservlet shoudl have been loaded before the jsp 
page was compiled unless - the jsp page was also specified in teh deployment 
descriptor to be precompiled?
 

  -Original Message-From: Jason Chaffee 
  [mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 3:41 
  PMTo: '[EMAIL PROTECTED]'Subject: RE: 
  "html:message" tag
  Your 
  ActionServlet needs to be loaded to create an instance of the 
  ResourceBundle.  Therefore, if you were requesting a jsp page without 
  going through the ActionServlet, there will not be a ResourceBundle in the 
  servlet context because this happens when the ActionServlet is 
  initialized.
  
-Original Message-From: Sue Deng 
[mailto:[EMAIL PROTECTED]]Sent: Tuesday, May 01, 2001 1:47 
PMTo: [EMAIL PROTECTED]Subject: Re: 
"html:message" tagI would like to share what I did 
wrong before:  I forgot to put the line 
"2" in web.xml file.  
After I add this line, my jsp works.  So, why is this line so important 
for using bean:message lag? 
Thanks, 
-Sue 
Jason Chaffee wrote: 
  
  I find the following configuration easier: 
  Simply put the the resouce file in /WEB-INF/classes 
  directory. 
  Then change the deployment descriptor as follows: 
       
  action  
  org.apache.struts.action.ActionServlet 
    
     
  application    
  ApplicationResources 
  Also, make sure there isn't a typo in your resource file 
  or your jsp page. 
  -Original Message- From: 
  Sue Deng [mailto:[EMAIL PROTECTED]] 
  Sent: Tuesday, May 01, 2001 11:51 AM To: [EMAIL PROTECTED] Subject: Re: "html:message" tag 
  I put my ApplicationResources.properties file in 
  /usr/local/tomcat/classes/net/covalent directory 
  before.  Now i moved it to my applications 
  /WEB-INF/classes/net/covalent directory.  And I got "Missing 
  message for key logon.title" error, but the 
  logon.title key is in the file. 
  Thanks, 
  -Sue Ratnadeep Bhattacharjee 
  wrote: 
  > Chances are the location of your ApplicationResource 
  file is not where > ActionServlet is looking 
  for it. For example, if your web.xml looks as follows: > >   
   > 
  action > 
  org.apache.struts.action.ActionServlet 
  >  
  >   
  application >   
  net.covalent.ApplicationResources 
  >    
  >    
  > > then the 
  ApplicationResources.properties file should be in the > WEB-INF/classes/net/covalent/ directory. > > Hope this helps. 
  > > -Deep. 
  > > > > > I did not make any changes on the code.  What do 
  you mean the "app > > server"?  I am 
  using jakarta-struts-1.0-b1 under Tomcat.  What should I 
  > > do now? > 
  > > > Thanks, > > > > -Sue > > > > Jason Chaffee 
  wrote: > > > 
  > >  Have you made any changes to the code?  The 
  ActionServlet should be > > > creating 
  the resource bundle and storing in the servlet context using 
  > > > this key. What app server are you 
  using?  There could be a bug in how > 
  > > it stores objects in the servlet context, thus the ActionServlet 
  can't > > > find anything that has 
  previously been stored there. > > 
  > > > >  
  -Original Message- > > 
  >  From: Sue Deng [mailto:[EMAIL PROTECTED]] 
  > > >  Sent: 
  Tuesday, May 01, 2001 9:39 AM > > 
  >  To: 
  [EMAIL PROTECTED] > > 
  >  Subject: Re: "html:message" tag 
  > > > > > 
  >  Thanks, Jason.  But  when I 
  use bean:message, I got "Cannot > > 
  >  find message resources under key 
  > > >  
  org.apache.struts.action.MESSAGE" error. > 
  > > > > 
  >  Thanks, > 
  > > > > 
  >  -Sue > > 
  > > > >  
  Jason Chaffee wrote: > > > 
  > > > > 
  > > > > 
  > > > > it should be 
  bean:message > > 
  > > > > 
  > > -Original Message- 
  > > > > From: Sue 
  Deng [mailto:[EMAIL PROTECTED]] 
  > > > > Sent: 
  Monday, April 30, 2001 5:26 PM > > 
  > > To: 
  [EMAIL PROTECTED] > > 
  > > Subject: "html:message" tag 
  > > > > 
  > > > > Hi, 
  > > > > 
  > > > > I am trying 
  to build form using struts taglib.  But I get > > > > "no such tag 
  > > > > 
  message  ..."error when I use "html:message" tag.  I 
  found > > > > 
  that > > > > 
  struts-html.tld and struts-bean.tld files do not have a > > > > tag named 
  > > > > "message", 
  but t

RE: Shopping Cart Project

2001-05-02 Thread Gogineni, Pratima

I cant access this page either.

-Original Message-
From: Joseph Hakim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 6:19 AM
To: [EMAIL PROTECTED]
Subject: RE: Shopping Cart Project



Ok. My apologies to those that couldn't access the website. The webserver
was running at port 800. Since this is a non-standard http port, some
firewalls chose to block access. I've moved it to port 80, so there should
be no more access prolems.

Access the website as normal by pointing your browser to
http://mycart.cjb.net/

Thanks to Mats Josefsson for bringing this to my attention.

Regards,

Joseph Hakim.



-Original Message-
From: Joseph Hakim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 May 2001 11:00 PM
To: [EMAIL PROTECTED]
Subject: RE: Shopping Cart Project




It's definitely getting hits. I checked the logs. Also got a friend to test
it from another ISP. Try it again. Let me know if you have any further
problems :-)

Joseph.


-Original Message-
From: Sridhar H C [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 2 May 2001 11:05 PM
To: 'Joseph Hakim'
Subject: RE: Shopping Cart Project


Yep. Thanks for the mail. I am prepared to code using struts framework.

Regards,
Sridhar

> -Original Message-
> From: Joseph Hakim [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 5:24 PM
> To:   [EMAIL PROTECTED]
> Subject:  Shopping Cart Project
>
>
> Hi,
>
> Thanks for expressing your interest in the shopping cart project. I'm sure
> you are as excited as I am to get things underway, so I've taken the
> liberty
> of preparing a few things. Namely a quick website located at
> http://mycart.cjb.net/ and a mailing list dedicated to this project.
>
> Please join the mailing list by visiting the website !
>
> Looking forward to coding with you :-)
>
> Regards,
>
> Joseph Hakim.
>
>
> _
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



RE: localization hor html tags

2001-05-02 Thread Gogineni, Pratima

This problem seems similar to yesterdays "html:message" tag.

check if applciation.properties exists and is specified in web.xml.
Also check if a message with the key you are using exists.


-Original Message-
From: Hartmut Bernecker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 6:44 AM
To: [EMAIL PROTECTED]
Subject: Re: localization hor html tags


Hi,

is in version 1.0 another way to localize HTML-Elements???

What I try, is:
--
"/>


But this don't work:
---
org.apache.jasper.compiler.ParseException:
T:\webapps\webclient\login.jsp(38,96) Attribute xy.test.btn.submit has
no value


Thank u for your time!
Hartmut Bernecker



Mike Fitterman schrieb:
> 
> This is may be left over from the struts version 0.5 days when their was
> one tag library rather than multiple.  They probably didn't clean it up.
> 
> Mike.
> 
> At 11:01 AM 4/26/2001 -0700, you wrote:
> >I could use localized name in a button tag using construct like :
> >
> >" />
> >
> >Are there any lighter way to specify i18n key for html tags.
> >
> >
> >Thanks,
> >--
> >Eugene Krivopaltsev Sun Microsystems, Inc.
> >[EMAIL PROTECTED] 901 San Antonio Road
> >Voice: 650.786.6260 (x86260)Palo Alto, CA. 94303
> >Fax:   650.786.7816 www.sun.com
> 
> Mike Fitterman1 Network Drive UBUR02-207
> Solaris Software Group Burlington, MA 01803-0902
> Sun Microsystems, Inc 781-442-0843

-- 
_

Hartmut Bernecker
Dipl.-Wirtschaftsinformatiker (BA)
Electronic Publishing
ASIM(r) - CONTENT MANAGEMENT AT ITS BEST

Druckhaus Waiblingen
Siemenstrasse 10
D-71332 Waiblingen, Germany

Tel.:   +49 (0)71 51 / 5 66 - 4 48
Fax:+49 (0)71 51 / 5 66 - 3 23
Mail:   mailto:[EMAIL PROTECTED]
Web:http://www.dhw.de/



RE: struts on Tomcat 3.3-m2

2001-05-02 Thread Gogineni, Pratima

I believe flush buffer was added in servlet api 2.2 - maybe you have an
older jarfile in your path.

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 6:35 AM
To: '[EMAIL PROTECTED]'
Subject: struts on Tomcat 3.3-m2 



Hi All,

 I am getting the following error when trying to run a Struts App on
Tomcat 3.3-m2 . The application works fine with WebLogic 6. Am i doing
anyting wrong ? Thanks a lot.

cheers,
Amar..


2001-05-02 09:30:27 - /onboard.presentation: compile error: req=R(
/onboard.presentation + /login.jsp + null) -
org.apache.jasper.JasperException: Unable to compile
C:\tomcat\work\DEFAULT\onboard.presentation\login_1.java:374: No method
matching flushBuffer() found in class
org.apache.jasper.runtime.JspWriterImpl.
((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer();
  ^
1 error

at
org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:682)
at
org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:59
3)
at
org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:410)
at
org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java,
Compiled Code)
at
org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
Code)
at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:143)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java,
Compiled Code)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a, Compiled Code)
at java.lang.Thread.run(Thread.java:479)



RE: Struts on Tomcat 4.0-b3

2001-05-02 Thread Gogineni, Pratima

are you wroking on solaris by any chance?

-Original Message-
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 6:03 AM
To: '[EMAIL PROTECTED]'
Subject: Struts on Tomcat 4.0-b3


Hi Guys,

 I was trying to use Struts on Tomcat 4.0 Beta 3. I am getting the
following errors when starting up Tomcat. Anybody out there can point out my
problem ? Thanks a lot.

cheers,
Amar..




A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL
relocation t
arget' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting
method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cg
i

A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL
relocation t
arget' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting
method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cg
i

A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL
relocation t
arget' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting
method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cg
i

Starting service Tomcat-Apache
Apache Tomcat/4.0-b3



RE: database connection

2001-05-02 Thread Gogineni, Pratima



  

-Original Message-
From: Ying Teng [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 10:26 AM
To: [EMAIL PROTECTED]
Subject: RE: database connection


The question is how to add or specify the datasource key value. I added the
datasource tag contents in the struts-config.xml file. What else do I need
to do? Do I need add an ActionDataSource class? Do I need to use the
GenericDataSource class? Thanks.

Ying


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 12:06 PM
To: [EMAIL PROTECTED]
Subject: RE: database connection



The reason why the value is null is because that is the default when you
don't specify a "key" value for your datasource.  When that is the case you
will obtain your connection in the following manner:



   try {
  javax.sql.DataSource dataSource =
servlet.findDataSource(null);
  java.sql.Connection myConnection =
dataSource.getConnection();


  Once again, if you want to change the value from "null" to something
  else, just add " key=[something other than null] " to your datasource
  configuration.

  Hope that helps.

  -Dallas







"Ying Teng"

x.com>   cc:
 Fax to:
05/02/01 Subject: RE: database
connection
09:50 AM
Please
respond to
struts-user






Yes, I did. I use my SQL and mine looks like this:



  

What else do I need to do to add this datasource to struts? Thanks.

Ying

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 02, 2001 11:05 AM
To: [EMAIL PROTECTED]
Subject: Re: database connection




Did you set up the data source configuration in your struts-config.xml
file?
I'm using oracle 8.1.6, my setup looks like this.


  


-Donnie Hall




|+--->
||  yteng@zenimax|
||  .com |
||   |
||  05/02/2001   |
||  09:39 AM |
||  Please   |
||  respond to   |
||  struts-user  |
||   |
|+--->

>
---
-|
  |
|
  |   To: [EMAIL PROTECTED]
|
  |   cc: (bcc: Donnie Hall/Enron Communications)
|
  |   Subject: database connection
|

>
---
-|



Hello All,

I am trying to connect to the database but when I do

DataSource dataSource =
(DataSource)servlet.getServletContext
().getAttribute(Action.DATA_SOURCE_KEY)
;

it gives me null as the dataSource value. Can anybody help me out here?
Thanks.

Ying














RE: database connection

2001-05-04 Thread Gogineni, Pratima

 
in the databaseservlet class do: getServletContext().getAttribute(key);
-Original Message-
From: Ying Teng
To: [EMAIL PROTECTED]
Sent: 5/4/01 8:17 AM
Subject: RE: database connection

Yes, I can get the DataSource reference in the ServletContext object of
the
ActionServlet class. But I want to get the reference to the dataSource
in
the DatabaseServlet class. Can anyone tell me how to get the reference
to
the dataSource from the databaseServlet class? Thanks.

Ying

-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection


A reference to the DataSource is stored in the ServletContext object...
You
can get it from that.

- Original Message -
From: "Ying Teng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection


>
> What you described is true. Now my question is how to get the
datasource
> without referencing the actionServlet. I wanted to intialize the
database
> hashtable of the databaseServlet class in the databaseServlet init
function.
> In order to do that, I need to get the datasource. But I can not
reference
> the actionServlet because the action is initialized after the database
is
> initialized (as in the log file). Hope someone can give me some hints.
> Thanks.
>
> Ying
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: database connection
>
>
>
> You will add the key information to the datasource info in you
> struts-config.xml file  it will look like this:
> 
>key="[some name I'll use to reference this datasource]"
>autoCommit="false"
>description="Data Source Configuration"
>driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password="pass"
>
> url
>
="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pas
s
> "
>user="user"
> />
>   
>
> Then, after that's done, the easiest way to access it is to reference
it
by
> the action servlet (servlet),  because using actionServlet you can
just do
> servlet.findDataSource("the name you called your datasource")  and
voila,
> you have your datasource object.  From that datasource object you can
> create a connection.
> If you cannot access the actionServlet, then it's a little more
> difficult--and actually I wouldn't be able to help much there, but at
least
> your question would then be "how do I get the datasource without
> referencing the actionServlet"
>
> -Dallas
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




RE: Dynamic Error Messages

2001-05-04 Thread Gogineni, Pratima

 
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError("view.construction.error", e.getMessage()));

in the application.properties you should have:

view.construction.error=Could not construct view because: {0}

e.getMessage() is substituted instead of {0}


-Original Message-
From: Darryl
To: [EMAIL PROTECTED]
Sent: 5/4/01 7:18 AM
Subject: Dynamic Error Messages

I can't figure out how to return dynamic error messages in the
ActionErrors collection. In other words, if an exception is thrown in an
Action object, I want to use the e.getMessage() to get the message
description and use that to populate an ActionError. The ActionError
class doesn't seem to have a constructor that supports this. Help!

- Darryl



RE: database connection

2001-05-04 Thread Gogineni, Pratima

 look at your web.xml file - 

you should have two  elements there one for DatabaseServlet and the
other for ActionServlet. each of them has a  element.

set the load-on-startup element of the actionservlet to 1 and that of
databaseservlet to 2. to indicate that the database servlet should be loaded
first.

-Original Message-
From: Ying Teng
To: Gogineni, Pratima
Sent: 5/4/01 12:10 PM
Subject: RE: database connection

I tried that. The ServletContext object does not have that attribute. If
you
look at the servlet.log file, the system initializes the database first
and
then action, datasource. So I am wondering how to let the system
initializes
the datasourc first so in the databaseServlet class, we can have access
to
the datasource.

My idea is to enable the system to write the database info to the
database.xml file when the database is initialized.

Thanks.

-Original Message-
From: Gogineni, Pratima [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 04, 2001 3:00 PM
To: 'Ying Teng '; '[EMAIL PROTECTED] '
Subject: RE: database connection



in the databaseservlet class do: getServletContext().getAttribute(key);
-Original Message-
From: Ying Teng
To: [EMAIL PROTECTED]
Sent: 5/4/01 8:17 AM
Subject: RE: database connection

Yes, I can get the DataSource reference in the ServletContext object of
the
ActionServlet class. But I want to get the reference to the dataSource
in
the DatabaseServlet class. Can anyone tell me how to get the reference
to
the dataSource from the databaseServlet class? Thanks.

Ying

-Original Message-
From: Vivek Bhaskaran [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 03, 2001 5:21 PM
To: [EMAIL PROTECTED]
Subject: Re: database connection


A reference to the DataSource is stored in the ServletContext object...
You
can get it from that.

- Original Message -
From: "Ying Teng" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 03, 2001 11:28 AM
Subject: RE: database connection


>
> What you described is true. Now my question is how to get the
datasource
> without referencing the actionServlet. I wanted to intialize the
database
> hashtable of the databaseServlet class in the databaseServlet init
function.
> In order to do that, I need to get the datasource. But I can not
reference
> the actionServlet because the action is initialized after the database
is
> initialized (as in the log file). Hope someone can give me some hints.
> Thanks.
>
> Ying
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 02, 2001 3:10 PM
> To: [EMAIL PROTECTED]
> Subject: RE: database connection
>
>
>
> You will add the key information to the datasource info in you
> struts-config.xml file  it will look like this:
> 
>key="[some name I'll use to reference this datasource]"
>autoCommit="false"
>description="Data Source Configuration"
>driverClass="org.gjt.mm.mysql.Driver"
>maxCount="4"
>minCount="2"
>password="pass"
>
> url
>
="jdbc:mysql://bethsoft.dev.zenimax.com:3306/test?user=user&password=pas
s
> "
>user="user"
> />
>   
>
> Then, after that's done, the easiest way to access it is to reference
it
by
> the action servlet (servlet),  because using actionServlet you can
just do
> servlet.findDataSource("the name you called your datasource")  and
voila,
> you have your datasource object.  From that datasource object you can
> create a connection.
> If you cannot access the actionServlet, then it's a little more
> difficult--and actually I wouldn't be able to help much there, but at
least
> your question would then be "how do I get the datasource without
> referencing the actionServlet"
>
> -Dallas
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>




RE: How can I get a data source from custom tag?

2001-05-04 Thread Gogineni, Pratima

 
but you have a reference to the pagecontext in which the tag is called
you could try 
(DataSource)pageContext.getAttribute("dsUsers",PageContext.APPLICATION_SCOPE
)
-Original Message-
From: Anna Hristova
To: Struts-User
Sent: 5/4/01 10:35 AM
Subject: How can I get a data source from custom tag?

Hi All,
 
I have different data sources defined in 'struts-config.xml'. I want to
use one of them from a custom tag. 
 
I know how to this from an Action class: 
DataSource ds = (DataSource) servlet.findDataSource("dsUsers");
 
But in the custom tag I don't have reference to the 'servlet' as in
Action class How can I get it?
 
Any help will be appreciated. 
 
10x, Anna 



RE: Internationalised strings and scriptlets

2001-05-04 Thread Gogineni, Pratima

 I havent tried this but I am guessing you could get hold of the pagecontext
object and get a reference to the applicationresources from it - similar to
what you would do in a custom tag implementation.

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 5/3/01 1:45 AM
Subject: Internationalised strings and scriptlets


Is it possible to access internationalised messages from inside
scriptlets? 

For example consider a dropdown list populated with text strings
produced by a 
 tag.  I then want to do some processing based on a
user 
selection:

 <% 
 String selectedItem = request.getParameter( "dropDown" );
 String internationalisedString = ???
 if ( selectedItem.equals( internationalisedString ) ) 
 {
// do something
 } 
 %>

How do I get a value for internationalisedString?

Thanks,
Sam



--
This message was sent using http://uk2.net
NEWS - CHEAPEST DEDICATED SERVERS IN THE WORLD -  25/month
FREE UK DIAL 0845 609 1370 - username uk2: - password: uk2
UK's FREE Domains, FREE Dialup, FREE Webdesign, FREE email




RE: dynamically build HTML forms

2001-05-05 Thread Gogineni, Pratima

 Hi,

in my current project I am generating forms dynamically in the action
classes - based on an xml configuration file. It is probably a little more
work but I feel it is possible to get it to work ...

Pratima

-Original Message-
From: Hartmut Bernecker
To: [EMAIL PROTECTED]
Sent: 5/5/01 10:50 AM
Subject: dynamically build HTML forms

Hi,

I came across the following statement:

"The Struts framework lacks what is called "dynamic properties", or the 
ability to use meta data to drive the creation of forms and the
associated 
ActionForm. This means it is impractical to dynamically build a HTML
form 
using a separate, predefined data source (such as a XML file or database

table). When a project requires database-driven form design it would be
best 
to design special Model I-based JSP pages for this task. Keep in mind,
it is 
still possible to use Struts in other areas of your project. The Struts
team is 
well aware of this limitation arising from the lack of "dynamic
properties." 
This feature is planned for version 1.1 of Struts."
(http://www.jspinsider.com/tutorials/jsp/struts/strutsadvance.html)

But what I'd like to do is precisely this: Creating HTML forms
dynamically. Is 
there another way besides using Model 1-based JSP pages for this task?

I appreciate any clue in this matter.

TIA
__
Hartmut Bernecker
Heinrich-Rorbeck-Weg 30
73614 Schorndorf
Tel. 0 71 81 / 25 75 39
Fax. 0 71 81 / 25 75 41
[EMAIL PROTECTED]
__



RE: All user's roles

2001-09-26 Thread Gogineni, Pratima

I looked for this in servlet api 2.2 too but couldnt find it either - so had
to do "isUserInRole" for each and every role ... 
would be great if someone has a better suggestion.

Thanks
Pratima

-Original Message-
From: Mike Douglass [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 26, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: All user's roles


Is there any way to get all roles for a currently authenticated user?

We are about to implement a jsp application which allows a user to select 
one of a number of roles which will determine the functionality available 
in later pages.

Essentially, I want to create a drop down box of all valid roles for the 
current user without having to build the names of all possible roles into 
the page source.



Mike Douglass   [EMAIL PROTECTED]
Senior Systems Programmer   
Communication & Collaboration Technologies  518 276 6780(voice) 2809
(fax)
Rensselaer Polytechnic Institute 110 8th Street, Troy, NY 12180