paritosh ranjan

Ranch Hand
+ Follow
since Aug 24, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by paritosh ranjan

Yes,everything except the validation is working,even the validation is working if I am using a method for validation.But my application contains fckeditor in many pages so I can't go with writing validation methods for every page.
17 years ago
Please help I am stuck in middle of something due to this issue
17 years ago
and instead of that smiley I wanted to use a : and a p
i.e. a : and property
<s: property
17 years ago
Here in the jsp file I m using fck editor,I want to validate cw.daCatalog.description


Now the code is from validation file(xml)


But its not working

cw.dsCatalog.description
cw-object of CatalogWrapper Class
dsCatalog-another object inside CatalogWrapper which has String description
17 years ago
Is my question unclear,if it is so please ask whatever information you need
17 years ago
I am using struts2.In a form I have used a fck editor and in its validation file I have used a I used a validator to check whether the length of the data entered is more than 6000 characters or not.But the validation is not working.If you enter more that 6000 characters no message is shown,and the form is also not submitted.What can be the problem?

The <fck:editor tag also does not have any name attribute,which is needed in validation file(xml file).
17 years ago
In HttpSessionListener Interface you have sessionCreated() and sessionDestroyed().This mesthods are called when the session is created or destroyed.You can use any static variable in the class which will implement HttpSessionListener which will be incremented once in the sessionCreated().So whenever a new session will be created sessionCreated() method will be called which will increment the value of the static variable.Remember to map this listener class in the web.xml.
17 years ago
Always remember,you get headers out of request,and set headers into response.
17 years ago
JSP
Yes,everything you wrote seems correct.This should work.I think you should write the code here which iterates over these lists.
And a gentle reminder,make sure you have populated the lists before iterating
[ October 15, 2007: Message edited by: paritosh ranjan ]
17 years ago
JSP
Make sure you give the relative URL in page attribute
<jsp:include page="relativeURL"/>
17 years ago
JSP
Are you sure you are using MVC pattern.You are trying to implement view in a servlet.This only breaks the MVC pattern,you should write view in a JSP,there should be no view part in a servlet.Servlets are used as controllers,so write your view part in a jsp and include that jsp file.That will be the correct MVC model.
17 years ago
JSP
There is no need to change web.xml for a jsp file(except for some cases when you are mapping its name to a servlet like this
<servlet-name>InitTestServlet</servlet-name>
<jsp-file>/initTest.jsp</jsp-file>)

Keep all the jsp files inside Test directory directly,start tomcat,then in the url type
http://localhost:8080/Test/yourjsppage.jsp

or make a index.jsp and keep it inside Test directory,start tomcat,
then by merely typing
http://localhost:8080/Test
index.jsp file will run
[ October 10, 2007: Message edited by: paritosh ranjan ]
17 years ago
Gayani
As you said
im using jsp:getProperty to reurn the vetor object in my bean class.

This is a common misconception,jsp:getProperty is used to print the value of the property.It doesn't gives you access to that property as it seems to do with a name like "getProperty".But the sole purpose of jsp:getProperty is to print the property.

The following actions instruct the JSP engine to print out the values of the state and the zip properties of the address bean:
<jsp:getProperty name="address" property="state" />
<jsp:getProperty name="address" property="zip" />

They are equivalent to the scriptlet code:
<%
out.print(address.getState());
out.print(address.getZip());
%>
17 years ago
JSP
The jsp file using <%.....%> is just copying the content inside
<% and %> into jsp_service()

The jsp file with a $ sign is using a EL,which is made for web designers so that they don't need to learn java.
17 years ago
JSP
Please try it once:
Keep your javabean in a package named mypackage.
TO be more specific
"WEB-INF/classes/mypackage/HelloBean.class"
and in your useBean give full classname like
<jsp:useBean id="user" class="mypackage.HelloBean" scope="session"/>

Just try this once,sometimes there is a problem if you don't keep your class in a package.I am not sure that this will work,but I faced a similar problem like this once and keeping it in a package helped.
17 years ago
JSP