Mnau Lubi

Ranch Hand
+ Follow
since Mar 17, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mnau Lubi

Hi!

I am trying to program a DELETE method in my Rest server. However I checked in the documentation that the default behaviour of DELETE is to set the response status to Status.CLIENT_ERROR_METHOD_NOT_ALLOWED. Is it any way to change this default behaviour?

Thanks
13 years ago
Ok, problem found!

All the libraries that are being used by the web service must be placed in the WEB-INF/lib folder.

Hope I help.
13 years ago
Hi everyone!

I am getting un ugly exception when trying to instantiate one class in my web service. Specifically, when the debugger executes the line:

RestClient client = new ResClient();

I get the next exception:



Can anyone help me please?

Thank you in advanced
13 years ago
Solved! I cleaned and rebuilt the project and it works now . Just one question, I get a red cross in the project folder, as if I am having an error somewhere in the project but then, there is no folder or package with the red cross. Is there any way to know exactly where the error is?

Thanks
13 years ago
Hi!

I am having a really strange error. I changed the name of an action class. Afterwards, I changed the name in the struts-config.xml, so that the system knows how to access to the new Action class. However, when the browser must access that action I get a:



I don't know why it can't find it. In struts-config.xml, if I press Ctrl and place the mouse on the Action class, I get a link to the Action class!

Please help, I am sure it is a very silly mistake.
13 years ago

Tom Reilly wrote:

<html:multibox property="multiBox" value="sharecontentparams"/>


You are assigning the vaue to the Striing "sharecontentparams". Change that to that variable sharecontentparams. I don't remember the syntax.



Can you search for it please? I cannot find anything.

Thanks
13 years ago
Hi!

I am using multiboxes inside a logic:iterate and it is working fine. What I am wondering now is if it is possible to pass URL variables using check boxes. I explain myself:

In my application, I share a song with a friend. When I want to share it, I access to a web page where all my friends are listed with multiboxes. There, I can select the friends I want to share the song with. The problem is that I would like to send the name of the friend and the name of the song as a URL variable to the FrowardAction. Before using multiboxes, I clicked in the name of the friend to share the song, which was a link. Obviously this way I could just share my song with one friend each time. I did it this way:




the variable sharecontentparams was carrying all the information and in the link URL I could see ....name=NameOfTheSong&friend=NameOfTheFriend.However, using multiboxes I cannot do that. I tried this:



But in the ForwardAction I get a String called sharecontentparams when I do the request.getParameters() and not the parameters friend and name.

Can anyone help me please?

Thanks in advanced
13 years ago
Thanks it works .

Just for the records:

If anyone has a problem like this, first read: http://struts.apache.org/1.x/userGuide/building_controller.html

And then, you have an example here (although the struts-config.xml is not showed): http://www.java2s.com/Code/Java/J2EE/StrutsCreatingtheController.htm
13 years ago
Hi!

Using this code:



I am getting the error:



I tried with /searchfriend.do as well but I get the same error. AS I understand, the mapping points to the struts-config file where all the mappings are made, but there I have:



Can anyone help me please?

Thank you in advanced
13 years ago
Found it! It was very easy. Domrepresentation has a constructor which uses a Document object.
Hi!

I have a String which contains the XML data. I need to create a Domrepresentation instance which contains that data. I passed the String to Document class because I thought that maybe from Document it was easy to convert to Domrepresentation, but I can't find anything . To convert to Docuemnt I used:



Can you help me to pass from String to Domrepresentation or Docuemnt to Domrepresentation?

Thanks in advanced
I was working with a struts project smoothly but suddenly, when I restart the server I get the next error in the log:



However, that class corresponds to the bundle: commons-beanutils, which is actually in my WEB-INF folder. This error is really strange since I didn't touch anything problematic, I just programmed one class. Can anyone help me please??

Thanks
13 years ago
yes, sorry I was confusing class with object
13 years ago
Hi!

I am using a POJO ( a very simple class: some variables + getters and setters) to store info of bikes. For example:



Therefore, each bike is represented by one POJO.

I would like to know if it is possible to create a method which takes the class as parameter. For example:



So I can just pass one parameter (the class) instead of having to execute all the getters in that class to obtain all the variables and then call the method with thousand parameters.

Thanks in advance

13 years ago
Hi everyone!

I'd like to create an application which measures the throughput of all the interfaces availables in my computer so that I can know in real time which is the fastest in case I wanted to send anything. I thought that it might be some kind of libraries which already do that but I haven't found anything. I want to ask you if you know how could I do it, any help is appreciated.

Thanks a lot