How to get a handle to ActionMappings from within an Action

2002-07-31 Thread Cutrell, George

How do you get a hold of the ActionMappings from within an Action?  I have
the case where I need to forward to another action but before doing so I
need to setup the form bean for that action.  To properly set the form bean
in either the request or session, I need to get its attribute name.
mapping.getAttribute() returns the attribute name of the form bean within
the context of the present action.  How do I do the same but for another
action and form?
 
Thanks,
George Cutrell
Technical Manager, Wireless Applications Development
Nextel Communications, Inc.
Desk: 703.433.8868
Mobile: 703.926.7851 



 



java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule

2001-12-21 Thread Cutrell, George

Platform: Solaris 8
App Server: iAS 6.0 SP4.  

This is a newbie question.  I'm simple trying to get a simple form and
action example working and I get the following exception. My
struts-config.xml and web.xml indicate nothing about configuring a
datasource, so I'm not sure why I would get this.  Any pointers would be
great!

[21/Dec/2001 10:33:27:2] info: --
[21/Dec/2001 10:33:27:2] info: WelcomeListServlet: init
[21/Dec/2001 10:33:27:2] info: --
[21/Dec/2001 10:33:27:2] info: --
[21/Dec/2001 10:33:27:2] info: action: init
[21/Dec/2001 10:33:27:2] info: --
[21/Dec/2001 10:33:27:2] error: Exception: SERVLET-execution_failed: Error
in executing servlet WelcomeListServlet: java.lang.IllegalAccessError:
org/apache/struts/action/AddDataSourceRule
Exception Stack Trace:
java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule
at org.apache.struts.action.ActionServlet.initDigester(Compiled
Code)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1267)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:461)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unkn
own Source)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Un
known Source)
at
com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Compiled
Code)
at
com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Compiled
Code)
at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServletCo
ntext(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.doJSPInclude(Un
known Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.streamFileToCli
ent(Unknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.service(Compile
d Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

[21/Dec/2001 10:33:27:2] error: APPLOGIC-caught_exception: Caught Exception:
java.lang.ClassCastException: java.lang.IllegalAccessError
at
com.netscape.server.servlet.servletrunner.ServletRunner.reportError(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

George Cutrell 
Technical Manager, Wireless Applications Development 
Nextel Communications, Inc. 
Desk:  703.433.8868 
Mobile:   703.926.7851 



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




java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule

2001-12-26 Thread Cutrell, George

Any ideas why I'd be getting the following exception when my
struts-config.xml file does not have a  section?

java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule
at org.apache.struts.action.ActionServlet.initDigester(Compiled
Code)
at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:1267)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:461)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Comp
iled Code)
at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(C
ompiled Code)
at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Co
mpiled Code)
at
com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Compiled
Code)
at
com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Compiled
Code)
at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServletCo
ntext(Unknown Source)
at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext(U
nknown Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.doJSPInclude(Un
known Source)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.streamFileToCli
ent(Compiled Code)
at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.service(Compile
d Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
at
com.netscape.server.servlet.servletrunner.ServletRunner.execute(Compiled
Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
at java.lang.Thread.run(Compiled Code)

Thanks,
George Cutrell 
Technical Manager, Wireless Applications Development 
Nextel Communications, Inc. 
Desk:  703.433.8868 
Mobile:   703.926.7851 



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




iAS 6.0 -- java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule

2002-01-07 Thread Cutrell, George

Platform:  iAS 6.0 SP4 on Solaris 8

I get the following exception when I enable versioning in iAS 6.0 SP4.  With
versioning enabled, I cannot use Struts.  Simply disabling seems to avoid
this and Struts and iAS 6.0 seem to behave OK together.  This is troubling
because to have JSPs automatically re-compiled upon a change to the JSP, you
must enable versioning.  Otherwise, I have to bounce iAS to affect the JSP
change.  Does anyone have any clue as to why this occurs?

java.lang.IllegalAccessError: org/apache/struts/action/AddDataSourceRule
  at org.apache.struts.action.ActionServlet.initDigester(Compiled Code)
  at org.apache.struts.action.ActionServlet.initMapping(Compiled Code)
  at org.apache.struts.action.ActionServlet.init(ActionServlet.java:466)
  at javax.servlet.GenericServlet.init(GenericServlet.java:258)
  at
com.netscape.server.servlet.servletrunner.ServletRepository.loadServlet(Unkn
own Source)
  at
com.netscape.server.servlet.servletrunner.ServletRepository.createInstance(U
nknown Source)
  at
com.netscape.server.servlet.servletrunner.ServletRunner.createServletInfo(Un
known Source)
  at
com.netscape.server.servlet.servletrunner.AppInfo.preLoadServlets(Compiled
Code)
  at
com.netscape.server.servlet.servletrunner.AppInfo.resetServlets(Compiled
Code)
  at com.netscape.server.servlet.servletrunner.AppInfo.(Unknown
Source)
  at
com.netscape.server.servlet.servletrunner.ServletModule.getAppInfo(Unknown
Source)
  at
com.netscape.server.servlet.servletrunner.ServletModule.getPlatformServletCo
ntext(Unknown Source)
  at
com.netscape.server.servlet.platformhttp.PlatformServletContext.getContext(U
nknown Source)
  at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.doJSPInclude(Un
known Source)
  at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.streamFileToCli
ent(Unknown Source)
  at
com.netscape.server.servlet.servletrunner.WelcomeListServlet.service(Compile
d Code)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
  at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown
Source)
  at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown
Source)
  at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
  at com.kivasoft.applogic.AppLogic.execute(Compiled Code)
  at com.kivasoft.thread.ThreadBasic.run(Native Method)
  at com.kivasoft.thread.ThreadBasic.run(Native Method)
  at com.kivasoft.thread.ThreadBasic.run(Native Method)
  at com.kivasoft.thread.ThreadBasic.run(Native Method)
  at com.kivasoft.thread.ThreadBasic.run(Compiled Code)
  at java.lang.Thread.run(Compiled Code) 

George Cutrell 
Technical Manager, Wireless Applications Development 
Nextel Communications, Inc. 
Desk:  703.433.8868 
Mobile:   703.926.7851 



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




How to achieve but with an image?

2002-01-09 Thread Cutrell, George

Is there a way to achieve  characteristics with an 
image?  I'd like to call isCancelled() in my perform() method when a cancel
image is pressed.  Does the HTML tag library support that?

Thanks,
George Cutrell 
Technical Manager, Wireless Applications Development 
Nextel Communications, Inc. 
Desk:  703.433.8868 
Mobile:   703.926.7851 



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




RE: Struts and cookies

2002-06-06 Thread Cutrell, George


When creating a cookie without setting its path, the path defaults to the
path of the request, e.g., /myapp/ActionA.  The browser will not send the
cookie back for subsequent request for anything other than /myapp/ActionA.
Set the cookie path via cookie.setPath() to something that will allow the
browser to send the cookie back on subsequent requests - either to something
like cookie.setPath("/") or cookie.setPath("/myapp").

Regards,
George.

-Original Message-
From: Brian Holzer [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 06, 2002 6:50 PM
Subject: Struts and cookies


Hi all,
   I am hoping that this is an easy question.  I have ActionA, jspA and
ActionB.  In ActionA I add a cookie to the response passed into the
perform() method.

 Cookie cookie1 = new Cookie( "SGI", "autodev01" );
 response.addCookie( cookie1 );

  Then I exit ActionA with the following command

 return( mapping.findForward( fwd ) ); 

I am then forwarded to jspA where I enter some search criteria and press the
submit button which forwards to ActionB.  In ActionB I use some displays to
show the contents of the request passed into the perform() method 

  System.out.println( "OUTPUTTING HEADERS: " );
Enumeration enum = request.getHeaderNames();
while ( enum.hasMoreElements() ) {
   String k = (String) enum.nextElement();
   Object v = request.getHeader( k );
   System.out.println( "Key: " + k + "  Value: " + v.toString() );
} // end of while

 Cookie sgiCookie[] = request.getCookies();
 System.out.println( "OUTPUTTING COOKIES: " );
 int w = 0;
 while( w < sgiCookie.length ){
System.out.println( "Cookie number " + w );
System.out.println( "Cookie name: " + sgiCookie[w].getName() );
System.out.println( "Cookie value: " + sgiCookie[w].getValue() );
System.out.println( "---" );
w++;
 }

but the cookie I added is not there.  The only cookie still there is the
jsessionid cookie.  I am using Silverstream 3.7.3 app server.

Does anyone know why my cookie is dissappearing?  or am I somehow not adding
it in the right place? 

Thanks
Brian


--
To unsubscribe, e-mail:

For additional commands, e-mail:


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