What does it means that the partial response writer is not integrated with PPRResponseWriter? - ajax

I'm trying to develop an application using JSF, primefaces, Tomcat7.
When I execute an ajax event, I get this warning:
17-ott-2012 9.26.04 org.apache.myfaces.trinidadinternal.context.PartialViewContextImpl getPartialResponseWriter
AVVERTENZA: getPartialResponseWriter() called during render_reponse. The returned writer is not integrated with PPRResponseWriter
What does it means? What do I have to do to integrate it?
In my server log, on startup, I find some messages about some web context parameters not found. May it be related to the previous warning?
Thanks for your help!!

This class is specific to MyFaces Trinidad. Apparently you're mixing Trinidad with PrimeFaces and it's not working very well. Since you didn't mention anything about Trinidad in your question, it's perhaps a leftover of previous experiments to play around with several component libraries. You might want to remove it before using PrimeFaces.

Related

Wildfly Undertow HTTP Response 200 but no content

I am developing a simple web service using Eclipse Java EE IDE for Web Developers : Version: Kepler Service Release 2 Build id: 20140224-0627 and Wildfly-8.2.0.Final. I chose wildfly-javaee7-webapp-blank-archetype using Maven and started development. Firstly, there was no problem, I could add some simple jsp pages and also a simple html page with some images and javascript inclusion then I could deployed, launched and accessed those pages by browser. But all of a sudden, Wildfly (I guess Undertow maybe?) started to response with HTTP response 200 with no content... I really don't get what is going on. I also did rollback my sources to the very early simple pages only. But still the symptoms are the same. Also I have tried to use newer version of Wildfly-9.0.1.Final and deployed manually but I haven't seen any difference.
ex1) this is ok. (Of course browsers take care of this...)
ex2) this kind of contents won't be loaded and sent back as content 0...
I doubted local path issue but I haven't changed anything and it was loaded earlier.
It would be really appreciated if somebody could give me a solution.
Finally I have solved this problem. I have found a problem on a servlet I have added at last. Actually I was trying to migrate my web service running on glassfish and did migrate files one by one. I specified a URL to be handled by the servlet in Web.xml when it run on glassfish. But somehow, it's not working on Wildfly which means all URL request are unexpectedly handled by the servlet... Since I have no idea to specify url to be handled by the specific servlet in Web.xml for Wildfly, I decided to filter request URL in the servlet code. So it is working now. Thank you guys trying to help me...

How to get values on server side in Spring ROO?

I am having a question regarding Spring ROO. Although this is not a good question to ask still as i am facing some issue.
I have created Spring ROO application using below link in Eclipse
http://docs.spring.io/spring-roo/reference/html/beginning.html
After putting some efforts i was able to see the application output as desired then a doubt came to mind that how i will print value from browser to Controller i.e. client to server side (System.out.println("")).
I have tried many solution but nothing seems to be working. So can some one tell me how will i do it.
Just to summarize the thing i want value from textfield etc in my .java file using above Spring ROO project.
Spring Roo just creates a Spring Web MVC application.
In your question I found that you need some architectural concepts about Spring Web MVC and Web applications that you must know to start developing application.
Try to read some tutorials and post (this looks good) before start to develop your application.
Good luck!
Chema.

Struts 2 security vulnerability issue

We have projects using Struts 2.0 and 2.1.
We're using web-hosting with Tomcat and both projects are working fine on remote servers. Recently, we got warning message from the webhosting provider, like:
This notice is inform you that recently numerous vulnerabilities have been discovered related to Struts and Struts2 frameworks and other frameworks which use OGNL classes.
Since your application is using Struts or Struts2 framework, we HIGHLY recommend that you URGENTLY update it to the most recent version: Struts v2.3.16.1
After research, we found there're consistent upgrades:
http://struts.apache.org/announce.html
Therefore, we tried to upgrade our Struts2 to 2.3.16.3 (latest version at present). However, we found it's not a trivial task to upgrade Struts2, since everything doesn't work, including AJAX tags, AJX form submit, auto-complete, etc. In this sense, Struts 2 is not well designed for scalability.
One example is that whenever we submit our AJAX form, the result will be in a new page instead of in the targets field defined in the sx:submit or sj:submit tag. We don't want to re-write all the codes just because of the upgrade.
We want to know if we don't upgrade Struts2 to the latest version, what kind of vulnerabilities our web application will face. Could anyone give us more details or any hint for solutions based on our situation? Thanks so much.
You are probably looking for Security Bulletins. Each documents describe the summary, problem, and solution to resolve the problem. At the end of each document you can find hotfixes if they are available.
One example is that whenever we submit our ajax form, the result will
be in a new page instead of in the targets field defined in the
sx:submit or sj:submit tag.
It seems you are using struts2 and struts 2 jquery plugin, so try to update to struts 2 jquery 3.7.0 too.
I recommend to accept some reworks and upgrade as some security issues are high.
There are some key parts which has changed and may need to be considered during upgrade like acceptableParameterName. Also review your param interceptor stack and list of exclude parameters.

Migrate jsf application to Glassfish 4 and JSF 2.2

I moved a JSF application from Galssfish 3.1.2 to Glassfish 4.0 and I thought the new server release was completely back compatible.
I found out it is not.
I used an outdated library, Primefaces 2.X, and some components stopped working properly, at least <p:tabview>. Common sense suggests to pass to a newer library such as Primafaces 3.5, but that way I have to modify my xhtml pages. Cannot find a compatibility matrix anywhere, nor a migration tutorial. Can you help ?
There is at least another weird problem outside those related to the Primefaces library.
I have a quite complex page and till now I couldn't isolate the problem to a simpler scenario.
In this page I have an <ui:repeat> tag and then a form with a button.
The button is configured to send Ajax request and update (render) only a single ui component.
At the 3rd Ajax request it stops working and I get an error saying there is a duplicate ID corresponding to the <ui:repeat> tag.
Any idea ?
Is there a migration guide from Glassfish 3.1.2 to Glassfish 4.0 which gives hints on what has changed and how to modify existing applications ?
Update
I found the following post which deals about the last problem I'm talkin about
Component ID xxx has already been found in the view.
Unfortunately I cannot understand how to solve it despite it has an accepted answer !
This is one of the many bugs that were released with GF4.
I would suggest either waiting for the next release of GF (if you need a released version) or update GF to the latest JSF release (Currently 2.2.8 I think).
JSF implementation jars
JEE7 APIs
JSF current and older bugs

Easiest way to add GWT to a Spring MVC application?

I've got a Spring MVC application and I've decided that I'd like to try using GWT for the front end. I'd like to continue using MVC as I'll also be using Spring Security and some other springy stuff.
I'm aware of the GWT-SL project, and I guess I'll use it. The documentation is light on examples unfortunately.
What I'm wondering now is.... how do I reconfigure my project so that I can use GWT? I'm assuming that I'll lose the ability to run in hosted mode, and I suppose that's ok. Do I just add the GWT and GWT-SL jars, reconfigure my web.xml, and add a package to my project for the GWT code?
I'm using Eclipse 3.4. My existing project is standard web project.
With the new version of the GWT plugin, you'd have all the benefits of the hosted mode browser without having to modify any options. The GWTHandler from the GWT-SL will take care of your rpc call mapping. However, you will have a problem with your existing domain objects structure. You will either have to put them in GWT's 'client' package, or mirror your existing domain objects to enable them to be compiled to javascript. I have been looking for a stable non-invasive framework for doing this, but have yet to find one. Gilead looks promising, but you will have to extend its classes on your domain.
I have posted a view month ago my simple project (3 classes) how to integrate GWT with existing Spring MVC application. Simple sample also provided.
Try it, it is clear and simple: http://code.google.com/p/gspring.
You won't lose hosted mode. I don't know if you're using the internal server for that - I use -noserver so I can't help you there.
Other than that, I guess the documentation is quite clear. Have you hit any specific problems?

Resources