Click here to Skip to main content
15,891,704 members
Everything / Struts

Struts

struts

Great Reads

by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
by abhinav_soni
Very simple XML based framework for client and server side validation frameworks in Java.
by Han Bo Sun
This article introduces developers to use Apache Struts 2 with Google AppEngine. Specifically, the jars needed, and the project setup to allow your application to allow Struts execute under the AppEngine environment.
by Aftab Ahmed Sajid
Preventing browsers from saving Admin user passwords, intentionally or unintentionally while using STRUTS forms

Latest Articles

by Aftab Ahmed Sajid
The simplest way to return json objects to client using struts 1
by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
by Aftab Ahmed Sajid
Preventing browsers from saving Admin user passwords, intentionally or unintentionally while using STRUTS forms
by Han Bo Sun
This article introduces developers to use Apache Struts 2 with Google AppEngine. Specifically, the jars needed, and the project setup to allow your application to allow Struts execute under the AppEngine environment.

All Articles

Sort by Score

Struts 

7 Jun 2016 by GProssliner
cobj is a preprocessor based generator for interface based polymorphism
15 Apr 2013 by OriginalGriff
It has "advantages" if you are going to include the same data in a number of different structures, and want to declare the common data in a single place - but generally speaking that is a poor way to do things anyway.The only real "use" of this is when you want to define a set of related...
5 Feb 2013 by V.
Just my two cents, but I see it more in OS related terms. Windows or Linux. If you're more a Linux or MacOS kind of guy, go to C++ and java else .Net is the way to go. It is also rarely a combination. Although it is a good idea to have knowledge of several technologies, often you use...
15 Mar 2011 by Espen Harlinn
Markus is definitely on to something:http://struts.apache.org/1.2.9/userGuide/struts-html.html#checkbox[^]Best regardsEspen Harlinn
13 Dec 2011 by nguyenle.it
Thank you so much for any commentI solved it by myselfThis is the solutionIn the jsp file of struts i have to have this directive to use html tag lib and in the "img" tag i should use rewrite attribute to link to the image file. And the image you should put in the Web Content pathAnd...
5 Feb 2013 by Joezer BH
The answer is: depends on who you are asking!Most people (including me) here in CP will probably say with .NET but the fact is that it's just an opinion, and some of my best friends (who are wrong about this question) will tell you with Java (being that it's cross OS). There you have...
11 Dec 2013 by thatraja
Gishisoft wrote:I try to research in the internet some i cannot understand. Probably you need to spend more time on learning(if possible, do from start)Check this one,A Simple Remember Me functionality in JSP/Servlet[^]
3 Nov 2010 by Nagy Vilmos
(1)The URI in the address should be the redirected address, that is the page being shown.(2)If you specify redirect="true", Struts uses a client-side redirect [response.sendRedirect()]. The JSP will be invoked by a new browser request, and any data stored in the old request will be lost.
11 Nov 2010 by Nagy Vilmos
Look at the following code:try { Class.forName("oracle.jdbc.driver.OracleDriver"); con = DriverManager.getConnection ("jdbc:oracle:thin@localhost:1521:xe", "system", "java");}catch (ClassNotFoundException cnf) { cnf.getMessage();}finally{ ...
6 Jan 2011 by SmoothCriminel
Hi Experts,I want to know following about struts2:1. Does internationalization works for Arabic & English? Any special considerations?2. How can I change the alignment of text when locale is changed? For English it will be left aligned and for Arabic it will be right aligned? 3. How...
25 Jul 2011 by ZeZe el X
For those who might need this in future, here my solution. (pretty simple! :D)private enum aEnum: int { A = 0, B = 1, C = 2, D = 3}private bool yourFunction (aEnum a){ ....}the function call:yourFunction(aEnum.A)
13 Dec 2011 by NikulDarji
http://www.ros...
27 Dec 2011 by thatraja
Fix linkDispatcher initialization failed - Unable to load configuration[^]
25 Jan 2012 by TorstenH.
You are new in the internet right?Otherwise you would have used www.google.com - typed "JSP table" and pressed the "I feel lucky" button which would have beamed you right where you want to be.try it. And buy a book. It's kind of like a second display to your computer: Video tutorial on...
16 Feb 2012 by bjorn_ht
The problem with QueueUserWorkItem is most likely that your main() exits before the worker thread gets a chance to run. Try adding a long Sleep() to your main() after the QueueUserWorkItem() call, or better, synchronize the worker with main(). E.g. something like this:#include...
12 Mar 2013 by Prasad Khandekar
Hello,Try putting following configuration in your web.xml if your are using Servlet 2.4 compliant container. org.springframework.web.context.request.RequestContextListener If you are using Servlet 2.3 compliant...
27 Apr 2013 by mohaideen shalim
Hi..Can anyone pls help me to write a code for the dynamic menu generation from oracle or any database in jsp???
25 May 2013 by Prasad Khandekar
Hello,You can obtain the actual URL by using code similar to one shown below.ActionForward af = mapping.findForward(status);System.out.println("path========-----".concat(af.getPath()));Regards,
29 Aug 2013 by TheUltimateDebugger
struts-2-sselect-drop-down-box...
4 Feb 2014 by Raghavendra M
I have created login page for struts application as follow,Login page | Hello World Struts application in EclipseLogin ...
20 Oct 2010 by g.raaja
Hi All,Did any one know the advantages and drawbacks of struts 2.0 over previous versions of struts. I mean is struts 2.0 will support all the features which were supported by earlier versions like 1.0, 1.1, 1.2.Thank you all.--raaja
20 Oct 2010 by jazy_smith
Hi all,please try to give me satisfactory explanationHi all,Please go...
20 Oct 2010 by Henry Minute
Have you tried looking/asking here[^].I would have thought that a site specifically for the framework would get you further quicker than here.
9 Nov 2010 by amitpinku8309
Hi I'm amit and getting this error: for this code:struts-config.xml
9 Nov 2010 by Nagy Vilmos
First thing is the class looks odd:public class TestDispatchAction extends DispatchActio { [...]}The super class should be DispatchAction.
11 Nov 2010 by amitpinku8309
Hi, I am making database connectivity in struts and getting error:javax.servlet.ServletException: java.lang.NullPointerException, code:-config.xml:
31 Mar 2011 by Gurpreet Singhh
Error(1,32): cannot access class com.opensymphony.xwork2.ActionContext; class file has wrong version 49.0, should be 45.3 or 46.0 or 47.0 or 48.0import com.opensymphony.xwork2.ActionContext;import com.opensymphony.xwork2.ActionSupport;import java.util.Map;public class loginAction...
31 Mar 2011 by Arndt Faulhaber
This means you compiled a class with the wrong java version (49.0 is Java 1.5, I think) and it seems in this case you try to run it in an older Java-VM...Try to set the javac to compile for an older Version e.g. 1.4 and retry.You can set this in your build files - assuming ant it would...
24 Aug 2011 by nazrul mondal
can any one tell me how can i show the Bengali letter in my property file because whenever i copy the Bengali letter and try to past in file it give an error (Actually not an error it show like @##### that.).So is there any jar file or any other things which i have to add in my project ,...
25 Aug 2011 by Nagy Vilmos
Make sure you have a font that supports Bengali characters for viewing your resource file. It is probably correct underneath, but just fails to render in correctly. Check in Tools > Options > Fonts & Colors.
1 Dec 2011 by nguyenle.it
Hello everyoneI'm just a newbie with struts framework, but when i run an struts app on server i got this error:"The server encountered an internal error () that prevented it from fulfilling this request."And the eclipse throw this exception:org.apache.jasper.JasperException:...
1 Dec 2011 by TorstenH.
you're not the first to encount the exception: Clickedy 1[^]Clickedy 2[^]
3 Dec 2011 by nilu16
hello friends i wanted to now about dynamic action formhow many dynamic action forms we can declare in struts config and how to call them from action classesthanks
4 Dec 2011 by TorstenH.
You should read about Action Forms in Struts[^]
7 Dec 2011 by nguyenle.it
Hello everyoneI want to do an app that integrate hibernate with struts. I have all correct "hibernate.cfg.xml" and i put this file in the right place. And i build an hibernate plugin to use for action servlets. I look like everything is ok, i have referenced on google, and i do the same but i...
7 Dec 2011 by TorstenH.
Check the libraries, you'll have forgotten some or differences in there. Also make sure you have only a "struts.jar" OR "struts-coreXXXX.jar" in there. Occurred to me one time and did cost time - lots of time.
20 Dec 2011 by matlub
I want to use checkboxlist in struts 2.0 but my condition is first we populated the checkboxlist from one database table when user select the checkboxlist than save another database table but i have to view and edit in the same fashion such as entry time
22 Dec 2011 by tsudhirkumar
HiIn my application i have to choose certain filter parameters to choose .Based on parameter selected i displays the list from DB and showing the result in AJAX div tag.I used pagesize for the result so that result show in pagination format.so the result in ajax page loads only the...
24 Dec 2011 by nguyenle.it
Hello everyoneI have a problem but i don't know how to solve it. Could anyone help me, please?I have a "dtails.jsp" page. It'll be linked by an action from another page. So i want to take a property that name "photo" that contain the image path and render it like this. To render a textfield,...
24 Dec 2011 by nguyenle.it
Hello everyoneI want to start learning struts2. So i want to write first "hello world" like in the example below. I do the same like they did, but when i using library(2.0.14) it work ok, but when i using library(2.2.3)Dispatcher initialization failedUnable to load configuration. - bean...
28 Dec 2011 by sunithamm1
Hi all,I am having two select boxes in my jsp page. I need to populate second select box depending upon the value selected in first select box. I am able to do this. But the problem is i am not getting the value selected in the second select box in the action class. i have provided getters and...
1 Jan 2012 by sunithamm1
Hi all,I got it solved.i wrote a javascript function in index.jspfunction test(){ document.innerForm.action = "printAction.action"; document.innerForm.submit();}Then on cliking print link,called that function.PRINT
11 Jan 2012 by nguyenle.it
Hello everyone!!I'm senior student at school, and my team want to make a senior project, but we don't know what project to do with. Our team have 6 members, and we want to make a project relate to cloud computing.Could anyone help us to give us the idea of project to work with?Thanks for...
11 Jan 2012 by Sergey Alexandrovich Kryukov
Please look at my ideas I tried to express in my past answers:Can you suggest a topic for my Senior Project? Programming[^],Need Project Ideas Help me Plz[^].Good luck,—SA
23 Jan 2012 by Er. Mayank Jain
can anybody tell me how to start to work with struts?which is best reference to learn struts framework?
25 Jan 2012 by rintu kumar
HI,I am working on struts application where i have to display data from database in Jsp grid/table but i have to also provide functionality to update the data , pagination, row deletion and ascending, descending functionality. Please help me I am new in web technology.
15 Feb 2012 by rintu kumar
hi, when I am running my site in my system where i have put my war file, that time i am getting all city according to the state but when I am accessing my sites through URL from other system that time my code is not working . Here below is my code please have a look and help me...
16 Feb 2012 by Abhineet Ayan Verma
Hi All, Why my QueueUserWorkItem is not at all working. My code is here:typedef struct{ PCHAR URL[MAX_URL] ; PCHAR DestinationPath ;}MAINDATA, *PMAINDATA ;int main(int argc, char * argv[]){ PMAINDATA pData ; BOOL bQuwi ; DWORD dwIndex ; PCHAR pURL ; ...
28 Feb 2012 by tsudhirkumar
Hi,I have doubt in array list implementation in struts2.I have created a array list in java script .But how access the arraylist value in action class using index.can some one help me out.Thanks
8 Mar 2012 by ashutoshdotcom
Sir , Now am making one web application similar to www.fitnessbliss.com . Their my username is ankurbhasin and password is ebhasin123.If you click on "my Routine" & on some created Routine button. you can see on its right side a Pannel for showing all the days and their corresponding...
13 Mar 2012 by ashutoshdotcom
Sir, After performing strut action i do not want to forward my page on any jsp , How can i do this in Struts 2.?Thankyou-Ashutosh
16 Mar 2012 by rintu kumar
I am using dojo datatimepicker and I have below mentioncode in my jsp :s:datetimepicker label="ToTime" name="totime" id="totime" type="time" displayFormat="dd/MM/yyyy hh:mm" required="true" onchange="false"/ors:datetimepicker...
5 Apr 2012 by tsudhirkumar
Hi guysI worked out some sample in struts2.I have struck in one point. while implementing my request.when logged into my application . i will check whether the user is ordinary user and super user in action class 1.if the user is ordinary user then i redirect the result for this...
6 Jun 2012 by abhinav_soni
Very simple XML based framework for client and server side validation frameworks in Java.
19 Apr 2012 by tsudhirkumar
I have solved it myself .created the arraylist in javascript and setted the list value to hidden value in jsp using javascript.Accessed the hidden variable value in action class.The list value can be accessed as string . split the string using comma separator.
25 Apr 2012 by tsudhirkumar
I am listing values in jsp page using display tag using struts2.In the jsp page i am using html checkbox element .based on the list value i need to checkbox to be checked, otherwise unchecked.if the value is true it should be checked if the value is false then uncheckedcan you help me out?
26 Apr 2012 by jitendra BABA
public byte[] getrepImagechange2(int loginid) { Criteria criteria = null; byte[] repCurrentImage = null; try { session = sessionFactory.openSession(); criteria =...
1 May 2012 by Vincent Ghomus
I've a struts checkboxlist for setting 'Status' as . So when I check any one from this list, the other one should be disabled (if 'Enabled' is checked 'Disabled' should go disable and converse is also true). I tried a number...
1 May 2012 by Chandan Aryan
Fire The Check Change Event of Check Box List and Make its auto post back property 'true'Now Write this code in event Foreach(ListItem in CheckBoxList.Items) { item.selected.equals(false); } e.item.seleted.equal(true);
1 May 2012 by johnysamuel
I have a check box and checkboxlist asDays of the WeekSo initially all checkboxes for the list should...
2 May 2012 by Human 2012
Hi Team,Can anyone please tell me what are Advantages of Struts,Hibernate Framework.I knew that they(Struts,Hibernate) will reduce the time for coding.Can anyone briefly explain in this concern.Please tell me wheteher follwing concern is correct or not?1)In struts,we create...
3 May 2012 by Vincent Ghomus
I've a checkbox like Days of the Week and another checkboxlist . When I check the checkbox it's value will store as...
5 May 2012 by Vincent Ghomus
I solved that problem. I'll give my code here :)public class ScheduleAction extends ActionSupport {private String checkListData;private List wordList;public String modifySchedule() {checkListData = modProcessVO.getCalWeek(); // retrieving checked items from database String...
6 May 2012 by Vincent Ghomus
I've a struts2 checkboxlist as,But I'm not getting the id 'days' as I specified. id is showing like processVO.weeklyCal-1 upto processVO.weeklyCal-7, when I checked in...
13 May 2012 by raghavendranayak
how to connect struts2-MySQL database in NetBeans 7.1
20 May 2012 by i_am_LemOn
hi--use the getElementById function. in your case:var days = document.getElementById("days");
25 May 2012 by hiseshu
hi johny try this // First way $('#week').attr('checked'); // Second way $('#week').is(':checked'); then enable or disable the checkbox list using id Happy coding .... :)Seshu
29 May 2012 by satya84
Hello, We are running an application developed in struts1.x which is hosted in jboss application server , we want to implement SSO for our application as a service provider our client hosted simplesamlphp idp for saml2.0 version, could you guide us what is the possibilities and where we...
15 Jun 2012 by techbrij
Try following:if ($('#weekCheckBox').is(':checked')){ $("[id*=CheckBoxList1] input:checkbox").prop('checked', true);}For more information to set checkboxlist items in jquery, check following:ASP.NET CheckBoxList Operations with jQuery[^]
26 Jun 2012 by Vincent Ghomus
Hello, I've a grid like
26 Jun 2012 by TorstenH.
...and the internet did not know anything about that?Javascript Validation Tutorial[^]
24 Jul 2012 by HCIMS DEVELOPER
Hi,Below is the code I am using to submit a form the problem is that I am not able to apply the jquery client validation..Please help me with the necessary jquery to do the same ..thanks in advance$(document).ready(function(){ $.subscribe('validateFields', function(event,data)...
7 Aug 2012 by Richard MacCutchan
You have started a new root element, servlet-mapping, which I do not think is allowed.
18 Aug 2012 by Sergey Alexandrovich Kryukov
Please do this: http://bit.ly/RqX5Po[^].Did you try it? 1,110,000 results cannot be all wrong… :-)—SA
1 Sep 2012 by Rameshmarri
hai i am working on Struts f/w. ==>My requirement is to fix the scroll bar when i update the record.Breif explanation:================= I have 25 records in my page in assending/desending order ...now i moved scroll bar to 20 th record.and update the 20th record ,then...
21 Oct 2012 by lakshman udayakantha
I have developed a java web application using struts2 in eclipse. I run the application by using this urlhttp://localhost:8080/newApp/[^]application run on the local machine.but I want to run it on a remote server.using a url something like this. http://myapp.com/newApp[^]how to do this...
28 Oct 2012 by amit bakle
By default checkboxlist uses the element name as id for the checkbox and label.You have to use custom theme, and edit the checkboxlist.ftl file.you need to make changes at two places:1: default:
8 Dec 2012 by Sarmila14
I have a file upload solution in Struts2/spring integrated app.I have a validation for the files the user selects. if the user selected 3 files and 1 of them fails validation, i return the user back to the same upload page.My problem is, for the other two files that went through the file...
19 Dec 2012 by Han Bo Sun
This article introduces developers to use Apache Struts 2 with Google AppEngine. Specifically, the jars needed, and the project setup to allow your application to allow Struts execute under the AppEngine environment.
3 Mar 2013 by tsudhirkumar
HiIn my action class i have passed the result type error to struts.xml when an exception raised .Return value in action class is ERROR.In my struts.xml for the return type error i have pointed a jsp with displaying action error message.Mapping value in struts.xml is ERROR.But the...
3 Mar 2013 by tsudhirkumar
solved the issue.If i mapped result type ERROR in action class then it passes the value to struts as "error" only.If i mapped result type "ERROR" in action class then it passes the value to struts as "ERROR" only.Thats the difference
12 Mar 2013 by liangwu2777
My Project is based on Struts2 + Spring + Hibernate.In my project, I'm using 'singleton' for bean scopes.But I want to apply request or session scope for the some beans.I'll describe configuration files of my projects.Web.xml
12 Mar 2013 by liangwu2777
Hi.My project is a web project based on Struts2 + Spring + Hibernate.And I'm using MySQL.I'm defining beans and applying DI( Dependency Injection ).All beans have 'request' scope, but only org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean instance is...
21 Mar 2013 by Prasad Khandekar
Hello Agav,You can use a LEFT JOIN between m_user and whatever the table from which you want to display the value in textbox. SELECT a.m_name, b.x_something FROM m_details.m_user LEFT JOIN x_table b ON b._x_name = a.m_name The next thing you are going to do change your loop as shown...
21 Mar 2013 by doree007
I was developed a dynamic web project using struts framework and eclipse. I want to display java object in jsp page. My problem is database values are assign to the object. But that values are not displayed in jsp page... This is my jsp code and in hear within iterator i have add the variables...
24 Mar 2013 by Prasad Khandekar
Hello,You should do such task in background as a asynchronous batch job. One simple way is to use Quartz Scheduler and use to validate the file contents. This way user does not have to wait for the validation to complete. The scheduled job will typically use the database to keep track of...
24 Mar 2013 by prabhat123.ranjan
Hi, i am having error when deploying web application build on struts and hibernet. the stak trace is giving below:---org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 2320: 21: 22: Contact Manager23:
2 Apr 2013 by Prasad Khandekar
Hello Prabhat,Try to remove xmlns:s="#unknown" from the jsp, and also ensure that following taglib directive is present in your page. Ensure that the filter is defined in web.xml as shown below (From the sample it's not clear) ...
9 Apr 2013 by gavkk
I have a jsp struts file with --select--
9 Apr 2013 by Prasad Khandekar
Hello,Please remove value attribute on html:select tag.Regards,
27 Apr 2013 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
29 Apr 2013 by Rezaul Hassan
Sometimes we need to generate menu form database according to our requirements. The following url[^] will help you to generate menu dynamically in ASP.NET. You can apply your customize CSS as you like to give nice outlook of the menu.
2 May 2013 by krishna chaitanya
i'm using Struts 2 dojo div targets , the response that i get is not targeted to the div instead opens up as a full page and i'm getting 'djConfig undefined' erorr in developers tool console. i have this problem only in IE, works fine in all other browsers.Any help is appreciated
2 May 2013 by Shubhashish_Mandal
you can try this... link1
5 May 2013 by mohaideen shalim
My jsp page is:]]>]]>]]> JSP Page
24 May 2013 by User-10031173
i have tried with all these things but giving url like/get.do. i have two forwaed pages success and failure.if success i want url like ..../projectname/success.jsp. how can i get this onei have used the following code but none of working.public class LoginAction extends Action { ...
27 May 2013 by User-10031173
hi, i need to get value of to action class. For examplei have link likeBuy Home for Sale
27 May 2013 by User-10031173
we can html link value in action class by using following code.Home for saleIn form bean class:private String sale;set()..get()..
19 Jun 2013 by manishg440
factContent is description want to desplay when share.factID - is fact id which I am going to share. function fbs_click() { u=location.href; t=document.title; ...
20 Jun 2013 by gavkk
I have in my jsp struts file. I want to add an place holder attribute in it. How can I do it?