struts

web application session cache

I want to cache data for a user session in a web application built on struts.What is the best way to do it .Currently we store certain information from the DB in java objects in the user's session .Works fine till now but people are now concerned about memory usage etc. Any thought on how best to get around this problem. ...

Recommendations... JavaServer Faces (JSF), Struts, model2, other

We are looking at reworking a java business management web service that has been in use for over 4 years now. The software's internal architecture has been all custom built and with a bad separation of of the presentation layer and business logic. As well the overall model layer has proven it can't effectively keep up with changing busin...

Struts 1 binding dynamic values in html:checkbox value

Using Apache Struts, I would like to bind a dynamic value to the html:checkbox value. For instance I want to get userid in the form while submit the action. Now <html:checkbox property="userCheck" value="${searchedUsers.userId}"></html:checkbox> so I just bind my userId value in the value attribute of check box. searchedUsers is a...

Alternative for JavaScript onUnload

Hi, there is an alternative to the Javascript onUnload? I use JSP Jakarta Struts framework with a Servlets. I must know, when is window closing, because not everyone clicks on Logout button. How do you handle it in your applications? ...

Any good tips for a PHP programmer starting a GWT project?

Coming from PHP with some Java Struts 2.0 experience any tips/tricks on learning GWT? I have been looking at some tutorials but just wanted to know if anyone has some great gems to pass along? ...

Problem with moving JSPs under WEB-INF directory

Hello I am facing a problem when I move my JSP files along with CSS and JS files under WEB-INF/web/ directory. The problem is that, when a JSP page loads, it does not load CSS and JS files. Please help if you have any idea about it. Thanks Umar ...

Struts JSP : set textfield value from session information

Hi, I have a DLPUser object in my session, this DLPUser is basically a container for Strings, ints and some useful info for me. (this is a fragment of code inside my action class in java) Map <String, Object> session = ActionContext.getContext().getSession(); session.put("logged-in","true"); session.put("user", user); //user is DLPUse...

result inside a sx:tabbedpanel? STRUTS AJAX

Hi, I am quite new to struts. I have a sx:tabbedpanel with three s:divs inside of it. <sx:tabbedpanel id="mainContainer" > <sx:div label="View Files" cssStyle="height:200px;margin:20%;" href="ShowFiles.action"> loading... </sx:div> <sx:div label="Upload Files" href="ShowFileUpload.action" closable="false"> ....

Prevent XSS attempts on a Tomcat/Struts 1 web application (without source code)

A 3rd party web application has a cross-scripting security issue. There is one page with three fields which are not sanitized. The vendor will not provide a timely fix and I need to. The application is running in Tomcat and uses Struts 1. The action for the bad page looks like this: <action path="/badpage" type="com.badvendor.Ba...

Struts 2 and locale question

I've got forms that I display on almost every pages of a website (a login form, for example), so I don't use an action for those. The "post" of those forms just goes to an action and if there is a validation error, it displays another "central" page. The only thing that doesn't seems to work in the form page is displaying a message in di...

How to encode a parameter with a url in struts?

A list of books is displayed on the page. When a user clicks a book, its detail page is opened. Now the problem is that I need to encode each book's id with the detail page url. The link to detail page is /loadDetailForm.do. If a book has id=23, the link should appear as /loadDetailForm.do?id=23. I am pasting code here: <logic:notEmpt...

Using <s:combobox> in Struts 1

I am using Struts 1.I have a taglibrary <%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld" %> This tag library works only in Struts 2.0 Framework.This has a tag which I have used in my application.Now when I had to backtrack to Struts 1 I got an error Could not parse deployment descriptor: java.io.IOException: cannot resolve...

what is a TOPIC in Struts2

HI, I am learning struts 2 with Tiles 2 and the word "topic" shows up very frequently... What is a topic? for example: The sx:a tag (specifically the ajax a template) and the div tag support an ajax event system, providing the ability to broadcast events to topics. You can specify the topics to listen to using a comma separated list in...

Struts : is there a way to test the current module?

In a JSP, I want part of the content to be module dependent. How do I test the current module? ...

Struts Tag> submit to anchor

Question> How can I change <s:submit> to <s:a> in struts tag? I want to send parameters to next page(action) by post (not get) <s:form action="products" method="post" theme="simple"> <s:hidden name="code" value="%{code}"/> <s:submit type="button" method="selectSale" value="see"/> </s:form> help me~ ...

call struts action from jquey

Hi All, i am trying to call a struts1.3 action from jQuery i tried this $.get("/samplAction.do",function(response){ //some code }); but the action is not called. waiting for your valuable responses. Thanking you in anticipation ...

Data type used in action forms

Hi can somebody explain that if i declare variables of other types (except string) in the form beans what problems I might face ? ...

Which is the best approach?

I have a question regarding struts. I have a HashMap which has nearly 50 entries. Now I have to define this map inside an action class, say TestAction. As you know, this action class extends the Action class. Now my doubt is fundamental: Should I load the map as static? What are the advantages of loading this Map static? If I am g...

[Struts Tag] how to change a link tag: Submit to Anchor

Question> How can I change <s:submit> to <s:a> in struts tag? I want to send parameters to next page(action) by post (not get) <s:form action="products" method="post" theme="simple"> <s:hidden name="code" value="%{code}"/> <s:submit type="button" method="selectSale" value="see"/> </s:form> ...

Problem submitting struts form

I have a form that has some indexed properties. When i submit this form io get the following error message javax.servlet.ServletException'(2009-09-16 13:14:29.814 GMT): BeanUtils.populate. --- Any ideas what i should be looking for to solve this issue? ...