Tomcat (servlet2.2 spec question)

2001-03-12 Thread Johan Compagner

Hi all,

Is it really true that everything that is in the webapp context must be served by the 
webapp?

Here our discussion with the support of ServletExec:

--
Hi,

Who has made that specification??
Because it it stupid.

Apache/IIS must do  the things they are goed at and that is serving static content.
ServletExec/Tomcat/JRun to name a few must do things they are good at and that is 
serving jsp/servlets

And saying that i must keep the images, static html ect ect in an other place is an 
enormous maintenance
and development problem. I want everything to getter what belongs to each other.

Apache with tomcat works perfectly the way i want.

Je specify a Alias in apache:

Alias /myprogram c:/tomcat/webapps/myprogram

And in the conf files of apache that is included in the httpd.conf of apache you say 
this;

JkMount /*.jsp ajp13
JkMount /*.do ajp13

That is the way it should work
Only the JSP's and the .do (struts framework redirects) are handled by tomcat the rest 
by tomcat.

And if i want to do the same with ServletExec then i must put the jsp ect in the
webapps/myprogram
and the rest in
/myprogramstatic?

And i must switch in both constantly pointing to each other?
What happens if
webapps/myprogram changes in
webapps/myprogram2 ?

Everything in /myprogramstatic my also change?
Because i can't use relative url's anymore??

Not to mention that in development you must do the same but there i use Tomcat as http 
server and app server.
And for every project i must have 2 context in tomcat. And they must be exactly the 
way be configured as the
deployment server! Horrible

Johan Compagner

- Original Message -
From: Unify Support
To: [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 8:58 PM
Subject: Re: Information about coupling IIS and servletexec


Per the servlet 2.2 specification (see the last sentence of the first paragraph in 
section 9), all requests to a web application
context are directed to the servlet/JSP container. If you need objects to be served by 
the HTTP server, they will need to be outside
the web application (there is no reason why URLs in the web application cannot refer 
to objects outside said web application).


  Unify Support   [EMAIL PROTECTED]
  Support FAQhttp://www.servletexec.com/support/support-faq.jsp



-Original Message-
From: Albert Schreuder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 11:10 AM
To: [EMAIL PROTECTED]
Cc: Johan Compagner
Subject: Information about coupling IIS and servletexec


Dear reader,

Today we tried to couple Servletexec with IIS 5.0, after some compiliation problems, 
we succeeded int this.

The ServletExec dll was indeed included in the ISAPI filter of the website.

But when we started testing, we got the idea, that all the information voor the 
webapplication was done by ServletExec. To our opion
also information like for example html and gif was done by ServletExec.

Now were we wondering if there is a way to configure the coupling between IIS and 
ServletExec, that only .jsp and .do files are
handled by ServletExec?

We hope we can get response from you soon, because this is a major item for us to go 
using ServletExec.

With kind regards,


Albert Schreuder
Topicus BV
Deventer, The Netherlands




RE: Tomcat (servlet2.2 spec question)

2001-03-12 Thread Brian Bowman

Cool but I don't see it as much better than a web page

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:20 AM
To: Struts
Subject: Tomcat (servlet2.2 spec question)

Hi all,

Is it really true that everything that is in the webapp context must be
served by the webapp?

Here our discussion with the support of ServletExec:


--
Hi,

Who has made that specification??
Because it it stupid.

Apache/IIS must do  the things they are goed at and that is serving static
content.
ServletExec/Tomcat/JRun to name a few must do things they are good at and
that is serving jsp/servlets

And saying that i must keep the images, static html ect ect in an other
place is an enormous maintenance
and development problem. I want everything to getter what belongs to each
other.

Apache with tomcat works perfectly the way i want.

Je specify a Alias in apache:

Alias /myprogram c:/tomcat/webapps/myprogram

And in the conf files of apache that is included in the httpd.conf of apache
you say this;

JkMount /*.jsp ajp13
JkMount /*.do ajp13

That is the way it should work
Only the JSP's and the .do (struts framework redirects) are handled by
tomcat the rest by tomcat.

And if i want to do the same with ServletExec then i must put the jsp ect in
the
webapps/myprogram
and the rest in
/myprogramstatic?

And i must switch in both constantly pointing to each other?
What happens if
webapps/myprogram changes in
webapps/myprogram2 ?

Everything in /myprogramstatic my also change?
Because i can't use relative url's anymore??

Not to mention that in development you must do the same but there i use
Tomcat as http server and app server.
And for every project i must have 2 context in tomcat. And they must be
exactly the way be configured as the
deployment server! Horrible

Johan Compagner

- Original Message -
From: Unify Support
To: [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 8:58 PM
Subject: Re: Information about coupling IIS and servletexec


Per the servlet 2.2 specification (see the last sentence of the first
paragraph in section 9), all requests to a web application
context are directed to the servlet/JSP container. If you need objects to be
served by the HTTP server, they will need to be outside
the web application (there is no reason why URLs in the web application
cannot refer to objects outside said web application).


  Unify Support   [EMAIL PROTECTED]
  Support FAQhttp://www.servletexec.com/support/support-faq.jsp



-Original Message-
From: Albert Schreuder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 11:10 AM
To: [EMAIL PROTECTED]
Cc: Johan Compagner
Subject: Information about coupling IIS and servletexec


Dear reader,

Today we tried to couple Servletexec with IIS 5.0, after some compiliation
problems, we succeeded int this.

The ServletExec dll was indeed included in the ISAPI filter of the website.

But when we started testing, we got the idea, that all the information voor
the webapplication was done by ServletExec. To our opion
also information like for example html and gif was done by ServletExec.

Now were we wondering if there is a way to configure the coupling between
IIS and ServletExec, that only .jsp and .do files are
handled by ServletExec?

We hope we can get response from you soon, because this is a major item for
us to go using ServletExec.

With kind regards,


Albert Schreuder
Topicus BV
Deventer, The Netherlands




RE: Tomcat (servlet2.2 spec question)

2001-03-12 Thread Brian Bowman

Please ignore last message. It was a response to an entirely different email

-Original Message-
From: Brian Bowman [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat (servlet2.2 spec question)

Cool but I don't see it as much better than a web page

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:20 AM
To: Struts
Subject: Tomcat (servlet2.2 spec question)

Hi all,

Is it really true that everything that is in the webapp context must be
served by the webapp?

Here our discussion with the support of ServletExec:


--
Hi,

Who has made that specification??
Because it it stupid.

Apache/IIS must do  the things they are goed at and that is serving static
content.
ServletExec/Tomcat/JRun to name a few must do things they are good at and
that is serving jsp/servlets

And saying that i must keep the images, static html ect ect in an other
place is an enormous maintenance
and development problem. I want everything to getter what belongs to each
other.

Apache with tomcat works perfectly the way i want.

Je specify a Alias in apache:

Alias /myprogram c:/tomcat/webapps/myprogram

And in the conf files of apache that is included in the httpd.conf of apache
you say this;

JkMount /*.jsp ajp13
JkMount /*.do ajp13

That is the way it should work
Only the JSP's and the .do (struts framework redirects) are handled by
tomcat the rest by tomcat.

And if i want to do the same with ServletExec then i must put the jsp ect in
the
webapps/myprogram
and the rest in
/myprogramstatic?

And i must switch in both constantly pointing to each other?
What happens if
webapps/myprogram changes in
webapps/myprogram2 ?

Everything in /myprogramstatic my also change?
Because i can't use relative url's anymore??

Not to mention that in development you must do the same but there i use
Tomcat as http server and app server.
And for every project i must have 2 context in tomcat. And they must be
exactly the way be configured as the
deployment server! Horrible

Johan Compagner

- Original Message -
From: Unify Support
To: [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 8:58 PM
Subject: Re: Information about coupling IIS and servletexec


Per the servlet 2.2 specification (see the last sentence of the first
paragraph in section 9), all requests to a web application
context are directed to the servlet/JSP container. If you need objects to be
served by the HTTP server, they will need to be outside
the web application (there is no reason why URLs in the web application
cannot refer to objects outside said web application).


  Unify Support   [EMAIL PROTECTED]
  Support FAQhttp://www.servletexec.com/support/support-faq.jsp



-Original Message-
From: Albert Schreuder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 11:10 AM
To: [EMAIL PROTECTED]
Cc: Johan Compagner
Subject: Information about coupling IIS and servletexec


Dear reader,

Today we tried to couple Servletexec with IIS 5.0, after some compiliation
problems, we succeeded int this.

The ServletExec dll was indeed included in the ISAPI filter of the website.

But when we started testing, we got the idea, that all the information voor
the webapplication was done by ServletExec. To our opion
also information like for example html and gif was done by ServletExec.

Now were we wondering if there is a way to configure the coupling between
IIS and ServletExec, that only .jsp and .do files are
handled by ServletExec?

We hope we can get response from you soon, because this is a major item for
us to go using ServletExec.

With kind regards,


Albert Schreuder
Topicus BV
Deventer, The Netherlands




RE: Tomcat (servlet2.2 spec question)

2001-03-12 Thread Brian Bowman

Sorry. Please ignore my last email. It was a reply to a completely different
email.

-Original Message-
From: Brian Bowman [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:18 AM
To: [EMAIL PROTECTED]
Subject: RE: Tomcat (servlet2.2 spec question)

Cool but I don't see it as much better than a web page

-Original Message-
From: Johan Compagner [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:20 AM
To: Struts
Subject: Tomcat (servlet2.2 spec question)

Hi all,

Is it really true that everything that is in the webapp context must be
served by the webapp?

Here our discussion with the support of ServletExec:


--
Hi,

Who has made that specification??
Because it it stupid.

Apache/IIS must do  the things they are goed at and that is serving static
content.
ServletExec/Tomcat/JRun to name a few must do things they are good at and
that is serving jsp/servlets

And saying that i must keep the images, static html ect ect in an other
place is an enormous maintenance
and development problem. I want everything to getter what belongs to each
other.

Apache with tomcat works perfectly the way i want.

Je specify a Alias in apache:

Alias /myprogram c:/tomcat/webapps/myprogram

And in the conf files of apache that is included in the httpd.conf of apache
you say this;

JkMount /*.jsp ajp13
JkMount /*.do ajp13

That is the way it should work
Only the JSP's and the .do (struts framework redirects) are handled by
tomcat the rest by tomcat.

And if i want to do the same with ServletExec then i must put the jsp ect in
the
webapps/myprogram
and the rest in
/myprogramstatic?

And i must switch in both constantly pointing to each other?
What happens if
webapps/myprogram changes in
webapps/myprogram2 ?

Everything in /myprogramstatic my also change?
Because i can't use relative url's anymore??

Not to mention that in development you must do the same but there i use
Tomcat as http server and app server.
And for every project i must have 2 context in tomcat. And they must be
exactly the way be configured as the
deployment server! Horrible

Johan Compagner

- Original Message -
From: Unify Support
To: [EMAIL PROTECTED]
Sent: Friday, March 09, 2001 8:58 PM
Subject: Re: Information about coupling IIS and servletexec


Per the servlet 2.2 specification (see the last sentence of the first
paragraph in section 9), all requests to a web application
context are directed to the servlet/JSP container. If you need objects to be
served by the HTTP server, they will need to be outside
the web application (there is no reason why URLs in the web application
cannot refer to objects outside said web application).


  Unify Support   [EMAIL PROTECTED]
  Support FAQhttp://www.servletexec.com/support/support-faq.jsp



-Original Message-
From: Albert Schreuder [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 09, 2001 11:10 AM
To: [EMAIL PROTECTED]
Cc: Johan Compagner
Subject: Information about coupling IIS and servletexec


Dear reader,

Today we tried to couple Servletexec with IIS 5.0, after some compiliation
problems, we succeeded int this.

The ServletExec dll was indeed included in the ISAPI filter of the website.

But when we started testing, we got the idea, that all the information voor
the webapplication was done by ServletExec. To our opion
also information like for example html and gif was done by ServletExec.

Now were we wondering if there is a way to configure the coupling between
IIS and ServletExec, that only .jsp and .do files are
handled by ServletExec?

We hope we can get response from you soon, because this is a major item for
us to go using ServletExec.

With kind regards,


Albert Schreuder
Topicus BV
Deventer, The Netherlands




forwarding to original page

2001-03-12 Thread Fred Lo

Hello all,

I have an application that contain support for multiple languages, we opt 
for the multiple language/multiple jsp option, where each language of the 
system will contain its own set of jsp.

We now have a problem that during validation, when there is an error, we 
would like the page forwarded back to the original jsp (of the originating 
language). But right now the mapping only allow us to define one input form, 
so upon looking at the source file, I think we can redefine 
processValidate() of ActionServlet a bit, instead of getting the input form 
from the mapping, we can get it from a parameter:

// Has an input form been specified for this mapping?
String uri = (request.getParameter(Constants.INPUT_FORM));
if (uri == null || uri.equals(""))
{ uri = mapping.getInput(); }


The idea is like this, is our approach correct? (pls don't say we shouldn't 
have a duplicate set of jsp) Or there is some better way to achieve that?

Thanks a lot.

Fred Lo
_
Get your FREE download of MSN Explorer at http://explorer.msn.com




iplanet prob with parser .jar

2001-03-12 Thread Mallari Kulkarni
Title: iplanet prob with parser .jar 





hi


   We are using IPlanet WS 4.0 and trying to implement struts framework.
   I am not able to implement  Struts Tag Libray in JSP file. But I was able to Action.xml. For Implementing ACtion.xml, we   

   downloaded Parser.java and JSP.jar. This is affecting the tag librarues and the following error is displayed.


   Please help me.
 

[12/Mar/2001:11:02:38] info (  294): JSP: JSP1x compiler threw exception
org.apache.jasper.JasperException: Unable to open taglibrary /servlet/struts.jar : null
    at org.apache.jasper.compiler.JspParseEventListener.handleDirective(Compiled Code)
    at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:119)
    at org.apache.jasper.compiler.Parser$Directive.accept(Compiled Code)
    at org.apache.jasper.compiler.Parser.parse(Compiled Code)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1022)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1018)
    at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
    at com.netscape.server.http.servlet.NSServletEntity.load(NSServletEntity.java:230)
    at com.netscape.server.http.servlet.NSServletEntity.update(NSServletEntity.java:149)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:463)
    at com.netscape.server.http.servlet.NSServletSession.internalRedirect(Native Method)
    at com.netscape.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:67)
    at org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:967)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:749)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:701)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:502)



[12/Mar/2001:11:02:38] warning (  294): Internal error: Failed to get GenericServlet. (uri=/logon.jsp,SCRIPT_NAME=/logon.jsp)

[12/Mar/2001:11:02:38] warning (  294): RequestDispatcher: forward call failed
[12/Mar/2001:11:02:38] failure (  294): Internal error: exception thrown from the servlet service function (uri=/logon.do): javax.servlet.ServletException: RequestDispatcher: forward call failed, Stack: javax.servlet.ServletException: RequestDispatcher: forward call failed

    at com.netscape.server.http.servlet.NSRequestDispatcher.forward(NSRequestDispatcher.java:74)
    at org.apache.struts.action.ActionServlet.processValidate(ActionServlet.java:967)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:749)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:701)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:826)
    at com.netscape.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:502)





Mime mapping not found for file, while displaying static content

2001-03-12 Thread Oliver . Lauer

Hi,

using the ReqestDispatcher.forward(URL) with a mapped URL I get the
following repsonse:

"...Mime mapping not found for file, while displaying static content..."

I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
that work ?

I'm trying to forward to a mapped URL like "logon.do" and want a specific
servlet to be invoked described in my web.xml below.

Invoking a mapped URL within the browser works, with the
RequestDispatcher.forward() not !

Any help appreciated !!
Oliver


web.xml:



ActionServlet
*.do
  


do
application/java-vm
  


 



WG: Mime mapping not found for file, while displaying static content

2001-03-12 Thread Oliver . Lauer

Hi,

using the ReqestDispatcher.forward(URL) with a mapped URL I get the
following repsonse:

"...Mime mapping not found for file, while displaying static content..."

I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
that work ?

I'm trying to forward to a mapped URL like "logon.do" and want a specific
servlet to be invoked described in my web.xml below.

Invoking a mapped URL within the browser works, with the
RequestDispatcher.forward() not !

Any help appreciated !!
Oliver


web.xml:



ActionServlet
*.do
  


do
application/java-vm
  


 



Re: forwarding to original page

2001-03-12 Thread Maya Muchnik

You can check with Validator  05. release :
http://home.earthlink.net/~dwinterfeldt/
It has a multiple language error support.
Maya
P.S. Is any connection your site with http://explorer.msn.com

Fred Lo wrote:

> Hello all,
>
> I have an application that contain support for multiple languages, we opt
> for the multiple language/multiple jsp option, where each language of the
> system will contain its own set of jsp.
>
> We now have a problem that during validation, when there is an error, we
> would like the page forwarded back to the original jsp (of the originating
> language). But right now the mapping only allow us to define one input form,
> so upon looking at the source file, I think we can redefine
> processValidate() of ActionServlet a bit, instead of getting the input form
> from the mapping, we can get it from a parameter:
>
> // Has an input form been specified for this mapping?
> String uri = (request.getParameter(Constants.INPUT_FORM));
> if (uri == null || uri.equals(""))
> { uri = mapping.getInput(); }
> 
>
> The idea is like this, is our approach correct? (pls don't say we shouldn't
> have a duplicate set of jsp) Or there is some better way to achieve that?
>
> Thanks a lot.
>
> Fred Lo
> _
> Get your FREE download of MSN Explorer at http://explorer.msn.com




RE: changing scope of the ActionForm objects at runtime

2001-03-12 Thread Nanduri, Amarnath


Thanks Anand.

cheers,
Amar..

-Original Message-
From: Anand Raman [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 3:06 AM
To: '[EMAIL PROTECTED]'
Subject: Re: changing scope of the ActionForm objects at runtime


Hi Amar
I did something similar..

Whenever i needed a ActionForm for variable scope i always used the
session scope. Now whenever i needed the bean to persist only for the
request, i manully removed the attribute from the session scope.. Not a
very elegant solution, but still managed to solve my needs/..


Hope this helps
Anand 

No
On Thu, Mar 08, 2001 at 01:40:12PM -0500, Nanduri, Amarnath wrote:
>
>
>Hi all,
>
>Is it possible to change the scope of the ActionForm bean during
>runtime ? 
>
>For example i have a multi-page ActionForm Bean being used by different
>Actions. After the user has filled in all the information in this
>ActionForm, the user submits the information to an other Action Class. This
>Action Class writes the information to a database, then has to show the
user
>the information entered by them (so that they can print it for their
>records). After which, the ActionForm gets deleted (or) removed from
>Sesison.
>
>  To do this..i have given the ActionForm bean request scope (in all the
>Actions which handle the user input). When the user submits info, and it
>gets written to a database, i want to change the scope of this ActionForm
to
>"request" scope. On doing this the jsp page will show the information back
>to the user, after which the ActionForm Bean gets deleted (since it has
>request scope). 
>
>  If i set the scope in the 'struts-config.xml' to 'session' for some
>Actions and 'request' to the Action class which writes to database and
>displays a page of all the user-entered informationwill it work ?
>
>   Any comments / suggestions will be greatly appreciated. Thanks.
>
>cheers,
>Amar..



Re: The use of '..' in relative path includes in JSPs

2001-03-12 Thread James Cook

But how about "forcing" the encodeURL() even if the client has cookies?

jim

- Original Message - 
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 11, 2001 10:49 PM
Subject: RE: The use of '..' in relative path includes in JSPs


> 
> 
> On Sun, 11 Mar 2001, James Cook wrote:
> 
> > Very cool. Thanks for that info.
> > 
> > I thought I saw an option at one time to force URL encoding in Struts, even
> > if the browser supports cookies. Is this true, and will the page attribute
> > also URL encode?
> > 
> 
> Yes, no matter which variants you use to create the hyperlink in an
>  or  tag, the result is always passed through
> response.encodeURL() so that sessions will work even in the absence of
> cookies.
> 
> > thank you,
> > jim
> >
> 
> Craig
> 
> 
> 




error header and footer

2001-03-12 Thread Scott Walter

Is it possible to use the  without having
it use the errors.header and errors.footer in certain
circumstances?

thanks.

=
~~~
Scott

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



Getting id attribute in the HTML tags?

2001-03-12 Thread Scott Snyder

Is it possible to get the id CSS attribute generated within the html custom
tags available within struts? From what I can see you can only get the style
and class attributes generated using the style and styleClass attributes on
the html custom tags.

Is there a reason to not use the id CSS attribute? It seems that it would be
straightforward to add it to struts. If there is interest I will submit the
updated files here.

Thanks,

Scott

Scott Snyder
Flashpoint Technologies
Senior Staff Software Engineer
[EMAIL PROTECTED]




RE: Problems with Struts+WebLogic

2001-03-12 Thread Deadman, Hal

2) You probably have struts.jar in your weblogic classpath. It should only
be in the WEB-INF/lib directory of your webapp. 

1) I am using weblogic without having xalan and xerces in the weblogic
classpath. Most of what you would need for a typical application is in
weblogic.jar. 

Hal

-Original Message-
From: Nguyen Thanh Phong [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 11, 2001 11:16 PM
To: [EMAIL PROTECTED]
Subject: Problems with Struts+WebLogic


Hi,

I'm having some problem when using Struts with WebLogic (6.0)

1> I'm using the binary distribution of Struts. Do I still need to download
and configure Xalan XSLT Processor and Xerces? I can run the example
"struts-example" successfully, so I suppose that I don't need these
packages. Am I right?

2> I'm building w sample application using Struts and WebLogic (EJB) but I
have the following error

  
<[WebAppServletContext(756828
7,smart)] Root cause of ServletException
javax.servlet.jsp.JspException: Cannot find message resources under key
org.apac
he.struts.action.MESSAGE
at
org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
at
org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:2
39)
at jsp_servlet._adminlogin._jspService(_adminlogin.java:111)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:208)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:1127)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:1529)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

My JSP file is as following

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>













  

  


  

  

  

  


  

  
  

  


  

  






I'm not quire sure what's going wrong. Please help me.

Thanks in advance.

PS. BTW, is there any searchable archive for Struts-User mailing list?


Nguyen Thanh Phong   Tel: 84-8-837 25 06/837 25 07
Saigon Software Development Company (SDC)Fax: 84-8-837 25 11
10 Co Giang Street, Dist I, HCMC Email:
[EMAIL PROTECTED]
Vietnam



RE: Strut Books

2001-03-12 Thread Rudy Bonefas

Hey,
Maybe someone at Jakarta could look into setting up a news group so
that my inbox is constantly spammed with useless shit like the following.

> -Original Message-
> From: [EMAIL PROTECTED]
> [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, March 09, 2001 4:16 PM
> To:   [EMAIL PROTECTED]
> Subject:  Re: Strut Books
> 
> If someone wrote one, I would buy it and my company would probably want
> one for each developer.  I would buy the hardback, even!  What about it
> Craig?
> 
> Julia
> 
> Spencer Smith wrote:
> 
> > Don't I wish!
> >
> > - Original Message -
> > From: "Marty Fisher" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, March 09, 2001 12:36 PM
> > Subject: Strut Books
> >
> > > Hello,
> > >
> > > Are there any decent books on the market now that give you a detailed
> > > account of how to modify/extend/use the strut classes ?
> > >
> > > Thanks,
> > > Marty
> > >
> > >
> 
> --
> In a time of drastic change it is the learners who inherit the future. The
> learned find themselves equipped to live in a world that no longer exists.
> - Eric Hoffer
> 
> 
> 
>   H e a l t h S t r e a m,   I n c.
>   Julia Reynolds - Systems Developer
>   209 10th Ave. South Ste. 450 - Nashville, TN 37203
>   phone: (615) 301-3220 - fax: (615) 301-3200
> 
>   email: [EMAIL PROTECTED]
>   Web Site: http://www.cmecourses.com
> 



RE: Strut Books

2001-03-12 Thread Steve A Drake

On Mon, 12 Mar 2001, Rudy Bonefas wrote:

> Hey,
>   Maybe someone at Jakarta could look into setting up a news group so
> that my inbox is constantly spammed with useless shit like the following.

 Apparently, you are not aware that struts-user is well-behaved and
doesn't flame. 




[PROPOSAL - specialized taglib for fast interface development]

2001-03-12 Thread Jean-Noël Ribette

Hi,

I have been working with Struts for one month now, and I think Struts is a
great framework. My company is going to use and support it. Otherwise, there
are a view features I would like to see in Struts or as an extension. Here
is a proposal for a special library to increase interfaces development
speed. More information can be found at
http://struts.application-servers.com


My company - Improve, (and a lot others I guess) are working on big web
application, which have those specificities:
- Hundreds of screens
- Developers with very different backgrounds, including people with 20 years
of experience in Cobol and without a good knowledge of new technology.
- All developers need to be able to develop application screens.
- That kind of application has 3 types of very simple screens: selectors,
lists and cards.
- The look and feel of the applications is very strict. The screen designer
has no freedom to choose it.

 Some time ago, Improve developed its own framework to build such
applications.
 The goal was to increase the productivity of the interface part without
drawback on the maintability of the application.

 Now, Improve is moving to Struts and would be glad to see special features
in Struts for this kind of applications, as we think such application are
very common. What we would like to be able to do is to reduce the time
development of those applications by three, which we did with our framework.

 We propose to add those features to Struts by adding a tag library named
Struts Light. Here are the functionalities:

- only 3 types of screens (selectors, lists, cards),
- standardize layout created by the library tags.
- allow people with no special Java or HTML skill to build pages.
- easy customization with CSS.
- reduced code length
- better readability
- easier maintenance
- faster development

Of course, this set of components would reduce the layout possibilities, but
one could always choose to use common HTML or Struts tags when needed.

To illustrate my point of view, we have already written a few components
that we invite you to have a look at the URL
http://struts.application-servers.com. Improve is going to use this
development for its own purpose, but would like share it people who might
find it useful and possibly see it incorporate into Struts as an extension.

Please say what you think about it.

Bear in mind that Struts Light goal is to simplify the development of
applications with simple interface.

--
--__/ \__---
  improve Jean-Noël Ribette
--/-\
 Tel : 01 41 97 83 20http://www.improve.fr
 http://www.application-servers.com





Scalability of Struts

2001-03-12 Thread Peter Doyle

Hi,
 I have searched long an hard for information on Struts relating to
scalability, performance and limitations. I have not found any information
on this, am I looking in all the wrong places?

Has a Struts system been deployed to cater for 100+ simultaneous users?
(Does this go back to the servlet container and its treading of the
controller servlet?)
Would you recommend Struts for mission critical applications?
What are the negative aspects of Struts?
When will Struts reach Version 1 and be considered stable and production
worthy?
What is its expected end of life?
Struts provides classes to help with database access and pooling, what about
connecting to EJB using RMI for database connectivity? Is this a non-issue?

Thanks for your interest,
Peter




--
__
Peter Doyle  TEO Media Ireland
[EMAIL PROTECTED] http://www.teomedia.com
Ph +353 1 888 1353  Fx +353 1 888 1354
Unit 8 Scotch Berth, North Wall, Dublin 1, Ireland
__




Re: problem with using redirect tag

2001-03-12 Thread Incze Lajos

> How come the 'amp;' is append after the '&' ?

"&" is the html encoded "&".   incze



Success with Struts [OFF-TOPIC]

2001-03-12 Thread Kyle Robinson



Does anyone have any 
stories of great success with Struts?  I'm trying to convince management 
that Struts is a good thing and applications can be developed efficiently and 
solidly with it. If so please email me directly as I think this may be slightly 
off-topic.
 
[EMAIL PROTECTED]
Kyle Robinson Systems Consultant Pangaea Systems 
Inc. (250) 360-0111 
 


AW: Success with Struts [OFF-TOPIC]

2001-03-12 Thread oliver . lauer

As one of the biggest insurance companies in Europe (or maybe the biggest
:-)) )  we decided to use STRUTS for inhouse Intranet development.

We are using STRUTS with IPlanet6.0 SP2 and the only problem we have is
the incompatibility of IPlanet concerning Servlet 2.2 and JSP1.1...but even
that is solvable.

Oliver

-- Original Nachricht --

>Does anyone have any stories of great success with Struts?  I'm trying
>to convince management that Struts is a good thing and applications can
>be developed efficiently and solidly with it. If so please email me
>directly as I think this may be slightly off-topic.
>
>[EMAIL PROTECTED] 
>
>Kyle Robinson
>Systems Consultant
>Pangaea Systems Inc.
>(250) 360-0111
>
>
>










Struts with IBM VisualAge for Java

2001-03-12 Thread Perez, Bill

I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS




Question about struts application model (DataSource, Business Logic beans)

2001-03-12 Thread Carles Pi-Sunyer
Title: Question about struts application model (DataSource, Business Logic beans)





Hi,


I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans. 

My Business Logic beans are making database accesses to manipulate the underlying data model. I am planning on using the struts db connection pool, which is supplied through the DataSource. My problem is that access to the DataSource is through the servlet.getDataSource() call. How do I make the Business Logic beans unaware of the servlet/http layer (as suggested in the developers guide) while still making the DataSource available to the Business Logic beans? Do I have to pass a reference to the DataSource on every call the Business Logic beans (not an option that I like), or is there a cleaner way to do this? I also have a similar issues with logging services.

I believe that a common way to solve this problem is to bind the DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe that this functionality is supplied in either Tomcat or Struts.

Thank You,
Carles





Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Martijn Spronk

Hi all,

I'm pretty new to struts, and just started developing a fairly
simple app, however taking a bit beyond the standard example functionality.

I have a (probably) pretty simple question:
I'm in the perform method of the Action class, processing a form submit, but
want to 
forward to different mappings depending on which button was pressed.
In the JSP I am using the ApplicationResources.properties file to create the
button text for the
different buttons, so now I need to access this text also to determine which
action to
take. 

So how do I access the descriptions from the properties file in the Action
class?

my form:
---

   
  

   
   
  

   
   
  

  
  
---

So what do I put at the ... in the following fragment of the perform()
method to
be able to get the textual value of the button.cancel and button.edit?
---
String submit = request.getParameter("submit");
// Forward control depending on which button was pressed
if (submit.equals(...))
return (mapping.findForward("cancel"))
else if (submit.equals(...))
return (mapping.findForward("edit"))
---

Thanks,
Martijn.



RE: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread James Stephens

how to unsubscribe please

-Original Message-
From: Martijn Spronk [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 13:22
To: '[EMAIL PROTECTED]'
Subject: Access to ApplicationResources.properties from Action class?


Hi all,

I'm pretty new to struts, and just started developing a fairly
simple app, however taking a bit beyond the standard example
functionality.

I have a (probably) pretty simple question:
I'm in the perform method of the Action class, processing a form submit,
but
want to 
forward to different mappings depending on which button was pressed.
In the JSP I am using the ApplicationResources.properties file to create
the
button text for the
different buttons, so now I need to access this text also to determine
which
action to
take. 

So how do I access the descriptions from the properties file in the
Action
class?

my form:
---

   
  

   
   
  

   
   
  

  
  
---

So what do I put at the ... in the following fragment of the perform()
method to
be able to get the textual value of the button.cancel and button.edit?
---
String submit = request.getParameter("submit");
// Forward control depending on which button was pressed
if (submit.equals(...))
return (mapping.findForward("cancel"))
else if (submit.equals(...))
return (mapping.findForward("edit"))
---

Thanks,
Martijn.



RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Magnus . B . Larsson

Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java


I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS



RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Nick Chalko

I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 stuff
before you install TOMCAT.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java


Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java


I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS



RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Perez, Bill

Well, I eventually have to deploy to WebSphere for production.. do you think
that will be a problem?

-Original Message-
From: Nick Chalko [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java


I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 stuff
before you install TOMCAT.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java


Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java


I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS



Success with Struts [OFF-TOPIC]

2001-03-12 Thread Nick Afshartous


Kyle Robinson writes:
 > Does anyone have any stories of great success with Struts?  I'm trying to
 > convince management that Struts is a good thing and applications can be
 > developed efficiently and solidly with it. If so please email me directly as
 > I think this may be slightly off-topic.

I don't think its off-topic.  As a matter of fact I'm also trying
to sell my management and would also like to here about success
stories.  If people could post to the list I'd be happy to
collect the responses for inclusion in the Struts site.  

Suggested format for responses:

  Company name and URL

  Contact person (optional)

  Description of application using Struts

  Number of users plus any performance metrics

  Server environment:  Describe Web/App server being used, and
   database config (DataSource ?).
   
   
-- 

Nick






RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Magnus . B . Larsson

No, WAS 3.5 supports Servlet API 2.2 with fixpack 2.

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java


Well, I eventually have to deploy to WebSphere for production.. do you think
that will be a problem?

-Original Message-
From: Nick Chalko [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java


I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 stuff
before you install TOMCAT.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java


Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java


I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS



Re: Question about struts application model (DataSource, Business Log ic beans)

2001-03-12 Thread Michael McCallister

I resolved this by creating two pieces:

First is a class in your business logic package that manages the context 
required by the business logic beans.  This class should be a Singleton and 
should manage access to resources needed by your business logic beans such 
as configuration parameters and your DataSource.  I modeled my context 
object after the Servlet session API, but you could make it much more 
structured if you like.

Second, depending on your servlet environment, create some mechanism to 
initialize your application context object.  Using Tomcat, you could do 
this using something like the DatabaseServlet from the Struts example.  In 
this case, your DatabaseServlet gets started by the servlet container and 
it initializes your application context object (using servlet 
initialization parameters, things like a GenericDataSource object, 
etc.).  Now when your business logic beans are called, they retrieve the 
application context, ask it for a DataSource, and use it to get a connection.

When you decide to re-implement your application as a two-tier 
Client/Server application with a Swing front-end, all you need to do is 
implement some alternate method for your application context object to be 
initialized and your business logic beans are shielded from the change.

I'm not sure this is the best way to decouple your layers, but it's what 
I've come across so far.


Mike

At 12:22 PM 3/12/2001, you wrote:

>Hi,
>
>I'm using Struts for a new application that I'm developing. I have a 
>question about the separation between the Action classes and the Business 
>Logic beans.
>
>My Business Logic beans are making database accesses to manipulate the 
>underlying data model. I am planning on using the struts db connection 
>pool, which is supplied through the DataSource. My problem is that access 
>to the DataSource is through the servlet.getDataSource() call. How do I 
>make the Business Logic beans unaware of the servlet/http layer (as 
>suggested in the developers guide) while still making the DataSource 
>available to the Business Logic beans? Do I have to pass a reference to 
>the DataSource on every call the Business Logic beans (not an option that 
>I like), or is there a cleaner way to do this? I also have a similar 
>issues with logging services.
>
>I believe that a common way to solve this problem is to bind the 
>DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe 
>that this functionality is supplied in either Tomcat or Struts.
>
>Thank You,
>Carles




Re: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Mikael Eriksson

Hello,

 I think that the best thing to do would be to not use the text of
the button at all. If you use the text you will need to change the
code as well if you decide to change the text on the button by
editing the property file. (And if you get internationalization into
the picture it will be even worse.)

I think the solution would be to have different names on the
buttons (using the 'property' attribute of the  tag) and
check the button used by having properties for all the possible names
in the Form bean and see which property that is different from null.
(Or by doing a request.getParameter() as you do in your example, but
I like the automatic way better :-) )

The downside of that is of course that you need extra properties in the
Form bean class but I still think it will be worth it.

 To come back to the original question I do not know how to do it
but I guess that it would be possible to find by checking the source
of the  tag.

 Regards
 Mikael




Martijn Spronk wrote:

> Hi all,
>
> I'm pretty new to struts, and just started developing a fairly
> simple app, however taking a bit beyond the standard example functionality.
>
> I have a (probably) pretty simple question:
> I'm in the perform method of the Action class, processing a form submit, but
> want to
> forward to different mappings depending on which button was pressed.
> In the JSP I am using the ApplicationResources.properties file to create the
> button text for the
> different buttons, so now I need to access this text also to determine which
> action to
> take.
>
> So how do I access the descriptions from the properties file in the Action
> class?
>
> my form:
> ---
> 
>
>   
> 
>    
>
>   
> 
>    
>
>   
> 
>   
>   
> ---
>
> So what do I put at the ... in the following fragment of the perform()
> method to
> be able to get the textual value of the button.cancel and button.edit?
> ---
> String submit = request.getParameter("submit");
> // Forward control depending on which button was pressed
> if (submit.equals(...))
> return (mapping.findForward("cancel"))
> else if (submit.equals(...))
> return (mapping.findForward("edit"))
> ---
>
> Thanks,
> Martijn.




RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Hines, Bill

Yes, but WebSphere 3.5 fixpack 2 was still not fully J2EE compliant and
there are some issues with running Struts under it. Some folks have gotten
it working by making a few simple mods. I'd search the archives of this list
for 'WebSphere'. There is a fixpack 3 for WebSphere which was just released
that may remove or help the problem. I haven't had a chance to look at it
yet. There is also an imminent fixpack for VisualAge Java's WebSphere Test
Environment to bring it to servlet 2.2 and JSP 1.1, so that you don't have
to use Tomcat instead.

Bill Hines
Hershey Foods

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 1:38 PM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java

No, WAS 3.5 supports Servlet API 2.2 with fixpack 2.

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java

Well, I eventually have to deploy to WebSphere for production.. do you think
that will be a problem?

-Original Message-
From: Nick Chalko [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java

I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 stuff
before you install TOMCAT.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java

Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java

I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS



Model 2 Implementation

2001-03-12 Thread Perez, Bill


Looking thru the archives of this list, I noticed someone mentioned a
JSP/Servlet Model 2 Framework available from the IBM website.  I can't find
it!!! Can anyone point me to it?

thanks.

Billy Perez
Java Developer, e-ARCS




RE: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Martijn Spronk

> I think that the best thing to do would be to not use the text of
>the button at all. If you use the text you will need to change the
>code as well if you decide to change the text on the button by
>editing the property file. (And if you get internationalization into
>the picture it will be even worse.)

I disagree on this. 

By accessing the properties file I am actually avoiding having
to modify the code if the button text changes. After all, I am accessing
the property from the JSP using a tag, and what I try to do in the perform 
method is the same: access the value of the property. 

I won't have a static text in my method, I will have something like 
getProperty("button.edit") in the conditional statement.
So a change of the property value will be mapped to both the JSP tag,
and to the (dynamic) conditional statement in the perform method.




Martijn Spronk wrote:

> Hi all,
>
> I'm pretty new to struts, and just started developing a fairly
> simple app, however taking a bit beyond the standard example
functionality.
>
> I have a (probably) pretty simple question:
> I'm in the perform method of the Action class, processing a form submit,
but
> want to
> forward to different mappings depending on which button was pressed.
> In the JSP I am using the ApplicationResources.properties file to create
the
> button text for the
> different buttons, so now I need to access this text also to determine
which
> action to
> take.
>
> So how do I access the descriptions from the properties file in the Action
> class?
>
> my form:
> ---
> 
>
>   
> 
>    
>
>   
> 
>    
>
>   
> 
>   
>   
> ---
>
> So what do I put at the ... in the following fragment of the perform()
> method to
> be able to get the textual value of the button.cancel and button.edit?
> ---
> String submit = request.getParameter("submit");
> // Forward control depending on which button was pressed
> if (submit.equals(...))
> return (mapping.findForward("cancel"))
> else if (submit.equals(...))
> return (mapping.findForward("edit"))
> ---
>
> Thanks,
> Martijn.



Re: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread David Winterfeldt

>From your action class you can call.

MessageResources messages = getResources();
String message = messages.get(locale, "resource.key");

See the API docs for all of the different ways to
retrieve a message resource.
http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html

David

--- Mikael Eriksson <[EMAIL PROTECTED]> wrote:
> Hello,
> 
>  I think that the best thing to do would be to not
> use the text of
> the button at all. If you use the text you will need
> to change the
> code as well if you decide to change the text on the
> button by
> editing the property file. (And if you get
> internationalization into
> the picture it will be even worse.)
> 
> I think the solution would be to have different
> names on the
> buttons (using the 'property' attribute of the
>  tag) and
> check the button used by having properties for all
> the possible names
> in the Form bean and see which property that is
> different from null.
> (Or by doing a request.getParameter() as you do in
> your example, but
> I like the automatic way better :-) )
> 
> The downside of that is of course that you need
> extra properties in the
> Form bean class but I still think it will be worth
> it.
> 
>  To come back to the original question I do not know
> how to do it
> but I guess that it would be possible to find by
> checking the source
> of the  tag.
> 
>  Regards
>  Mikael
> 
> 
> 
> 
> Martijn Spronk wrote:
> 
> > Hi all,
> >
> > I'm pretty new to struts, and just started
> developing a fairly
> > simple app, however taking a bit beyond the
> standard example functionality.
> >
> > I have a (probably) pretty simple question:
> > I'm in the perform method of the Action class,
> processing a form submit, but
> > want to
> > forward to different mappings depending on which
> button was pressed.
> > In the JSP I am using the
> ApplicationResources.properties file to create the
> > button text for the
> > different buttons, so now I need to access this
> text also to determine which
> > action to
> > take.
> >
> > So how do I access the descriptions from the
> properties file in the Action
> > class?
> >
> > my form:
> > ---
> > 
> >
> >   
> > 
> >    
> >
> >   
> > 
> >    
> >
> >   
> > 
> >   
> >   
> > ---
> >
> > So what do I put at the ... in the following
> fragment of the perform()
> > method to
> > be able to get the textual value of the
> button.cancel and button.edit?
> > ---
> > String submit = request.getParameter("submit");
> > // Forward control depending on which button was
> pressed
> > if (submit.equals(...))
> > return (mapping.findForward("cancel"))
> > else if (submit.equals(...))
> > return (mapping.findForward("edit"))
> > ---
> >
> > Thanks,
> > Martijn.
> 


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



RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Magnus . B . Larsson

>yet. There is also an imminent fixpack for VisualAge Java's WebSphere Test
>Environment to bring it to servlet 2.2 and JSP 1.1, so that you don't have
>to use Tomcat instead.

Is that an official fixpack from IBM? Because I cant find it at there site.

- Magnus

>
>Bill Hines
>Hershey Foods



RE: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Martijn Spronk

>From your action class you can call.
>
>MessageResources messages = getResources();
>String message = messages.get(locale, "resource.key");

Thanks, that did the job.

PS The method is getMessage(), not get().





--- Mikael Eriksson <[EMAIL PROTECTED]> wrote:
> Hello,
> 
>  I think that the best thing to do would be to not
> use the text of
> the button at all. If you use the text you will need
> to change the
> code as well if you decide to change the text on the
> button by
> editing the property file. (And if you get
> internationalization into
> the picture it will be even worse.)
> 
> I think the solution would be to have different
> names on the
> buttons (using the 'property' attribute of the
>  tag) and
> check the button used by having properties for all
> the possible names
> in the Form bean and see which property that is
> different from null.
> (Or by doing a request.getParameter() as you do in
> your example, but
> I like the automatic way better :-) )
> 
> The downside of that is of course that you need
> extra properties in the
> Form bean class but I still think it will be worth
> it.
> 
>  To come back to the original question I do not know
> how to do it
> but I guess that it would be possible to find by
> checking the source
> of the  tag.
> 
>  Regards
>  Mikael
> 
> 
> 
> 
> Martijn Spronk wrote:
> 
> > Hi all,
> >
> > I'm pretty new to struts, and just started
> developing a fairly
> > simple app, however taking a bit beyond the
> standard example functionality.
> >
> > I have a (probably) pretty simple question:
> > I'm in the perform method of the Action class,
> processing a form submit, but
> > want to
> > forward to different mappings depending on which
> button was pressed.
> > In the JSP I am using the
> ApplicationResources.properties file to create the
> > button text for the
> > different buttons, so now I need to access this
> text also to determine which
> > action to
> > take.
> >
> > So how do I access the descriptions from the
> properties file in the Action
> > class?
> >
> > my form:
> > ---
> > 
> >
> >   
> > 
> >    
> >
> >   
> > 
> >    
> >
> >   
> > 
> >   
> >   
> > ---
> >
> > So what do I put at the ... in the following
> fragment of the perform()
> > method to
> > be able to get the textual value of the
> button.cancel and button.edit?
> > ---
> > String submit = request.getParameter("submit");
> > // Forward control depending on which button was
> pressed
> > if (submit.equals(...))
> > return (mapping.findForward("cancel"))
> > else if (submit.equals(...))
> > return (mapping.findForward("edit"))
> > ---
> >
> > Thanks,
> > Martijn.
> 


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



Re: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Marty Fisher

Martijn,

I'm also new to struts, could you post the relavent portion of your
ApplicationResources.properties file for me.  I'm interested in how your
code works if you want to have the button be in French or whatever.

Thanks,
Marty Fisher

Martijn Spronk wrote:

> >From your action class you can call.
> >
> >MessageResources messages = getResources();
> >String message = messages.get(locale, "resource.key");
>
> Thanks, that did the job.
>
> PS The method is getMessage(), not get().
>
> --- Mikael Eriksson <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> >  I think that the best thing to do would be to not
> > use the text of
> > the button at all. If you use the text you will need
> > to change the
> > code as well if you decide to change the text on the
> > button by
> > editing the property file. (And if you get
> > internationalization into
> > the picture it will be even worse.)
> >
> > I think the solution would be to have different
> > names on the
> > buttons (using the 'property' attribute of the
> >  tag) and
> > check the button used by having properties for all
> > the possible names
> > in the Form bean and see which property that is
> > different from null.
> > (Or by doing a request.getParameter() as you do in
> > your example, but
> > I like the automatic way better :-) )
> >
> > The downside of that is of course that you need
> > extra properties in the
> > Form bean class but I still think it will be worth
> > it.
> >
> >  To come back to the original question I do not know
> > how to do it
> > but I guess that it would be possible to find by
> > checking the source
> > of the  tag.
> >
> >  Regards
> >  Mikael
> >
> >
> >
> >
> > Martijn Spronk wrote:
> >
> > > Hi all,
> > >
> > > I'm pretty new to struts, and just started
> > developing a fairly
> > > simple app, however taking a bit beyond the
> > standard example functionality.
> > >
> > > I have a (probably) pretty simple question:
> > > I'm in the perform method of the Action class,
> > processing a form submit, but
> > > want to
> > > forward to different mappings depending on which
> > button was pressed.
> > > In the JSP I am using the
> > ApplicationResources.properties file to create the
> > > button text for the
> > > different buttons, so now I need to access this
> > text also to determine which
> > > action to
> > > take.
> > >
> > > So how do I access the descriptions from the
> > properties file in the Action
> > > class?
> > >
> > > my form:
> > > ---
> > > 
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >   
> > >   
> > > ---
> > >
> > > So what do I put at the ... in the following
> > fragment of the perform()
> > > method to
> > > be able to get the textual value of the
> > button.cancel and button.edit?
> > > ---
> > > String submit = request.getParameter("submit");
> > > // Forward control depending on which button was
> > pressed
> > > if (submit.equals(...))
> > > return (mapping.findForward("cancel"))
> > > else if (submit.equals(...))
> > > return (mapping.findForward("edit"))
> > > ---
> > >
> > > Thanks,
> > > Martijn.
> >
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/






RE: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Martijn Spronk

>I'm also new to struts, could you post the relavent portion of your
>ApplicationResources.properties file for me.  I'm interested in how your
>code works if you want to have the button be in French or whatever.

Sorry Marty, I am not using internationalization in
any way. My properties file is simply a modification of the
one that comes with the struts-example app.

PS Does everyone on the mailing list receive a copy of their reply 
twice? (One right away and 10 minutes later again)

Martijn Spronk wrote:

> >From your action class you can call.
> >
> >MessageResources messages = getResources();
> >String message = messages.get(locale, "resource.key");
>
> Thanks, that did the job.
>
> PS The method is getMessage(), not get().
>
> --- Mikael Eriksson <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> >  I think that the best thing to do would be to not
> > use the text of
> > the button at all. If you use the text you will need
> > to change the
> > code as well if you decide to change the text on the
> > button by
> > editing the property file. (And if you get
> > internationalization into
> > the picture it will be even worse.)
> >
> > I think the solution would be to have different
> > names on the
> > buttons (using the 'property' attribute of the
> >  tag) and
> > check the button used by having properties for all
> > the possible names
> > in the Form bean and see which property that is
> > different from null.
> > (Or by doing a request.getParameter() as you do in
> > your example, but
> > I like the automatic way better :-) )
> >
> > The downside of that is of course that you need
> > extra properties in the
> > Form bean class but I still think it will be worth
> > it.
> >
> >  To come back to the original question I do not know
> > how to do it
> > but I guess that it would be possible to find by
> > checking the source
> > of the  tag.
> >
> >  Regards
> >  Mikael
> >
> >
> >
> >
> > Martijn Spronk wrote:
> >
> > > Hi all,
> > >
> > > I'm pretty new to struts, and just started
> > developing a fairly
> > > simple app, however taking a bit beyond the
> > standard example functionality.
> > >
> > > I have a (probably) pretty simple question:
> > > I'm in the perform method of the Action class,
> > processing a form submit, but
> > > want to
> > > forward to different mappings depending on which
> > button was pressed.
> > > In the JSP I am using the
> > ApplicationResources.properties file to create the
> > > button text for the
> > > different buttons, so now I need to access this
> > text also to determine which
> > > action to
> > > take.
> > >
> > > So how do I access the descriptions from the
> > properties file in the Action
> > > class?
> > >
> > > my form:
> > > ---
> > > 
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >   
> > >   
> > > ---
> > >
> > > So what do I put at the ... in the following
> > fragment of the perform()
> > > method to
> > > be able to get the textual value of the
> > button.cancel and button.edit?
> > > ---
> > > String submit = request.getParameter("submit");
> > > // Forward control depending on which button was
> > pressed
> > > if (submit.equals(...))
> > > return (mapping.findForward("cancel"))
> > > else if (submit.equals(...))
> > > return (mapping.findForward("edit"))
> > > ---
> > >
> > > Thanks,
> > > Martijn.
> >
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/





RE: Strut Books

2001-03-12 Thread Lacerda, Wellington (AFIS)

I'm working on a book about tag libraries that has quite a number of
chapters dedicated to Struts. What are the topics you want to be covered
with more detail? I'm still working on those chapters to have them more
up-to-date! This kind of input would be nice and right in time! :-)

Wellington Silva
UN/FAO 

-Original Message-
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 09/03/01 22:16
Subject: Re: Strut Books

If someone wrote one, I would buy it and my company would probably want
one for each developer.  I would buy the hardback, even!  What about it
Craig?

Julia

Spencer Smith wrote:

> Don't I wish!
>
> - Original Message -
> From: "Marty Fisher" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 09, 2001 12:36 PM
> Subject: Strut Books
>
> > Hello,
> >
> > Are there any decent books on the market now that give you a
detailed
> > account of how to modify/extend/use the strut classes ?
> >
> > Thanks,
> > Marty
> >
> >

--
In a time of drastic change it is the learners who inherit the future.
The
learned find themselves equipped to live in a world that no longer
exists.
- Eric Hoffer



  H e a l t h S t r e a m,   I n c.
  Julia Reynolds - Systems Developer
  209 10th Ave. South Ste. 450 - Nashville, TN 37203
  phone: (615) 301-3220 - fax: (615) 301-3200

  email: [EMAIL PROTECTED]
  Web Site: http://www.cmecourses.com




Re: Access to ApplicationResources.properties from Action class?

2001-03-12 Thread Maya Muchnik

David,

Please clarify for me. I am trying use your application for validation and display
different error depending on a selected language. It is 05 release. Your
RegistrationAction.java or MultiRegistrationAction.java calls
Locale locale = getLocale(request);
but it is not used in the source code (directly). Maybe I am missing something. Your
have 2 properties files depending on the language. Does MessageResources use them?

Thanks,

Maya

David Winterfeldt wrote:

> >From your action class you can call.
>
> MessageResources messages = getResources();
> String message = messages.get(locale, "resource.key");
>
> See the API docs for all of the different ways to
> retrieve a message resource.
> http://jakarta.apache.org/struts/api/org/apache/struts/util/MessageResources.html
>
> David
>
> --- Mikael Eriksson <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> >  I think that the best thing to do would be to not
> > use the text of
> > the button at all. If you use the text you will need
> > to change the
> > code as well if you decide to change the text on the
> > button by
> > editing the property file. (And if you get
> > internationalization into
> > the picture it will be even worse.)
> >
> > I think the solution would be to have different
> > names on the
> > buttons (using the 'property' attribute of the
> >  tag) and
> > check the button used by having properties for all
> > the possible names
> > in the Form bean and see which property that is
> > different from null.
> > (Or by doing a request.getParameter() as you do in
> > your example, but
> > I like the automatic way better :-) )
> >
> > The downside of that is of course that you need
> > extra properties in the
> > Form bean class but I still think it will be worth
> > it.
> >
> >  To come back to the original question I do not know
> > how to do it
> > but I guess that it would be possible to find by
> > checking the source
> > of the  tag.
> >
> >  Regards
> >  Mikael
> >
> >
> >
> >
> > Martijn Spronk wrote:
> >
> > > Hi all,
> > >
> > > I'm pretty new to struts, and just started
> > developing a fairly
> > > simple app, however taking a bit beyond the
> > standard example functionality.
> > >
> > > I have a (probably) pretty simple question:
> > > I'm in the perform method of the Action class,
> > processing a form submit, but
> > > want to
> > > forward to different mappings depending on which
> > button was pressed.
> > > In the JSP I am using the
> > ApplicationResources.properties file to create the
> > > button text for the
> > > different buttons, so now I need to access this
> > text also to determine which
> > > action to
> > > take.
> > >
> > > So how do I access the descriptions from the
> > properties file in the Action
> > > class?
> > >
> > > my form:
> > > ---
> > > 
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >    
> > >
> > >   
> > > 
> > >   
> > >   
> > > ---
> > >
> > > So what do I put at the ... in the following
> > fragment of the perform()
> > > method to
> > > be able to get the textual value of the
> > button.cancel and button.edit?
> > > ---
> > > String submit = request.getParameter("submit");
> > > // Forward control depending on which button was
> > pressed
> > > if (submit.equals(...))
> > > return (mapping.findForward("cancel"))
> > > else if (submit.equals(...))
> > > return (mapping.findForward("edit"))
> > > ---
> > >
> > > Thanks,
> > > Martijn.
> >
>
> __
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/




Re: The use of '..' in relative path includes in JSPs

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, James Cook wrote:

> But how about "forcing" the encodeURL() even if the client has cookies?
>

It already does ... this is built in to the processing that the custom tag
classes do.  If your client supports cookies then the encoding will return
the hyperlink unchanged, but the call still happened.
 
> jim
> 

Craig





Where to put code to populate SELECT / OPTION lists?

2001-03-12 Thread Martijn Spronk

The part of my app I'm working on is a simple form submit, take the
struts-example/subscription for example.

My form is accessed by an editRequestTime.do?action=Create call in the
browser.
In the form I use the  and  tags to display
a selection box that is part of the form.

My problem is, what is the best place to create the ArrayList containing the
elements
for the option tag?

In the struts example it is hardcoded at the start of the JSP, with a
disclaimer that
it would normally be populated by the database (and I assume not in the
JSP).

So I figured I'll put it in my editRequestTimeAction code. Pass it on to the
JSP using
a request.setAttribute(). This works fine is the form is accessed through
the editRequestTime
call. 
However, the form submits to a new action, saveRequest.do. Which means that
if there is 
an error in the form, saveRequestAction will be executed, after which it
will forward to the form 
again. The form however is not aware of the ArrayList since it's not created
in the saveRequestAction
but only in the editRequestTimeAction.

It doesn't seem to make sense to have to create the ArrayList in both the
editRequestTimeAction
AND in the saveRequestTimeAction. Should I put the creation code (or at
least a handle to it)
in the JSP?? That doesn't seem to help the seperation?

Martijn.



Re: Tomcat (servlet2.2 spec question)

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, Johan Compagner wrote:

> Hi all,
> 
> Is it really true that everything that is in the webapp context must be served by 
>the webapp?
>

I would say the answer to this question is "yes", but the definition of
the term "servlet container" would include the web server you are running
behind.  Thus, both of the following two approaches are legal:

* Have the web server serve static resources and the servlet add-on
  server dynamic resources (the way Apache+Tomcat works)

* Have the web server forward all requests underneath the context path
  to the servlet add-on (the way ServletExec appears to work)

Note that the combined "container" in either scenario should still respect
all of the requirements of the servlet spec.  This was not explicit in
Servlet 2.2 (and Apache+Tomcat violates this principle, because it ignores
things like the security constraint settings in web.xml), but is
likely to become explicit in 2.3.  Doing the "pass all requests to the
servlet add-on" approach is certainly an easier way to accomplish this,
but it is still not required.

Craig McClanahan






Re: Where to put code to populate SELECT / OPTION lists?

2001-03-12 Thread Scott Walter

I have created a servlet where I do not code the
doGet() or doPost(), only the init() method.  This
allows me to get around the fact that the 2.2 servlet
api doesn't have a server startup event.

Then within the init() method I setup my arraylist of
values where each object in the arraylist is of type
LabelValueBean (which I got from the Struts Example).

I then store the arraylist as an application
attribute.  This way I can have dropdowns that
populated once and re-used across my entire app. 
Below is a sample servlet using this technique:

package sitemanager.shr.app;

import javax.servlet.http.*;
import javax.servlet.*;
import sitemanager.daemon.*;
import java.util.ArrayList;
import sitemanager.util.LabelValueBean;

/**
 *  Description of the Class
 *
 *@author Scott F. Walter
 *@createdFebruary 17, 2001
 */
public class InitApp extends HttpServlet {
public void init(ServletConfig config) throws
ServletException {
System.out.println("Loading dropdowns...");
loadDropdowns(config);  
}

public void loadDropdowns(ServletConfig config) {
ServletContext context = config.getServletContext();

ArrayList list = new java.util.ArrayList();
list.add(new LabelValueBean("What is your street
address?","" + 1));
list.add(new LabelValueBean("Where were your
born?","" + 2));
list.add(new LabelValueBean("What is your mother's
maiden name?","" + 3));
list.add(new LabelValueBean("What is your favorite
car?","" + 4));

context.setAttribute("dd_rememberpassword",list);   
}
}
--- Martijn Spronk <[EMAIL PROTECTED]> wrote:
> The part of my app I'm working on is a simple form
> submit, take the
> struts-example/subscription for example.
> 
> My form is accessed by an
> editRequestTime.do?action=Create call in the
> browser.
> In the form I use the  and
>  tags to display
> a selection box that is part of the form.
> 
> My problem is, what is the best place to create the
> ArrayList containing the
> elements
> for the option tag?
> 
> In the struts example it is hardcoded at the start
> of the JSP, with a
> disclaimer that
> it would normally be populated by the database (and
> I assume not in the
> JSP).
> 
> So I figured I'll put it in my editRequestTimeAction
> code. Pass it on to the
> JSP using
> a request.setAttribute(). This works fine is the
> form is accessed through
> the editRequestTime
> call. 
> However, the form submits to a new action,
> saveRequest.do. Which means that
> if there is 
> an error in the form, saveRequestAction will be
> executed, after which it
> will forward to the form 
> again. The form however is not aware of the
> ArrayList since it's not created
> in the saveRequestAction
> but only in the editRequestTimeAction.
> 
> It doesn't seem to make sense to have to create the
> ArrayList in both the
> editRequestTimeAction
> AND in the saveRequestTimeAction. Should I put the
> creation code (or at
> least a handle to it)
> in the JSP?? That doesn't seem to help the
> seperation?
> 
> Martijn.


=
~~~
Scott

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



Re: forwarding to original page

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, Fred Lo wrote:

> Hello all,
> 
> I have an application that contain support for multiple languages, we opt 
> for the multiple language/multiple jsp option, where each language of the 
> system will contain its own set of jsp.
> 
> We now have a problem that during validation, when there is an error, we 
> would like the page forwarded back to the original jsp (of the originating 
> language). But right now the mapping only allow us to define one input form, 
> so upon looking at the source file, I think we can redefine 
> processValidate() of ActionServlet a bit, instead of getting the input form 
> from the mapping, we can get it from a parameter:
> 
> // Has an input form been specified for this mapping?
> String uri = (request.getParameter(Constants.INPUT_FORM));
> if (uri == null || uri.equals(""))
> { uri = mapping.getInput(); }
> 
> 
> The idea is like this, is our approach correct? (pls don't say we shouldn't 
> have a duplicate set of jsp) Or there is some better way to achieve that?
>

Subclassing ActionServlet, and then overriding processValidate() to do
what you are describing above, certainly seems like a viable
approach.  This is the primary reason that the processing logic in
ActionServlet has been divided into so many protected methods - so that
you can easily specialize the parts you want, without having to recode the
entire processing flow.
 
> Thanks a lot.
> 
> Fred Lo

Craig





Re: Mime mapping not found for file, while displaying static content

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001 [EMAIL PROTECTED] wrote:

> Hi,
> 
> using the ReqestDispatcher.forward(URL) with a mapped URL I get the
> following repsonse:
> 
> "...Mime mapping not found for file, while displaying static content..."
> 
> I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
> that work ?
> 
> I'm trying to forward to a mapped URL like "logon.do" and want a specific
> servlet to be invoked described in my web.xml below.
>

Be sure you are actually using a context-relative path like
"/logon.do" (with a leading slash) rather than "logon.do".  This is
required by a RequestDispatcher.
 
> Invoking a mapped URL within the browser works, with the
> RequestDispatcher.forward() not !
> 
> Any help appreciated !!
> Oliver
> 
> 
> web.xml:
> 
> 
> 
> ActionServlet
> *.do
>   
> 
> 
> do
> application/java-vm
>   
>

Why do you need this  entry at all?  If every request ending
with ".do" is going through your controller servlet, there will never be
any need to send a static response with this content type (which is what
the  entry normally means in web.xml).

Craig McClanahan





Re: Question about struts application model (DataSource, BusinessLog ic beans)

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, Carles Pi-Sunyer wrote:

> Hi,
> 
> I'm using Struts for a new application that I'm developing. I have a
> question about the separation between the Action classes and the Business
> Logic beans. 
> 
> My Business Logic beans are making database accesses to manipulate the
> underlying data model. I am planning on using the struts db connection pool,
> which is supplied through the DataSource. My problem is that access to the
> DataSource is through the servlet.getDataSource() call. How do I make the
> Business Logic beans unaware of the servlet/http layer (as suggested in the
> developers guide) while still making the DataSource available to the
> Business Logic beans? Do I have to pass a reference to the DataSource on
> every call the Business Logic beans (not an option that I like), or is there
> a cleaner way to do this? I also have a similar issues with logging
> services.
> 
> I believe that a common way to solve this problem is to bind the DataSource
> to a jndi service. I am using tomcat 3.2.1, and I don't believe that this
> functionality is supplied in either Tomcat or Struts.
>

Binding the data source to a JNDI context is definitely attractive -- and
it is also the approach that is suggested if you are running in a
J2EE-compatible application server (which is required to support this
approach).  In such a scenario, you would configure the data source using
the tools provided by your app server, rather than declaring it in
struts-config.xml, and you'd define a  entry in your web.xml
file to link the data source you need to the facilities set up by your app
server.

Tomcat 3.2 does not support a JNDI context for this kind of thing, but
Tomcat 4.0 does.  By default, it uses the data source and transaction
implementations from Tyrex (http://tyrex.exolab.org), but you can also
create your own object factories if you want to do something different.

 
> Thank You,
> Carles
> 

Craig





Absolute URL in global-forward

2001-03-12 Thread Libersan, Martin

I have a problem using global-forward with an absolute URL.

  
  

http://poseidon:6969/logon/index.jsp"/>


  

When i rerefer to the global forward name simualtion i got this exception

Mon Mar 12 15:34:16 EST 2001:  Servlet failed with 
Exception
java.lang.NullPointerException
at 
org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.java:1697)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1540)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at 
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:106)
at 
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
at weblogic.servlet.internal.ServletContextImpl.invokeServlet(Compiled Code)
at weblogic.servlet.internal.ServletContextManager.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.invokeServlet(Compiled Code)
at weblogic.socket.MuxableSocketHTTP.execute(Compiled Code)
at weblogic.kernel.ExecuteThread.run(Compiled Code)

When i rerefer to ohters global forwards i got no problem at all

Is it possible to use absolute url path in a global-forward ?
Martin Libersan
Myriap inc.
Sun Certified Java2 Programmer
* (514) 804-7237 
* [EMAIL PROTECTED]




Logging IP Addresses

2001-03-12 Thread Ted Husted

This is mildly off-topic, but I'm logging accesses to my application
when people login. I'd like to convert the IP string (xxx.xxx.xxx.xxx)
returned by the HttpRequest to an unsigned integer. Before I write one,
I wondered if anyone had a handy library routine for that. 

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



Re: Strut Books

2001-03-12 Thread Ted Husted

Are you including the new Taglibs JDBC tag set (which works well with
Struts, among other frameworks)?

"Lacerda, Wellington (AFIS)" wrote:
> 
> I'm working on a book about tag libraries that has quite a number of
> chapters dedicated to Struts. What are the topics you want to be covered
> with more detail? I'm still working on those chapters to have them more
> up-to-date! This kind of input would be nice and right in time! :-)
> 
> Wellington Silva
> UN/FAO



PropertyUtils.copyProperties and EJB beans

2001-03-12 Thread Bryan Field-Elliot
I am trying to use copyProperties()
to copy everything FROM a standard bean, TO an enterprise javabean (entity
bean). When I do so, I get the following exception:

   Name: java.lang.IllegalArgumentExceptionMessage: object is not an instance of declaring class  Stack: java.lang.IllegalArgumentException: object is not an instance of declaring class	at java.lang.reflect.Method.invoke(Native Method)	at org.apache.struts.util.PropertyUtils.getSimpleProperty(PropertyUtils.java:591)	at org.apache.struts.util.PropertyUtils.copyProperties(PropertyUtils.java:207)	at com.reachmydoctor.ejb.patientSessionBean.createAccount(patientSessionBean.java:109)

I suspect this may have something to do with the fact that my destination,
being a remote interface, is a funky jBoss proxy class and not a standard
bean at all. Nevertheless is there any way I can get this to work? I was
really counting on this working... Otherwise I have about 65 properties to
copy by hand!

Thanks,

Bryan





Re: The use of '..' in relative path includes in JSPs

2001-03-12 Thread James Cook

Sorry to keep repeating this, but I don't think I phrased it properly.

Is there a technique where the session id is included in the URL even if the
client browser supports cookies? Basically, I *never* want to use cookies to
manage sessions, and I *always* want the session id encoded on the URLs.

thanks,
jim

- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 3:28 PM
Subject: Re: The use of '..' in relative path includes in JSPs


>
>
> On Mon, 12 Mar 2001, James Cook wrote:
>
> > But how about "forcing" the encodeURL() even if the client has cookies?
> >
>
> It already does ... this is built in to the processing that the custom tag
> classes do.  If your client supports cookies then the encoding will return
> the hyperlink unchanged, but the call still happened.
>
> > jim
> >
>
> Craig
>
>




Re: The use of '..' in relative path includes in JSPs

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, James Cook wrote:

> Sorry to keep repeating this, but I don't think I phrased it properly.
> 
> Is there a technique where the session id is included in the URL even if the
> client browser supports cookies? Basically, I *never* want to use cookies to
> manage sessions, and I *always* want the session id encoded on the URLs.
>

The only way I can think of to do this is to configure your servlet
container to not use cookies for session management, if it has such an
option.  Tomcat versions greater than 3.1 can do this, but I don't know
about any other containers in particular.

Absent that approach, you could create a modified version of the
 tag that forcibly included the session ID (in other words, it
did the processing that response.encodeURL() usually does), but the cookie
would still be included in the response as well, and the container will
probably pay attention to the cookie, and not the session id from the URL,
in subsequent requests.
 
> thanks,
> jim
>

Craig




FREE Biotech Stock Info! 895

2001-03-12 Thread biotechstox62
Title: Do you want to capitalize on the Biotech Revolution








Do
you want to capitalize on the Biotech Revolution? Would you like to add
groundbreaking biotech, pharmaceutical and medical device companies to your
portfolio mix? Does hearing about exciting IPO and private placement offerings
from life sciences companies interest you?
The
exclusive Ruddy-Carlisle Biotech Infoline service keeps you abreast of
investment opportunities in the life sciences space. Just sign up for it once
and get important information instantly delivered to study at your leisure. Our
service is 100% FREE! Sign
up!
Ruddy-Carlisle
Biotech Infoline:

  Instantly
delivers key life sciences investment information directly to you! 

  
  Learn
about biotech, pharmaceutical & medical device investment opportunities
before others! 

  
  Includes
IPO & private placement information! 

  
  100%
FREE!

For
the entire last decade there were only three profitable biotech companies. At
the end of this year, ten are projected. At the end of 2003, over forty
are projected! The genomic promise is about to be delivered and investors know
it. The Ruddy-Carlisle Biotech Infoline provides you with critical,
decision-making, information that aids the chance of investment success in this
lucrative space. Sign
up!
Please
Note- Your information will only be
shared with companies that are in the life sciences space and pass our
rigorous inspection. Only the best opportunities will come to you.
Ruddy-Carlisle respects your privacy. Sign
up!
 
 


List Removal Instructions- Simply click here: remove
to be instantly and permanently removed from our list. Send the blank email to
the address specified. Please do not try to reply to this message.






Re: Problems with Struts+WebLogic

2001-03-12 Thread Nguyen Thanh Phong

I found the answer for my question. I forgot to include a init-param for the
ActionSevrlet to initialize the resource ... really ignorance ...

Thanks all for your answers.

Cheers.

Phong.

- Original Message -
From: Deadman, Hal <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 9:34 PM
Subject: RE: Problems with Struts+WebLogic


> 2) You probably have struts.jar in your weblogic classpath. It should only
> be in the WEB-INF/lib directory of your webapp.
>
> 1) I am using weblogic without having xalan and xerces in the weblogic
> classpath. Most of what you would need for a typical application is in
> weblogic.jar.
>
> Hal
>
> -Original Message-
> From: Nguyen Thanh Phong [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 11, 2001 11:16 PM
> To: [EMAIL PROTECTED]
> Subject: Problems with Struts+WebLogic
>
>
> Hi,
>
> I'm having some problem when using Struts with WebLogic (6.0)
>
> 1> I'm using the binary distribution of Struts. Do I still need to
download
> and configure Xalan XSLT Processor and Xerces? I can run the example
> "struts-example" successfully, so I suppose that I don't need these
> packages. Am I right?
>
> 2> I'm building w sample application using Struts and WebLogic (EJB) but I
> have the following error
>
>   
> <[WebAppServletContext(756828
> 7,smart)] Root cause of ServletException
> javax.servlet.jsp.JspException: Cannot find message resources under key
> org.apac
> he.struts.action.MESSAGE
> at
> org.apache.struts.util.RequestUtils.message(RequestUtils.java:285)
> at
> org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:2
> 39)
> at jsp_servlet._adminlogin._jspService(_adminlogin.java:111)
> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> at
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
> pl.java:208)
> at
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
> rvletContext.java:1127)
> at
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
> pl.java:1529)
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> >
>
> My JSP file is as following
>
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-template.tld" prefix="template" %>
>
> 
> 
> 
> 
> 
> 
>
> 
>
> 
> 
>
>   
> 
>   
> 
> 
>   
> 
>   
>
>   
> 
>   
> 
> 
>redisplay="false"/>
> 
>   
>   
> 
>   
> 
> 
>   
> 
>   
> 
> 
> 
> 
>
>
> I'm not quire sure what's going wrong. Please help me.
>
> Thanks in advance.
>
> PS. BTW, is there any searchable archive for Struts-User mailing list?
>
>
> Nguyen Thanh Phong   Tel: 84-8-837 25 06/837 25 07
> Saigon Software Development Company (SDC)Fax: 84-8-837 25 11
> 10 Co Giang Street, Dist I, HCMC Email:
> [EMAIL PROTECTED]
> Vietnam
>




Re: Success with Struts [OFF-TOPIC]

2001-03-12 Thread Bill Pfeiffer

Kyle,

SilverStream's flagship example application, SilverBooks, was rewritten with
Struts in their newly released, j2ee compliant, SilverStream application
server 3.7.

If you've got the time and inclination you can download a single user
version of the appserver and it comes with the SilverBooks application.  The
app itself is an Amazon type knockoff.  It looks pretty good.

Get it at http://www.silverstream.com

HTH,

Bill Pfeiffer


- Original Message -
From: Kyle Robinson
To: '[EMAIL PROTECTED]'
Sent: Monday, March 12, 2001 12:43 PM
Subject: Success with Struts [OFF-TOPIC]


Does anyone have any stories of great success with Struts?  I'm trying to
convince management that Struts is a good thing and applications can be
developed efficiently and solidly with it. If so please email me directly as
I think this may be slightly off-topic.

[EMAIL PROTECTED]
Kyle Robinson
Systems Consultant
Pangaea Systems Inc.
(250) 360-0111




Digester order of events

2001-03-12 Thread Zach Thompson

Hello,

I just spent quite a bit of time debugging some code that uses a
Digester, and I'd like to share what I found.

class MyBean {
SomeType p = new SomeType();
public void setProp(SomeType p) {
this.p = p;
}

String name;
public void setName(String name) {
System.err.println("Setting name...");
this.name = name;
}
}

...



...

digester.addSetProperties("mybean");

The name property was never being set..

The problem was that SomeType was not in my runtime CLASSPATH, so even
though setProp() is never called, and hence no runtime error occurs,
Digester fails to ever call setName().  Of course, the error here is
really mine, but I'd like to at least see Digester give some debugging
messages (I had debug detail set to 999).

2.  Next I was trying to get the body of a tag and set a bean property
with the content:

Some content

...

digester.addSetProperties("mybean");
digester.addCallMethod("mybean", "setBody", 0);
digester.addSetNext("mybean", "addMyBean");

I discovered that at the point addMyBean() is called, setBody() has not
been called yet.  I realize that I'm just setting up a Digester
here (not actually doing the parsing), so I can imagine that the order of
events is not really defined here.  However, it seems like the parsing
should generally follow the order that I set up the Digester in.  Am I
missing something?

Anyway, I'll look at the struts source and see if I can come up with
suggestions or patches for struts-dev, but I thought I'd share this info
in case it helps anyone.

Zach



Question about struts application model (DataSource, Business Logic beans)

2001-03-12 Thread Carles Pi-Sunyer
Title: Question about struts application model (DataSource, Business Logic beans)





Hi,


I'm using Struts for a new application that I'm developing. I have a question about the separation between the Action classes and the Business Logic beans. 

My Business Logic beans are making database accesses to manipulate the underlying data model. I am planning on using the struts db connection pool, which is supplied through the DataSource. My problem is that access to the DataSource is through the servlet.findDataSource() call. How do I make the Business Logic beans unaware of the servlet/http layer (as suggested in the developers guide) while still making the DataSource available to the Business Logic beans? Do I have to pass a reference to the DataSource on every call the Business Logic beans (not an option that I like), or is there a cleaner way to do this? I also have a similar issues with logging services.

I believe that a common way to solve this problem is to bind the DataSource to a jndi service. I am using tomcat 3.2.1, and I don't believe that this functionality is supplied in either Tomcat or Struts.

Thank You,
Carles





Re: Digester order of events

2001-03-12 Thread Zach Thompson

Sorry - I noticed a confusing mistake in my post.  I was never actually
calling "new SomeType()" - that's why there was no runtime error.

Zach Thompson wrote:
> Hello,
> 
> I just spent quite a bit of time debugging some code that uses a
> Digester, and I'd like to share what I found.
> 
> class MyBean {
> SomeType p = new SomeType();

SomeType p;

> public void setProp(SomeType p) {
> this.p = p;
> }
> 
> String name;
> public void setName(String name) {
> System.err.println("Setting name...");
> this.name = name;
> }
> }
> 
> ...
> 
> 
> 
> ...
> 
> digester.addSetProperties("mybean");
> 
> The name property was never being set..
> 
> The problem was that SomeType was not in my runtime CLASSPATH, so even
> though setProp() is never called, and hence no runtime error occurs,
> Digester fails to ever call setName().  Of course, the error here is
> really mine, but I'd like to at least see Digester give some debugging
> messages (I had debug detail set to 999).
> 
> 2.  Next I was trying to get the body of a tag and set a bean property
> with the content:
> 
> Some content
> 
> ...
> 
> digester.addSetProperties("mybean");
> digester.addCallMethod("mybean", "setBody", 0);
> digester.addSetNext("mybean", "addMyBean");
> 
> I discovered that at the point addMyBean() is called, setBody() has not
> been called yet.  I realize that I'm just setting up a Digester
> here (not actually doing the parsing), so I can imagine that the order of
> events is not really defined here.  However, it seems like the parsing
> should generally follow the order that I set up the Digester in.  Am I
> missing something?
> 
> Anyway, I'll look at the struts source and see if I can come up with
> suggestions or patches for struts-dev, but I thought I'd share this info
> in case it helps anyone.
> 
> Zach



Re: Digester order of events

2001-03-12 Thread martin . cooper

Regarding your first point, are you saying "There's a name attribute in the 
XML, but there's no corresponding setter, so the Digester should flag an 
error"? If not, I apologise for putting words in your mouth. :-}

One of the nice things about the Digester is that I can tell it which 
pieces of the XML I care about, and that's all it calls me about. If I 
don't care about the value of a certain attribute, I shouldn't need to 
provide for it. So I consider that a feature rather than a problem.

--
Martin Cooper

At 06:12 PM 3/12/01, Zach Thompson wrote:
>Hello,
>
>I just spent quite a bit of time debugging some code that uses a
>Digester, and I'd like to share what I found.
>
>class MyBean {
> SomeType p = new SomeType();
> public void setProp(SomeType p) {
> this.p = p;
> }
>
> String name;
> public void setName(String name) {
> System.err.println("Setting name...");
> this.name = name;
> }
>}
>
>...
>
>
>
>...
>
>digester.addSetProperties("mybean");
>
>The name property was never being set..
>
>The problem was that SomeType was not in my runtime CLASSPATH, so even
>though setProp() is never called, and hence no runtime error occurs,
>Digester fails to ever call setName().  Of course, the error here is
>really mine, but I'd like to at least see Digester give some debugging
>messages (I had debug detail set to 999).
>
>2.  Next I was trying to get the body of a tag and set a bean property
>with the content:
>
>Some content
>
>...
>
>digester.addSetProperties("mybean");
>digester.addCallMethod("mybean", "setBody", 0);
>digester.addSetNext("mybean", "addMyBean");
>
>I discovered that at the point addMyBean() is called, setBody() has not
>been called yet.  I realize that I'm just setting up a Digester
>here (not actually doing the parsing), so I can imagine that the order of
>events is not really defined here.  However, it seems like the parsing
>should generally follow the order that I set up the Digester in.  Am I
>missing something?
>
>Anyway, I'll look at the struts source and see if I can come up with
>suggestions or patches for struts-dev, but I thought I'd share this info
>in case it helps anyone.
>
>Zach





Re: Digester order of events

2001-03-12 Thread Craig R. McClanahan



On Mon, 12 Mar 2001, Zach Thompson wrote:

> Hello,
> 
> I just spent quite a bit of time debugging some code that uses a
> Digester, and I'd like to share what I found.
> 
> class MyBean {
> SomeType p = new SomeType();
> public void setProp(SomeType p) {
> this.p = p;
> }
> 
> String name;
> public void setName(String name) {
> System.err.println("Setting name...");
> this.name = name;
> }
> }
> 
> ...
> 
> 
> 
> ...
> 
> digester.addSetProperties("mybean");
>

Is the object on top of the stack (at runtime) a MyBean?  If it's not, and
if the object on top of the stack does not have a "name" property, your
rule will be silently ignored.

Typically, you would have an object create rule for each object, prior to
the set properties rule:

digester.addObjectCreate("mybean", "MyBean");
digester.addSetProperties("mybean");

to ensure that an object of the correct type is on top of the stack.
 
> The name property was never being set..
> 
> The problem was that SomeType was not in my runtime CLASSPATH, so even
> though setProp() is never called, and hence no runtime error occurs,
> Digester fails to ever call setName().  Of course, the error here is
> really mine, but I'd like to at least see Digester give some debugging
> messages (I had debug detail set to 999).
> 
> 2.  Next I was trying to get the body of a tag and set a bean property
> with the content:
> 
> Some content
> 
> ...
> 
> digester.addSetProperties("mybean");
> digester.addCallMethod("mybean", "setBody", 0);
> digester.addSetNext("mybean", "addMyBean");
> 
> I discovered that at the point addMyBean() is called, setBody() has not
> been called yet.  I realize that I'm just setting up a Digester
> here (not actually doing the parsing), so I can imagine that the order of
> events is not really defined here.  However, it seems like the parsing
> should generally follow the order that I set up the Digester in.  Am I
> missing something?
> 

There are order dependencies on the order in which you make these calls,
but it is actually somewhat more subtle than "call in the order I add the
rules".  This is because adding a rule registers things that happen at the
*beginning* of an XML element, as well as at the *end* of the XML element.

To illustrate this, let's assume you do the following:

digester.addObjectCreate("mybean", "com.mycompany.MyBean");
digester.addSetProperties("mybean");
digester.addCallMethod("mybean", "setBody", 0);
digester.addSetNext("mybean", "addMyBean");

and you process the XML file:

Some content

So what actually happens?  First, the events that are registered for the
beginning of the element are executed, in the order you registered them:

* (ObjectCreateRule) Instantiate the new object, and put it
  on the top of the stack.
* (SetPropertiesRule) Call the matching property setters on
  the top object on the stack, passing the values of the corresponding
  attributes.
* (CallMethodRule) No events registered.  If you had specified >0 call
  parameters, an array to contain them would have been pushed on the
  stack, to be processed by CallParamRule rules.
* (SetNextRule) No events registered.


Next, the body content of the  element is saved away.

Finally, the events that are registered for the end of the element are
executed, in REVERSE order:

* (SetNextRule) Call the specified method on the next-to-top object
  on the stack, passing the top object on the stack as an argument.
* (CallMethodRule) Call the specified method, passing the saved body
  content.  If you had specified >0 parameters, this rule would have
  popped the parameters array off the stack first and passed it instead.
* (SetPropertiesRule) No events registered.
* (ObjectCreateRule) Pop the top object off the stack.

> Anyway, I'll look at the struts source and see if I can come up with
> suggestions or patches for struts-dev, but I thought I'd share this info
> in case it helps anyone.
> 

You can do all this yourself by utililzing a SAX parser, but the Digester
module does most of the bookkeeping for you.  You'll find it much easier
to program, once you get the hang of how it works.

If you have got ideas about how to explain this process better in the
documentation, I'm all ears.

> Zach
> 

Craig





RE: Struts with IBM VisualAge for Java

2001-03-12 Thread dion

There are known issues with WAS 3.5.2 and struts, as WAS 3.5.2 does not 
completely implement Servlet 2.2.

Please see the install instructions off the struts home page for the exact 
details.
--
dIon Gillard, Multitask Consulting
Work:  http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf




[EMAIL PROTECTED]
13/03/2001 05:37 AM
Please respond to struts-user

 
To: [EMAIL PROTECTED]
cc: 
Subject:RE: Struts with IBM VisualAge for Java


No, WAS 3.5 supports Servlet API 2.2 with fixpack 2.

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:34 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java


Well, I eventually have to deploy to WebSphere for production.. do you 
think
that will be a problem?

-Original Message-
From: Nick Chalko [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:32 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Struts with IBM VisualAge for Java


I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 
stuff
before you install TOMCAT.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:27 AM
To: [EMAIL PROTECTED]
Subject: RE: Struts with IBM VisualAge for Java


Apache Tomcat Test Environment 3.1 is avialable as a VAJ feature from IBM.

http://www7.software.ibm.com/vad.nsf/

- Magnus

-Original Message-
From: Perez, Bill [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 7:15 PM
To: '[EMAIL PROTECTED]'
Subject: Struts with IBM VisualAge for Java


I can't seem to get Struts to work with VisualAge for Java 3.5.  The
WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
replace it with 2.2.  Is there anyway to get this working???

Billy Perez
Java Developer, e-ARCS






RE: The use of '..' in relative path includes in JSPs

2001-03-12 Thread James Cook

Thanks Craig, that confirms what I have previously read on the subject. It
also concerns me a little bit. There are legitimate times when the user may
want to open two different sessions (browsers) of a web application. Using
cookies to maintain the session there would be no way to identify the
separate client instances. You would have to reinvent your own session
management mechanism based on some other id value.

Using URL rewriting you could accomplish this. I'm surprised that the spec
hasn't made it a forceable alternative by now. Especially with the misplaced
concern over cookies the past couple years.

jim

> -Original Message-
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 7:41 PM
> To: [EMAIL PROTECTED]
> Subject: Re: The use of '..' in relative path includes in JSPs
>
>
>
>
> On Mon, 12 Mar 2001, James Cook wrote:
>
> > Sorry to keep repeating this, but I don't think I phrased it properly.
> >
> > Is there a technique where the session id is included in the
> URL even if the
> > client browser supports cookies? Basically, I *never* want to
> use cookies to
> > manage sessions, and I *always* want the session id encoded on the URLs.
> >
>
> The only way I can think of to do this is to configure your servlet
> container to not use cookies for session management, if it has such an
> option.  Tomcat versions greater than 3.1 can do this, but I don't know
> about any other containers in particular.
>
> Absent that approach, you could create a modified version of the
>  tag that forcibly included the session ID (in other words, it
> did the processing that response.encodeURL() usually does), but the cookie
> would still be included in the response as well, and the container will
> probably pay attention to the cookie, and not the session id from the URL,
> in subsequent requests.
>
> > thanks,
> > jim
> >
>
> Craig
>
>




More on my copyProperties/EJB woes

2001-03-12 Thread Bryan Field-Elliot
I've been tearing apart my problems using copyProperties in an EJB environment; 

The scenario is that I am using PropertyUtils.copyProperties to copy everything FROM a simple bean, TO an EJB entity bean.

Earlier tonight I thought that the hangup was over the destination bean,
perhaps because it was an EJB remote interface. But my digging turns up that
this isn't the case.

The exception is during the getting of the source properties (from my simple
bean), and it never even gets to the setting of the destination property.

I extracted a small piece of code from copyProperties and am executing it directly:

// pv is my simple bean, and "name" is a String property within in, which has a getter and a setter method.
PropertyDescriptor descriptor;

// Following two lines are key:
descriptor = PropertyUtils.getPropertyDescriptor(pv, "name");
//descriptor = new PropertyDescriptor("name", pv.getClass());

Method readMethod = descriptor.getReadMethod();
Object value = readMethod.invoke(pv, new Object[0]);


When I use the first of the two "descriptor = " lines (thereby making use
of Struts), I get the following exception on the invoke() line:

   Name: java.lang.IllegalArgumentExceptionMessage: object is not an instance of declaring class  Stack: java.lang.IllegalArgumentException: object is not an instance of declaring class	at java.lang.reflect.Method.invoke(Native Method)

However, when I use the second of the two "descriptor = " lines (thereby
using standard Java SDK reflection), the invoke() line executes correctly.

Any help would be appreciated.

This is using Struts 1.0 beta-1 (binaries).

Regards,
Bryan



AW: Mime mapping not found for file, while displaying static content

2001-03-12 Thread Oliver . Lauer



-Ursprüngliche Nachricht-
Von: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
Gesendet am: Montag, 12. März 2001 21:44
An: [EMAIL PROTECTED]
Betreff: Re: Mime mapping not found for file, while displaying static
content



On Mon, 12 Mar 2001 [EMAIL PROTECTED] wrote:

> Hi,
> 
> using the ReqestDispatcher.forward(URL) with a mapped URL I get the
> following repsonse:
> 
> "...Mime mapping not found for file, while displaying static content..."
> 
> I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
> that work ?
> 
> I'm trying to forward to a mapped URL like "logon.do" and want a specific
> servlet to be invoked described in my web.xml below.
>

Be sure you are actually using a context-relative path like
"/logon.do" (with a leading slash) rather than "logon.do".  This is
required by a RequestDispatcher.

==> I did so but it did'nt work
 
> Invoking a mapped URL within the browser works, with the
> RequestDispatcher.forward() not !
> 
> Any help appreciated !!
> Oliver
> 
> 
> web.xml:
> 
> 
> 
> ActionServlet
> *.do
>   
> 
> 
> do
> application/java-vm
>   
>

Why do you need this  entry at all?  If every request ending
with ".do" is going through your controller servlet, there will never be
any need to send a static response with this content type (which is what
the  entry normally means in web.xml).

==> I did not exactly know what that entry meant and therefore only another
straw that did'nt help.

Craig McClanahan




Re: problem with using redirect tag

2001-03-12 Thread kiatkin

>>Query string is valueA=aaa&valueB=

Thx for reply.. but this causing me can't retrieve the second parameter
(valueB)

   servlet.log("value A "+ request.getParameter("valueA"));
   servlet.log("value B " +request.getParameter("valueB"));

The output is
value A aaa
value B null

It is bug?

- Original Message -
From: "Incze Lajos" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 1:10 AM
Subject: Re: problem with using redirect tag


> > How come the 'amp;' is append after the '&' ?
>
> "&" is the html encoded "&".   incze


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




RE: Struts with IBM VisualAge for Java

2001-03-12 Thread Markus Torpvret

We're running Struts 1.0-beta-1 with WebSphere 3.5.3 (the new fixpack 3) and
it works pretty well out of the box. We're not using VisualAge though.

/Markus

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 13, 2001 5:04 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: Struts with IBM VisualAge for Java
> 
> 
> There are known issues with WAS 3.5.2 and struts, as WAS 
> 3.5.2 does not 
> completely implement Servlet 2.2.
> 
> Please see the install instructions off the struts home page 
> for the exact 
> details.
> --
> dIon Gillard, Multitask Consulting
> Work:  http://www.multitask.com.au
> NetRexx: http://www.multitask.com.au/NetRexx.nsf
> 
> 
> 
> 
> [EMAIL PROTECTED]
> 13/03/2001 05:37 AM
> Please respond to struts-user
> 
>  
> To: [EMAIL PROTECTED]
> cc: 
> Subject:RE: Struts with IBM VisualAge for Java
> 
> 
> No, WAS 3.5 supports Servlet API 2.2 with fixpack 2.
> 
> - Magnus
> 
> -Original Message-
> From: Perez, Bill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 7:34 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Struts with IBM VisualAge for Java
> 
> 
> Well, I eventually have to deploy to WebSphere for 
> production.. do you 
> think
> that will be a problem?
> 
> -Original Message-
> From: Nick Chalko [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 10:32 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Struts with IBM VisualAge for Java
> 
> 
> I have TOMCAT running in VAJ 3.5.  You have to delete the Servlet 2.1 
> stuff
> before you install TOMCAT.
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 10:27 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Struts with IBM VisualAge for Java
> 
> 
> Apache Tomcat Test Environment 3.1 is avialable as a VAJ 
> feature from IBM.
> 
> http://www7.software.ibm.com/vad.nsf/
> 
> - Magnus
> 
> -Original Message-
> From: Perez, Bill [mailto:[EMAIL PROTECTED]]
> Sent: Monday, March 12, 2001 7:15 PM
> To: '[EMAIL PROTECTED]'
> Subject: Struts with IBM VisualAge for Java
> 
> 
> I can't seem to get Struts to work with VisualAge for Java 3.5.  The
> WebSphere Test Environment only supports the Servlet 2.1 API.  I can't
> replace it with 2.2.  Is there anyway to get this working???
> 
> Billy Perez
> Java Developer, e-ARCS
> 
> 
>