I am currently evaluating HDIV for our project. I have been reading the hdiv-reference.pdf, and have followed all the steps of installing and configuring the HDIV on my project. In the hdivConfig.xml I have added "/index.html" to the "userStartPages" property in the HDIV Configuration bean.
Now my problem is that, I can access my index page and log into my application. But, after that if I click on any link or submit the form in that page I get the following error on my tomcat's console:
HDIV is a Security filter that acts over urls with these patterns: *.do, *.jsp. You can see this configuration in page 28 of hdiv reference documentation.
In addition to that you have to know that all links or forms to your web application, including of course "quickSearch.do", have to be created with Struts tags, otherwise you have to define them as start pages.
If you don't use custom tags and you create the link or form statically, HDIV doesn't add the state (_HDIV_STATE_) to your links or forms and the filter won't allow these requests.
Steps that you can do:
1. rename index.html to index.jsp
2. add headers to index.jsp to use tag libraries and java language:
3. Reimplement the link: <a href="quickSearch.do" ... />
<html:link href="quickSearch.do" ... />
>> PS: We are not using spring in our project. Could this be the reason?
It is not necessary for your project to use Spring but you have to add the Spring library to your project because HDIV uses it.
We hope having helped you. if you have any other doubt please reply to this post.
Regards,
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am currently evaluating HDIV for our project. I have been reading the hdiv-reference.pdf, and have followed all the steps of installing and configuring the HDIV on my project. In the hdivConfig.xml I have added "/index.html" to the "userStartPages" property in the HDIV Configuration bean.
Now my problem is that, I can access my index page and log into my application. But, after that if I click on any link or submit the form in that page I get the following error on my tomcat's console:
[Logger] 8;/XXX/quickSearch.do;_HDIV_STATE_;null;127.0.0.1;127.0.0.1;user
On referring the document I find that the error is - "The HDIV parameter has not been received in the request."
Can anyone tell me what is the cause of this? Is it possible that I may have missed any step while configuration?
PS: We are not using spring in our project. Could this be the reason?
Thanks in advance,
Rishabh Joshi
Hi Rishabh,
HDIV is a Security filter that acts over urls with these patterns: *.do, *.jsp. You can see this configuration in page 28 of hdiv reference documentation.
In addition to that you have to know that all links or forms to your web application, including of course "quickSearch.do", have to be created with Struts tags, otherwise you have to define them as start pages.
If you don't use custom tags and you create the link or form statically, HDIV doesn't add the state (_HDIV_STATE_) to your links or forms and the filter won't allow these requests.
Steps that you can do:
1. rename index.html to index.jsp
2. add headers to index.jsp to use tag libraries and java language:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/tags/struts-html" prefix="html" %>
3. Reimplement the link: <a href="quickSearch.do" ... />
<html:link href="quickSearch.do" ... />
>> PS: We are not using spring in our project. Could this be the reason?
It is not necessary for your project to use Spring but you have to add the Spring library to your project because HDIV uses it.
We hope having helped you. if you have any other doubt please reply to this post.
Regards,
Hi gvicente,
Your information has proved to be really helpful. Reimplementing the links seems to work. Thank you.
Regards,
Rishabh
Hi gvicente,
I'm using Prototype Windows and I get the same error. Prototype Windows uses a javascript like this:
.......
var win = new Window({className: "spread", title: "Ruby on Rails", top:70, left:100, width:300, height:200,
url: "http://www.rubyonrails.org/", showEffectOptions: {duration:1.5}})
win.show();
.......
Is there any different way to navegate that "html:link" or "submit"?How can I use HDIV with Prototype Windows?
Hi, everyone.
I hope to have chosen the right topic…
I'm integrating hdiv with an existing spring web application where "viewResolver" is so defined:
_ <bean id="tipicalViewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="order" value="0" />
<property name="basename" value="views" />
</bean>
<bean id="specialViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="order" value="1" />
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView">
</property>
<property name="prefix" value="/WEB-INF/ui/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
_
Now, the question is: how can i define "views" in "hdiv code"?
Thanks