Vikash Ananda

Ranch Hand
+ Follow
since Oct 12, 2009
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 Vikash Ananda

I think that there is some problem in your JSP file.

Validate that struts-bean and struts-html is properly imported in kslogin.jsp page.

or there may be some JMS issue. I may not be able to help with JMS/EJB issues.
12 years ago
Hi Ankit,

Thanks for the info. I removed this line and things worked fine.

<default-interceptor-ref name="showcaseStack"/>

I was not aware if hibernate interceptor could create problem. Thanks for the link also.

Vikash Anand.
12 years ago
Hi,

Yes application can have only one initial page i.e. index page (name doesn't matter).

If you have requirement of having 2 index pages then ask two sets of customers to login using

http://servername/customercare/index.jsp
and
http://servername/customercare/kmlogin.jsp

instead of
http://servername/customercare/

else read my comment to add a link to different page in your existing index.jsp
12 years ago
Hi Raj,

I think you are looking for Tiles framework. Follow this link for a sample.

http://www.vaannila.com/struts-2/struts-2-example/struts-2-tiles-example-1.html


Thanks,
Vikash Anand.
12 years ago
Hi,

In web.xml you have coded:


When your application opens it selects the options from welcome file list and displays the first found View page (customercare/index.jsp in your case). kslogon.jsp will never show up until and unless you delete the index.jsp from your application considering the fact that web.xml do not change.

What you can do is add a link in index.jsp for kslogin.jsp.

Hope that helps.

Thanks,
Vikash Anand.
12 years ago
Hi All,

I have been trying to have validation inside my application using tutorials from roseindia and java-x.blogspot.com and based on them I have created small sample application but validations are not working. The source codes are below:

index.jsp


struts.xml


LoginAction-validation.xml


LoginAction.java


Application code and flow is working but username and password validation is not working. One thing I got is that if Action name is LoginAction then validation XML file name should be LoginAction-validation.xml which is true in my case. All jars are there in proper place and have rechecked them from given tutorials and samples.

Configuration:
Win XP
JDK 1.6
Apache Tomcat 6.0

Please let me know where Am i making mistake?
12 years ago
Thanks for the info....u saved me from much trouble
12 years ago

Hi All,

I need a library that converts a PDF to word document. I tried google and sun forum but was unable to find suitable one. Got lots of hits for Word to PDF and some had GUI based programs to select PDF and will generate word on click of some button. I want to do this in Java where I can provide input PDF file path and output Word file path and it gets converted.

The PDF will also contain some images.

Please let me know any pointers in this regard.

Thanks and Regards,
Vikash Anand.
12 years ago
Hi,

The exact error is:
The import javax.faces.model.ManagedBean cannot be resolved

in class Count.java

I have rebuilt the application and all jars are there in classpath and also in faces-config.xml file.

Please suggest.
12 years ago
JSF
Hi all,

I am extremely new to JSF. Infact this is the first Hello World Application I am building that has Ajax Support. I have written following code from website :
http://weblogs.java.net/blog/driscoll/archive/2008/11/a_simple_ajax_j.html


But Eclipse is not able to find classes for:
javax.faces.model.ManagedBean
javax.faces.model.SessionScoped

Jars added currently:
jsf-api.jar
jsf-impl.jar
jstl.jar
standard.jar
servlet-api.jar

and some commons jar files.

What jars should i include. I googled for it but could not get relevant information. Sadly, www.findjar.com is down.

Thanks,
Vikash Anand.
12 years ago
JSF
Hi All,

I am planning to build a new application architecture that should have hibernate and lot of Ajax capabilities.

I am planning to use JSF, Hibernate, Springs (if needed) running on Apache Tomcat 5.5.

Please suggest me if my choice is correct and/or suggest some good ideas.

Thanks,
Vikash Anand.
Hi All,

I need to create an application that optimize vehicle utilization for future orders based on promised date and time to customers subject to availability of vehicles which needs to be done using Linear Programming. Please help me out in this direction. Is there some Java API or any tool that we can use.

Thanks,
Vikash Anand.
12 years ago
Hi Rajendra,

As you have seen Servlets and JSP. Writing Java Code in Servlet classes is easier than to write in JSPs. Similarly writing HTML codes within Servlets are cumbersome task. Just for clarity of things and to make applications more readable and more maintainable we follow more of MVC-2 design. This provides clear separation of UI and code. However this is not mandatory but If you follow this then your life will be easier.

Thanks,
Vikash
12 years ago
Hi,

Implementation wise there is some difference. Suppose you have created Vecor object and doing some operations on it and at some point of time you want to check wether it has become null or not.



If you are using first case: if ( vTest != null ) and suppose that vTest is null then on run time the application will throw NullPointerException.

If you are using second case: if ( null != vTest) and suppose that vTest is null then on run time the application will not throw NullPointerException.

Second case is good coding practice.

Thanks,
Vikash Anand.
12 years ago
Hi All,

I am using Hibernate for quite some time and want to learn about Associations in Hibernate like one to one, one to many, many to one and many to many. I googled but could not get any good site with easy and practical samples. Can you please direct me to good websites/articles.

Thanks,
Vikash Anand.