Switch Action

2006-04-03 Thread Sahil Gupta
Hi, 
 
Can anyone tell me how to use Switch Action in my project. My project
consists of more than one module and I need to forward from one to
another file in different modules. 
 
Are there any good links available to get more information about it.
 

Regards,

Sahil Gupta

Extn : 233
Email : [EMAIL PROTECTED]   
**
NetEdge Computing Global Solutions Private Limited. 
A-14, Sector-7, NOIDA U.P. 201-301
Tel #  91-120-2423281, 2423282 
Fax #  91-120-2423279 
URL  http//www.netedgecomputing.com 
**
This message may contain confidential and/or privileged information. If
you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose or take any action based on
this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation. 
 


Re: Servlet action is not available

2006-04-03 Thread Craig McClanahan
On 4/3/06, red phoenix <[EMAIL PROTECTED]> wrote:
>
> Mr Craig,
>I  configure a JNDI in Tomcat5.5.12 like you tell me,like follows:
>
>  crossContext="true">
>  maxActive="100" maxIdle="30" maxWait="1" username="administrator"
> password="123" driverClassName="sun.jdbc.odbc.JdbcOdbcDriver"
> url="jdbc:odbc:SMS"/>
> 
>
> Then I call this JNDI in a JSP file,the JSP file is follows:
>
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]> <[EMAIL PROTECTED]@page> 
> import="java.sql.*"%>
> <[EMAIL PROTECTED] <[EMAIL PROTECTED]> import="javax.sql.DataSource"%>
> < [EMAIL PROTECTED] <[EMAIL PROTECTED]> import="javax.naming.*"%>
> 
> 
> <%
> try{
>   Context initCtx=new InitialContext();
>   System.out.println("ok");
>   DataSource db = (DataSource)initCtx.lookup("java:comp/env/jdbc/bb1");
>   System.out.println("db="+db);
>   Connection conn = db.getConnection();
>   System.out.println("conn="+conn);
>   Statement stmt = conn.createStatement();
>   ResultSet rs = stmt.executeQuery ("SELECT * FROM abc");
>   out.println("User-list"+"");
>   while(rs.next()){
>out.print(rs.getString(1)+"");
>   }
>   rs.close();
>   stmt.close();
>   conn.close();
> }catch(Exception e){
>   out.print(e);
> }
> %>
> 
> 
>
>
>
> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context
>
> Why?
> Any idea will be appreciated!


This error implies there is something wrong with your configuration, and
that the registration of the resource did not get completed successfully.
In my experience, there's usually a stack trace in the Tomcat logs that says
why it didn't get processed.   You might also want to add a call to:

e.printStackTrace();

inside your exception handler to see where the error is actually coming
from.

I don't use Tomcat 5.5 much myself (primarily 5.0) so I can't help you much
more than that ... best bet would be to ask questions on the Tomcat user
mailing list.

Craig

Best regards,
>
>
> On 4/4/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> >
> > On 4/3/06, red phoenix <[EMAIL PROTECTED]> wrote:
> > >
> > > My Struts is 1.2.9,and tomcat is 5.5.15,and JDK is 1.5,I want to use
> > > Struts
> > > Datasource,my database is Microsoft Access 2000,and I have configured
> > ODBC
> > > datasource in windows,when I run it, it raise follows error:
> > > type Status report
> > > message Servlet action is not available
> > > description The requested resource (Servlet action is not available)
> is
> > > not
> > > available.
> >
> >
> > "Servlet action is not available" almost always means that some
> exception
> > was thrown as the Struts action servlet was first initialized.  The
> > exception will be logged in one of the Tomcat log files
> > ($CATALINA_HOME/logs/*).
> >
> > In your particular case, the most likely problem is trying to use the
> > Struts
> > data source.  This functionality was deprecated in Struts 1.1, and was
> > removed in Struts 1.2.  You should use the JNDI data sources provided by
> > your container (Tomcat) instead.  There is pretty reasonable
> documentation
> > on the Tomcat web site for how to set this stuff up, which applies to
> all
> > webapps, not just Struts based ones.
> >
> >
> >
> >
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
> >
> > Historical note -- the only reason Struts 1.0 supplied a data source
> > implementation in the first place was that, six years ago, most servlet
> > containers did not support JNDI based resource access.  Now that they
> > (essentially) all do support JNDI, that is the recommended mechanism for
> > managing data sources.
> >
> > Craig
> >
> >
>
>


action not work

2006-04-03 Thread red phoenix
I have a submit button in A.jsp,and I want to submit to B.do from A.jsp,but
when I click this submit button,it should submit to B.do and show some
information on screen,but in fact it doesn't work,when I use
http://localhost:8080/B.do, it can work.I don't know why it don't work from
A.jsp to B.do?
My code is follows:
/*A.jsp*/
<%@ taglib uri="/WEB-INF/taglib/struts-html" prefix="html"%>





/*AForm.java*/
package test;
import org.apache.struts.action.ActionForm;
public class AForm extends ActionForm{
}

/*AAction.java*/
package test;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class AAction extends Action{
 public ActionForward execute(ActionMapping mapping,ActionForm
form,HttpServletRequest req,HttpServletResponse res){
  System.out.println("A action");
  return mapping.findForward("B");
 }
}

/*B.jsp*/


Hello world



/*BForm.java*/
package test;
import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;
public class BForm extends ActionForm{
   protected FormFile attachFile;
   public FormFile getAttachFile(){
 return attachFile;
  }
  public void setAttachFile(FormFile attachFile){
  this.attachFile=attachFile;
 }

/*BAction.java*/
package test;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.upload.FormFile;
public class BAction extends Action{
 public ActionForward execute(ActionMapping mapping,ActionForm
form,HttpServletRequest req,HttpServletResponse res){
  System.out.println("B action");
  return mapping.findForward("B");
}

/*struts-config.xml*/

http://struts.apache.org/dtds/struts-config_1_2.dtd
">




 

 
  
  
  
  
  
 
  

 


Re: Servlet action is not available

2006-04-03 Thread red phoenix
 Mr Craig,
   I  configure a JNDI in Tomcat5.5.12 like you tell me,like follows:





Then I call this JNDI in a JSP file,the JSP file is follows:

<[EMAIL PROTECTED] <[EMAIL PROTECTED]> <[EMAIL PROTECTED]@page> 
import="java.sql.*"%>
<[EMAIL PROTECTED] <[EMAIL PROTECTED]> import="javax.sql.DataSource"%>
< [EMAIL PROTECTED] <[EMAIL PROTECTED]> import="javax.naming.*"%>


<%
 try{
  Context initCtx=new InitialContext();
  System.out.println("ok");
  DataSource db = (DataSource)initCtx.lookup("java:comp/env/jdbc/bb1");
  System.out.println("db="+db);
  Connection conn = db.getConnection();
  System.out.println("conn="+conn);
  Statement stmt = conn.createStatement();
  ResultSet rs = stmt.executeQuery ("SELECT * FROM abc");
  out.println("User-list"+"");
  while(rs.next()){
   out.print(rs.getString(1)+"");
  }
  rs.close();
  stmt.close();
  conn.close();
 }catch(Exception e){
  out.print(e);
 }
%>





javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

Why?
 Any idea will be appreciated!

Best regards,


On 4/4/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
>
> On 4/3/06, red phoenix <[EMAIL PROTECTED]> wrote:
> >
> > My Struts is 1.2.9,and tomcat is 5.5.15,and JDK is 1.5,I want to use
> > Struts
> > Datasource,my database is Microsoft Access 2000,and I have configured
> ODBC
> > datasource in windows,when I run it, it raise follows error:
> > type Status report
> > message Servlet action is not available
> > description The requested resource (Servlet action is not available) is
> > not
> > available.
>
>
> "Servlet action is not available" almost always means that some exception
> was thrown as the Struts action servlet was first initialized.  The
> exception will be logged in one of the Tomcat log files
> ($CATALINA_HOME/logs/*).
>
> In your particular case, the most likely problem is trying to use the
> Struts
> data source.  This functionality was deprecated in Struts 1.1, and was
> removed in Struts 1.2.  You should use the JNDI data sources provided by
> your container (Tomcat) instead.  There is pretty reasonable documentation
> on the Tomcat web site for how to set this stuff up, which applies to all
> webapps, not just Struts based ones.
>
>
>
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html
>
> Historical note -- the only reason Struts 1.0 supplied a data source
> implementation in the first place was that, six years ago, most servlet
> containers did not support JNDI based resource access.  Now that they
> (essentially) all do support JNDI, that is the recommended mechanism for
> managing data sources.
>
> Craig
>
>


Re: Some questions

2006-04-03 Thread Comain Chen
I have used Eclipse+Myeclipse to develop, and it is quite convinient, At
least the build and deploy process can be done in a single step with
myeclipse.  Somes your change in your code does not affect dramaticly,
tomcat with hot deploying will handle it withour restarting, but the
othertimes you do have to rebuild the project and restart the server.



On 4/4/06, Mário Lopes <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> First off, a little bit of my background. I've been developing with
> Java for a long time now. None of it was web based development. On
> this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
> etc..
>
> Now that I'm encharged of developing a Java/JSP/Servlets application I
> had to decide about a framework to ease my life. It had to have a
> strong MVC pattern to enforce organization. So I picked Struts :-)
>
> Now that I've given it a test drive, some questions arose:
>
> 1) I tried using Eclipse, as I've always did, for developing. What IDE
> do you suggest?
> 2) I noticed that each time I did a simple change I had to build with
> ant to package a .war and then restart Tomcat to recognize it. Tomcat
> takes 20 secs to load which is absolutely unbearable. Is there a more
> agile way of doing things?
> 3) Is MyEclipse worth it?
>
> I think this is it.. for now :-) I'll be forever in debt for your kind
> replies.
>
> Regards,
>
> Mário Lopes
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
With best regrads,
Comain Chen


Some questions

2006-04-03 Thread Mário Lopes
Hi.

First off, a little bit of my background. I've been developing with
Java for a long time now. None of it was web based development. On
this field, I've programmed with PHP, .NET, Ruby on Rails, Python,
etc..

Now that I'm encharged of developing a Java/JSP/Servlets application I
had to decide about a framework to ease my life. It had to have a
strong MVC pattern to enforce organization. So I picked Struts :-)

Now that I've given it a test drive, some questions arose:

1) I tried using Eclipse, as I've always did, for developing. What IDE
do you suggest?
2) I noticed that each time I did a simple change I had to build with
ant to package a .war and then restart Tomcat to recognize it. Tomcat
takes 20 secs to load which is absolutely unbearable. Is there a more
agile way of doing things?
3) Is MyEclipse worth it?

I think this is it.. for now :-) I'll be forever in debt for your kind replies.

Regards,

Mário Lopes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Support for Transfer-Encoding: gzip

2006-04-03 Thread Graham Leggett

Dion Gillard wrote:


I use this filter in our web apps pretty successfully:

http://sourceforge.net/projects/pjl-comp-filter/


That did the trick - thank you!

Regards,
Graham
--


smime.p7s
Description: S/MIME Cryptographic Signature


[using class.forname()]

2006-04-03 Thread temp temp
I am using class.forname() in several classes  to load other   classes  so that 
 my application can be configured without  changing the exsisting code .
  I am not very clear about the issues which can come across using  class 
loaders .
  I tested in my localhost where all classes reside in one  container, it works 
.
  But in  production and tdl ,the  environment is  clustered   and app tier and 
web tier are seperated  so  could there be issues with class.forname() or  
dynamically  loading  classes which I donot see in my development  environment  
but can arise in production  because of  clustering or seperation of web tier 
and app tier.
  Thanks & Regards
  
  

-
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1¢/min.

RE: Issue while migrating from 1.0 to 1.1

2006-04-03 Thread Olivier Citeau
Hi Tim,
  Thank you for your answer.
  Now I see that I was not clear and I apologize for that.
   
  We migrated a project from :
  WSAD 5.0 / J2EE 1.2/ JDK1.3 (Websphere 5)
  to 
  RSA / J2EE 1.4 / JDK 1.4 (Websphere 6)
   
  We discovered the hard way that RSA's migration assistant suck.
  Our ".ear" was both j2ee1.2 and j2ee1.4
   
  So in order to get a j2ee1.4 ear I started a new blank project from RSA. RSA 
has Struts support, and I guess that it is 1.1.
   
  Tim, I solved my first issue before posting (Error 500...).
  It appears that if you do not specify anything about ressource bundle 
(neither in web.xml nor in struts-config.xml) Struts 1.0 is looking for 
"struts.properties" whereas Struts 1.1 is looking for 
ApplicationRessources.properties.
   
  So, yes I have this file "struts.properties" and my error template are 
defined there.
   
  Now here is my issue.
  In the form, if the user forgets a mandatory field, I do something like :
errors.add (...
...
return errors
  I do not use saveErrors(), because I use it only in the action.
   
  With WSAD/ Struts 1.0 it works fine : stay on same page and display errors.
  With RSA/Struts 1.1 it stay on same page and display nothing.
   
  And it is the same code !
  Same jsp, same form.
  As if the  tag stopped working.
   
  I try debugging, using request.getAttributeNames() from the jsp, but I found 
nothing even on Struts 1.0 where everything works fine. Thus my question of 
where Errors object are stored.

"Slattery, Tim - BLS" <[EMAIL PROTECTED]> a écrit :
  > Hi,
> while migrating my app tu Websphere 6, I choos to migrate 
> from Struts 1.0 to 1.1.
> (According to META-INF/MANIFEST.MF file, because I am not sure).
> 
> First when forgetting a file I had :
> Error 500: Cannot find message resources under key 
> org.apache.struts.action.MESSAGE 
> 
> I solved this issue in adding the following in web.xml:
> 
> 
application

> 
struts

> 

This language is telling Struts that there's a file named
"struts.properties" in your /WEB-INF/classes directory that has the
definitions of the strings referenced in your ActionError classes.

> Now my issue, is that it does not dispaly errors anymore.
> The "form.java" is the same in both version.
> The jsp file is the same.
> But does not display anything.

Does "struts.properties" exist? Have you defined your error template
strings there?

> By the way, where are errors message stored ? I found 
> nothing neither in the request nor in the session.

I'm not sure what you mean. What errors? In Struts 1.1.x, when you call
saveErrors(...) in your Action.perform function, the ActiveErrors object
is stored in the HttpRequest object.

--
Tim Slattery
[EMAIL PROTECTED]

-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

Struts Forward and URL prefix problem

2006-04-03 Thread Jeff Thorne
I am trying out struts action mappings and wildcards so that I can provide
my dynamic content static URLs that are

not based on query strings.

 

When my action class forwards to success or failure all the URLs in the
receiving .jsp page are prefix with the initial URL.

 

For example if I submit the following URL to my action class

 

http://www.example.com/getCompanyDetails/companyName/postalCode/CEO all the
urls in the receiving .jsp file look like

 

/getCompanyDetails/companyName/postalCode/CEO/contactUs.jsp - a contact us
link in my footer 

 

Here is my action definition:

 



  

  



 

Any advice you have on how to solve this would be appreciated.

 

Thanks again.

 

Cheers,

Jeff

 

 

 



Re: Tomcat not starting

2006-04-03 Thread Rick Reumann

Klaus Rohwer wrote the following on 4/3/2006 5:01 AM:


During startup Tomcat suddenly doesn't continue after having given out the
following lines:


03.04.2006 10:46:26 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
03.04.2006 10:46:26 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
03.04.2006 10:46:27 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='myStruts.ApplicationResources', returnNull=true



3) JARs that I am using:

commons-beanutils.jar
commons-digester.jar
javax.servlet.jar
struts.jar
xmlParserAPIs.jar



Not sure what the problem is exactly but you definitely don't need 
javax.servlet.jar and xmlParserAPIs.jar in your WEB-INF/lib for a Struts 
app to run.



--
Rick
http://www.learntechnology.net

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Shale] CLayForEach and var attribute

2006-04-03 Thread Gary VanMatre
>From: Hermod Opstvedt <[EMAIL PROTECTED]> 
>
> Hi 
> 
> I have a situation that I am struggling a bit with. On a page that I have, I 
> have a page that displays different races and has a clayForEach tag that is 
> supposed render a jsfid that displays information about a classes in a race, 
> and a dataTable on that jsfid that displays the results for each class. What 
> happens is that when I first hit that page, the method that backs the 
> clayForEach is called, but when I change to a different race, the method is 
> never called again, but it displays the classes w/results from the initial 
> load of that page. I seem to remember something about the clayForEach tag 
> and the var being session scoped? Should I explicitly do a 
> getExternalContext().getSessionMap().remove("myvar") in my backing beans 
> init method? 
> 

That's correct.  The data is stored in a map in session scope.  This is an 
attempt to cheat the complexity of the UIData component.  What the clayForEach 
component does is creates a naming container for each iteration.  It actually 
creates a grid of components versus the fly weight pattern that the UIData 
uses.  The data from the "var" attribute is organized in a map in session scope 
and the managed-bean-name symbol injects the prefix binding to the map 
therefore the complex decode in the UIData is not required.  The clayForEach is 
not a decendent of UIData.  It's just a dynamic way to create a grid of JSF 
components that have a strategy for binding.

The clayForEach is a "RUNTIME" uses of the clay component so this setup only 
happens when the view is created.  I think that is what is causing your 
problem.  You need the view to be recreated each time you select a race.  I 
would try adding a navigation rule back to the same page from the command that 
is associated with selecting a race.

If that doesn't work, I would suggest using the tomahawk dataList component.  
The clayForEach is a kluge in comparison.  

Example of the dataList:


 
  
 
  
 


> Hermod 
> 

Gary

> 
> - 
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
> For additional commands, e-mail: [EMAIL PROTECTED] 
> 

Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Michael Jouravlev
On 4/3/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> Frank
> I dont want to update all the jsp page, only the last
> name text field,
> I am able to do so if i do
> PrintWriter out = response.getWriter();
> out.println(last);
> return null;
>
> but suppose, i have 10-15 fields that need to be
> updated, how will i pass data ack to jsp
> Is there a way to pass java object to jsp, and then
> some how refresh these 10-15 fields.
> I dont want to write html generating code in
> ActionClass, but just send data and jsp handle it. and
> refresh those 10-15 fields

JSP already works with Java objects. I guess what you meant is "to
pass java object to client-side HTML/DOM". You cannot send Java to
HTML page, but you can send Javascript object, search for "JSON". You
can also sent XML structure and parse it on the client.

Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Michael Jouravlev
On 4/3/06, Ashish Kulkarni <[EMAIL PROTECTED]> wrote:
> hi
> I am trying to learn AJAX and struts together (will
> use some standard solution later)
> This is what i am doing,
> In my jsp i have 2 text fields FirstName and LastName
> when the user enters FirstName and hits enter i call a
> javascript which creates XMLHttpRequest objects, and
> calls a Action class using GET , it send parameter as
> name  some thing like this
> GetNameAction.do?first=name
>
> this Action class then populates last name,
> In servlet i would just do
> PrintWriter out = response.getWriter();
> out.println(last); and works fine, but i dont want to
> do it that way,
> In Struts, i want to populate ActionForm, and then
> refresh jsp page
>
> How do i do it
>
> Ashish

Search for: "partial submit", "Google suggests", "in place update", "AHAH".

Plugging my product in: JSP Controls Tag Library provides in-place
update and Struts integration. Th partial submit feature is exected in
the next version, which should be released in about a week. But if you
are looking for something to use right now, google the keywords I
listed above.

Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Michael Jouravlev
On 4/3/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> Then again, if you were to return a redirecting forward, that might do the
> trick.  I'm actually not sure how XMLHttpRequest reacts to a redirect...
> that's an interesting question :)

It does not, I tried it ;-)

On the other hand, there is no sense in using XHR to initiate full page reload.

Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Ashish Kulkarni
Frank
I dont want to update all the jsp page, only the last
name text field,
I am able to do so if i do 
PrintWriter out = response.getWriter();
out.println(last);
return null;

but suppose, i have 10-15 fields that need to be
updated, how will i pass data ack to jsp
Is there a way to pass java object to jsp, and then
some how refresh these 10-15 fields.
I dont want to write html generating code in
ActionClass, but just send data and jsp handle it. and
refresh those 10-15 fields

I have looked at DWR also, but it only handles Java
Beans, how do i make it call ActionClass, i need this
because i have to get information about session,
request, servlet context and then process data.
Is it possible to do get all this information using
DWR and also about security, i have ServletFilter in
place which checks few things for security, how will
it be affected uwing DWR

Ashish

--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> On Mon, April 3, 2006 1:19 pm, Ashish Kulkarni said:
> > In Struts, i want to populate ActionForm, and then
> > refresh jsp page
> 
> This is pretty much the exact opposite of what AJAX
> is for :)  Refreshing
> the whole page is what your actually tring to avoid
> with AJAX.
> 
> You can populate the form fields yourself in a
> Javascript callback
> function, or I suppose you could fire off a refresh
> of the page from a
> callback if you really wanted to do that.
> 
> Have a look here:
> 
> http://www.omnytex.com/articles
> 
> This has an article about doing AJAX with Struts,
> and shows some examples
> of updating form fields.
> 
> You may also want to see this Wiki page:
> 
> http://wiki.apache.org/struts/AjaxStruts
> 
> And, if you don't feel like writing the client-side
> code yourself, have a
> look at this library:
> 
> http://javawebparts.sourceforge.net
> 
> Specifically, click the Javadocs link, and then
> navigate to the AjaxTags
> package.  This is a taglib for implementing AJAX in
> an application, Struts
> or otherwise, in a completely declarative fashion,
> without having to write
> a lot (or any!) Javascript yourself.
> 
> Alternatively, I'm a big fan of DWR:
> 
> http://getahead.ltd.uk/dwr
> 
> Although AjaxTags will save you from writing a lot
> of script yourself, DWR
> is a more RPC-like mechanism, and handles
> transmutation of Java objects to
> Javascript objects, and really works very well.
> 
> > Ashish
> 
> Frank
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


A$HI$H

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Shale] CLayForEach and var attribute

2006-04-03 Thread Hermod Opstvedt
Hi

I have a situation that I am struggling a bit with. On a page that I have, I
have a page that displays different races and has a clayForEach tag that is
supposed render a jsfid that displays information about a classes in a race,
and a dataTable on that jsfid that displays the results for each class. What
happens is that when I first hit that page, the method that backs the
clayForEach is called, but when I change to a different race, the method is
never called again, but it displays the classes w/results from the initial
load of that page. I seem to remember something about the clayForEach tag
and the var being session scoped? Should I explicitly do a
getExternalContext().getSessionMap().remove("myvar") in my backing beans
init method?

Hermod


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Frank W. Zammetti
That's true Brian, but if he doesn't have appropriate code on the
client-side to handle the response, it won't do much good in this
particular case.  Remember he's getting the response via XMLHttpRequest.

Then again, if you were to return a redirecting forward, that might do the
trick.  I'm actually not sure how XMLHttpRequest reacts to a redirect...
that's an interesting question :)

Frank

On Mon, April 3, 2006 1:32 pm, Brian Long said:
>
> Ashish,
>
> There's a built-in method you can use to return to the calling jsp.
>
> Try return (mapping.getInputForward());
>
> from your Action class.
>
> hope that helps,
> -Brian
>
>
> On Mon, 2006-04-03 at 10:19 -0700, Ashish Kulkarni wrote:
>> hi
>> I am trying to learn AJAX and struts together (will
>> use some standard solution later)
>> This is what i am doing,
>> In my jsp i have 2 text fields FirstName and LastName
>> when the user enters FirstName and hits enter i call a
>> javascript which creates XMLHttpRequest objects, and
>> calls a Action class using GET , it send parameter as
>> name  some thing like this
>> GetNameAction.do?first=name
>>
>> this Action class then populates last name,
>> In servlet i would just do
>> PrintWriter out = response.getWriter();
>> out.println(last); and works fine, but i dont want to
>> do it that way,
>> In Struts, i want to populate ActionForm, and then
>> refresh jsp page
>>
>> How do i do it
>>
>> Ashish
>>
>> __
>> Do You Yahoo!?
>> Tired of spam?  Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
> --
> Brian M. Long
> Middleware Services, Virginia Tech
> "Ancora Imparo (I am still learning)" - Michaelangelo, age 87
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Brian Long

Ashish,

There's a built-in method you can use to return to the calling jsp.

Try return (mapping.getInputForward());

from your Action class.

hope that helps,
-Brian


On Mon, 2006-04-03 at 10:19 -0700, Ashish Kulkarni wrote:
> hi
> I am trying to learn AJAX and struts together (will
> use some standard solution later)
> This is what i am doing, 
> In my jsp i have 2 text fields FirstName and LastName
> when the user enters FirstName and hits enter i call a
> javascript which creates XMLHttpRequest objects, and
> calls a Action class using GET , it send parameter as
> name  some thing like this
> GetNameAction.do?first=name
> 
> this Action class then populates last name, 
> In servlet i would just do 
> PrintWriter out = response.getWriter();
> out.println(last); and works fine, but i dont want to
> do it that way,
> In Struts, i want to populate ActionForm, and then
> refresh jsp page
> 
> How do i do it
> 
> Ashish
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
-- 
Brian M. Long
Middleware Services, Virginia Tech
"Ancora Imparo (I am still learning)" - Michaelangelo, age 87



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Frank W. Zammetti
On Mon, April 3, 2006 1:19 pm, Ashish Kulkarni said:
> In Struts, i want to populate ActionForm, and then
> refresh jsp page

This is pretty much the exact opposite of what AJAX is for :)  Refreshing
the whole page is what your actually tring to avoid with AJAX.

You can populate the form fields yourself in a Javascript callback
function, or I suppose you could fire off a refresh of the page from a
callback if you really wanted to do that.

Have a look here:

http://www.omnytex.com/articles

This has an article about doing AJAX with Struts, and shows some examples
of updating form fields.

You may also want to see this Wiki page:

http://wiki.apache.org/struts/AjaxStruts

And, if you don't feel like writing the client-side code yourself, have a
look at this library:

http://javawebparts.sourceforge.net

Specifically, click the Javadocs link, and then navigate to the AjaxTags
package.  This is a taglib for implementing AJAX in an application, Struts
or otherwise, in a completely declarative fashion, without having to write
a lot (or any!) Javascript yourself.

Alternatively, I'm a big fan of DWR:

http://getahead.ltd.uk/dwr

Although AjaxTags will save you from writing a lot of script yourself, DWR
is a more RPC-like mechanism, and handles transmutation of Java objects to
Javascript objects, and really works very well.

> Ashish

Frank

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



action tag vanishing?

2006-04-03 Thread Brian Long

Greetings All.

I'm migrating an existing webapp to Struts.  An Action tag in my menu is
getting blown away.  The application is in the middle of migration, so
there are some struts-enabled jsps and some vanilla jsps.

On first navigation to the menu, the code works fine.  After navigating
to a non-struts page, then back to the menu, the url is corrupted - as
if the /viewGroupQuery link were redefined to "".

The Action is defined at session scope.  The corruption of the Action
remains across multiple sessions.

I'm using Struts 1.2.9 w/ Tiles.

Has anyone seen this behavior?

Thanks in advance,
-Brian

--- code snippets ---



 







  <% if (activeItem.equalsIgnoreCase("group.query")) { %>

  
  Query a Group

  <% } else { %>

  
  Query a Group

  <% } // END GROUP QUERY ACTIVE ITEM CHECK %>





-- 
Brian M. Long
Middleware Services, Virginia Tech
"Ancora Imparo (I am still learning)" - Michaelangelo, age 87



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



using AJAX and Struts Action class how to refresh data on jsp page

2006-04-03 Thread Ashish Kulkarni
hi
I am trying to learn AJAX and struts together (will
use some standard solution later)
This is what i am doing, 
In my jsp i have 2 text fields FirstName and LastName
when the user enters FirstName and hits enter i call a
javascript which creates XMLHttpRequest objects, and
calls a Action class using GET , it send parameter as
name  some thing like this
GetNameAction.do?first=name

this Action class then populates last name, 
In servlet i would just do 
PrintWriter out = response.getWriter();
out.println(last); and works fine, but i dont want to
do it that way,
In Struts, i want to populate ActionForm, and then
refresh jsp page

How do i do it

Ashish

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Issue while migrating from 1.0 to 1.1

2006-04-03 Thread Slattery, Tim - BLS
> Hi,
>   while migrating my app tu Websphere 6, I choos to migrate 
> from Struts 1.0 to 1.1.
>   (According to META-INF/MANIFEST.MF file, because I am not sure).
>
>   First when forgetting a file I had :
>   Error 500: Cannot find message resources under key 
> org.apache.struts.action.MESSAGE 
>
>   I solved this issue in adding the following in web.xml:
>   
>   application
>   struts
>   

This language is telling Struts that there's a file named
"struts.properties" in your /WEB-INF/classes directory that has the
definitions of the strings referenced in your ActionError classes.

>   Now my issue, is that it does not dispaly errors anymore.
>   The "form.java" is the same in both version.
>   The jsp file is the same.
>   But  does not display anything.

Does "struts.properties" exist? Have you defined your error template
strings there?

>   By the way, where are errors message stored ? I found 
> nothing neither in the request nor in the session.

I'm not sure what you mean. What errors? In Struts 1.1.x, when you call
saveErrors(...) in your Action.perform function, the ActiveErrors object
is stored in the HttpRequest object.

--
Tim Slattery
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Servlet action is not available

2006-04-03 Thread Craig McClanahan
On 4/3/06, red phoenix <[EMAIL PROTECTED]> wrote:
>
> My Struts is 1.2.9,and tomcat is 5.5.15,and JDK is 1.5,I want to use
> Struts
> Datasource,my database is Microsoft Access 2000,and I have configured ODBC
> datasource in windows,when I run it, it raise follows error:
> type Status report
> message Servlet action is not available
> description The requested resource (Servlet action is not available) is
> not
> available.


"Servlet action is not available" almost always means that some exception
was thrown as the Struts action servlet was first initialized.  The
exception will be logged in one of the Tomcat log files
($CATALINA_HOME/logs/*).

In your particular case, the most likely problem is trying to use the Struts
data source.  This functionality was deprecated in Struts 1.1, and was
removed in Struts 1.2.  You should use the JNDI data sources provided by
your container (Tomcat) instead.  There is pretty reasonable documentation
on the Tomcat web site for how to set this stuff up, which applies to all
webapps, not just Struts based ones.


http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html

Historical note -- the only reason Struts 1.0 supplied a data source
implementation in the first place was that, six years ago, most servlet
containers did not support JNDI based resource access.  Now that they
(essentially) all do support JNDI, that is the recommended mechanism for
managing data sources.

Craig


RE: Error deploying struts webapp to iPlanet

2006-04-03 Thread nageshkumar.siddu

Hi David,
Thanks for the reply.

Yes this portion of HTML code is in side Table definition.


The VO I am trying to access the properties in the tags is as follows:

public class TopupMethodVO implements Serializable{
  
private String topumMethod=null;
private ArrayList bundles=null;
private ArrayList selBundles=null;
 
public TopupMethodVO() {

}
// getter/ setter methods
 }


Regards,
Nagesh




-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 9:37 PM
To: Struts Users Mailing List
Subject: RE: Error deploying struts webapp to iPlanet

Just to nitpick, do you care that your below HTML has an opening TR,
opening TD, then another opening TR and opening TD BUT NO TABLE
declaration between them?

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 11:53 AM
To: user@struts.apache.org
Subject: FW: Error deploying struts webapp to iPlanet



 Hi ,
I hope  this issue can be resolved  which i am struggling for a couple
of days.
The scenario:
 I have an application perfectly working in Tomcat 5.0. the same
application when deployed in iPlanet is giving an error that
unterminated tag.
 [03/Apr/2006:17:16:55] failure ( 5100): for host 10.116.21.235 trying
to POST //offerMetadata.do, service-j2ee reports:
StandardWrapperValve[action]: WEB2792: Servlet.service() for servlet
action threw exception
org.apache.jasper.compiler.ParseException:
/jsp/offer/oneoffSubscription.jsp(480,33) WEB4118: Unterminated
user-defined tag: ending tag  not found or
incorrectly nested  at
org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:901)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1157)

 I am posting the part of the JSP code with the select tag that is
giving problem.
 

// topupMethodVOList
is an arrayList available in session scope
















//bundles
this is an arrayList inside each topupMethodVO whose collection is
itereting in the above iterate tag with "topupMethodVOList" as ArrayList











/// this tag is not closed is the error??










any references  on this issue ?? I guess the problem can be with
"handling nested properties of VO"?? but i am not sure how to go about
it.
 regards,
Nagesh



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s)
and may contain proprietary, confidential or privileged information. If
you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and
destroy all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses.
The company accepts no liability for any damage caused by any virus
transmitted by this email.
 www.wipro.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Issue while migrating from 1.0 to 1.1

2006-04-03 Thread Olivier Citeau
Hi,
  while migrating my app tu Websphere 6, I choos to migrate from Struts 1.0 to 
1.1.
  (According to META-INF/MANIFEST.MF file, because I am not sure).
   
  First when forgetting a file I had :
  Error 500: Cannot find message resources under key 
org.apache.struts.action.MESSAGE 
   
  I solved this issue in adding the following in web.xml:
  
  application
  struts
  
   
  Now my issue, is that it does not dispaly errors anymore.
  The "form.java" is the same in both version.
  The jsp file is the same.
  But  does not display anything.
   
  By the way, where are errors message stored ? I found nothing neither in the 
request nor in the session.


-
 Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs 
exceptionnels pour appeler la France et l'international.Téléchargez la version 
beta.

RE: Error deploying struts webapp to iPlanet

2006-04-03 Thread David G. Friedman
Just to nitpick, do you care that your below HTML
has an opening TR, opening TD, then another opening
TR and opening TD BUT NO TABLE declaration between
them?

Regards,
David

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, April 03, 2006 11:53 AM
To: user@struts.apache.org
Subject: FW: Error deploying struts webapp to iPlanet



 Hi ,
I hope  this issue can be resolved  which i am struggling for a couple
of days.
The scenario:
 I have an application perfectly working in Tomcat 5.0. the same
application when deployed in iPlanet is giving an error that
unterminated tag.
 [03/Apr/2006:17:16:55] failure ( 5100): for host 10.116.21.235 trying to
POST //offerMetadata.do, service-j2ee reports:
StandardWrapperValve[action]: WEB2792: Servlet.service() for servlet
action threw exception
org.apache.jasper.compiler.ParseException:
/jsp/offer/oneoffSubscription.jsp(480,33) WEB4118: Unterminated
user-defined tag: ending tag  not found or
incorrectly nested
 at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:901)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1157)

 I am posting the part of the JSP code with the select tag that is giving
problem.
 

// topupMethodVOList
is an arrayList available in session scope
















//bundles
this is an arrayList inside each topupMethodVO whose collection is
itereting in the above iterate tag with "topupMethodVOList" as ArrayList











/// this tag is not closed is the error??










any references  on this issue ?? I guess the problem can be with
"handling nested properties of VO"?? but i am not sure how to go about
it.
 regards,
Nagesh



The information contained in this electronic message and any attachments to 
this message are intended for the exclusive
use of the addressee(s) and may contain proprietary, confidential or privileged 
information. If you are not the intended
recipient, you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately and destroy
all copies of this message and any attachments.
WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for
the presence of viruses. The company accepts no liability for any damage caused 
by any virus transmitted by this email.
 www.wipro.com


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



FW: Error deploying struts webapp to iPlanet

2006-04-03 Thread nageshkumar.siddu


Hi ,
I hope  this issue can be resolved  which i am struggling for a couple
of days.
The scenario:

I have an application perfectly working in Tomcat 5.0. the same
application when deployed in iPlanet is giving an error that
unterminated tag.

[03/Apr/2006:17:16:55] failure ( 5100): for host 10.116.21.235 trying to
POST //offerMetadata.do, service-j2ee reports:
StandardWrapperValve[action]: WEB2792: Servlet.service() for servlet
action threw exception
org.apache.jasper.compiler.ParseException:
/jsp/offer/oneoffSubscription.jsp(480,33) WEB4118: Unterminated
user-defined tag: ending tag  not found or
incorrectly nested
 at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:901)
 at org.apache.jasper.compiler.Parser.parse(Parser.java:1157)


I am posting the part of the JSP code with the select tag that is giving
problem.



// topupMethodVOList
is an arrayList available in session scope

















//bundles
this is an arrayList inside each topupMethodVO whose collection is
itereting in the above iterate tag with "topupMethodVOList" as ArrayList











/// this tag is not closed is the error??













any references  on this issue ?? I guess the problem can be with
"handling nested properties of VO"?? but i am not sure how to go about
it.

regards,
Nagesh




The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Re: How to configure Struts connection pool

2006-04-03 Thread Tarun Reddy
Hi Craig,
I'm very glad to recieve an e-mail from you. I keep following your
interviews in www.theserverside.com . Well I didn't know that Struts
DataSource concept has been deprecated. I've been using Weblogic from so
many years and it's very easy to configure datasources and connection pools
in Weblogic.

Thanks,
Tarun.

On 4/2/06, Craig McClanahan <[EMAIL PROTECTED]> wrote:
>
> On 4/2/06, Tarun Reddy <[EMAIL PROTECTED]> wrote:
> >
> > Could you please try not to configure your data source in Tomcat?
> Instead
> > try to configure your datasource only in struts-config.xml file as I've
> > mentioned. It should work. Please get rid of the JNDI lookup code from
> the
> > JSP and use the getDataSource(request) method which is very intelligent
> > enough to pick up the datasource object. Just to try this approach,
> > comment
> > out the resource definitions part in Tomcat and confiure the datasource
> > exactly as I've mentioned. I was also facing some problems when I tried
> to
> > keep the "key" attribute and retrieve the DataSource object through JNDI
> > lookup. Let me know if you still face any issues.
>
>
> Tarun,
>
> Using a Struts data source, instead of JNDI, is not a good long term
> solution.  Indeed, the Struts data source implementation was deprecated in
> version 1.1 and removed in version 1.2.  Current best practice for
> configuring data sources *is* to use the JNDI capabilities of your
> container.  The only reason that Struts provided a data source
> implementation at all is that servlet containers six years ago did not
> support JNDI.  Now they do.
>
> Tomcat has pretty reasonable documentation on how to configure and use
> JNDI-based data sources.  Start at:
>
> http://tomcat.apache.org/tomcat-5.0-doc/jndi-resources-howto.html
>
> and
>
>
>
> http://tomcat.apache.org/tomcat-5.0-doc/jndi-datasource-examples-howto.html
>
> If you still have questions, the Tomcat user mailing list is a good place
> to
> get answers.
>
>
> Thanks,
> > Tarun.
>
>
> Craig
>
>


Re: Support for Transfer-Encoding: gzip

2006-04-03 Thread Dion Gillard
I use this filter in our web apps pretty successfully:

http://sourceforge.net/projects/pjl-comp-filter/

On 4/3/06, Graham Leggett <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I have a struts application that calls business logic from Action classes,
> and displays HTML results via JSP.
>
> I would like my application to compress content on the fly (on the basis
> of the Accept-Encoding header) using gzip. Is there a way to get Struts to
> do this for me?
>
> Regards,
> Graham
> --
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris


Support for Transfer-Encoding: gzip

2006-04-03 Thread Graham Leggett
Hi all,

I have a struts application that calls business logic from Action classes,
and displays HTML results via JSP.

I would like my application to compress content on the fly (on the basis
of the Accept-Encoding header) using gzip. Is there a way to get Struts to
do this for me?

Regards,
Graham
--



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Drawing of Struts web application

2006-04-03 Thread DGraham
Maybe Struts Console is what you're looking for: 
http://www.jamesholmes.com/struts/console/

-Dennis





"Dan Jas" <[EMAIL PROTECTED]> 
04/01/2006 12:02 PM
Please respond to
"Struts Users Mailing List" 


To
"Struts Users Mailing List" 
cc

Subject
Re: Drawing of Struts web application






Exadel Studio at http://exadel.com/web/portal/products/ExadelStudio
is free and will read your Struts-Config.xml file and display a mapping.

I don't know if you can print from it but it is a start.


- Original Message - 
From: "Adam Hardy" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Saturday, April 01, 2006 11:46 AM
Subject: Re: Drawing of Struts web application


> chuanjiang lo on 31/03/06 13:56, wrote:
>> Hi all,
>>
>> I've recently developed a struts web application and with all the 
>> mappings
>> here and there..i think it would be good for me to have some visual
>> documentation on how the web application flows from a  page to another.
>>
>> Is there any good open source tool or plugins to netbeans or eclipse i 
>> can
>> use to draw the mappings? It would be great if reverse engineering is
>> possible  so that it can just read all my struts-config files and come 
>> out
>> with the diagram.
>
> Hi Chuan,
> try argouml. I'm not sure about the reverse engineering capabilities, 
but 
> it's good for UML.
>
> Adam
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Validwhen

2006-04-03 Thread Julian Tillmann
Hi I tried now for several hours to fix my validwhen-example.

The property time should only be validated if the checkbox (property
calculatingShift)

Is not checked.

How can help me? Thank you so much!

 

 



  

 

 

   

test

(calculatingShift==false)

  

 

   

datePatternStrict

HH:mm

  

  

   

   

   

 

On tomcat the error message is: No input attribute for mapping path 

-- 
E-Mails und Internet immer und überall!
1&1 PocketWeb, perfekt mit GMX: http://www.gmx.net/de/go/pocketweb

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet action is not available

2006-04-03 Thread red phoenix
My Struts is 1.2.9,and tomcat is 5.5.15,and JDK is 1.5,I want to use Struts
Datasource,my database is Microsoft Access 2000,and I have configured ODBC
datasource in windows,when I run it, it raise follows error:
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not
available.

My code is follows:
/*TestForm.java*/

*package* test;*import* org.apache.struts.action.*;*public* *class*
TestForm *extends* ActionForm{}



/*TestAction.java*/

*package* test;*import* java.io.*;*import* java.util.*;*import*
java.sql.*;*import* org.apache.struts.action.Action;*import*
org.apache.struts.action.ActionForm;*import*
org.apache.struts.action.ActionForward;*import*
org.apache.struts.action.ActionMapping;*import*
javax.servlet.http.HttpServletRequest;*import*
javax.servlet.http.HttpServletResponse;
 *public* *class* TestAction *extends* Action {
 *public* ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
*throws* Exception {
  System.out.println("ok");

  javax.sql.DataSource dataSource;
  java.sql.Connection myConnection=*null*;
  *try*{
   dataSource = getDataSource(request);
  myConnection = dataSource.getConnection();
  Statement stmt = myConnection.createStatement();
  ResultSet rs = stmt.executeQuery("SELECT * FROM abc");

  *while*(rs.next()){
   System.out.print(rs.getString(1));
  }
  rs.close();
  stmt.close();

 }*catch*(Exception e){
  e.printStackTrace();
 }
 *finally*{
  *try* {
myConnection.close();
 }
 *catch* (SQLException e) {
   e.printStackTrace();
 }
 }
  *return* *null*;
   }}



/*Struts-config.xml*/


http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>















 








/*test.jsp*/



OK





/*web.xml*/


http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>

  Struts Blank Application
  
  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  2


  detail
  2

2
  
  
  
action
*.do
  
  
  
index.jsp
  
  
  
/tags/struts-bean
/WEB-INF/struts-bean.tld
  
  
/tags/struts-html
/WEB-INF/struts-html.tld
  
  
/tags/struts-logic
/WEB-INF/struts-logic.tld
  
  
/tags/struts-nested
/WEB-INF/struts-nested.tld
  
  
/tags/struts-tiles
/WEB-INF/struts-tiles.tld
  




When I run http://localhost:8080/Test.do,it raise following error:
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not
available.

When I removes data-source from Struts-config.xml,it can run well.But when I
add data-source into Struts-config.xml,it raise above erorr. I am puzzled
with it very much! Anybody can tell me the reason and how to correct it?

Thanks in advance!


How to display Integer vector in

2006-04-03 Thread Gaet
Hello,

I have a vector of Integer that I want to display in a "select" tag.

When writting the following code :



I got the following error :
 "Error 500: No getter method available for property productionYear for
bean under name productionYearsVector "

Does someone know how to do?

Thanks!




Tomcat not starting

2006-04-03 Thread Klaus Rohwer
Hello together,

I have a problem with Tomcat not starting which seems related to using
Struts.

During startup Tomcat suddenly doesn't continue after having given out the
following lines:


03.04.2006 10:46:26 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.util.LocalStrings',
returnNull=true
03.04.2006 10:46:26 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.action.ActionResources',
returnNull=true
03.04.2006 10:46:27 org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='myStruts.ApplicationResources', returnNull=true


I will give you excerpts of my web.xml file, of my struts-config-file and a
list of the jars I am using (cause it seemed to me that some JARS seemed to
cause trouble!)

1) web.xml


http://java.sun.com/dtd/web-app_2_3.dtd";>

  
action
org.apache.struts.action.ActionServlet

  config
  /WEB-INF/struts-config.xml


  debug
  2

2
  
  
action
*.do
  
  
login.jsp
  
  
... taglibs
  



2) struts-config.xml



http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>

  
... form-beans ...
  
  
... global-forwards ...
  
  
... action-mappings ...
  
  




3) JARs that I am using:

commons-beanutils.jar
commons-digester.jar
javax.servlet.jar
struts.jar
xmlParserAPIs.jar


Please tell me if you notice any mistakes!

Thanks a lot in advance and best regards,

Klaus

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



"Valid when"-Example

2006-04-03 Thread Julian Tillmann
Hi,

would someone be so kind to help me with the following problem:
 
A date field should only be validated 
if another checkbox isn't selected.
 
I'm not sure how to do it:
Do I have to use validwhen or reiqired-if??
I cannot find any good examples or references concerning my problem.

Here is my code snippet:





var
//-->this is the property that should decide if a check
is necessary or not (the bean-property of a html-checkbox)
(selectionForShift==false)



Help would be highly appreciated as this is really driving me crazy 

Thanks a lot
Julian


-- 
Echte DSL-Flatrate dauerhaft für 0,- Euro*!
"Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl

-- 
GMX Produkte empfehlen und ganz einfach Geld verdienen!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]