Tulip Jain

Greenhorn
+ Follow
since Nov 08, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tulip Jain

Thanks a lot Jinal .... i really appreciate your replies ....
11 years ago
I am writing a hotel booking website. What is the common methodology used to forward to the selected hotel's website for payment processing so that I can get my commision for making the sale. I am writing my website in spring which shows the user with various choices for hotels and used webservices for getting vacancy information & rate information from each of the hotels. But forwards to the hotel website for actual booking.
TL
11 years ago
Thanks a lot jinal ... it helped a lot... after your post i did some practice on validation and concept is clear now .... but i have only doubt remaining is that whatever validations we configure for client side same validations applies to server side in the configuration files. There is no way in the configuration files, where we can seperate the validations for client side and for server side....
11 years ago
Hi all,

I have few questions regarding validator framework.

1. In struts we can do both server and client side validation so wats the diff btwn two? can i apply all validations at client side?
2. So in the client side validations, <html:javascript formName=" LoginBeanName" /> and <html:form action="LoginAction.do" onSubmit=”return validateLoginFormBean(this);”> are the only tags which i need to add in jsp page.
3. In case of server side validation, can i validate the data from Database? Can i do this? for eg if i want to check whether the user entered fake or existing bank account number?

Please reply... i am very confused ...

Thanks
11 years ago
Yes it was a interview question .... i couldn't hit it .....

Only thing i know is that checkboxes are used to take multiple inputs from the user in case of a form submission...
Can someone explain,
why are HTML checkboxes sometimes problematic for managing true/false values via form submissions?


thanks in advance?
Thanks Everyone Guys

error was resolved actually there were 2 problem one was in the jar files.... i was using 2 versions of a same jar files ..... when i replaced it by using common-logging.jar. jstl.jar, spring.jar & standard.jar files in my lib folder it worked...

Also when i replaced the following the code

<bean id="loginConroller" class="loginFormController">
<property name="commandName" value="login"></property>
<property name="commandClass" value="Login"></property>

<property name="formView"><value>index</value></property>
<property name="successView"><value>success</value></property>
</bean>

<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>


by-


<property name="commandName"><value>login</value></property>
<property name="commandClass"><value>Login</value></property>

<property name="prefix"><value>/WEB-INF/jsp/</value></property>
<property name="suffix"><value>.jsp</value></property>


IT WORKED..... dont know wats d problem!!!... in my opinion both are valid formart in spring....!!!
12 years ago
Thnaks for the guidance Paul ... I will try to fix this out ....
12 years ago
Thanks Paul for your reply ....

i forgot to mention that the error is in the below "value" tag....

<bean id="loginConroller" class="loginFormController">
line 20 <property name="commandName" value="login"></property>
<property name="commandClass" value="Login"></property>
<property name="formView"><value>index</value></property>
<property name="successView"><value>success</value></property>
</bean>

for ease, here is the actual error .....

org.springframework.beans.factory.BeanDefinitionStoreException: Line 20 in XML document from ServletContext resource [/WEB-INF/polling-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Attribute "value" must be declared for element type "property".
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:135)
org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:144)
org.springframework.context.support.AbstractXmlApplicationContext.refreshBeanFactory(AbstractXmlApplicationContext.java:79)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:249)
org.springframework.web.context.support.XmlWebApplicationContext.refresh(XmlWebApplicationContext.java:131)
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:281)
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:228)
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:199)
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:103)
javax.servlet.GenericServlet.init(GenericServlet.java:212)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:722)


Thanks ....
12 years ago
Hi Guys... i m new to this Spring framework....

I m facing this ERROR nested exception is org.xml.sax.SAXParseException: Attribute "value" must be declared for element type "property".

Please help me out ... in my spring-servlet.xml ...

My spring-servlet.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>


<!-- Maps flow requests from DispatcherServlet to flowController -->

<bean id="simpleUrlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/index.html=loginController
</value>
</property>
</bean>

<!-- Mappings required for the loginFormController are-->

<bean id="loginConroller" class="loginFormController">
<property name="commandName" value="login"></property>
<property name="commandClass" value="Login"></property>
<property name="formView"><value>index</value></property>
<property name="successView"><value>success</value></property>
</bean>



<!-- Maps a logical view name to a physical resource -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"/>
<property name="suffix" value=".jsp"/>
</bean>

</beans>


& my controller class is:

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.SimpleFormController;

public class loginFormController extends SimpleFormController {

@Override
protected ModelAndView onSubmit(Object command) throws Exception {

Login log=(Login)command;

String uname=log.getUsername();

ModelAndView mav= new ModelAndView(getSuccessView());

mav.addObject("uname",uname);
//Add an object to the model.
//modelName - name of the object to add to the model
//modelObject - object to add to the model. May not be null.

return mav;
}

}

Appreciate your response----
12 years ago