gurneeraj singh

Ranch Hand
+ Follow
since Mar 19, 2008
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 gurneeraj singh

What is the use of label="%{ example}" in defining struts2 tag when we can use this directly label="example" with the help of OGNL?
14 years ago
Can't we use custom tags for this functionality?
14 years ago
Dear Ranchers,

I am new to struts. I just wish to know with which struts version should i start my learning. I know struts 2 and struts 1 are totally different but don't know which version should i go for.



14 years ago
Hello ranchers,

Can any one explain me the best way to access a database.

What is connection pooling and dao related to each other. Please tell me some good resources to learn about them.
Thanks Frank,

Your solution must solve my problem.

But now i am facing a strange problem, when ever i click a link for any jsp file or servlet, web browser starts downloading it instead displaying it on the browser.

What can be the error or my ide got currupted?
14 years ago
But if i use absolute path like /reconfirmation in my jsp it takes the page out of scope of apllication like;

http://localhost:80084/reconfirmation

instead of

http://localhost:8084/projectName/reconfirmation
14 years ago
In my application I placed a newEnquiry.jsp in enquiry directory of my project. Form in it is calling NewEnquiryServlet without any problem.

Jsp Code:


Servlet Code:



I have another JSP file in same enquiry directory 'errorEnquiry.jsp' which is calling another servlet ReconfirmationServlet. But it is causing a error 404 servlet does not exist. When calling code and dirctory structure is same as above jsp.

Code for errorEnquiry.jsp


Code for reconfirmation servlet is


Web xml is


Directory Structure is

project/enquiry/newEnquiry.jsp
project/enquiry/reconfirmation.jsp

WEB-INF/classes/com/inventa/enquiry/NewEnquiryServlet
WEB-INF/classes/com/inventa/enquiry/Reconfirmation

Kindly suggest me how to solve this issue when ever i click submit button in reconfirmation.jsp it automatically adds /enquiry/ url before servlet name but no so in case of newEnquiry.jsp and causing error to display.

How should i solve this problem
14 years ago
Great Solution! yes i will do the same.

15 years ago
JSP
No you can't do it because javascript and jsp are for totally different purposes.

Javascript is client side language and jsp is a server side language.

You can use custom tags to conditionally set attribute in a session object.
15 years ago
JSP
I am making a page which is used for order processing and updates databse with order values.

This page contains many drop down menus which get values from a database like product id, product name, product description, city and state.

But i don't want client to face overhead each time of accessing database to get these drop down menu values. What can be the bast solution for this?

My understanding is to use servletcontext object to store these values on server startup using servletcontextlistener and then fill these values to drop down menu. But this has a issue what if client wish to update these values like new product addition then after each updation server has to be restarted to get these updated values.

So, i am left with accessing database directly but i wish to use best technique for it.

What i have in my mind are:-
1) Access database directly from jsp page using <sql: tags.
2) use these values through a javabean
3) Or control the whole process through a servlet but for just filling values of drop down menu from databse i don't think this method is good or even its possible.
4) Make a custom tag with table attribute so that i get values from that concerned database table only like for city, state, product, etc

Kindly tell me with best technique for this issue.

Thanks in advance.>
15 years ago
JSP
I understand Bauke,

But then why it is mentioned in jobs for j2ee that knowledge of javascript is must.

I mean here in india.

And i am talking about web part of j2ee.
I found good reviews for 'javascript definitive guide' on net. Is this book good for beginners like me or should I go for other resources.
Hello ranchers,

Please teel me the best way or book to learn javascript for developing web apllications.
i think there is some confusion between tag files and custom tags.
15 years ago
JSP
Ankit is right. Why not you try to read generated servlet codes it will give you better understanding.