Several Java Questions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • michela rossi

    Several Java Questions

    Hi,
    Don't know if anyone can help me. I've got the following questions:

    1. Does anyone know of anywhere that offers shared webspace which has
    support for Java/JSP? Ideally running Tomcat?

    2. Is there any driver/support in JSP for writing to a text file?
    E.g. a website that receives many thousand submissions/day via a
    feedback form - rather than simply send emails, desire is to put them
    all into one text file per day then email that file. Surely there
    would be a problem is several thousand people are trying to access the
    text file simultaneously? Is there any driver in JSP/Java tech. to
    deal with this?

    3. Finally - anyone had any problems setting up a production
    environment running Apache/Tomcat/Struts and Lucene on a Windows
    platform?

    Many thanks,
    Michela.
  • Hegemony Cricket

    #2
    Re: Several Java Questions

    michela_rossi66 @hotmail.com (michela rossi) wrote in message news:<1ed550fd. 0310130820.5f26 [email protected] ogle.com>...[color=blue]
    > 2. Is there any driver/support in JSP for writing to a text file?
    > E.g. a website that receives many thousand submissions/day via a
    > feedback form - rather than simply send emails, desire is to put them
    > all into one text file per day then email that file. Surely there
    > would be a problem is several thousand people are trying to access the
    > text file simultaneously? Is there any driver in JSP/Java tech. to
    > deal with this?[/color]


    Well, your JSP will likely be calling some servlet when the user
    clicks submit -- in that servlet you can do whatever file input/output
    you want by using the java.io.* classes. You can always declare the
    output method "synchroniz ed" too to prevent multiple people from
    writing to the same file simultaneously. ..


    --Mark

    Comment

    • Phil...

      #3
      Re: Several Java Questions

      I wonder what happens if there is an error, maybe
      loose the whole file? Why not have a separate directory
      for each day and individual files, one
      for each response then cat them at the end of the day
      to avoid this.

      "Hegemony Cricket" <mschnitzius@ho tmail.com> wrote in message
      news:c754e412.0 310131951.4165a [email protected] gle.com...[color=blue]
      > michela_rossi66 @hotmail.com (michela rossi) wrote in message[/color]
      news:<1ed550fd. 0310130820.5f26 [email protected] ogle.com>...[color=blue][color=green]
      > > 2. Is there any driver/support in JSP for writing to a text file?
      > > E.g. a website that receives many thousand submissions/day via a
      > > feedback form - rather than simply send emails, desire is to put them
      > > all into one text file per day then email that file. Surely there
      > > would be a problem is several thousand people are trying to access the
      > > text file simultaneously? Is there any driver in JSP/Java tech. to
      > > deal with this?[/color]
      >
      >
      > Well, your JSP will likely be calling some servlet when the user
      > clicks submit -- in that servlet you can do whatever file input/output
      > you want by using the java.io.* classes. You can always declare the
      > output method "synchroniz ed" too to prevent multiple people from
      > writing to the same file simultaneously. ..
      >
      >
      > --Mark[/color]


      Comment

      Working...