HTTP status 404 in the Struts2 web application

Here is my set up: Specs: Tomcat 7.0.55 jdk1.8.0_11 Eclipse Luna Win 8.1 I have a Dynamic Web Project set up in Eclipse titled "Struts2Test" with following structure. Note: I am highlighting only the folders and files relevant to this question.

actionMessage showing all pages how to avoid

addActionMessage(" does not exist!"); how to avoid this message in JSP page showing all pages. jsp: <s:actionerror cssClass="MessageBox" theme="simple" /> </s:if> <s:if test="hasActionMessages()">

Struts2 if the tag does not work

I am writing a login page that when a invalid user tries to login I redirect to the login action with a error parameter equal to 1. private String username; private String password; private int error; @Override public String execute() { //validate us

How to set values ​​in session?

If I'm getting empty session I need to setup some values to play the action class. So, here is the method public SearchFilters getFilters() { return (SearchFilters) getSession().get("Filters"); } I would like to check the session, if it's null,

Struts 2 JQuery Grid is not showing

I am trying to show the data from struts2 action class into JQuery Grid. but when i try to achieve that, I am not even getting the Grid, it is just showing the JSON string as output, as shown below, tried all the other answers posted here but no luck

to call the javascript function using hyperlink 2 tags?

i have below code snippet in my jsp but it does not call addCustomer function. <s:a href="javascript:addCustomer()">Add Customer</s:a> Am i missing something in using s:a tag? The html code generated coressponding to s:a tag is <a

In Struts2, I do not get a form value on the success.jsp page

In my application I am trying to register a user by adding his details to the database and after success fully insert these values. I need to display form input page but on result page I am not getting any output. My ACTION CLASS IS package action; i

if the condition in jsp does not work

I am using the following if condition but it does not work. When the jsp page is loaded the output will be shown without checking the condition. The code is expect to receive the values of a form put them in obj property and send them to Xclass when

Displaytag in the included page

I would like to use displaytag in an included page but I have difficulties. I have got a main page which includes a header jspf, a menu jspf and an other jspf depending on the selected menu (on menu.jspf) main.jspf <html><body> <table borde

Access to Struts2 properties in included JSP pages

I want to access Struts2 Action bean properties in included jsp files of my main jsp Main.jsp [where I can access Action Bean] <s:if test="%{assignedProductBean.productCode =='NOMADIC'}"> //SOMETHING HERE </s:if> <s:elseif test=&q

Retrieve values ​​based on card keys in cards

I working on a project where I have to connect the specific database based on the bank_name.I am using java,struts2,hibernate. for example: {'sbi': {'host':'111.111.15.45','port':3306,'username':'xxxx','password':'xxxx','database':'sbidb'} Here sbi i

Call a method after starting jobss

Hi i am using struts 2 and want to call a method just after when server is up. as on server startup we can use FILTER DISPATCHER. i am using jax ws . and i am deploying my jax client and endpoint project on same jboss server. How to solve this Plz he

Allow only one session per user

We have a web-application developed using struts2, spring & hibernate. The application needs a functionality that one user can login from only one browser. Say if user x, is logged in on pc-1 browser ff, then he cannot be logged in from any other pla

how to get json from a request?

I'm posting a json request to server. I can see the http post is done correctly in firebug. (I'm sure the json format is valid) eg. {datas:[{"a":1, "b":2},{"a":5, "b":6}]} my question is, how do I recover this data

Struts 2 Redirect Option

All, I want to redirect to an dynamic URL (decided based on certain business rules) and redirect the user from the current page to a page on the redirected URL (same as Servlet redirect). Say the user is in http://server1:port1/context1/abc.action on

Use Struts or a custom controller

I am developing an Ajax-heavy application, where the user never navigates away from the same page. However, there is going to dozens of different kinds of calls to the server for data and I'm confident this application will be added onto in the futur

Transfer only some of the properties of a class in json struts

Sorry, I really don't know how to summarize the title of this question. So, the title may not be clear. I have an action class which performs some business logic. in the Action Class: class ActionClass extends ActionSupport{ private Merchandise merch

NPE in StrutsTestCase after activating the tiles

I developed some JUnit tests that extend org.apache.struts2.StrutsTestCase. I used the tutorial on struts.apache.org as my starting point. Everything was working fine until I modified my simple web application to use Tiles. I have Tiles working fine

Get the value of hidden fields

I am working on a Struts2 application. I am setting the value of a hidden field in JSP with the purpose to access it by JavaScript. My JSP code: <s:iterator value="collegelist"> <tr> <td align="center"><s:property

Validation of the methods of some actions in Struts2

I have an Action class with CRUD actions inside and I have overridden the validate() method given by the ActionSupport class. The question is: how can I fire the validation only for the update and create actions? One possible solution is to move crea

axis2 problem (1.3) with the client

(axis2 1.3, struts2 2.1.8.1, tomcat 6.x, java 1.5.0) I've got problem with making my first web service. I create a MOCK api which i want to test. My action: public HotelMessage[] getMessages(String roomNr) { HotelMessage[] msg2return = new HotelMessa