Mattia Merenda

Ranch Hand
+ Follow
since Dec 14, 2006
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 Mattia Merenda

Is it possible to recover an accidentally deleted directory with the boot recovery?

I phisically deleted this directory with a git rm command. Any other advice is good for me. Thanks
14 years ago
Hi everybody,
I am working in my second application with Struts.I also have to estimate the costs of it.I'm using the Function Point's method for this.
I found out somewhere that 1 Function Point is equal to 30 LOC(Lines of Code) for a Java application.
Does it remain the same value for Struts(since it is a Java based framework?)
I also have used Ajax und SQL in the application.Do I need some more consideration to find the final result?
Thanks,
Mattia.
16 years ago
Hi everybody,
I've developed a project using Netbeans 5.5.It already has a web server as Apache Tomcat 5.5.17.When I was running the project it was working fine and it has opened the browser with the initial page:

http://localhost:8084/MyProject

Now I downloaded Apache Tomcat 5.5.23 and I want to pass this project on the webapps directory of this server.I've already made it.
But when I open the browser at the initial page

http://New_Host_Name:8080/MyProject

I get an error from the server.I made a build of my project with Netbeans and what I did was to copy the directory MyProject with the build.xml file in the webapps directory of the downloaded server.
I think that is the error.But I don't know how to solve this problem.
I wonder if it also possible this prolem with Netbeans.I mean if it is possible when I run the project in Netbeans to have the initial page:

http://New_Host_Name:8080/MyProject

where New_Host_Name is different from localhost.
Thank in advance for any advice.
Mattia
Hi everybody,
I am developing UML Class Diagrams for my application.I developed it with Struts.
Now I need to know where I can find some good example to put in the same Class Diagrams the classes developed by myself and the classes of Struts framework.
Thanks in advance,
Mattia
17 years ago
I also tried

href="javascript opup(this.innerHTML)" in the display:column but I don't get the result the same.
Mattia
Hi,
your solution it is not working.I add the javascript function code:
function popup(value) {
var w = 400;
var h = 400;
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
if (winl < 0) winl = 0;
if (wint < 0) wint = 0;
document.write(value);
var page = "fullJobname.jsp";
windowprops = "height="+h+",width="+w+",top="+ wint +",left="+ winl +",location=no,"
+ "scrollbars=yes,menubars=no,toolbars=no,resizable=no,status=yes";
window.open(page, "Popup", windowprops);
}

the result of document.write(value) where value is the value of passed in

<display:column property="jobname" value="JOBNAME" maxlength=10" href="javascript opup('this.innerHTML')" />
and it is "undefined".
Can I have any other advice?
Thanks, Mattia
Hi everybody,
I have a table in my application where I get long strings in a column of my table.
I use displaytag to show the table.
Well,I've put the lenght of this column like this:

<display:column property="jobname" title="JOBNAME" maxLength="20" href="javascript opup()"/>

popup is javascript function that opens a new window and it shows the full name of jobname.But I have a problem how to pass the value of jobname.
Can anyone give an advice?
How must I solve this problem?
Thank in advance,
Mattia
Hi everybody,
I have a table in my application where I get long strings in a column of my table.
I use displaytag to show the table.
Well,I decided to limit the lenght of this column like this:

<display:column property="jobname" title="JOBNAME" maxLength="20"/>

Now I want when a user hovers one of these strings the full long name of the string should be displayed.

I also want to make something like that for the header names of my table.
I am trying to use tooltiptag.jar to develop the tooltip.
Can anyone give an advice?
How must I solve this problem?
Thank in advance,
Mattia
Hi everybody,
in my application I have a form where I need to get some results from a database.
In this form there are 2 buttons that call 2 JSP pages because I need one JSP page to know the results from the database as they are and the other one to know total results for every user is in the table of my database.
I handle these buttons in my Action class by extending my Action class as DispatchAction.In my struts-config.xml file I define for this Action class the parameter "results_type" to work with the 2 buttons.
For the pagination of my tables in my JSP pages I use Displaytag.It is also working fine and I can also save these tables in the PDF format.But,in the user table I added a link for every user and it is possible to see a chart about user's work with this link.
If I try to see the table in the PDF format before to see the chart for an user,it works fine.The problem that I have is when I decide to see for first the chart for a user, to come back in my JSP page with the table and I try to see the table in the PDF format.I get this error:

javax.servlet.ServletException: Request[/joblogs] does not contain handler parameter named 'result_type'. This may be caused by whitespace in the label text.
org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:222)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:256)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:194)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362

So,I think I was able to save the table in the session so when I go back I can see the table as it was before.But,if I try to click the PDF label to see my label,I cannot do this because it is not possible to know the value of the parameter "result_type".
How can I solve this problem?
I need a solution before Wednesday.
Thanks,Mattia.
17 years ago
Hi,
I add a part of the code of my Action class and my class that I use to make the chart where I think there is the problem:

In my ClassAction.java I save in the session the query that I create:

HttpSession session = request.getSession();
String sql = "SELECT ..... FROM .... WHERE username LIKE '%" + Username + "%' AND total = " + Ttotal +"....");
session.setAttribute("sqlTotal",sql);

In ClusterTotals.java I try to call the session to get the query in this class:

HttpServletRequest req;
HttpSession sess = req.getSession();
String query = (String) sess.getAttribute("sqlTotal");
....

I get the NullPointerException error.I think the problem is that the request is not initialized.I should fix it in a way I will be able to get the query of my Action class,but I don't know how and I also don't know if this is the right way.
I think the code is clear to understand my problem.
Thanks,
Mattia
17 years ago
Hi,
Is it mandatory to write the servlet?Is there another way?
Because I already have my Action class instead of the servlet.I don't know if this can create other problems.
Thanks,
Mattia
17 years ago
Hi,
If I cannot get the request in this way,how can I get from the container the informations that I need?
Thanks,
Mattia
17 years ago
Hi,
I tried to put

HttpSession sess = req.getSession(false);

and

HttpSession sess = req.getSession(true);

I think Aslam is right.The problem is that "req" is not initialized.So how can I solve this problem now?
17 years ago
In my class for the chart I try to get session in this way:

HttpServletRequest req;
HttpSession sess = req.getSession();

I get this error when I open the page:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:370)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

root cause

java.lang.NullPointerException
com.myapp.struts.ClusterTotals.<init>(ClusterTotals.java:35)
org.apache.jsp.chartcluster1_jsp._jspService(chartcluster1_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)

I hope this helps for a solution
17 years ago
Hi everybody,
I am developing a web application with Struts.
I have a form where the user inserts some values and in Action class I create the query to get the results from a database.
When I submit the form I get a table with these results.
Now I want to make some chart with these results on the table.
I am using Cewolf for this purpose.
To make the chart I must develop a Java class where I need to create the same query that I have in the Action class.
For this reason,I saved all the parameters in the form in a session in my Action class.
Now in the class to make the chart I must call the session that I saved previously.
And for the moment,I am getting errors.So,how to get the session from the Action class in my new class for the charts?
I need a fast answer if it is possible.
Thanks in advance for this.
Mattia
17 years ago