• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in running struts application.

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
I worked on Struts 1.1 version 2 years back. I am familiar in working with an already existing project but am not sure on how to create one new Struts project and get it running.
I need some guidance from you experts here please. I am trying to work on a sample application that logins and redirects to Welcome.jsp page or Sorry.jsp .


Here are the steps that i followed for creating the project.

1) I am using Eclipse IDE (galileo version), Tomcat 6.0, Struts 2.0.14 versions. I downloaded them .
2) Created a Dynamic Web Project.
3) I have created Login.jsp , Welcome.jsp, Sorry.jsp in WebContent folder.
4)LoginAction.java, LoginForm.java and ValidateUser.java in src folder.
5)Created struts-config.xml in WEB-INF and updated entries correctly as shown in the snapshot.
6)updated web.xml.
7)Added the required jars into the classpath.

These are the steps that i have followed and i think i am correct till here.

Now how should i run this application ?

do we need to do some ant build and create a war file ? and then copy it to tomcat webapps directory ??
Or any other way to run it ??
I am not sure on how to run it from here on..CAn some one please point me to steps...
It would be of great help for me. Though i am familiar with most of the framework functionality, i am not able to run the application yet. It is blocking my progress.



Struts.JPG
[Thumbnail for Struts.JPG]
 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse provide convenience that the application server can be integrated to your workspace and publish the project there on.

1. Add your Tomcat 6.0 server in your workspace.
2. Start your server.
3. Add your Web project to the server and publish the content.
 
Srikanth Ramineni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
/////Add your Web project to the server and publish the content.

How do we add the Web project to the server? I already have tomcat added into my eclipse. I did try running the application directly by providing the url. But it is showing Error :404
 
Shinelin Samuel
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that you have added Tomcat server to eclipse Servers view. Then, Right click and select Add and Remove projects from the menu.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You said you're using Struts 2, but everything you mention is for Struts 1--first you need to decide which version you're actually using.

Then go to the Struts 2 documentation wiki and follow the tutorial, or find another one on the net, or get a book, etc. Many of the Struts 2 books use Maven, which you may want to hold off on using for now.
 
Srikanth Ramineni
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can some one point me good tutorial for Struts 2.0 that will guide me from scratch to end development. Anything that you found is the best/appropriate one.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I still think the Struts 2 wiki tutorial is as good a place as any to start, although I haven't searched the web for more recent ones.
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Try this LINK this will help you lot as it help me too.
reply
    Bookmark Topic Watch Topic
  • New Topic