struts

Apache Struts: Cannot retrieve ActionForward

I am trying to learn the Apache Struts framework and I have written a small application that does class enrollments but whenever I try and load up my application it just spits out the following exception: javax.servlet.ServletException: org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.J...

what is the NDC logs and how we can use it in our application and what is the significance of that...

what is the NDC logs and how we can use it in our application and what is the significance of that... ...

I have a problem while using strusts validation frame work. container not load validations file?

I have a problem while using strusts 1.2 validation frame work. container not load validations file? the error is, Cannot load a validator resource from '/org/apache/struts/validator/validator-rules.xml, /WEB-INF/validation.xml' at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:172) Can anybody help me what s...

struts.xml and struts-config.xml

What is the difference between struts.xml and struts-config.xml....is both are same or is there any difference ...

Help with Struts Action mapping

I am having a problem with my struts application it is a class enrollment app and when the user clicks on a "show enrolled courses" button it is supposed to show the courses they are enrolled in but it shows nothing at the moment. Struts/Apache does not return any errors, it Just shows a blank page and I cannot figure out why. My action...

Duplicate Prefix Error in Jsp page with Struts

Hi, i am creating and Configuring the Struts for the first time, when I place the following Code in my jsp page <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> <%@ taglib uri="http...

Struts is not using my default CSS for rendering <select> items seems to ignore my CSS

Struts seems to completely ignore the styleclass option for rendering the and associated options. I have spent a good deal of time getting the CSS right for this website to shar on all the pages, but cannot get struts to play ball? ...

struts dynamic error message handling

Hi , I want to display a dynamic error message ,i am having the code as ActionMessages errors = new ActionMessages(); errors.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("error.plan.foundForUser")); saveErrors(request, errors); error.plan.foundForUser={1} Not Found I want to replace 1 with a dynamic value,how to do so ? ...

Generic error pages in webapp under jboss

Not a jsp/maven/java dev myself, i'm trying to configure error pages in a generic way, for a webapp, without touching jboss's configuration. Here's how i'm trying to do so: in my web.xml, i've set up <error-page> <error-code>*</error-code> <location>/actions/erreur</location> </error-page> Here, I doubt using...

How do I set the user's locale on a JSP

I have a .jsp page that the user loads directly. The request it with a URL like the following: http://www.example.com/myfile.jsp?country=CA&amp;language=fr In the JSP, I pull the URL GET parameters and attempt to set the locale using them as follows: <% String myLanguage = request.getParameter("language"); String myCountry = ...

How to implement payment gateway in Java Struts project?

I want to implement a payment gateway in a Java Struts project. What are the steps for this? ...

Adding name and id properties to textarea (struts)

Hi, i mostly do CSS and php so i'm kind'a lost here, so no idea if this is possible the way i want it anyway, this is it: I have this code <html:textarea rows="10" cols="70" property="thankYouMessage" /> And i want this textarea to render an id of "textareaID" and a name like "textareaname" how can i go about this?... if i use styl...

Struts: Upload a file with progress bar

Hi, i want to upload files with Struts using the org.apache.struts.upload.FormFile but i would like to put a progress bar (like the gmail uploads forms or some like that), to upload the file (the files are big like 100Mb so the user must see what's going with the application). How i can do it? Regards :) ...

How to access struts interceptor parameters in Java?

I have the following code in struts.xml: <interceptor-ref name="checkTabsStack"> <param name="tabName">availability</param> </interceptor-ref> and I want to access the parameter tabName in the interceptor routine, how do i do that? i tried Map params = ActionContext.getContext().getParameters(); but params comes empty... Thank...

Why are action based web frameworks predominant?

Most web frameworks are still using the traditional action based MVC model. A controller recieves the request, calls the model and delegates rendering to a template. That is what Rails, Grails, Struts, Spring MVC ... are doing. The other category, the component based frameworks like Wicket, Tapestry, JSF, or ASP.Net Web Forms have becom...

How can data be passed into an <s:> tag within a Struts tag file via attributes?

I have a form with two halves, one for attaching a wide thumbnail to an asset and one for a standard-size thumbnail. The jsp file generating the page calls thumbnail.tag, which calls thumb.tag twice: <thumbnail:thumb label="75px Thumbnail" /> <thumbnail:thumb label="Wide Thumbnail" /> thumb.tag in turn has the following: <s:if test="...

Load variable only once in struts 1 Action class

Hi, I have a structs action object instance that loads a variable from a properties file.I want it to happen only the first time the action is called, so in further executions its read from memory. Any hints ? Thanks. ...

Iterating over hashmap in JSP in struts application

I have a HashMap object that I am getting on a JSP page. HashMap<Integer,Gift_product> gift_hm = new HashMap<Integer,Gift_product>(); gift_hm.put(17,new Gift_product("doll",67)); Now I need to iterate this and display content on JSP. The Gift_product class contains two fields: name and price. JSP output should be serial no. ...

Ways to polling server status

Hi guys, I am try to create a JSP page that will show all the status in a group of local servers. Currently I create a schedule class that will constantly poll to check the status of the server with 30 second interval, with 5 second delay to wait for each server reply, and provide the JSP page with the information. However I find this w...

Passing a Java object from one Struts action to another

Hello! In one of my Struts action I've got the following code in a method: ... List<Object> retrievedListOfObjects = c.getListOfObjects(); return mapping.findForward("fw_view"); } fw_view leads to a new Struts action with another Struts form. Let's say this form has got among others the following field List<Object> listOfObjec...