dwarakanathan thiru

Ranch Hand
+ Follow
since Oct 14, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by dwarakanathan thiru

Hi All,
I created a Axis WS in my local setup and I was able to deploy the WS in my JBoss server.
I was able to deploy it by invoking in a build script


But when i tried to deploy in different remote server's JBoss application server (note that the localhost:8104 will become servername), I got the following error:
faultString: org.xml.sax.SAXException: Bad envelope tag: HTML

It looks like when I hit the application's Axis servlet, it requires a login to access. And the login page (provided by the web cluster / server) was returned as a Response and so the error.
But how do i bypass the page which requires me to provide the user id or password. Can i have some options to fix this?

One more note: Application server access is filtered through web server's cluster access

Thanks!!!
12 years ago
Hi,
Every portlet can be shown or hid based on the user role. You have to define the role at the portlet-instance level.
And assign the roles to the users who need to view the portlet in your portal page.

Learn more about <security-constraint> at portlet & portal object level.
13 years ago
Hi All,

I have been using a common java file that streams contents in a specific file content type. I have used the code to open / save pdf file contents and small excel file contents.
Now, I am trying to dump a huge xlsx file which takes almost 30 minutes to download on our servers, but in my local server, it takes just half the time.

almost one out of 2 times, it also gets timed out (but no error is thrown on the screen), after 30 minutes or so.
Is the timeout related to session inactivity for 30 minutes because of the download that is happening which avoids the user interaction with the screen?

Which is the better option of the two to solve the timeout issue and to improve the performance?
1) Use a temporary file to store the data and then buffer the contents into the stream (This is the option currently in practice)
2) Write directly into the response output stream

Note: I am using POI to generate the xlsx

I appreciate any timely help in this regard.

Thanks!!
13 years ago
Hi
I want to invoke a managed bean method in a Servlet.
And so I used the following code:


I am able to get the value when the page from where the action has been initiated is not mapped to the backing bean's navigation rule.

But in some cases where the page from where the action has been initiated is mapped to the backing bean's navigation rule, I am unable to access the backing bean.
I get a NULL value for the object of the backing bean.

The scope of the backing bean is set to SESSION and I do not evict it explicitly.

Please let me know how can I fix this issue.

Thanks in advance!!
14 years ago
JSF
Hi All,

I need to call a servlet from my JSF / xhtml file. But the servlet is not getting called for some reason.


But the page is not getting re-directed to the servlet and it stays on the same page.
I am using RichFaces for the UI framework.

Also, in another application I have used SUN's RI / jsp file and it worked for me.

The difference that I see is I use "javax.portlet.faces.GenericFacesPortlet" in the current application for rich faces to work.
In the working application, I used "com.sun.faces.portlet.FacesPortlet". Why is this issue in rich faces and not in sun's RI.

Any idea on this?

Thanks!!
14 years ago
JSF
Hi All,

I need to call a servlet from my JSF / xhtml file. But the servlet is not getting called for some reason.


But the page is not getting re-directed to the servlet and it stays on the same page.
I am using RichFaces for the UI framework.

Also, in another application I have used SUN's RI / jsp file and it worked for me.

The difference that I see is I use "javax.portlet.faces.GenericFacesPortlet" in the current application for rich faces to work.
In the working application, I used "com.sun.faces.portlet.FacesPortlet". Why is this issue in rich faces and not in sun's RI.

Any idea on this?

Thanks!!
14 years ago
Finally I got a way that works.
I tried passing request parameters from the 1st application to the 2nd application using a servlet in the 2nd app.
And from there I will set the parameter back to a session & use a redirect to my portal page, which will use up the parameter.

I shall post the code soon.
14 years ago
Finally I got a way that works.
I tried passing request parameters from the 1st application to the 2nd application using a servlet in the 2nd app.
And from there I will set the parameter back to a session & use a redirect to my portal page, which will use up the parameter.

I shall post the code soon.
14 years ago
Finally I got a way that works.
I tried passing request parameters from the 1st application to the 2nd application using a servlet in the 2nd app.
And from there I will set the parameter back to a session & use a redirect to my portal page, which will use up the parameter.

I shall post the code soon.
14 years ago
JSF
Okay!! Cool!!
I have been trying various ways. Even sending via the URL get / post method as you have mentioned.
But it does not seem to work. Please have a look at the following code snippet.

To set the attribute in portlet session
final FacesContext fcRequest = FacesContext.getCurrentInstance();
final PortletSession objPortletSess = (PortletSession) fcRequest.getExternalContext().getSession(false);
objPortletSess.setAttribute("fileId", getStrSelFileId(), PortletSession.APPLICATION_SCOPE);


To get the attribute from portlet session
PortletSession objPortletSess = (PortletSession) fcRequest.getExternalContext().getSession(false);
String strSelFileId = (String) objPortletSess.getAttribute("fileId", PortletSession.APPLICATION_SCOPE);
14 years ago
Hi All,
I am new to Portlets and need more information about the Portlet Session Scope.

If the Portlet Session Scope is set to "Application Scope", the attributes are visible to all the portlets that belong to the same WAR-file.
Is it visible to other WAR-file(s)? If so how can I pass attributes from one JSP / Portlet Java in WAR-1 file to another JSP / Portlet Java in WAR-2 file?

Thanks!!
14 years ago
Okay, In that case, can you please tell me why request attributes are not passed over to the other JSP / JSF file?
It should be the same request right?

FacesContext is unique to each request. Not only is it not unique to an application, it's not unique to the user session. The FacesServlet builds it when a JSF request comes in, uses it to manage the JSF request/response process, then tosses it away once the reponse has been sent back. It builds a whole new FacesContext on the next JSF request that comes in. That's why generic servlets and JSPs get NullPointerExceptions. They don't build FacesContext's. Only the FacesServlet does.



I prefer to use the session / request to pass on the values from one portal application to another portal application.
Can you please tell me how to do that? I tried with PortletSession and it does not work.

There are several ways to share data between webapps and they're not JSF-specific. One way is to share session data. That tends to be fairly low overhead, but it only works in limited configurations. And you have to specially configure the server(s) that do the session sharing.
A more robust way is to simply keep the info in persistent storage. This is more flexible, but may be more overhead. The overall penalty can be reduced, though, if you use a shared cache mechanism.

14 years ago
JSF
Hi,

I have a JBoss portal server and I have two applications (different EAR files) deployed in it.
I use JSF framework for both the applications.

I provide a link in my first application which takes the user to a page in the second application.
Now, how can I set and then pass parameters / attributes from the first application to second application?

I tried to get the backing bean of the first application, in the second application but I guess it wont work.
Every FacesContext is unique for each application. Isnt it?

And then I tried this, again I get only "null" as value:

To set the attribute in portlet session

FacesContext fcRequest = FacesContext.getCurrentInstance();
PortletSession objPortletSess = (PortletSession) fcRequest.getExternalContext().getSession(false);
objPortletSess.setAttribute("ATTRIBUTE_NAME", "VALUE", PortletSession.APPLICATION_SCOPE);


To get the attribute from portlet session

PortletSession objPortletSess = (PortletSession) fcRequest .getExternalContext().getSession(false);
String strSelFileId = (String) objPortletSess.getAttribute("ATTRIBUTE_NAME", PortletSession.APPLICATION_SCOPE);

Any help is much appreciated.

Thanks!!
14 years ago
JSF
Hi,

I have JBoss portal server and I have two applications (different EAR files) deployed in it.

I provide a link in my first application which takes the user to a page in the second application. Both implement JSF framework.
Now, how can I pass parameter from the first application to second application? Can i pass request parameters? I would like to avoid query strings too.

I tried to get the backing bean of the first application, in the second application but I guess it wont work.
Every FacesContext is unique for each application.

Thanks!!
14 years ago
Hi,

Thanks for your reply. But, I have already tried that solution and it works. I have also tried "<datasources><no-tx-datasource>" which works.
I need a solution where my solution should be incorporated within the EAR / application file.

Thanks!!
14 years ago