Brian Mulvany

Greenhorn
+ Follow
since Oct 19, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Brian Mulvany

Hi
I have to create a basic web service using Apache Axis and Tomcat. I have never created a web service before and to be honest dont know where to start. Does anybody know where I can go to get a very basic introduction on how to setup Axis and then how to create and deploy my first Web Service.
Thanks
Brian
19 years ago
Hi
Im still having a bit of trouble importing the style sheet.
The line of code I tried in my servlet was the following.
out.println("<link href="servletstyle.css" rel="stylesheet" type="text/css">");

Here is a larger segment showing you exactly where I put it inside the servlet.
Any help is greatly appreciated
Thanks
Brian
19 years ago
I forgot to paste in the larger segment

out.println("<html>");
out.println("<head><title>Servlet1</title>");
out.println("<link href="servletstyle.css" rel="stylesheet" type="text/css">");
out.println("</head>");
out.println("<body>");
out.println("<p>You searched for cds by ");
out.println(request.getParameter("target"));
out.println("<p>");
out.println("Here are the results");


There it is
19 years ago
Hi
Im wondering is it possible to import css stylesheets into a servlet. If its possible, could somebody tell me how to do it.
Thanks
Brian
19 years ago
Hi
Thanks for that help.
Does anybody know a good place to go on getting a tutorial on using JavaMail with MySQL.
Thanks
Brian Mulvany
19 years ago
JSP
Hi
I am trying to add extra functionality to our website where we can email users their passwords and other user details if they forget them.
I want the user to be able to type in their email address and then after we check that they are a valid member in our database to email them their password.
I am using a MySQL database and JSP as you probably guessed.
If anybody knows where I can get a script to provide this funcionality I would really appreciate it.
Thanks
Brian Mulvany
19 years ago
JSP
Hi
I have a set of Java classes that parse a website looking for cd's. The amount of cd's vary depending on the search. I want to be able to sort the search results by price, album, artist etc. I figure one way to do this might be to use a dynamic array to store the results. I dont know how to do one of these or where to start. Has anybody here got any useful guidelines or hints as to where I can go and start.
Thanks
Brian
19 years ago
Hi
I have created several Java classes that will search http://www.cdwow.com for cds by an artist or album name and will parse some of the information. The search it carries out on the site is dependant on what the runtime paramaters for the program are set to.
I have created a servlet (in a seperate package)in JBuilder that has a shtml form. I enter a value in this form and this value is used as a paramater for the package with all the parsing classes. This works in JBuilder. So when I enter in U2 in the shtml form it will search CDWow for cds by U2.
I want to get this working outside JBuilder. I see somebody mentioned you have to change the web.xml file so it will work for whatever file you are trying to create.
When I try and request the shtml file by typing in the following
http://localhost:8080/webapp/servlet1.shtml
it says it cannot find the file, but if I resave the form as form.html it can find that and it works grand in JBuilder. But as the web.xml file is set up for shtml the html version wont work. So I was thinking if I alterthe xml file to work for html it might work.

There are two parts of the code that might need changing included below.

<servlet-mapping>
<servlet-name>shtml</servlet-name>
<url-pattern>*.shtml</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>shtml</servlet-name>
<servlet-class>com.borland.jbuilder.webserverglue.shtml.ShtmlLoaderEcho</servlet-class>


Thanks
Brian
19 years ago
Yes Thats exactly what I am trying to do
19 years ago
Hi
I have created a servlet which is linked with a html form and the value entered in the form is passed to the servlet. The servlet then uses this value as the runtime paramater for a set of java classes that searches CD Wow's webpageand returns the results depending on what is searched for.
I have done all this in JBuilder. The Servlet and Parser classes are in two different packages.
I want to know how do I get this to work on a webpage, like by using Tomcat for example. In the folders JBuilder creates for the project there are an awful lot of files and I dont know which ones I need or where exactly to store them.
Any help greatly appreciated
Thanks
Brian
19 years ago
Thanks for that
Can you tell me what the last two lines mean as well if you dont mind

Debug.println("Getting default " + i + " with val: " + config.getDefaultVal(i));
arg.addProperty(cargs[i], config.getDefaultVal(i));

The Debug part is confusing me a small bit.
Thanks
Brian
19 years ago
Hi
I am trying to use a tool called Tess for scraping web pages.
There are several java class in this package.
Im trying to understand some of the code so I can write my own.
Can some body please explain the section of code: new URLConfig(new File(args[0])). Its the paramater I dont get. Ithink its something to with an array. I can post up the whole code or a link to the Tess website either if you want.


public static void main(String[] args) {
try {
URLConfig config = new URLConfig(new File(args[0]));
int num = 0;
SQLProperties arg = new SQLProperties();
if(!(args.length > 1)) {
String[] cargs = config.getArgs();
for(int i = 0;i<config.getArgCount();i++) {
//System.out.println(config.getArgCount());
Debug.println("Getting default " + i + " with val: " + config.getDefaultVal(i));
arg.addProperty(cargs[i], config.getDefaultVal(i));


Thanks Brian
19 years ago
Well Im actually looking to get a servlet to work with a html form because I have several Java classes that search www.cdwow.com for a particular cd. They search for whatever I have built in as the search paramater in JBuilder. I want to be able to have a html form and to send whatever value is typed in the form to be returned to the servlet. Then I want to use this value as the search paramater for the Java classes.
So I need to get the htmlform servlet working.
What is the handiest way of compiling the servlet.
How do I add the classpath lets say if I use command prompt to compile it.
Also the servlet on the coreservlets web page is in a package
Thanks
Brian
19 years ago
Hi
I just want to know how to I get a basic servlet running with Tomcat. I have managed to get a basic servlet running with JBuilder. This servlet takes paramaters that I enter in a html form and returns the values.
I have been reading up on www.coreservlets.com and on that website it gives me code to get the data typed in on a html form to be returned in a Servlet.
I dont know where to start in trying to get it running using Tomcat. Do I have to compile the Servlets first or when they are called from the html page will Tomcat compile them.
Sorry if I seem a bit stupid here but I honestly dont know where to start.
The code can be found at http://archive.coreservlets.com/ or if you want I can post it up here. Its the ThreeParams example from chapter 3.
Any help is greatly appreciated.
Thanks
Brian
19 years ago
Hi
I have a series of Java classes that search www.cdwow.com for cds and returns the values in xml format. The program searchs for cd's for whatever paramater I set it to search for within JBuilder.
I also have a basic servlet working that takes a value from a html form and returns the value.
I want to be able to use whatever value enter in the html form to be entered into the java class as a search paramater.
I have the servlet and the classes for searching in two seperate packages.
I presume I have to call the classes from inside the servlet somewhere but Im not sure how.
If anybody has any help I would be more than grateful.
Thanks
Brian Mulvany
19 years ago