[JBoss Portal] - Re: sendRedirect and setRenderParameter
by pedrosacosta
In the portal that i'm building, i'm using attributes to send information from the java classes to the jsp files. For example, have a jsp that shows the name of the user logged in.
But, in other use cases, like submit a form, i want to show messages to the user like "The registration submitted sucessfully". But this message must dissappear if i do another action that follow the submit action.
I thought to put this variables/attributes in session, but i had a problem. The variables remains in session, and in the sequence of the pageflow, it is very difficult to remove the attributes in all cases of the pageflow of my portlet. My portlet has many pages that use the same portlet, but for different cases.
So, i thought to use renderParameter as a substiture to setAttribute. I thought that the renderParameter value dissappeared if i render the same page again.
For example, when i render a page, i set a message with renderParameter. If i re-render the page, the parameter would dissapear.
But, i'm seeing that it's not possible.
So, how can i set values that won't remain in session?
Thanks,
Pedro
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963849#3963849
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963849
19 years, 9 months
[JBossWS] - Re: JSR181 Web Service Client
by chamillard
Thanks for the prompt response! Unfortunately, it's the previous line in the client code that's killing me:
Hello port = service.getHelloPort();
Here's the HelloService.java file generated by wsimport:
package endpoint.jaws;
|
| import java.net.MalformedURLException;
| import java.net.URL;
| import javax.xml.namespace.QName;
| import javax.xml.ws.Service;
| import javax.xml.ws.WebEndpoint;
| import javax.xml.ws.WebServiceClient;
|
|
| /**
| * This class was generated by the JAXWS SI.
| * JAX-WS RI 2.0_01-b15-fcs
| * Generated source version: 2.0
| *
| */
| @WebServiceClient(name = "HelloService", targetNamespace = "http://endpoint/jaws", wsdlLocation = "http://localhost:8080/hello/Hello?wsdl")
| public class HelloService
| extends Service
| {
|
| private final static URL HELLOSERVICE_WSDL_LOCATION;
|
| static {
| URL url = null;
| try {
| url = new URL("http://localhost:8080/hello/Hello?wsdl");
| } catch (MalformedURLException e) {
| e.printStackTrace();
| }
| HELLOSERVICE_WSDL_LOCATION = url;
| }
|
| public HelloService(URL wsdlLocation, QName serviceName) {
| super(wsdlLocation, serviceName);
| }
|
| public HelloService() {
| super(HELLOSERVICE_WSDL_LOCATION, new QName("http://endpoint/jaws", "HelloService"));
| }
|
| /**
| *
| * @return
| * returns Hello
| */
| @WebEndpoint(name = "HelloPort")
| public Hello getHelloPort() {
| return (Hello)super.getPort(new QName("http://endpoint/jaws", "HelloPort"), Hello.class);
| }
|
| }
|
Additional debugging statements indicate that my service object is null when I try to call the getHelloPort method. I thought that the following in the client code would be creating the object for me (since this is straight from the Sun example):
@WebServiceRef(wsdlLocation="http://localhost:8080/hello/Hello?wsdl")
| static HelloService service;
Any idea why this wouldn't be happening?
Thanks,
Tim
(I did make sure I'm getting the user name OK as well).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963841#3963841
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963841
19 years, 9 months