Struts exception - pl. help

2003-11-13 Thread DurgaPrasad Guduguntla \(dgudugun\)
Hi,

Our application is using Struts1.1 and running on Tomcat4.1.  We got the
following exception stack trace.  
Any clues will be appreciated to fix this problem.

Thanks,

Durgaprasad

Exception Stack Trace:
--

Nov 13, 2003 12:21:37 PM org.apache.struts.action.RequestProcessor
processException
WARNING: Unhandled Exception thrown: class
java.lang.NullPointerException
StandardWrapperValve[action]: Servlet.service() for servlet action threw
exception
javax.servlet.ServletException
javax.servlet.ServletException
at
org.apache.struts.action.RequestProcessor.processException(RequestProces
sor.java:541)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:482)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
274)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:263)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
80)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
nvokeNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator
Base.java:490)


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



Appending params to the URL of ActionForward

2003-06-06 Thread DurgaPrasad Guduguntla
Hi,

I am new to struts and would like to know the solution to the following:

When the request is submitted to the action class, the action class will
evaluate and constructs the request parameters which needs to be
appended to URL of the View component mentioned in the forward target.

action path=/process type=SomeAction
 forward name = success path=jsp/content.jsp/
 forward name = failure path=jsp/failure.jsp/
/action

Depending upon the logic inside action class, there might be different
request parameters are obtained and the path of the url for the
success target should go like this:

 path = jsp/content.jsp?param1=val1param2=val2 (OR)
path=jsp/content.jsp?param3=val3param4=val4

Can we set the path for ActionForward by using
ActionForward.setPath()before returning inside Action class?  What could
be better approach to this problem?

Thanks,

Durgaprasad

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



RE: Appending params to the URL of ActionForward

2003-06-06 Thread DurgaPrasad Guduguntla
Thanks a lot! It worked perfectly.

Regards,

Durgaprasad

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2003 8:26 PM
To: Struts Users Mailing List
Subject: RE: Appending params to the URL of ActionForward


You can create a new action forward and return that.

The code below creates a new actionforward based on the path in an
existing one and appending some parameter:

ActionForward forward = mapping.findForward(myforward); forward = new
ActionForward( addParameterToUrl(forward.getPath(),foo,bar),
forward.getRedirect() );
return forward;

where addParameterToUrl does something like:

  private String addParameterToURL(String url, String parameter, String
value)
  {
return url + ( (url.indexOf(?)==-1) ? ? :  ) + parameter +
= + value;
  }


-Original Message-
From: DurgaPrasad Guduguntla [mailto:[EMAIL PROTECTED]
Sent: Friday, 6 June 2003 08:31
To: [EMAIL PROTECTED]
Subject: Appending params to the URL of ActionForward


Hi,

I am new to struts and would like to know the solution to the following:

When the request is submitted to the action class, the action class will
evaluate and constructs the request parameters which needs to be
appended to URL of the View component mentioned in the forward target.

action path=/process type=SomeAction
 forward name = success path=jsp/content.jsp/
 forward name = failure path=jsp/failure.jsp/
/action

Depending upon the logic inside action class, there might be different
request parameters are obtained and the path of the url for the
success target should go like this:

 path = jsp/content.jsp?param1=val1param2=val2 (OR)
path=jsp/content.jsp?param3=val3param4=val4

Can we set the path for ActionForward by using
ActionForward.setPath()before returning inside Action class?  What could
be better approach to this problem?

Thanks,

Durgaprasad

-
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]


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