[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Struts - replacing ActionServlet

Posted on 2003-11-09
8
Medium Priority
?
597 Views
Last Modified: 2010-04-01
Has anyone managed to replace ActionServlet successfully? I've tried to do this by editing web.xml:

    <!--<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>-->
    <servlet-class>ActionsServlet</servlet-class>

and then putting the subclass ActionsServlet into WEB-INF/classes. No go - different error messages depending on the application. Any ideas?
0
Comment
Question by:CEHJ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 15

Accepted Solution

by:
jimmack earned 420 total points
ID: 9710512
If you're using Tomcat, I think there is an issue with servlets that are not in packages.
0
 
LVL 86

Author Comment

by:CEHJ
ID: 9710669
OK - i'll give it a try
0
 
LVL 86

Author Comment

by:CEHJ
ID: 9711236
I think you may be right, although the main problem was that the class was not marked pu blic (Doh - i used a 'class wizard').

A sub-question, so i can give you the points: where *does* this output go:

>>log.debug("Calling init() in custom ActionServlet...");

This appears in web.xml:

    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 15

Expert Comment

by:jimmack
ID: 9711259
Err. I'm not certain.

A normal line like

   log("This is a log message")

Is written to the logger that you set up in the server.xml file inside the <Context> for your webapp, eg:

        <Context path="test" docBase="test" debug="0" reloadable="true">
          <Logger className="org.apache.catalina.logger.FileLogger"
                  directory="webapps/test" prefix="testlog." suffix=".txt"
                  timestamp="true"/>

In this case, it would be written to the file webapps/test/testlog_2003_09_11.txt

I'm hesitating here because I haven't used log.debug().

If you don't set up the log file, then I'm not exactly sure where it goes :-(  System.out.printlns go to catalina.out in the /logs directory.

Does this help?
0
 
LVL 86

Author Comment

by:CEHJ
ID: 9714458
Not really - well, a bit. I'm going to have to find out how all these logging apis cooperate (or don't). What an utter pain for something that's meant to help *maintain* code!

Don't take this the wrong way Jim, but i don't think you've *quite* earned your points yet ;-)Maybe i'll keep this one open for a short while - there's bound to be a Struts newb question that I'll have to ask that'll be the clincher for you - OK?
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9714502
OK
;-)
0
 
LVL 14

Assisted Solution

by:kennethxu
kennethxu earned 80 total points
ID: 9719732
struts use jakarta common logs. it can be configured to use log4j or j2sdk1.4 log.
http://jakarta.apache.org/commons/logging.html
0
 
LVL 86

Author Comment

by:CEHJ
ID: 9720980
Yes - thanks for that kenneth - i'm getting under the covers with that now anyway, but... a few points for your confirmation ;-)
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

A walk-through example of how to obtain and apply new DID phone numbers to your cloud PBX enabled users that are configured in Office 365. Whether you have 1, 10 or 100+ users in your tenant, it's quite easy to get them phone-enabled and making/rece…
As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

649 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