Timo Tamme

Greenhorn
+ Follow
since Nov 10, 2011
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 Timo Tamme

Hello!

I am new on J2EE and previously I have some experience with ASP.NET, so my question is about J2EE MVC. I know that servlet stands for controller and in view role is JSP page. So when I create view that contains many methods, so user can access to: delete item, update item, submit page, cancel etc. How is the best way to implement controller in J2EE? So far I have read from one basic J2EE book that servlet supports 'doGet' and 'doPost' methods (also it support some others, but its not relevant in my case). So far I have seen that servlet as controller is not for my needs, I want controller to be something where these view functions are in separate methods in controller. For example clicking delete in view calls from 'ItemController.class' method 'deleteItem'. How can I do that, or is it even possible? Which are the best practices?
11 years ago
I'm trying to setup maven and struts 2 project in Eclipse, but I'm having problems. I have chosen to create simple HelloWorld example and afterwards add some other functionality, but I'm having problems.

I have 'struts.xml' path in project: src/main/resources/struts.xml

and inside it:


also I have web.xml with path src/main/web/WEB-INF/web.xml and content:


From commandline I use 'mvn clean install' and I get .war file to target folder, that .war file I'm going to deploy under Tomcat (also it deploys it successfully) but when I enter url I get error:

The requested resource (/ContactWeb/Pages/Login.jsp) is not available.

same error with different url-s only path is different (/ContactWeb/Login.jsp, /ContactWeb/Login.action etc.).

In my project I do have Login.jsp, Index.jsp and also Welcome.jsp. They are under: src/main/web/Pages

I have read somewhere that in struts2 I need to but .action extension to url, but it doesn't work and also why in struts.xml is package name and namespace? what exactly needs to be there? I have read that is for page what it is going to display?
11 years ago
I find solution for my problem, I undeployed my project from Tomcat, restarted Tomcat service and deployed my project again and JSTL standard tags are working now. Thanks for trying to helpp me!
12 years ago
JSP
Now I tried with this tutorial, but didnt help me, still getting the same error:


I changed these .jar files and removed previous ones (also removed old .jar files from Eclipse project), also chekced that my $CATALINA_HOME/lib doesn't contain these .jar's already.
Do I need to use older version of Tomcat?
12 years ago
JSP
Hi

I am usng Tomcat 7.0.23 and Eclipse to learn J2EE programming, but I am getting errors in part where JSTL is introduced, my exact error is:


In my project I have in WEB-INF/lib folder files: jstl-1.2.jar and standard.jar.
My web.xml file is below:


Can anyone help me with this problem?
12 years ago
JSP
I don't actually know, if there is any framework. It should be made up by developers team, who worked here before.
12 years ago
JSP
Hi everyone, I am usng input on jsp page:


Is it somehow possible to save this input value until user submits this form? So if user searches from different page and came back to a form page, these values are already initialized by previous input values?
Searched from google too, but didn't find anything useful. I am trying to do this with jsp or javascript, is it even correct way?
12 years ago
JSP
Hello!
I am quite new at HTML and JavaScript and I make web page, where users can insert some data.
So I have done HTML page, where user can insert different values, but form continues in separate pages. So I have problem that I want to save form data before submitting it. Is this even possible by using JavaScript?
In my dreams the ideal solution would work with saving data to XML and if user is going to previous page of form, it will be initialized from XML by using JavaScript.
Can you give me some ideas / hints to make this solution?