Solved

Tomcat server + struts

Posted on 2004-09-02
3
653 Views
Last Modified: 2006-11-17
How do I configure the tomcat server so that I can access the page through struts action.

For example if I enter the following URL in the IE I sould get my page

http://localhost:8080\SMSWeb\ProductDetail.do?mode=getProductDetail

So what all is to be set in the Web/ server xml file.

Thanks & Regards,
Amisha
0
Comment
Question by:amishap
3 Comments
 
LVL 23

Accepted Solution

by:
rama_krishna580 earned 250 total points
ID: 11969706
Hi,

Look at this below file...you can set lot of parameters/properties under web.xml file...

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

  <display-name>Project Name</display-name>
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>definitions-config</param-name>
      <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <init-param>
      <param-name>definitions-debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>definitions-parser-details</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>    
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml,/WEB-INF/struts-config-lead.xml,/WEB-INF/struts-config-admin.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>log4jPropertyFile</param-name>
      <param-value>log4j.properties</param-value>          
    </init-param>
   
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>




  <welcome-file-list>
    <welcome-file>Login.jsp</welcome-file>
  </welcome-file-list>
  <error-page>
  <exception-type>java.lang.Exception</exception-type>
  <location>/ErrorPage.jsp</location>
  </error-page>


  <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
  </taglib>

  <resource-ref>
    <res-ref-name>jdbc/ProjectDataSource</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>

  <resource-ref>
    <res-ref-name>mail/ProjectMailSession</res-ref-name>
    <res-type>javax.mail.Session</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>



  <security-role>
    <role-name>Manager</role-name>
  </security-role>

  <security-role>
    <role-name>Administrator</role-name>
  </security-role>

  <security-role>
    <role-name>SuperAdministrator</role-name>
  </security-role>

</web-app>

i hope it may help you...

R.K
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question