Win a copy of Terraform in Action this week in the Cloud forum!

Stef Mischook

Greenhorn
+ Follow
since Nov 12, 2004
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 Stef Mischook

Rather than the enterprise I've been curious about frameworks for small medium size applications and websites and so I am looking at Velocity as it seems to have much less overhead than frameworks like Struts or Taperstry...

Is Velocity dead? Any opinions boys and girls?
Hi,

I have not been able to figure how to get TOMCAT to display a console window so I cans see system.out statements.

Using the latest version on windows.

Any ideas?
16 years ago
Hey Pascal,

Thanks for the heads up on Abatis, looks very good.
In terms of complecity ... yes about the same as JDBC.

In terms of time in development - based on my initial impression I would say that projects with 10 tables or less and only a couple of queries a table you are going to write much less code via JDBC.

I think ORM shines with larger projects.
Is there any point to using JDO or Hibernate for small web apps that may have only a few tables to deal with and perhaps 1/2 dozen queries? Or are these tools more or less show their stuff in the enterprise arena?

Thanks,

Stefan
Hi,

I am looking for a templating framework that I could use to build dynamically generated emails that are sent using JavaMail.

At this time I just use stringBuffer() to build the mail, but that's a pain! Any ideas anyone?

Thanks

Stefan

http://www.killersites.com
http://www.how-to-build-websites.com
http://www.websitetemplates.name
[ December 13, 2004: Message edited by: Stef Mischook ]
Hi,

It's interesting that you mention that because when testing the web-app on my local installation of Tomcat (standalone)as a sub-context this form works fine:

<form action="loginResponse" method="post">

The form pages' url is:

http://127.0.0.1/myWebsite/logIn.jsp

The servlet mapping is :

<servlet>
<servlet-name>loginResponse</servlet-name>
<servlet-class>com.myApp.authenticateAdmin</servlet-class>

</servlet>

<servlet-mapping>
<servlet-name>loginResponse</servlet-name>
<url-pattern>/loginResponse</url-pattern>
</servlet-mapping>

Yet on the live server where Tomcat is integrated with Apache I get the 404. So I changed the form to:

<form action="/loginResponse" method="post">

But still 404 ... any ideas?

Thanks,

S
17 years ago
I have a servlet that is mapped like so:

<servlet-mapping>
<servlet-name>loginResponse</servlet-name>
<url-pattern>/loginResponse</url-pattern>
</servlet-mapping>

And I have a form that submits to the servlet:

<form action="/loginResponse" method="post">

But I'm getting a 404 ... any suggestions?

I'm using Tomcat 5 integrated with Apache on Linux.

Thanks,

S
17 years ago
Hi,

I want to replace Tomcats root application with my own so that I don't have to have this URL:

http://127.0.0.1/mywebsite/

Rather I want this:

http://127.0.0.1/

Thanks,

S
17 years ago
Hi,

How can you view the System.out.prinln() statements when using Tomcat? I've manually launched Tomcat with tomcat5.exe found in the install directory, but nothing is displayed to the console?
17 years ago
Hi,

I reinstalled tomcat and things are working now.

Thanks ...
[ November 22, 2004: Message edited by: Stef Mischook ]
17 years ago
Hi,

How can you start tomcat to see its' system window?
17 years ago
Hi,

Nah, I'm actually posting to the url-pattern I defined in the web-apps web.xml file:



Could the mapping problem have to do with setting the context path for the application?

In ${catalina.home}/conf/Catalina/localhost I've created an .xml file named after my web app that contains this code:

17 years ago
Hi,

Using Tomcat 5.0.28 standalone on windows XP with JVM 1.4, I get this error even though I have mapped my servlet in the web.xml file of the web app:


HTTP Status 404 - /loginResponse.do

--------------------------------------------------------------------------------

type Status report

message /loginResponse.do

description The requested resource (/loginResponse.do) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28


I've placed my webapp folder in the webapps directory and all the jsp pages run fine as do my POJO's for business logic, any ideas why the servlet code could be causing problems?

The servlet mappings:



It's my first time using Tomcat, been a Resin user for years ...

Thanks,

Stef
17 years ago
Hi,

Just playing with NIO for the first time and I am reading from text files from a collection of file objects and the reads always result in:

???

Where as if I read the same files with the old Java IO I get the actual text.

My code:

FileInputStream inFile = null;
try {
inFile = new FileInputStream(files[i]);
}
catch(FileNotFoundException e) {
System.out.println("Eror reading file"+e);
}

FileChannel inChannel = inFile.getChannel();
ByteBuffer buf = ByteBuffer.allocate(1024);
try {
while(inChannel.read(buf) != -1) {
System.out.println("String read: "+ ((ByteBuffer)(buf.flip())).asCharBuffer().toString());
buf.clear();
}

}
catch(IOException e) {

}


Any ideas what I'm doing wrong here? I think it has to do with my byte buffer casting?:

((ByteBuffer)(buf.flip())).asCharBuffer().toString());

Thanks,

Stef
17 years ago