where can i download struts-example about using tokens

2002-12-30 Thread Huy Banh
Hi all,

Im a new Struts, can anyone tell me where i can download Struts-Example
about using token for testing.

Thanks alot,
Huy

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to connect a database in SQL Server ? (NEWBIE)

2002-12-30 Thread Loren Hall

Hi, trying to help my webhost get this working for mySQL.  Previously posted

> The datasource must be registered with the application server you are
using.

I've got tomcat and apache involved, what files do I need to make changes
to?  Is registering simply copy-pasting the data-source element from
struts-config to server.xml?


thanks,
Loren

-Original Message-
From: Jitendra Singh [mailto:[EMAIL PROTECTED]]
Sent: Sunday, December 29, 2002 1:01 AM
To: Struts Users Mailing List
Subject: Re: How to connect a database in SQL Server ?


The datasource must be registered with the application server you are using.
First check if its done.

Jitendra
- Original Message -
From: "Tanmaya" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 5:44 PM
Subject: How to connect a database in SQL Server ?


Hi All,

I am new to Struts.Kindly anyone let me know, what I should do, to connect a
database in SQL Server.I have the struts-config.xml file where I defined the
datasource parameters...



  
   
  
  
  
  
  
  

  

In the Action class,I tried to access the database in perform method as
follows...

public ActionForward perform(ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response) {

Connection connection = null;
DataSource dataSource = null;
Statement statement = null;
ResultSet resultSet = null;
try {
dataSource = servlet.findDataSource(null);
connection = dataSource.getConnection();
statement = connection.createStatement();
resultSet = statement.executeQuery("select * from team_shift");
System.out.println("\n\n AFTER EXEcuting the query.");
while (resultSet.next())
{

System.out.println("Shift:"+resultSet.getString("shift_code"));
}
resultSet.close(); // just a test
} catch (SQLException sqle) {
getServlet().log("Connection.process", sqle);
} finally {

try {
connection.close();
} catch (SQLException e) {
getServlet().log("Connection.close", e);
}
}


In this way I am able to connect to the default database of SQL Server(i.e.
master) database successfully.I wanna access to my own database.How can I
achive it ??Where should I mention my database name ?? I tried by mentioning
my database name in the url property as follow :
set-property property="url"
value="jdbc:microsoft:sqlserver://tanmaya:1433/TAProd"/>

But in this way I am getting error (org.apache.jasper.JasperException:
Cannot find ActionMappings or ActionFormBeans collection) while tried to
access the jsp itself.

Please help me to knock this problem down.

Thanks in advance,
Tanmaya


--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Can we set the request encoding before populate the params?

2002-12-30 Thread xunhong li

 Hi, Can we add a config item to set the request encoding before populate the params? 
It is not convenient to transform the encoding every time when we work on Chinese or 
Janpanese platform. I knew newest tomcat support the new servlet API 
request.setCharacterEncoding().



-
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now


RE: Nasty Error when use LookupDispatchAction

2002-12-30 Thread Deepika Malik
hi,
I am using struts validate method to validate my fields.How can i set the
focus in html to a particular field on error in a particular field.
thanks in advance,
Deepika


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: problem streaming file to browser

2002-12-30 Thread Srinivas Sampige
Hi
 Sven's suggestion on returning null in "ReportAction" got me past the problem 
of not being able to run the "report generation" a second time consecutively. 
Now, another problem still remains. In "ReportAction" depending on various 
conditions I am doing processing and forwarding back to the calling page or if 
it is specifically a report generation I am returning a null(as per sven's 
suggestion). But what is happening here is if I keep doing a submit from the 
JSP only for report generation consecutively  the report generation works. 
Now, when I do a submit for another operation from the same JSP  
ReportAction does the processing and forwards back to the JSP successfully, 
but then if I hit the "report" button i.e to generate a report... 
"ReportAction" breaks down with this exception (after the stack trace I have 
typed in some of my thoughts so please read them)..

===
Error: 500
Location: /etrac/jsp/report.jsp
Internal Servlet Error:

javax.servlet.ServletException: OutputStream is already being used for this 
request
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
javax.servlet.ServletException(java.lang.Throwable)
void 
org.apache.jasper.runtime.PageContextImpl.handlePageException(java.lang.Except
ion)
void 
jsp._0002fjsp_0002freport_0002ejspreport_jsp_43._jspService(javax.servlet.http
.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void 
org.apache.jasper.runtime.HttpJspBase.service(javax.servlet.http.HttpServletRe
quest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(javax.servlet.h
ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(javax.servlet.h
ttp.HttpServletRequest, javax.servlet.http.HttpServletResponse, boolean)
void 
org.apache.jasper.servlet.JspServlet.serviceJspFile(javax.servlet.http.HttpSer
vletRequest, javax.servlet.http.HttpServletResponse, java.lang.String, 
java.lang.Throwable, boolean)
void 
org.apache.jasper.servlet.JspServlet.service(javax.servlet.http.HttpServletReq
uest, javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request
, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.facade.RequestDispatcherImpl.doForward(javax.servlet.Servlet
Request, javax.servlet.ServletResponse)
void 
org.apache.tomcat.facade.RequestDispatcherImpl.forward(javax.servlet.ServletRe
quest, javax.servlet.ServletResponse)
void 
org.apache.struts.action.ActionServlet.processActionForward(org.apache.struts.
action.ActionForward, org.apache.struts.action.ActionMapping, 
org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.process(javax.servlet.http.HttpServletR
equest, javax.servlet.http.HttpServletResponse)
void 
com.boeing.etrac.action.EtracServlet.process(javax.servlet.http.HttpServletReq
uest, javax.servlet.http.HttpServletResponse)
void 
org.apache.struts.action.ActionServlet.doPost(javax.servlet.http.HttpServletRe
quest, javax.servlet.http.HttpServletResponse)
void 
javax.servlet.http.HttpServlet.service(javax.servlet.http.HttpServletRequest, 
javax.servlet.http.HttpServletResponse)
void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, 
javax.servlet.ServletResponse)
void 
org.apache.tomcat.core.ServletWrapper.doService(org.apache.tomcat.core.Request
, org.apache.tomcat.core.Response)
void org.apache.tomcat.core.Handler.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ServletWrapper.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ContextManager.internalService(org.apache.tomcat.core.R
equest, org.apache.tomcat.core.Response)
void 
org.apache.tomcat.core.ContextManager.service(org.apache.tomcat.core.Request, 
org.apache.tomcat.core.Response)
void 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(org.apa
che.tomcat.service.TcpConnection, java.lang.Object [])
void org.a

Validator, how to control when it gets triggered

2002-12-30 Thread Swish

Hi,

I have the following situation. A user clicks on a link that gets sent to an action.  
This action retrieves info from db and fills in some info for the form bean and 
forwards to a jsp page.  This form bean uses the validator.  My problem is that the 
validator triggers before the request makes it to an action and the user sees the 
blank form, asking them to fill in the required fields.  Is there any way for me to 
fix this situation.  Any ideas are greatly appreciated.  Thank you!



-
Post your free ad now! Yahoo! Canada Personals



Re: Problem with € and multipart/form-data enctype

2002-12-30 Thread Dan Tran
I just changed one of my utf8 txt file to contain a  €  and
display back to the browser.   It works

Did you use the recommended filter in

http://www.anassina.com/struts/i18n/i18n.html ?

-Dan

- Original Message -
From: "Christophe Vigouroux" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 2:40 AM
Subject: RE : Problem with € and multipart/form-data enctype


Thanks for your reply; it helped me to go further on...

Now, I know where the problem is: it's nothing with Hibernate or Postgres.
In fact with the multipart form encoding, the characters are encoded with
Unicode (or UTF-8?). For example my € symbol is represented by the 8364
code. With the default form encoding, it was represented by the 0128 code.

My problem now is to render correctly the € symbol when it is coded by
8364... I tried to put the <%@ page contentType="text/html; charset=UTF-8"
%> directive, but it renders "€" instead of "€"... Is there another way to
render the "€" symbol another way than using the html entity € ?
Because I have the following problem: when my ActionForm is not validated,
it returns to the input page automatically and struts populate the form
fields. So when one of my fields contains the € symbol, it isn't rendered
well... and I can't replace it with the € entity, am I right?

Any help would be appreciated!


Christophe VIGOUROUX
ECILIA - Ingénieur développement
Tel: 04.78.68.46.14
Fax: 04.37.43.69.01


-Message d'origine-
De : Dan Tran [mailto:[EMAIL PROTECTED]]
Envoyé : vendredi 27 décembre 2002 18:31
À : Struts Users Mailing List
Objet : Re: Problem with € and multipart/form-data enctype

Have you try to set your jsp's content type to charset=utf-8??

The following references may help:

   - Struts upload example
   - http://www.anassina.com/struts/i18n/i18n.html

-D
- Original Message -
From: "Christophe Vigouroux" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:11 AM
Subject: Problem with Ђ and multipart/form-data enctype


Hi,

I'm developing an application using struts and hibernate for data
persistence. I have some kind of problems with special characters like the
"€" one.
When I use a standard  (so using the default
application/x-www-form-urlencoded enctype), I have no problem : the €
character is well persisted and I can load and display correctly the data
from my database (postgresql with Unicode database).

But when it comes to use multipart/form-data enctype in order to send some
file along with some text, the € character seems not to be saved correctly
in the database (it doesn't display well at all after reloading the data).
I've tried to modify a working form (from application/x-www-form-urlencoded
to multipart/form-data enctype) and the € symbol is not well saved.

I'm quite confused because when I try to debug my application, the attribute
of my form bean containing the € symbol is right (it outputs in my logger as
a € symbol...). Whatever enctype is used the character seems to be right in
the form bean, but with multipart enctype it does not save right in the
database!! Anyone as an idea of what I'm experiencing ??

Christophe Vigouroux



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:

For additional commands, e-mail:





--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Problem Using Log4J and Commons Logging with Struts

2002-12-30 Thread pqin
Sorry, I am talking about Tomcat. Maybe it is bug for JRun.

Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-Original Message-
From: Paul Hodgetts [mailto:[EMAIL PROTECTED]] 
Sent: December 30, 2002 5:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem Using Log4J and Commons Logging with Struts

Phillip Qin wrote:

 > If I only use log4j, jar has to be placed in my app's WEB-INF/lib. Don't
 > know why it is in a different directory if commons-logging and log4j work
 > together.

Just because two libraries use each other's classes doesn't mean
their classes (or jars) need to be in the same directory.  They
just need to locate each other's classes in the classpath.

A web container places WEB-INF/classes and all the jars found in
WEB-INF/lib into the classpath for the web application.  I don't
know for sure (I haven't researched the specs), but apparently
these are supposed to be placed in the classpath prior to
initializing the web application.

JRun apparently has a bug where it does not put these in the
classpath early enough, so when some components of Struts (or
something else that depends on Log4J) initialize, they can't
find the Log4J jar file, and hence the NoClassDefFoundError.

It probably works for you to just put the Log4J jar into
WEB-INF/lib under a different container, and I'd really like it
to work this way for JRun as well, but it doesn't, so I need to
put the Log4J jar and properties file into the shared server lib
directory (jrun/servers/lib) for it to work.

That is why it is in a different directory.

Regards,
Paul
-
Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Re: Problem Using Log4J and Commons Logging with Struts

2002-12-30 Thread Paul Hodgetts
Phillip Qin wrote:

> If I only use log4j, jar has to be placed in my app's WEB-INF/lib. Don't
> know why it is in a different directory if commons-logging and log4j work
> together.

Just because two libraries use each other's classes doesn't mean
their classes (or jars) need to be in the same directory.  They
just need to locate each other's classes in the classpath.

A web container places WEB-INF/classes and all the jars found in
WEB-INF/lib into the classpath for the web application.  I don't
know for sure (I haven't researched the specs), but apparently
these are supposed to be placed in the classpath prior to
initializing the web application.

JRun apparently has a bug where it does not put these in the
classpath early enough, so when some components of Struts (or
something else that depends on Log4J) initialize, they can't
find the Log4J jar file, and hence the NoClassDefFoundError.

It probably works for you to just put the Log4J jar into
WEB-INF/lib under a different container, and I'd really like it
to work this way for JRun as well, but it doesn't, so I need to
put the Log4J jar and properties file into the shared server lib
directory (jrun/servers/lib) for it to work.

That is why it is in a different directory.

Regards,
Paul
-
Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts Forwards

2002-12-30 Thread Brian McPheeters
I have developed an application using tomcat and I am not trying to make it
work with websphere. I have defined a couple of forwards in my
struts-config.xml file that do not seem to work with websphere.

When I go to http://server/context and click on a button that executes my
forward websphere tells me that it cannot find the jsp page I am trying to
forward to and tells me that this is the path that it is looking for /context/initial/signin.jsp. The correct path is /initial/signin.jsp. For some reason websphere is adding in the context
root to the path statement when looking for the resource to forward to. This
is happening on my other forwards as well. I am able to fix the problem by
removing the / at the begining of my path in the forward definition. But the
/ is required by tomcat. Here is my forward tag definition.

Works in Tomcat


Works in Websphere


I don't want to have seperate code bases for different app servers. Does
anyone know why this is happening? 


Thanks
Brian McPheeters



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: bean:write html stuff, how

2002-12-30 Thread Sash Sash

Thank you!!!
Now looking at the javadocs, I found the filter option.  It would be nice thought to 
have this mentioned in the description part of the the javadocs for bean output 
section.  I missed it earlier, cause I assumed the format for bean documentation would 
be the same as for html and logic tags where the usage is fully described in the 
description section.  I will look in the javadoc next time before I post.  Again, 
thanks!!!
 "Eric C. Hein" <[EMAIL PROTECTED]> wrote:Sash,



- Eric

- Original Message -
From: "Sash Sash" 
To: 
Sent: Sunday, December 29, 2002 11:04 AM
Subject: bean:write html stuff, how


>
> Hello and Happy Holidays to you all!!!
>
> Got a quick question. I'm trying to use property="desc"/> to output HTML code. 
>However, it seems that the bean
replaces characters like & in   with  . Is there anyway to turn
of this feature and have the bean output exactly what is given? Is there
another way to do this? I would like to use the bean tag, as I really don't
want to use tag cause I have to specify the scope. Thanks
in advance!
>
>
>
> -
> Post your free ad now! Yahoo! Canada Personals
>


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



-
Post your free ad now! Yahoo! Canada Personals



Re: ApplicationResources in UTF-8

2002-12-30 Thread Eric Tse
Hi Tom,

Thanks for sharing your experiences to me and to all in the mailing list
regarding the i18n.

I'm really interested in knowing the difficulties in building the i18n
application you mentioned below. I'm currently designing an enterprise
application. And I would like to decrease the development time and the no.
of application support problems by utilizing the struts framework.

I have made a "proof-of-concept" prototype which loads zh_CN, zh_HK and
en_US characters in UTF-8 encoding. With the help of the experts here, i
have made it work. I have also make a form-bean and corresponding actions to
retrieve the data captured from the UTF-8 browser, i can get the data
correctly displayed at the backend (in UTF-8 tomcat console) which is HPUX
11i having LANG=zh_HK.utf8

At frontend, I have tested with 3 Intel-based PCs,
1. W2K pro - locale = en_US, IE with language en_US
2. W2K pro - locale = zh_gb, IE with language zh_gb
3. W2K pro - locale = zh_hk, IE with language zh_hk

We noticed that there are conversions between the window console and HTML in
browser, i.e. when user type in characters, Windows will change the encoding
to UTF-8 from its system locale and put those internal code to the inputs. I
believe that's why i can receive the right characters.

I am thinking if there're some tricks you have noticed that I'm really
interested to know. Could you please share with me?

Thanks a lot, please comment!

Regards,
Eric

- Original Message -
From: "Tom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 29, 2002 12:13 AM
Subject: Re: ApplicationResources in UTF-8


>
> Hi,
>
> I have being struggled with the i18n of the Struts
> framework, I understand the problem that Eric is
> facing.
>
> Let me explain here what I have explored about the
> i18n given by the Struts.
>
> Bascially, the i18n ONLY supports unicode / UTF-8 page
> encoding. That is, WHATEVER LOCALE YOU USE, the page
> generated should be encoded in UTF-8. As unicode
> almost covers all the languages of this funny world,
> using unicode is the simple way for developing i18n
> application.
>
> Therefore, referring to the page,
> http://www.anassina.com/struts/i18n/i18n.html, it
> tells you to use the native2ascii program to covert
> file encoding of the resource files to UTF. And you
> will have to add, <%@ page contentType="text/html;
> charset=UTF-8" %>, into your pages to let browsers to
> use UTF-8 encoding. Otherwise, the browsers will not
> know which encoding it should use and it will use the
> default encoding.
>
> For the Eric's case, I believe that he want to
> internationalize the application using the following
> pairs of locale and corresponding charset encoding.
> locale encoding
> en_US  iso8859-1
> zh_HK  BIG5
> zh_CN  GB2312
>
> But this sort of i18n application cannot be easily
> done with Struts, unless you create some classes for
> convering encoding of "String" data from one encoding
> to another one and vice versa. For instance, if the
> ecoding of user's browser is set to BIG5, String used
> to store the data obtained from the browser will be
> set to BIG5. If the backend database server can only
> process unicode data, then data will not be stored
> properly. If the data is retrived back from the
> database, data would probably be displayed as "".
>
> I hope this problem would be addressed in the next
> release of Struts. Unicode / UTF is good for
> developing i18n application, but the majority of users
> especially the Asian users would have problems.
>
> If you visit
> http://cn.yahoo.com
> http://tw.yahoo.com
> http://hk.yahoo.com
> http://www.ibm.com/cn
> http://www.ibm.com/tw/
> http://www.ibm.com
>
> you will find that these large scale web site dos use
> specific encoding method but NOT UNICODE/UTF to
> localize their websites.
>
> Regards,
> Tom
>
> This link works for me
>
> http://www.anassina.com/struts/i18n/i18n.html
>
> -D
> - Original Message -
> From: "Eric Tse" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>;
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Friday, December 27, 2002 11:57 AM
> Subject: ApplicationResources in UTF-8
>
>
> > Hi Vipul,
> >
> > Thanks for your mail. I know what you mean. But even
> I tried to set
> the
> > locale to hk, it works neither :)
> >
> > I know the root cause to my problem. The filename of
> application
> resource
> > should be "ApplicationResources_zh-HK.properties"
> instead of
> > "ApplicationResources_zh_hk.properties".
> >
> > rana >> thanks!
> >
> > BTW, when i load the message resource file in UTF-8
> formats, the
> browser
> > windows does not change the default encoding to
> UTF-8. I can see the
> > characters correctly if i manually switch the
> browser codeset.
> >
> > But when I added page
> contentType="text/html;charset=utf-8" or
> > "pageEncoding=utf-8" at JSP page directive, the
> characters become
> > unrecognized symbols. I also tried to include
> > contentType="text/html;charset=

Re: Best Practice for Forwarding to a Tile?

2002-12-30 Thread Jim Theodoridis
I works. 
Itr Works

Thank U very much!!!

I am awaiting news about my old problem!! 

> 
>   Hum, sound like a bug. I will investigate on that.
> 
>   In the meantime, you can use the old action:
> type="org.apache.struts.tiles.actions.NoOpAction">
>   
> 
> 
>   It should work (I hope).
>   Cedric
> 
> 
> Jim Theodoridis wrote:
> 
> >Yes it does.
> >...
> >  
> >   
> >   
> >  
> >...
> >
> >If i use 
> >
> > >type="gr.tera.mailclient.contacts.ShowContactsAction" >
> >   
> >
> >
> >works fine. The problem is when I use
org.apache.struts.actions.ForwardAction
> >
> >For now I use an extra jsp page like compose.jsp 
> >
> ><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
> >
> >
> >But i don't want to create extra pages. i want to work with tiles
> >
> >Thanx
> >  
> >
> >>  Does .compose exist in your tiles config file ?
> >>
> >>  Apparently, the TilesRequestProcessor doesn't catch the name 
> >>".compose", which means that it doesn't exist in the factory.
> >>
> >>  Cedric
> >>
> >>Jim Theodoridis wrote:
> >>
> >>
> >>
> >>>Yes.
> >>>
> >>>I use struts 1.2b2
> >>>
> >>>I have the following entries in struts-config.xml 
> >>>
> >>>
> >>> >>>   type="gr.tera.mailclient.contacts.ShowContactsAction" >
> >>>  
> >>>
> >>>  
> >>> >>>   type="org.apache.struts.actions.ForwardAction"
> >>>   parameter=".compose"/>
> >>>
> >>>...
> >>>
> >>>
> >>>The 1st works fine but the on the 2nd i am getting the message 
> >>>
> >>>javax.servlet.ServletException: Path .compose does not start with a "/"
> >>>character
> >>>   at
> >>>  
> >>>
>
>>org.apache.struts.action.RequestProcessor.processException(RequestProcessor.ja
v
> >>
> >>
> >a
> >  
> >
> >>>:507)
> >>>   at
> >>>  
> >>>
>
>>org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcesso
r
> >>
> >>
> >.
> >  
> >
> >>>java:448)
> >>>..
> >>>
> >>>Thanx
> >>>
> >>>
> >>>
> >>>--
> >>>To unsubscribe, e-mail:  
> >>>  
> >>>
> >
> >  
> >
> >>>For additional commands, e-mail:
> >>>  
> >>>
> >
> >  
> >
> >>> 
> >>>
> >>>  
> >>>
> >>--
> >>To unsubscribe, e-mail:  

> >>For additional commands, e-mail:

> >>
> >>
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:  

> >For additional commands, e-mail:

> >
> >
> >  
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Global Exception Handlers

2002-12-30 Thread pqin
What kind of detail you are looking at?

Regards,
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"


-Original Message-
From: Michael Marrotte [mailto:[EMAIL PROTECTED]] 
Sent: December 30, 2002 1:00 PM
To: Struts Users Mailing List
Subject: Global Exception Handlers

Do you know of any good reading that elaborates on writing a global
exception handlers for Struts?

I've already read
http://jakarta.apache.org/struts/userGuide/building_controller.html#exceptio
n_handler ,

but am looking for more detail or a tutorial.

Thanks,

--Mike


--
To unsubscribe, e-mail:

For additional commands, e-mail:




Global Exception Handlers

2002-12-30 Thread Michael Marrotte
Do you know of any good reading that elaborates on writing a global
exception handlers for Struts?

I've already read
http://jakarta.apache.org/struts/userGuide/building_controller.html#exceptio
n_handler ,

but am looking for more detail or a tutorial.

Thanks,

--Mike


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Best Practice for Forwarding to a Tile?

2002-12-30 Thread Cedric Dumoulin

 Hum, sound like a bug. I will investigate on that.

 In the meantime, you can use the old action:

 


 It should work (I hope).
 Cedric


Jim Theodoridis wrote:


Yes it does.
...
 
	  
	  
 
...

If i use 


   type="gr.tera.mailclient.contacts.ShowContactsAction" >
  


works fine. The problem is when I use org.apache.struts.actions.ForwardAction

For now I use an extra jsp page like compose.jsp 

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>


But i don't want to create extra pages. i want to work with tiles

Thanx
 

 Does .compose exist in your tiles config file ?

 Apparently, the TilesRequestProcessor doesn't catch the name 
".compose", which means that it doesn't exist in the factory.

 Cedric

Jim Theodoridis wrote:

   

Yes.

I use struts 1.2b2

I have the following entries in struts-config.xml 



  type="gr.tera.mailclient.contacts.ShowContactsAction" >
 

 

  type="org.apache.struts.actions.ForwardAction"
  parameter=".compose"/>

...


The 1st works fine but the on the 2nd i am getting the message 

javax.servlet.ServletException: Path .compose does not start with a "/"
character
	at
 

org.apache.struts.action.RequestProcessor.processException(RequestProcessor.jav
   

a
 

:507)
	at
 

org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor
   

.
 

java:448)
..

Thanx



--
To unsubscribe, e-mail:  
 


 

For additional commands, e-mail:
 


 



 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


   



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Best Practice for Forwarding to a Tile?

2002-12-30 Thread Jim Theodoridis
Yes it does.
...
  
  
  
  
...

If i use 


   


works fine. The problem is when I use org.apache.struts.actions.ForwardAction

For now I use an extra jsp page like compose.jsp 

<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>


But i don't want to create extra pages. i want to work with tiles

Thanx
> 
>   Does .compose exist in your tiles config file ?
> 
>   Apparently, the TilesRequestProcessor doesn't catch the name 
> ".compose", which means that it doesn't exist in the factory.
> 
>   Cedric
> 
> Jim Theodoridis wrote:
> 
> >Yes.
> >
> >I use struts 1.2b2
> >
> >I have the following entries in struts-config.xml 
> >
> >
> > >type="gr.tera.mailclient.contacts.ShowContactsAction" >
> >   
> >
> >   
> > >type="org.apache.struts.actions.ForwardAction"
> >parameter=".compose"/>
> >
> >...
> >
> >
> >The 1st works fine but the on the 2nd i am getting the message 
> >
> >javax.servlet.ServletException: Path .compose does not start with a "/"
> >character
> > at
>
>org.apache.struts.action.RequestProcessor.processException(RequestProcessor.jav
a
> >:507)
> > at
>
>org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor
.
> >java:448)
> >..
> >
> >Thanx
> >
> >
> >
> >--
> >To unsubscribe, e-mail:  

> >For additional commands, e-mail:

> >
> >
> >  
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RE: RE: Struts - XML/XSL

2002-12-30 Thread Puneet Agarwal
I found that bit of information in mail archives of struts user 
list.
Hope it helps.
Regards
Puneet

On Mon, 30 Dec 2003 Jacob Hookom wrote :
Has anyone successfully developed an XSLT filter that could be 
used with
MVC frameworks yet?

-Original Message-
From: Puneet Agarwal [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: RE: Struts - XML/XSL

Jeff,
This looks good, but this may not suit us as well as struts
does.
We had tough time convincing our mgmt/client to accept struts, 
no
way they can accept another opensource, they are convinced of
apache/jakarta projects now.

moreover 90% of our screens have to be in HTML.
There are few (one Module) wherein we require this XML stuff 
for
hand handelled devices and some Swing clients.

If struts does not have this featuer we will have to build it 
for
ourselves. Our seniors as well have liked the approach of a 
custom
tag library.

I don't know if I can ask about this in developers forum.
Would be nice if someone of the committers could say something 
on
this.
Regards
Puneet

On Mon, 30 Dec 2003 Schnitzer, Jeff wrote :
>Take a look at the Maverick MVC framework
>(http://mav.sourceforge.net).  It is Struts-like in concept, 
but
>you can run any model through an arbitrary pipeline of XSLT 
(and
>several other) transformations in Cocoon-like fashion.  The
>pipeline will be efficiently connected with SAX events if
>appropriate.  As an example, you can easily run your model
>through an XSLT transformation and then through a FOP
>transformation to send PDF back to the client.
>
>Using the optional Domify module, you don't even need JSP to
>generate the XML in the first place.  The Domify adapter uses
>reflection to create a lazily-loaded DOM façade of your model
>directly.  This is much more efficient than generating and
>parsing text XML.
>
>Try it out :-)
>
>Jeff Schnitzer
>
> > -Original Message-
> > From: Puneet Agarwal [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 27, 2002 11:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Struts - XML/XSL
> >
> > I know that this topic has been dicsussed in this forum a
>number
> > of times.
> > I came to know this from mail archives, but my question
>still
> > remains unanswered.
> >
> > In our application we have to generate some XML documents
>apart
> >  from HTML screens.
> > The intent here is to send these XML documents to a Swing
>client
> > through a socket.
> >
> > there is also a possibility that some of the screens may 
be
> > required in both HTML and Swing.
> >
> > I have been searching for information on this for past few
>days.
> >
> > one of the nice option that I cam acorss is described on 
URL
> >
> >
>http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html
> >
> > while going through the struts mail archives, I came acorss 
a
>mail
> > written by Craig on 06/12/2000
> >
> > the mail can be accessed on link
> >
> >
>http://www.servlets.com/archive/servlet/ReadMsg?msgId=18247&listName=st
rut
> > s-dev
> >
> > Here Craig talks about developing some facility within
>struts
> > which could do the same.
> >
> > Does struts have such a facility.
> >
> > Would be grateful if someone cuold give some tips/links,
>which
> > could help me in deciding as what is the best option.
> >
> >
> > Regards
> > Puneet Agarwal
> >
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>
> > For additional commands, e-mail:  > [EMAIL PROTECTED]>
> >
>


Regards
Puneet Agarwal

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   

For additional commands, e-mail: 




Regards
Puneet Agarwal

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts-el Jsp compilation problem

2002-12-30 Thread Karr, David
It appears that there's some problem getting to your message resources or your Struts 
configuration, I'm not sure.  Can you upgrade to a newer stable version of Tomcat?

> -Original Message-
> From: Fabrice BLANQUART [mailto:[EMAIL PROTECTED]]
> 
> Hi,
> 
> I am using Netbeans 3.4 and I try to test struts-el.
> 
> When I try to compile a JSP with a html-el tag like 
> " the following error :
> 
> login.jsp [-1:-1] java.lang.ExceptionInInitializerError
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:130)
> at 
> org.apache.strutsel.taglib.html.ELTextTagBeanInfo.class$(ELTex
> tTagBeanInfo.java:91)
> at 
> org.apache.strutsel.taglib.html.ELTextTagBeanInfo.getPropertyD
> escriptors(ELTextTagBeanInfo.java:91)
> at 
> java.beans.Introspector.getTargetPropertyInfo(Introspector.java:420)
> at java.beans.Introspector.getBeanInfo(Introspector.java:361)
> at java.beans.Introspector.getBeanInfo(Introspector.java:132)
> at 
> org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCach
> e.java:116)
> at 
> org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGene
> rator.java:146)
> at 
> org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.
> addGenerator(AnalyzerParseEventListener.java:156)
> at 
> org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.
> handleTagBegin(AnalyzerParseEventListener.java:955)
> at 
> org.apache.jasper.compiler.DelegatingListener.handleTagBegin(D
> elegatingListener.java:221)
> at 
> org.apache.jasper.compiler.DelegatingListener.handleTagBegin(D
> elegatingListener.java:216)
> at 
> org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:852)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
> at 
> org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:892)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
> at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
> at 
> org.apache.jasper.compiler.ParserController.parse(ParserContro
> ller.java:214)
> at 
> org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatPar
> ser(JspParserImpl.java:130)
> at 
> org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(J
> spParserImpl.java:97)
> at 
> org.netbeans.modules.web.core.jsploader.JspDataObject.createCo
> mpiler(JspDataObject.java:323)
> at 
> org.netbeans.modules.web.core.jsploader.JspCompilerSupport.add
> ToJob(JspCompilerSupport.java:67)
> at 
> org.openide.loaders.CompilerSupport.prepareJobFor(CompilerSupp
> ort.java:183)
> at 
> org.openide.loaders.CompilerSupport.prepareJob(CompilerSupport
> .java:150)
> at 
> org.openide.actions.AbstractCompileAction.compileNodes(Abstrac
> tCompileAction.java:106)
> at 
> org.openide.actions.AbstractCompileAction.performAction(Abstra
> ctCompileAction.java:47)
> at 
> org.openide.util.actions.NodeAction.performAction(NodeAction.java:179)
> at 
> org.openide.util.actions.NodeAction.actionPerformed(NodeAction
> .java:170)
> at 
> org.netbeans.core.ModuleActions$1.run(ModuleActions.java:100)
> at org.openide.util.Task.run(Task.java:136)
> at 
> org.openide.util.RequestProcessor$Processor.run(RequestProcess
> or.java:599)
> Caused by: java.lang.NullPointerException
> at 
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources.java:577)
> at 
> org.apache.struts.taglib.html.BaseHandlerTag.(BaseHand
> lerTag.java:96)
> ... 34 more
> Errors compiling login.
> 
> I try with the "exercise-taglib" example and I get the same error.
> 
> It seems to be a problem with the Tomcat 4.0.4 jsp compiler.
> 
> Any help to make it work .
> -- 
> Fabrice BLANQUART
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   

For additional commands, e-mail: 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Best Practice for Forwarding to a Tile?

2002-12-30 Thread Cedric Dumoulin

 Does .compose exist in your tiles config file ?

 Apparently, the TilesRequestProcessor doesn't catch the name 
".compose", which means that it doesn't exist in the factory.

 Cedric

Jim Theodoridis wrote:

Yes.

I use struts 1.2b2

I have the following entries in struts-config.xml 



   type="gr.tera.mailclient.contacts.ShowContactsAction" >
  

  

   type="org.apache.struts.actions.ForwardAction"
   parameter=".compose"/>

...


The 1st works fine but the on the 2nd i am getting the message 

javax.servlet.ServletException: Path .compose does not start with a "/"
character
	at
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java
:507)
	at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:448)
..

Thanx



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE: Struts - XML/XSL

2002-12-30 Thread Jacob Hookom
Has anyone successfully developed an XSLT filter that could be used with
MVC frameworks yet?

-Original Message-
From: Puneet Agarwal [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 30, 2002 7:27 AM
To: [EMAIL PROTECTED]
Subject: Re: RE: Struts - XML/XSL

Jeff,
This looks good, but this may not suit us as well as struts 
does.
We had tough time convincing our mgmt/client to accept struts, no 
way they can accept another opensource, they are convinced of 
apache/jakarta projects now.

moreover 90% of our screens have to be in HTML.
There are few (one Module) wherein we require this XML stuff for 
hand handelled devices and some Swing clients.

If struts does not have this featuer we will have to build it for 
ourselves. Our seniors as well have liked the approach of a custom 
tag library.

I don't know if I can ask about this in developers forum.
Would be nice if someone of the committers could say something on 
this.
Regards
Puneet

On Mon, 30 Dec 2003 Schnitzer, Jeff wrote :
>Take a look at the Maverick MVC framework 
>(http://mav.sourceforge.net).  It is Struts-like in concept, but 
>you can run any model through an arbitrary pipeline of XSLT (and 
>several other) transformations in Cocoon-like fashion.  The 
>pipeline will be efficiently connected with SAX events if 
>appropriate.  As an example, you can easily run your model 
>through an XSLT transformation and then through a FOP 
>transformation to send PDF back to the client.
>
>Using the optional Domify module, you don't even need JSP to 
>generate the XML in the first place.  The Domify adapter uses 
>reflection to create a lazily-loaded DOM façade of your model 
>directly.  This is much more efficient than generating and 
>parsing text XML.
>
>Try it out :-)
>
>Jeff Schnitzer
>
> > -Original Message-
> > From: Puneet Agarwal [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 27, 2002 11:16 AM
> > To: [EMAIL PROTECTED]
> > Subject: Struts - XML/XSL
> >
> > I know that this topic has been dicsussed in this forum a 
>number
> > of times.
> > I came to know this from mail archives, but my question 
>still
> > remains unanswered.
> >
> > In our application we have to generate some XML documents 
>apart
> >  from HTML screens.
> > The intent here is to send these XML documents to a Swing 
>client
> > through a socket.
> >
> > there is also a possibility that some of the screens may be
> > required in both HTML and Swing.
> >
> > I have been searching for information on this for past few 
>days.
> >
> > one of the nice option that I cam acorss is described on URL
> >
> > 
>http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html
> >
> > while going through the struts mail archives, I came acorss a 
>mail
> > written by Craig on 06/12/2000
> >
> > the mail can be accessed on link
> >
> > 
>http://www.servlets.com/archive/servlet/ReadMsg?msgId=18247&listName=st
rut
> > s-dev
> >
> > Here Craig talks about developing some facility within 
>struts
> > which could do the same.
> >
> > Does struts have such a facility.
> >
> > Would be grateful if someone cuold give some tips/links, 
>which
> > could help me in deciding as what is the best option.
> >
> >
> > Regards
> > Puneet Agarwal
> >
> > --
> > To unsubscribe, e-mail:    > [EMAIL PROTECTED]>
> > For additional commands, e-mail:  > [EMAIL PROTECTED]>
> >
>


Regards
Puneet Agarwal

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Best Practice for Forwarding to a Tile?

2002-12-30 Thread Jim Theodoridis
Yes.

I use struts 1.2b2

I have the following entries in struts-config.xml 



   

   


...


The 1st works fine but the on the 2nd i am getting the message 

javax.servlet.ServletException: Path .compose does not start with a "/"
character
at
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java
:507)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:448)
..

Thanx



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: redirect attribute (newbie)

2002-12-30 Thread pqin
Why don't you do it in your struts config xml? If authenticated, return a
forward for action/getaccountinformation; if failed, return mapping.getInput
(u need to define input as login page)?

Regards,
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"


-Original Message-
From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] 
Sent: December 30, 2002 8:02 AM
To: [EMAIL PROTECTED]
Subject: redirect attribute (newbie)

Hi,

I have a loginAction. If login is successfu, I want to perform another
action as follows.



I am not sure whether to use true or false for "redirect". What is the
difference and which one should I use in this case?

Thanks,
Suresh




RE: logon servlet through html forms "resource not available"

2002-12-30 Thread pqin
In your html, action="/logon.do"; in your struts config xml, define 

Regards,
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"


-Original Message-
From: Loren Hall [mailto:[EMAIL PROTECTED]] 
Sent: December 28, 2001 6:07 PM
To: Struts Users Mailing List
Subject: logon servlet through html forms "resource not available"

New to this and can't access /logon action through a standard html form

I'm integrating some struts functionality with a pre-existing, html based
site.  At index.html I'd like a login form, but don't want to force a change
to index.jsp.  However, i've tried action="logon",
action="/summershow/logon" and it says The requested resource (/logon) is
not available. I figure it's a path issue vs. an access issue, but for all I
know an html form just won't work.


First, any thoughts why the following html form tag won't work, and second,
what is the standard solution for this situation, .jsp or .html?








responds with

type: Status report
message: /logon
description: The requested resource (/logon) is not available.


The servlet is under catalina/webapps/summershow/WEB-INF/ . . .  The working
code looks like this.



  User Name:   
Password:
  
  






--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: Problem Using Log4J and Commons Logging with Struts

2002-12-30 Thread pqin
If I only use log4j, jar has to be placed in my app's WEB-INF/lib. Don't
know why it is in a different directory if commons-logging and log4j work
together.

Regards,
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"


-Original Message-
From: Paul Hodgetts [mailto:[EMAIL PROTECTED]] 
Sent: December 28, 2002 12:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem Using Log4J and Commons Logging with Struts

Eddie Bush wrote:

 > Add two files to your WEB-INF/classes directory:
[...]
 > That should fix things, I believe.  The commons-logging package
 > is going to expect that you want to use Log4J if you have the
 > Log4J JAR in the classpath (ie your WEB-INF/lib directory).
 > It's not going to "work" correctly until you configure it
 > properly though (at least, it never has for me).

Thanks for the reply.  I tracked down what was happening.

The error was a NoClassDefFoundError on org/apache/log4j/Layout,
despite the fact that I have log4j-1.2.7.jar and log4j.properties
in the WEB-INF/lib directory.  So it looks like the server is
looking for Log4J as the web app is actually being loaded and
prior to the web app's jars being put in its classpath.

I put the jar and the properties file into the lib directory for
the server, in this case JRun puts them in jrun/servers/xxx/lib
(for a server named xxx).  Now it loads the web app properly
without the error.

I don't like this, because it means my web app can't be self-
contained and distributed just as the war.  I'd have to look at
the specs to see if JRun is behaving correctly by not putting the
web app's jars in the classpath prior to initializing the web app,
but even if it is behaving incorrectly, that's the way it works,
so I guess I have to deal with it.

I hope maybe this helps someone else...

Thanks to everyone who replied,
Paul
-
Paul Hodgetts -- President, Principal Consultant
Agile Logic -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA


--
To unsubscribe, e-mail:

For additional commands, e-mail:




RE: problem streaming file to browser

2002-12-30 Thread pqin
Did you return null? Since u write as pdf, you can only return null as
forward.

Regards,
 
 
Phillip Qin
 
"This Guy Thinks He Knows Everything"


-Original Message-
From: Srinivas Sampige [mailto:[EMAIL PROTECTED]] 
Sent: December 27, 2002 7:34 PM
To: Struts Users Mailing List
Subject: RE: problem streaming file to browser

Hi
 Thanks for your reply.The code you have supplied is on the lines of what I
am 
doing. Here is what happens. First time the action is run the PDF comes out 
fine to the nrowser but with this message on the server side -

2002-12-27 15:39:46 - Ctx( /etrac ): IllegalStateException in: R( /etrac + 
/reportAction.do + null) Cannot forward as OutputStream or Writer has
already 
been obtained

   Then I cannot generate the PDF again until I execute another action by
say 
... doing back to the main menu of my web app(through another action) OR say

by logging out. I get the same "IllegalStateException" error in another
simple 
test Action that I put together. Can somebody help me? The same thing works 
fine in as servlet. So, I am not able to understand what is special about a 
Struts Action! Should I be doing something else?. Here are snippets of my 
code-

public abstract class EtracAction extends EtacAction
{
   public ActionForward perform(ActionMapping mapping,ActionForm form 
,HttpServletRequest request, HttpServletResponse response) throws
IOException,
  ServletException
{
   
   
   return performAction(mapping, form, request, response,userSessionInfo);
 
}

public abstract ActionForward performAction(ActionMapping mapping,
ActionForm 
form, HttpServletRequest request, HttpServletResponse response, 
UserSessionInfo userSessionInfo) throws IOException, ServletException;

}//end of EtracAction



---
ReportAction extends EtracAction 
{
  public org.apache.struts.action.ActionForward performAction   
(org.apache.struts.action.ActionMapping mapping, 
org.apache.struts.action.ActionForm form, 
javax.servlet.http.HttpServletRequest request, 
javax.servlet.http.HttpServletResponse response, UserSessionInfo 
userSessionInfo)
throws javax.servlet.ServletException, java.io.IOException
 {

 byte[] reportBuffer = reportManager.generateReport(userSessionInfo);
 String fileName = "";
 //write the pdf to the response
 if (reportBuffer != null)
 {
 response.setContentType("application/pdf");
 response.setHeader("Window-target","report_window");
 fileName = "etracPdfReport.pdf";
 ServletOutputStream sout = response.getOutputStream(); //THIS IS THE
CODE 
THAT FAILS THE SECOND TIME AROUND,HAVE TO EXECUTE ANOTHER ACTION BEFORE 
ANOTHER PDF CAN BE STREAMED BACK TO BROWSER.
 sout.write(reportBuffer);

 //sout.flush();  //tried these two lines to avoid above error
 //sout.close();  //but no improvement.

 }
 return mapping.findForward(Forwards.REPORT_PAGE);
 }//end of performaction
}//end of ReportAction



thanks in advance

Srinivas





>= Original Message From "Struts Users Mailing List" 
<[EMAIL PROTECTED]> =
>stmt is an Oracle BFILE
>
>InputStream in = null ;
>BufferedInputStream bis = null ;
>ServletOutputStream writer = null ;
>
>try
>{
>stmt.openFile() ;
>in = stmt.getBinaryStream() ;
>bis = new BufferedInputStream(in) ;
>int length ;
>byte[] buf = new byte[512] ;
>writer = response.getOutputStream() ;
>response.setContentType("application/pdf") ;
>while ((length=bis.read(buf))!= -1)
>{
>writer.write(buf) ;
>}
>}
>finally
>{
>if (writer != null)
>writer.close() ;
>if (in != null)
>in.close() ;
>if (bis != null)
>bis.close() ;
>if (stmt != null)
>stmt.closeFile() ;
>}
>
>Regards,
>
>
>Phillip Qin
>
>"This Guy Thinks He Knows Everything"
>
>
>-Original Message-
>From: Srinivas Sampige [mailto:[EMAIL PROTECTED]]
>Sent: December 27, 2002 2:39 PM
>To: [EMAIL PROTECTED]
>Subject: problem streaming file to browser
>
>Hi
> I havene an action in which I am streaming a PDF file to the browser. I am
>doing that by doing a response.getOutputStream() in the action and writing
>to
>the resulting ServletOutputStream. The first time it works fine, the PDF
>appears on the browser but with an illegal state exception on the console
on
>
>the server side. The next time the user chooses to download a file and the
>same action is run again I get an error saying that the the servlet output
>stream has already been obtained and the PDF does not appear. The user has
>to
>log out of the web application and then log back on for the PDF download to
>work. Could anybody give me an idea what is going wrong? What is the best
>way
>to code this functionality? Could somebody provide OR point me to some
>sou

RE: multibox problem - No getter method

2002-12-30 Thread Sterin, Ilya
Make sure you have the first letter as lower case, in your jsp file, so
say...

public void setAcChecked(...)
public String[] getAcChecked(...)


in jsp make sure that it's acChecked, as it will append and get or set and
capitalize the first letter.

Ilya

-Original Message-
From: kiuma [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 8:33 AM
To: Struts Users Mailing List
Subject: Re: multibox problem - No getter method


David Rothschadl ha scritto:

>Kiuma,
>It looks like you need to change your property "caChecked" to "acChecked"
> David R
>
>
> kiuma <[EMAIL PROTECTED]> wrote:hello,
>On some forms I have a no getter method error , and I can't see the reason.
>
>The problem doesn't exist if I use for ex. a html-el.text element.
>
>This is my form
>
>public class ActivityCenterForAgendaForm extends ActionForm {
>
>private String str;
>private String acChecked[];
>private Collection activityCenters;
>
>
>/** Creates a new instance of CustomerEditForm */
>public ActivityCenterForAgendaForm() {
>super();
>activityCenters = new Vector();
>resetFields();
>}
>
>/**
>* Restets all fields
>*/
>public void resetFields ()
>{
>str = "ciao";
>acChecked = new String[0];
>activityCenters.clear();
>}
>
>
>public void reset(ActionMapping mapping, HttpServletRequest req)
>{
>resetFields();
>}
>
>//Setters
>
>public void setStr(String str) {
>this.str = str;
>}
>
>public void setAcChecked(String acChecked[]) {
>this.acChecked = acChecked;
>}
>
>public void setActivityCenters(Collection activityCenters) {
>this.activityCenters = activityCenters;
>}
>
>
>//Getters
>
>public String getStr()
>{
>return this.str;
>}
>
>public String[] getAcChecked()
>{
>return acChecked;
>}
>
>public Collection getActivityCenters() {
>return this.activityCenters;
>}
>
>public int getActivityCentersSize() {
>return this.activityCenters.size();
>}
>
>
>/**
>* Called by the framework to validate the customer's data
>* @return On success returns an empty ActionErrors
>*/
>public ActionErrors validate( ActionMapping mapping,
>HttpServletRequest req) {
>ActionErrors result = new ActionErrors();
>
>return result;
>}
>}
>
>
>When I access to the relative page I have the following error:
>WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
>javax.servlet.jsp.JspException: No getter method available for property
>caChecked for bean under name org.apache.struts.taglib.html.BEAN
>at
>org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
>at
>precompiled.secure.activitycenterforagenda._jspService(activitycenterforage
nda.java:164)
>at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>
>Please help
>kiuma
>
>
>--
>To unsubscribe, e-mail:
>For additional commands, e-mail:
>
>
>Remember:
>Peace, Love & Understanding
>Always
>
>David R
>
>
Sorry I've done it yet but nothing happens (write & rewrite makes some
misspell error ;-P)



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [Validator] Client-side works, but not server-side

2002-12-30 Thread Matt Raible <[EMAIL PROTECTED]>
Actually, I'm not getting the famous Struts blank screen of
nothingness, but rather, it seems that validation is just not kicking
in - it routes me to my success page.

I am using the forwardInput="true" on my  element and have
the input specified as "editProfile" where my forward is below:



I've tried using the path instead (input="/userProfile.do") and it
doesn't seem to work either.  I'm sure it's something simple, I just
can't seem to figure it out right now.

Thanks,

Matt

--- In [EMAIL PROTECTED], "Michelle Wynn" <[EMAIL PROTECTED]> wrote:
> 
> I assume you are only getting nothing when the server side validation
> fails.  If you are getting nothing when the validation doesn't fail
that is
> another problem.
> 
> If it is the former, I suspect your problem is related to your input
> parameter in the action mapping.  I had a similar situation (blank
screen
> when server side validation failed and javascript was turned off). 
Turned
> out Input was set to an invalid path, once it was corrected, it
worked like
> a charm.
> 
> 
> 
> 
>
  
>   "Matt Raible"
  
>
>   ns.com>  cc: 
  
>Subject:  [Validator]
Client-side works, but not server-side   
>   12/29/2002 05:58 
  
>   PM   
  
>   Please respond to
  
>   "Struts Users
  
>   Mailing List"
  
>
  
>
  
> 
> 
> 
> 
> I have the following defined in validation.xml:
> 
>   
> 
> depends="required,email">
>name="required"
> key="errors.required"/>
>name="email"
> key="errors.email"/>
> 
>   
>   
> 
>   
> 
> And this works great for prompting me with client-side validation, but
> when I turn off Javascript to test server-side validation, I get
> nothing.  Any ideas?  I'm using inputForward="true" on my ,
> but I changed to be a regular path to "/editProfile.do" and still I get
> no server-side validation.  Here is my action-mapping:
> 
>name="userForm" scope="session" input="/userProfile.do"
>   parameter="action" unknown="false" validate="true"/>
> 
> Any ideas?  I'm fairly confident that I have things configured
> correctly, as the client-side validation works.  Suggestions are
> appreciated.
> 
> Thanks,
> 
> Matt
> 
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: login mechanism

2002-12-30 Thread Matt Raible <[EMAIL PROTECTED]>
I have my ActionServlet mapped to "*.do" and an ActionFilter mapped to
that same url-pattern.  In ActionFilter, I check to see if there is a
UserForm in the session, and secondly to see if
request.getRemoteUser() returns null.  If either of these occur, I
call my Business Delegate (UserManager in my case) to get the user's
information. Currently, it talks to a database to get the information,
but it easily could talk to a Directory Server like LDAP.  Here's some
code from my doFilter method:

UserForm userForm = (UserForm)
session.getAttribute(Constants.USER_KEY);
ServletContext ctx = filterConfig.getServletContext();
String username = request.getRemoteUser();

// user authenticated, empty user object
if ((username != null) && (userForm == null)) {
try {
UserManager mgr = new UserManagerImpl((String)
ctx.getAttribute(Constants.DAO_TYPE));
UserForm user = mgr.getUser(username);
session.setAttribute(Constants.USER_KEY, user);
} catch (Exception e) {
log.error("Error getting user's information", e);
e.printStackTrace();

ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("errors.general"));

while (e != null) {
errors.add(ActionErrors.GLOBAL_ERROR,
   new ActionError("errors.detail",
e.getMessage()));
e = (Exception) e.getCause();
}

request.setAttribute(Globals.ERROR_KEY, errors);

// forward to the error page
RequestDispatcher dispatcher =
request.getRequestDispatcher("/error.jsp");
dispatcher.forward(request, response);

return; // stop processing
}
}



--- In [EMAIL PROTECTED], usha <[EMAIL PROTECTED]> wrote:
> Hi
> 
> can you tell me briefly how you are using filtes in security-example 
> application.
> 
> Thanks
> usha
> 
> Matt Raible wrote:
> 
> >You could use a filter to map to all your protected resources.  This 
> >is what I do in the security-example application I recently wrote.  
> >You can download the source at:  
> >
> >http://javawebapps.com/downloads/security-example.zip (14MB)
> >
> >HTH,
> >
> >Matt
> >
> >--- In [EMAIL PROTECTED], usha <[EMAIL PROTECTED]> wrote:
> >  
> >
> >>Hi
> >>
> >>Sorry what you mean by proxy. i didn't get you actually i wanted 
> >>
> >>
> >to 
> >  
> >
> >>authenticate logged in user against the users that are there in 
> >>
> >>
> >the 
> >  
> >
> >>database, and when ever they bookmark some page and if they go to 
> >>
> >>
> >that 
> >  
> >
> >>page directly i wanted to display the login page after they login 
> >>sussefully only . right now with form based authentication i am 
> >>
> >>
> >getting 
> >  
> >
> >>this , but i had some drawbacks as i mentioned in the previous 
> >>
> >>
> >mail. is 
> >  
> >
> >>there a standard way i can use for user login checks.
> >>
> >>thanks
> >>usha
> >>
> >>Eddie Bush wrote:
> >>
> >>
> >>
> >>>Write a proxy to retrieve the user data you wish to put in the 
> >>>session. The proxy will check to see if a user has been 
> >>>  
> >>>
> >authenticated 
> >  
> >
> >>>(request.getUserPrincipal() != null), and, if they have, it will 
> >>>  
> >>>
> >check 
> >  
> >
> >>>to see if your user data has been created yet.  If it has, it 
> >>>  
> >>>
> >will 
> >  
> >
> >>>just take it from the session and return it.  If it hasn't, it 
> >>>  
> >>>
> >will 
> >  
> >
> >>>create it, save it to the session, and return it.
> >>>
> >>>That help?
> >>>
> >>>usha wrote:
> >>>
> >>>  
> >>>
> Hi
> 
> i am new to structs. right now i am using in my project form 
> 
> 
> >based 
> >  
> >
> authentication. with this i have some problems like i cannot 
> instantiate some of session veriable upon logging etc. is there 
> 
> 
> >any 
> >  
> >
> standard mechnism for loging using sturcts. i am using JBoss as 
> 
> 
> >my 
> >  
> >
> application server.
> 
> Thanks in advance
> usha.. 
> 
> 
> >>>  
> >>>
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:   
> >>For additional commands, e-mail: 
> >>
> >>
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> >  
> >
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to call Action Bean Without doing any action by User

2002-12-30 Thread Mark
Define a start action or something and point there..

Forward to the welcome page, or perhaps not depend on whether your "some
action" is happy.. (i.e. Doesn't throw an exception, or fail anything).




On 30-12-2002 13:32, "Shabbir Khadir Mohammed" <[EMAIL PROTECTED]>
wrote:

> 
> Hi All
> I want to do some Action before displaying one JSP page let's say.
> How to achieve that one...???
> I.e before displaying welcome.jsp if I want to call an Action Bean.
> 
> How shall I proceed.
> 
> Any suggestions..!!!
> 
> 
> Regards
> Shabbir
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to get a reference to an Action instance

2002-12-30 Thread Kris Schneider
As others have said, it's unclear exactly what it is you need to do, but here's
a general suggestion for having a tag handler and action play nicely together -
use scoped attributes. In other words, if your tag handler needs some
information from your action, have the action place the information in a request
(or session or application) attribute that the handler can access through its
current PageContext. Of course, this implies that the action operates on the
request before the JSP...

Quoting Martin Cooper <[EMAIL PROTECTED]>:

> On Sun, 29 Dec 2002, Lirian Ostrovica wrote:
> 
> > Hi,
> >
> > I need to access an Action instance (I have its class name) while
> > writting a Tag.
> >
> > I have seen that ActionServlet stores Action instances in a 'protected'
> > variable (FastHashMap), and so far the only way I can see, is to extend
> > ActionServlet and write my own 'public' method to do the job.
> > But of course I do not prefer to extend ActionServlet just for that...
> 
> Even if you know the class name, there is no guarantee that an instance of
> that Action exists, since Action instances are created as needed. And even
> if an instance does exist, what would be the purpose of accessing it? An
> Action instance should not maintain state, since that will cause threading
> problems, and if you need to access class data, then you do not need an
> instance.
> 
> Perhaps if you tell us what you are trying to achieve, we can help you
> find the right way to do that.
> 
> --
> Martin Cooper
> 
> 
> >
> > If there is any other way, can someone please let me know
> >
> > thanks a lot
> >
> > lirian
> >
> >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:  
> 
> > For additional commands, e-mail:
> 
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 

-- 
Kris Schneider 
D.O.Tech   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: How to call Action Bean Without doing any action by User

2002-12-30 Thread James Turner
The best technique to date for doing this is to have welcome.jsp do a
redirect to an action which then ends up on the page you want to be at.

James

> -Original Message-
> From: Shabbir Khadir Mohammed [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 30, 2002 8:33 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: How to call Action Bean Without doing any action by User
> 
> 
> 
> Hi All
> I want to do some Action before displaying one JSP page let's 
> say. How to achieve that one...??? I.e before displaying 
> welcome.jsp if I want to call an Action Bean.
> 
> How shall I proceed.
> 
> Any suggestions..!!!
> 
> 
> Regards
> Shabbir
> 



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




How to call Action Bean Without doing any action by User

2002-12-30 Thread Shabbir Khadir Mohammed

Hi All
I want to do some Action before displaying one JSP page let's say.
How to achieve that one...???
I.e before displaying welcome.jsp if I want to call an Action Bean.

How shall I proceed.

Any suggestions..!!!


Regards
Shabbir

**Disclaimer** 
   
 
 Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' 
and 'confidential' and intended for use only by the individual or entity to which it 
is 
addressed. You are notified that any use, copying or dissemination of the information 
contained in the E-MAIL in any manner whatsoever is strictly prohibited.







--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: redirect attribute (newbie)

2002-12-30 Thread Vikram Goyal
Search the mailing list for "chaining actions". This has been covered
several times in this list.

Regards,
Vikrma
- Original Message -
From: "Suresh Addagalla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 11:01 PM
Subject: redirect attribute (newbie)


> Hi,
>
> I have a loginAction. If login is successfu, I want to perform another
> action as follows.
>
>  redirect="true"/>
>
> I am not sure whether to use true or false for "redirect". What is the
> difference and which one should I use in this case?
>
> Thanks,
> Suresh
>
>






> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: multibox problem - No getter method

2002-12-30 Thread kiuma
David Rothschadl ha scritto:


Kiuma,
It looks like you need to change your property "caChecked" to "acChecked" 
David R  
  

kiuma <[EMAIL PROTECTED]> wrote:hello,
On some forms I have a no getter method error , and I can't see the reason.

The problem doesn't exist if I use for ex. a html-el.text element.

This is my form

public class ActivityCenterForAgendaForm extends ActionForm {

private String str;
private String acChecked[];
private Collection activityCenters;


/** Creates a new instance of CustomerEditForm */
public ActivityCenterForAgendaForm() {
super(); 
activityCenters = new Vector(); 
resetFields();
}

/**
* Restets all fields
*/
public void resetFields ()
{ 
str = "ciao";
acChecked = new String[0];
activityCenters.clear(); 
}


public void reset(ActionMapping mapping, HttpServletRequest req) 
{ 
resetFields();
}

//Setters

public void setStr(String str) { 
this.str = str;
} 

public void setAcChecked(String acChecked[]) { 
this.acChecked = acChecked;
} 

public void setActivityCenters(Collection activityCenters) { 
this.activityCenters = activityCenters;
} 


//Getters

public String getStr()
{
return this.str;
}

public String[] getAcChecked()
{
return acChecked;
}

public Collection getActivityCenters() { 
return this.activityCenters;
}

public int getActivityCentersSize() { 
return this.activityCenters.size();
}


/**
* Called by the framework to validate the customer's data
* @return On success returns an empty ActionErrors
*/
public ActionErrors validate( ActionMapping mapping, 
HttpServletRequest req) {
ActionErrors result = new ActionErrors();

return result; 
} 
}


When I access to the relative page I have the following error:
WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
javax.servlet.jsp.JspException: No getter method available for property 
caChecked for bean under name org.apache.struts.taglib.html.BEAN
at 
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
at 
precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please help
kiuma


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


Remember:
Peace, Love & Understanding
Always

David R
 

Sorry I've done it yet but nothing happens (write & rewrite makes some 
misspell error ;-P)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: multibox problem - No getter method

2002-12-30 Thread David Rothschadl

Kiuma,
It looks like you need to change your property "caChecked" to "acChecked" 
 David R  
   

 kiuma <[EMAIL PROTECTED]> wrote:hello,
On some forms I have a no getter method error , and I can't see the reason.

The problem doesn't exist if I use for ex. a html-el.text element.

This is my form

public class ActivityCenterForAgendaForm extends ActionForm {

private String str;
private String acChecked[];
private Collection activityCenters;


/** Creates a new instance of CustomerEditForm */
public ActivityCenterForAgendaForm() {
super(); 
activityCenters = new Vector(); 
resetFields();
}

/**
* Restets all fields
*/
public void resetFields ()
{ 
str = "ciao";
acChecked = new String[0];
activityCenters.clear(); 
}


public void reset(ActionMapping mapping, HttpServletRequest req) 
{ 
resetFields();
}

//Setters

public void setStr(String str) { 
this.str = str;
} 

public void setAcChecked(String acChecked[]) { 
this.acChecked = acChecked;
} 

public void setActivityCenters(Collection activityCenters) { 
this.activityCenters = activityCenters;
} 


//Getters

public String getStr()
{
return this.str;
}

public String[] getAcChecked()
{
return acChecked;
}

public Collection getActivityCenters() { 
return this.activityCenters;
}

public int getActivityCentersSize() { 
return this.activityCenters.size();
}


/**
* Called by the framework to validate the customer's data
* @return On success returns an empty ActionErrors
*/
public ActionErrors validate( ActionMapping mapping, 
HttpServletRequest req) {
ActionErrors result = new ActionErrors();

return result; 
} 
}


When I access to the relative page I have the following error:
WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
javax.servlet.jsp.JspException: No getter method available for property 
caChecked for bean under name org.apache.struts.taglib.html.BEAN
at 
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
at 
precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please help
kiuma


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 


Remember:
Peace, Love & Understanding
Always

David R


Re: RE: Struts - XML/XSL

2002-12-30 Thread Puneet Agarwal
Jeff,
This looks good, but this may not suit us as well as struts 
does.
We had tough time convincing our mgmt/client to accept struts, no 
way they can accept another opensource, they are convinced of 
apache/jakarta projects now.

moreover 90% of our screens have to be in HTML.
There are few (one Module) wherein we require this XML stuff for 
hand handelled devices and some Swing clients.

If struts does not have this featuer we will have to build it for 
ourselves. Our seniors as well have liked the approach of a custom 
tag library.

I don't know if I can ask about this in developers forum.
Would be nice if someone of the committers could say something on 
this.
Regards
Puneet

On Mon, 30 Dec 2003 Schnitzer, Jeff wrote :
Take a look at the Maverick MVC framework 
(http://mav.sourceforge.net).  It is Struts-like in concept, but 
you can run any model through an arbitrary pipeline of XSLT (and 
several other) transformations in Cocoon-like fashion.  The 
pipeline will be efficiently connected with SAX events if 
appropriate.  As an example, you can easily run your model 
through an XSLT transformation and then through a FOP 
transformation to send PDF back to the client.

Using the optional Domify module, you don't even need JSP to 
generate the XML in the first place.  The Domify adapter uses 
reflection to create a lazily-loaded DOM façade of your model 
directly.  This is much more efficient than generating and 
parsing text XML.

Try it out :-)

Jeff Schnitzer

> -Original Message-
> From: Puneet Agarwal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 27, 2002 11:16 AM
> To: [EMAIL PROTECTED]
> Subject: Struts - XML/XSL
>
> I know that this topic has been dicsussed in this forum a 
number
> of times.
> I came to know this from mail archives, but my question 
still
> remains unanswered.
>
> In our application we have to generate some XML documents 
apart
>  from HTML screens.
> The intent here is to send these XML documents to a Swing 
client
> through a socket.
>
> there is also a possibility that some of the screens may be
> required in both HTML and Swing.
>
> I have been searching for information on this for past few 
days.
>
> one of the nice option that I cam acorss is described on URL
>
> 
http://www.javaworld.com/javaworld/jw-02-2002/jw-0201-strutsxslt.html
>
> while going through the struts mail archives, I came acorss a 
mail
> written by Craig on 06/12/2000
>
> the mail can be accessed on link
>
> 
http://www.servlets.com/archive/servlet/ReadMsg?msgId=18247&listName=strut
> s-dev
>
> Here Craig talks about developing some facility within 
struts
> which could do the same.
>
> Does struts have such a facility.
>
> Would be grateful if someone cuold give some tips/links, 
which
> could help me in deciding as what is the best option.
>
>
> Regards
> Puneet Agarwal
>
> --
> To unsubscribe, e-mail:    [EMAIL PROTECTED]>
> For additional commands, e-mail:  [EMAIL PROTECTED]>
>



Regards
Puneet Agarwal

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




multibox problem - No getter method

2002-12-30 Thread kiuma
hello,
On some forms I have a no getter method error , and I can't see the reason.

The problem doesn't exist if I use  for ex. a html-el.text element.

This is my form

public class ActivityCenterForAgendaForm extends ActionForm {
  
   private String str;
   private String acChecked[];
   private Collection activityCenters;
  
  
   /** Creates a new instance of CustomerEditForm */
   public ActivityCenterForAgendaForm() {
   super();
   activityCenters = new Vector();
   resetFields();
   }
  
   /**
* Restets all fields
*/
   public void resetFields ()
   {   
   str = "ciao";
   acChecked = new String[0];
   activityCenters.clear();  
   }
  
  
   public void reset(ActionMapping mapping, HttpServletRequest req)   
   {
   resetFields();
   }
  
   //Setters
  
   public void setStr(String str) {   
   this.str = str;
   }  
  
   public void setAcChecked(String acChecked[]) {   
   this.acChecked = acChecked;
   }  
  
   public void setActivityCenters(Collection activityCenters) {   
   this.activityCenters = activityCenters;
   }   

  
   //Getters
  
   public String getStr()
   {
   return this.str;
   }
  
   public String[] getAcChecked()
   {
   return acChecked;
   }
  
   public Collection getActivityCenters() {   
   return this.activityCenters;
   }
  
   public int getActivityCentersSize() {   
   return this.activityCenters.size();
   }
  
 
   /**
* Called by the framework to validate the customer's data
* @return On success returns an empty ActionErrors
*/
   public ActionErrors validate( ActionMapping mapping, 
HttpServletRequest req) {
   ActionErrors result = new ActionErrors();
  
   return result;   
   } 
}


When I access to the relative page I have the following error:
WARNING: Exception for /webappointments/secure/activitycenterforagenda.jsp
javax.servlet.jsp.JspException: No getter method available for property 
caChecked for bean under name org.apache.struts.taglib.html.BEAN
   at 
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:161)
   at 
precompiled.secure.activitycenterforagenda._jspService(activitycenterforagenda.java:164)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

Please help
kiuma


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



redirect attribute (newbie)

2002-12-30 Thread Suresh Addagalla
Hi,

I have a loginAction. If login is successfu, I want to perform another
action as follows.



I am not sure whether to use true or false for "redirect". What is the
difference and which one should I use in this case?

Thanks,
Suresh


**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


Re: disable enter key

2002-12-30 Thread deepak
This works with input type="text"

- Original Message -
From: "Daniel Joshua" <[EMAIL PROTECTED]>
To: "'deepak'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 5:12 PM
Subject: RE: disable enter key


> Would that work if my control is a password input field ?
>
> Regards,
> Daniel
>
>
> -Original Message-
> From: deepak [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 30, 2002 7:41 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: disable enter key
>
>
> You can use something like this
>
> function captureEnter ()
> {
>var keycode;
>if (window.event)
> keycode = window.event.keyCode;
> if (keycode == 13)
>{
> //Your processing
> }
>  }
>
> You can call this function on keyPress event of your control
>
> - Original Message -
> From: "Daniel Joshua" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Monday, December 30, 2002 2:27 PM
> Subject: RE: disable enter key
>
>
> > Another question:
> >
> > If I have no submit button. How do I make it that the 'Enter' key
triggers
> a
> > JavaScript function?
> >
> > This is because I need to do some processing before submitting.
> >
> > Regards,
> > Daniel
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, December 28, 2002 2:07 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: disable enter key
> >
> >
> > But the default behavior of Enter in a browser (IE?) is to invoke the
form
> > submission. For example, if you hit Enter on a login page, it acts like
> you
> > click the Sing-In button. There is no JS involved.
> >
> > Regards,
> >
> >
> > Phillip Qin
> >
> > "This Guy Thinks He Knows Everything"
> > Canadian Shareowner
> > 121 Richmond Street W, 7th Floor
> > Toronto, ON M5H 2K1
> > (416) 595-9600 ext 291
> >
> >
> > -Original Message-
> > From: James Childers [mailto:[EMAIL PROTECTED]]
> > Sent: December 27, 2002 1:03 PM
> > To: Struts Users Mailing List
> > Subject: RE: disable enter key
> >
> > No.
> >
> > Struts is a server-side platform. It can make client-side tasks easier,
> such
> > as validation, but this falls outside it's realm of responsibility.
You'll
> > have to use JavaScript.
> >
> > -= J
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, December 27, 2002 11:59 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: disable enter key
> > >
> > >
> > > Dumb question. Is it able to disable "Enter" key without
> > > using JavaScript on
> > > any struts-powered page?
> > >
> > > Regards,
> > >
> > >
> > >
> > > Phillip Qin
> > >
> > > "This Guy Thinks He Knows Everything"
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: disable enter key

2002-12-30 Thread deepak
Should work I have not tried it. Just try it out

- Original Message -
From: "Daniel Joshua" <[EMAIL PROTECTED]>
To: "'deepak'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 5:12 PM
Subject: RE: disable enter key


> Would that work if my control is a password input field ?
>
> Regards,
> Daniel
>
>
> -Original Message-
> From: deepak [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 30, 2002 7:41 PM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: disable enter key
>
>
> You can use something like this
>
> function captureEnter ()
> {
>var keycode;
>if (window.event)
> keycode = window.event.keyCode;
> if (keycode == 13)
>{
> //Your processing
> }
>  }
>
> You can call this function on keyPress event of your control
>
> - Original Message -
> From: "Daniel Joshua" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Monday, December 30, 2002 2:27 PM
> Subject: RE: disable enter key
>
>
> > Another question:
> >
> > If I have no submit button. How do I make it that the 'Enter' key
triggers
> a
> > JavaScript function?
> >
> > This is because I need to do some processing before submitting.
> >
> > Regards,
> > Daniel
> >
> >
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, December 28, 2002 2:07 AM
> > To: [EMAIL PROTECTED]
> > Subject: RE: disable enter key
> >
> >
> > But the default behavior of Enter in a browser (IE?) is to invoke the
form
> > submission. For example, if you hit Enter on a login page, it acts like
> you
> > click the Sing-In button. There is no JS involved.
> >
> > Regards,
> >
> >
> > Phillip Qin
> >
> > "This Guy Thinks He Knows Everything"
> > Canadian Shareowner
> > 121 Richmond Street W, 7th Floor
> > Toronto, ON M5H 2K1
> > (416) 595-9600 ext 291
> >
> >
> > -Original Message-
> > From: James Childers [mailto:[EMAIL PROTECTED]]
> > Sent: December 27, 2002 1:03 PM
> > To: Struts Users Mailing List
> > Subject: RE: disable enter key
> >
> > No.
> >
> > Struts is a server-side platform. It can make client-side tasks easier,
> such
> > as validation, but this falls outside it's realm of responsibility.
You'll
> > have to use JavaScript.
> >
> > -= J
> >
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, December 27, 2002 11:59 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: disable enter key
> > >
> > >
> > > Dumb question. Is it able to disable "Enter" key without
> > > using JavaScript on
> > > any struts-powered page?
> > >
> > > Regards,
> > >
> > >
> > >
> > > Phillip Qin
> > >
> > > "This Guy Thinks He Knows Everything"
> > >
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > 
> > For additional commands, e-mail:
> > 
> >
> >
> > --
> > To unsubscribe, e-mail:
> 
> > For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Still no getter method available...

2002-12-30 Thread Brown, Melonie S. - Contractor
I struggled with pretty much the same error message all weekend, getting
more and more frustrated because I could see the getter method.  Turns out,
I wasn't returning the object that I thought I was, so there indeed was no
getter method for the property that was being referenced.

See if you can print the output of the troublesome variable to console in
your action class.  You may discover that you're not dealing with the
object(s) you think you are... 

-Original Message-
From: David Rothschadl [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, December 28, 2002 10:49 AM
To: Struts Users Mailing List
Subject: Still no getter method available...



I am still getting the Error Message: No getter method for property
geozoneID of bean org.apache.struts.taglib.html.BEAN. 
I have tried everything.maybe my Action class is not right, which would
not surprise me, since this is my maiden voyage into the Java world. Here is
the code. Any help would be greatly appreciated!
 

package tgt.transportation.points.action;

import java.io.IOException;

import java.lang.reflect.InvocationTargetException;

import java.util.Locale;

import java.util.Hashtable;

import java.util.Date;

import java.util.Vector;

import javax.servlet.ServletException;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionError;

import org.apache.struts.action.ActionErrors;

import org.apache.struts.action.ActionForm;

import org.apache.struts.action.ActionForward;

import org.apache.struts.action.ActionMapping;

 

public class GeoZoneAction extends org.apache.struts.action.Action {

// Method signature

public ActionForward perform(

 ActionMapping mapping, 

 ActionForm form,

HttpServletRequest request,

   HttpServletResponse response)

 throws IOException, ServletException {



// Extract attributes we will need

Locale locale = getLocale(request);

MessageResources messages = getResources();

HttpSession session = request.getSession();

GeoZoneForm geoForm = (GeoZoneForm) form;

String action = request.getParameter("action");

if (action == null)

action = "Create";

if (servlet.getDebug() >= 1)

servlet.log("GeoZoneAction: Processing " + action + " action");

Hashtable database = (Hashtable)

   servlet.getServletContext().getAttribute(Constants.DATABASE_KEY);

if (servlet.getDebug() >= 1)

servlet.log("GeoZoneAction: Processing " + action + "
action");

// Populate the GeoZone form

if (form == null) {

if (servlet.getDebug() >= 1)

   servlet.log(" Creating new GeoZoneForm bean under key "

  + mapping.getAttribute());

  form = new GeoZoneForm();

 if ("request".equals(mapping.getScope()))

request.setAttribute(mapping.getAttribute(), form);

   else

session.setAttribute(mapping.getAttribute(), form);

}



GeoZoneForm geoForm = (GeoZoneForm) form;

   if (user != null) {

if (servlet.getDebug() >= 1)

servlet.log(" Populating form from " + user);

try {

PropertyUtils.copyProperties(geoForm, user);

geoForm.setAction(action);

geoForm.setGeozoneID(null);

geoForm.setGeozoneName(null);

   } catch (InvocationTargetException e) {

Throwable t = e.getTargetException();

if (t == null)

t = e;

   servlet.log("GeoZoneForm.populate", t);

   throw new ServletException("GeoZoneForm.populate", t);

  } catch (Throwable t) {

   servlet.log("GeoZoneForm.populate", t);

   throw new ServletException("GeoZoneForm.populate", t);

   }

}

   // Set a transactional control token to prevent double posting

   if (servlet.getDebug() >= 1)

servlet.log(" Setting transactional control token");

saveToken(request);

// Forward control to the Geographic Zone Maintenance page

 if (servlet.getDebug() >= 1)

 servlet.log(" Forwarding to 'GeoZoneMaint' page");

 return (mapping.findForward("GeoZoneMaint"));

   }

}

 

David Rothschadl

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts-el Jsp compilation problem

2002-12-30 Thread Fabrice BLANQUART
Hi,

I am using Netbeans 3.4 and I try to test struts-el.

When I try to compile a JSP with a html-el tag like "

login.jsp [-1:-1] java.lang.ExceptionInInitializerError
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:130)
   at 
org.apache.strutsel.taglib.html.ELTextTagBeanInfo.class$(ELTextTagBeanInfo.java:91)
   at 
org.apache.strutsel.taglib.html.ELTextTagBeanInfo.getPropertyDescriptors(ELTextTagBeanInfo.java:91)
   at 
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:420)
   at java.beans.Introspector.getBeanInfo(Introspector.java:361)
   at java.beans.Introspector.getBeanInfo(Introspector.java:132)
   at 
org.apache.jasper.compiler.TagCache.setTagHandlerClass(TagCache.java:116)
   at 
org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:146)
   at 
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.addGenerator(AnalyzerParseEventListener.java:156)
   at 
org.netbeans.modules.web.jspparser.AnalyzerParseEventListener.handleTagBegin(AnalyzerParseEventListener.java:955)
   at 
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:221)
   at 
org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:216)
   at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:852)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
   at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:892)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
   at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
   at 
org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
   at 
org.netbeans.modules.web.jspparser.JspParserImpl.callTomcatParser(JspParserImpl.java:130)
   at 
org.netbeans.modules.web.jspparser.JspParserImpl.analyzePage(JspParserImpl.java:97)
   at 
org.netbeans.modules.web.core.jsploader.JspDataObject.createCompiler(JspDataObject.java:323)
   at 
org.netbeans.modules.web.core.jsploader.JspCompilerSupport.addToJob(JspCompilerSupport.java:67)
   at 
org.openide.loaders.CompilerSupport.prepareJobFor(CompilerSupport.java:183)
   at 
org.openide.loaders.CompilerSupport.prepareJob(CompilerSupport.java:150)
   at 
org.openide.actions.AbstractCompileAction.compileNodes(AbstractCompileAction.java:106)
   at 
org.openide.actions.AbstractCompileAction.performAction(AbstractCompileAction.java:47)
   at 
org.openide.util.actions.NodeAction.performAction(NodeAction.java:179)
   at 
org.openide.util.actions.NodeAction.actionPerformed(NodeAction.java:170)
   at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:100)
   at org.openide.util.Task.run(Task.java:136)
   at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:599)
Caused by: java.lang.NullPointerException
   at 
org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
   at 
org.apache.struts.taglib.html.BaseHandlerTag.(BaseHandlerTag.java:96)
   ... 34 more
Errors compiling login.

I try with the "exercise-taglib" example and I get the same error.

It seems to be a problem with the Tomcat 4.0.4 jsp compiler.

Any help to make it work .
--
Fabrice BLANQUART




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: disable enter key

2002-12-30 Thread Daniel Joshua
Would that work if my control is a password input field ?

Regards,
Daniel


-Original Message-
From: deepak [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 30, 2002 7:41 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: Re: disable enter key


You can use something like this

function captureEnter ()
{
   var keycode;
   if (window.event)
keycode = window.event.keyCode;
if (keycode == 13)
   {
//Your processing
}
 }

You can call this function on keyPress event of your control

- Original Message -
From: "Daniel Joshua" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 2:27 PM
Subject: RE: disable enter key


> Another question:
>
> If I have no submit button. How do I make it that the 'Enter' key triggers
a
> JavaScript function?
>
> This is because I need to do some processing before submitting.
>
> Regards,
> Daniel
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 28, 2002 2:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: disable enter key
>
>
> But the default behavior of Enter in a browser (IE?) is to invoke the form
> submission. For example, if you hit Enter on a login page, it acts like
you
> click the Sing-In button. There is no JS involved.
>
> Regards,
>
>
> Phillip Qin
>
> "This Guy Thinks He Knows Everything"
> Canadian Shareowner
> 121 Richmond Street W, 7th Floor
> Toronto, ON M5H 2K1
> (416) 595-9600 ext 291
>
>
> -Original Message-
> From: James Childers [mailto:[EMAIL PROTECTED]]
> Sent: December 27, 2002 1:03 PM
> To: Struts Users Mailing List
> Subject: RE: disable enter key
>
> No.
>
> Struts is a server-side platform. It can make client-side tasks easier,
such
> as validation, but this falls outside it's realm of responsibility. You'll
> have to use JavaScript.
>
> -= J
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 27, 2002 11:59 AM
> > To: [EMAIL PROTECTED]
> > Subject: disable enter key
> >
> >
> > Dumb question. Is it able to disable "Enter" key without
> > using JavaScript on
> > any struts-powered page?
> >
> > Regards,
> >
> >
> >
> > Phillip Qin
> >
> > "This Guy Thinks He Knows Everything"
> >
> >
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: disable enter key

2002-12-30 Thread deepak
You can use something like this

function captureEnter ()
{
   var keycode;
   if (window.event)
keycode = window.event.keyCode;
if (keycode == 13)
   {
//Your processing
}
 }

You can call this function on keyPress event of your control

- Original Message -
From: "Daniel Joshua" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Monday, December 30, 2002 2:27 PM
Subject: RE: disable enter key


> Another question:
>
> If I have no submit button. How do I make it that the 'Enter' key triggers
a
> JavaScript function?
>
> This is because I need to do some processing before submitting.
>
> Regards,
> Daniel
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, December 28, 2002 2:07 AM
> To: [EMAIL PROTECTED]
> Subject: RE: disable enter key
>
>
> But the default behavior of Enter in a browser (IE?) is to invoke the form
> submission. For example, if you hit Enter on a login page, it acts like
you
> click the Sing-In button. There is no JS involved.
>
> Regards,
>
>
> Phillip Qin
>
> "This Guy Thinks He Knows Everything"
> Canadian Shareowner
> 121 Richmond Street W, 7th Floor
> Toronto, ON M5H 2K1
> (416) 595-9600 ext 291
>
>
> -Original Message-
> From: James Childers [mailto:[EMAIL PROTECTED]]
> Sent: December 27, 2002 1:03 PM
> To: Struts Users Mailing List
> Subject: RE: disable enter key
>
> No.
>
> Struts is a server-side platform. It can make client-side tasks easier,
such
> as validation, but this falls outside it's realm of responsibility. You'll
> have to use JavaScript.
>
> -= J
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 27, 2002 11:59 AM
> > To: [EMAIL PROTECTED]
> > Subject: disable enter key
> >
> >
> > Dumb question. Is it able to disable "Enter" key without
> > using JavaScript on
> > any struts-powered page?
> >
> > Regards,
> >
> >
> >
> > Phillip Qin
> >
> > "This Guy Thinks He Knows Everything"
> >
> >
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE : Problem with € and multipart/form-data enctype

2002-12-30 Thread Christophe Vigouroux
Thanks for your reply; it helped me to go further on...

Now, I know where the problem is: it's nothing with Hibernate or Postgres. In fact 
with the multipart form encoding, the characters are encoded with Unicode (or UTF-8?). 
For example my € symbol is represented by the 8364 code. With the default form 
encoding, it was represented by the 0128 code.

My problem now is to render correctly the € symbol when it is coded by 8364... I 
tried to put the <%@ page contentType="text/html; charset=UTF-8" %> directive, but it 
renders "€" instead of "€"... Is there another way to render the "€" symbol 
another way than using the html entity € ? Because I have the following problem: 
when my ActionForm is not validated, it returns to the input page automatically and 
struts populate the form fields. So when one of my fields contains the € symbol, it 
isn't rendered well... and I can't replace it with the € entity, am I right?

Any help would be appreciated!


Christophe VIGOUROUX
ECILIA - Ingénieur développement
Tel: 04.78.68.46.14
Fax: 04.37.43.69.01


-Message d'origine-
De : Dan Tran [mailto:[EMAIL PROTECTED]] 
Envoyé : vendredi 27 décembre 2002 18:31
À : Struts Users Mailing List
Objet : Re: Problem with € and multipart/form-data enctype

Have you try to set your jsp's content type to charset=utf-8??

The following references may help:

   - Struts upload example
   - http://www.anassina.com/struts/i18n/i18n.html

-D
- Original Message -
From: "Christophe Vigouroux" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Friday, December 27, 2002 8:11 AM
Subject: Problem with Ђ and multipart/form-data enctype


Hi,

I'm developing an application using struts and hibernate for data
persistence. I have some kind of problems with special characters like the
"€" one.
When I use a standard  (so using the default
application/x-www-form-urlencoded enctype), I have no problem : the €
character is well persisted and I can load and display correctly the data
from my database (postgresql with Unicode database).

But when it comes to use multipart/form-data enctype in order to send some
file along with some text, the € character seems not to be saved correctly
in the database (it doesn't display well at all after reloading the data).
I've tried to modify a working form (from application/x-www-form-urlencoded
to multipart/form-data enctype) and the € symbol is not well saved.

I'm quite confused because when I try to debug my application, the attribute
of my form bean containing the € symbol is right (it outputs in my logger as
a € symbol...). Whatever enctype is used the character seems to be right in
the form bean, but with multipart enctype it does not save right in the
database!! Anyone as an idea of what I'm experiencing ??

Christophe Vigouroux



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts-layout taglibraries

2002-12-30 Thread usha
Hi

Thnaks a lot for replying. yes i defenetly need the help from u in using 
the struts-layout . i was just struggling to implement the struts-layout 
from past 1 week. right now i have 1 problem i am using the text tag 
where i am specifying the isRequired="false" but still it displays the 
pixel icon besides the text box. how to disable this.
i have an invoice page where there are 2 section one is header and 
details section. i wanted to display the header portion depends on the 
mode if its in create then i wanted to display the text box else a plain 
text depending on the button onclick on the header portion like 
add,delete,update. can u tell me what i need to do to achieve this. and 
if u have time can u explain me how this modes works.

Thanks
usha
Xavier Escuderosabadell wrote:

Hi Usha. We are using struts-layout, and I have to say that is very useful!! 
We've used it mainly for developing only 1 jsp for a one maintenance use case 
(create, update, delete), because it allows to specify with tags and code the enabling and
disabling of components (if you are in an update, some textfields or combos appear like labels, etc.)

Don't hesitate if you want more information.
 

anybody is using the struts-layout taglibraries. i wanted to know how to 
use this with strutsv1.0.2.

thanks
usha


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

   



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 
 





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts-layout taglibraries

2002-12-30 Thread Xavier Escuderosabadell
In terms of your question, I think that it doesn't have to do anything with struts.
You can use it without it, but maybe I'm wrong
> Hi
>
> anybody is using the struts-layout taglibraries. i wanted to know how to
> use this with strutsv1.0.2.
>
> thanks
> usha
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts-layout taglibraries

2002-12-30 Thread Xavier Escuderosabadell
Hi Usha. We are using struts-layout, and I have to say that is very useful!!
We've used it mainly for developing only 1 jsp for a one maintenance use case
(create, update, delete), because it allows to specify with tags and code the enabling 
and
disabling of components (if you are in an update, some textfields or combos appear 
like labels, etc.)

Don't hesitate if you want more information.
>
> anybody is using the struts-layout taglibraries. i wanted to know how to
> use this with strutsv1.0.2.
>
> thanks
> usha
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to get a reference to an Action instance

2002-12-30 Thread Martin Cooper


On Sun, 29 Dec 2002, Lirian Ostrovica wrote:

> Hi,
>
> I need to access an Action instance (I have its class name) while
> writting a Tag.
>
> I have seen that ActionServlet stores Action instances in a 'protected'
> variable (FastHashMap), and so far the only way I can see, is to extend
> ActionServlet and write my own 'public' method to do the job.
> But of course I do not prefer to extend ActionServlet just for that...

Even if you know the class name, there is no guarantee that an instance of
that Action exists, since Action instances are created as needed. And even
if an instance does exist, what would be the purpose of accessing it? An
Action instance should not maintain state, since that will cause threading
problems, and if you need to access class data, then you do not need an
instance.

Perhaps if you tell us what you are trying to achieve, we can help you
find the right way to do that.

--
Martin Cooper


>
> If there is any other way, can someone please let me know
>
> thanks a lot
>
> lirian
>
>
> >
>
>
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
>
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: disable enter key

2002-12-30 Thread Daniel Joshua
Another question:

If I have no submit button. How do I make it that the 'Enter' key triggers a
JavaScript function?

This is because I need to do some processing before submitting.

Regards,
Daniel


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, December 28, 2002 2:07 AM
To: [EMAIL PROTECTED]
Subject: RE: disable enter key


But the default behavior of Enter in a browser (IE?) is to invoke the form
submission. For example, if you hit Enter on a login page, it acts like you
click the Sing-In button. There is no JS involved.

Regards,


Phillip Qin

"This Guy Thinks He Knows Everything"
Canadian Shareowner
121 Richmond Street W, 7th Floor
Toronto, ON M5H 2K1
(416) 595-9600 ext 291


-Original Message-
From: James Childers [mailto:[EMAIL PROTECTED]]
Sent: December 27, 2002 1:03 PM
To: Struts Users Mailing List
Subject: RE: disable enter key

No.

Struts is a server-side platform. It can make client-side tasks easier, such
as validation, but this falls outside it's realm of responsibility. You'll
have to use JavaScript.

-= J

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 27, 2002 11:59 AM
> To: [EMAIL PROTECTED]
> Subject: disable enter key
>
>
> Dumb question. Is it able to disable "Enter" key without
> using JavaScript on
> any struts-powered page?
>
> Regards,
>
>
>
> Phillip Qin
>
> "This Guy Thinks He Knows Everything"
>
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:   
For additional commands, e-mail: