age spets

Ranch Hand
+ Follow
since Aug 07, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by age spets

This works:
BaseFont rotis = BaseFont.createFont(fontroot+"ROTISS_0.ttf", BaseFont.CP1252, BaseFont.EMBEDDED);
font = new Font(rotis, size);
This does not work:
BaseFont Egyptienne = BaseFont.createFont(fontroot+"e046013t.pfm", BaseFont.CP1252, BaseFont.EMBEDDED);
fontbunn = new Font(Egyptienne, 24);

Error:Font 'c:\winnt\fonts\e046013t.pfm' with 'Cp1252' is not recognized.

Looks for me thar CP1252 is not correct basefont for URWEgyptienne. Or is it that I could not get the PFB file in the font directory? Get the error that the file is destoyed.

Any ideas? Have tried alot of other basefonts with no luck...

Age
Hi!

A customer is asking me to put a web service on my production machine, which will be called from a web-server. Today there is no connection between this machines. I see that the security get reduced, but how much? Will I be in big risk? See this as more secure than if he runs SQL, but is it more secure? The other possibility is to move data from production machine to the web machine.

Any ideas?
18 years ago
I'm sure some of you have had this challenge before and solved it, so
I'm bravely asking.

Printing (rtf's and pdf's) from a java web-application running under WAS
5.1 on an i5.

The story is that I'm generating an rtf or a pdf document based on some
user activity on the web. This document is processed in batch (the user
will not see it until it is printed) and should be printed on a
predefined (for the user) network (not i5) printer.

Any hints or suggestions.

Rgds Age
18 years ago
Thank you. Will talk to my boss about buying one. Anybody who knows any free/open source?
18 years ago
Hi!

Must save an email from outlook into a file archive. The users want to look on the mail and press a button to save it from outlook. Is it possible for Java to interact with outlook or do I have to use VB or .NET?

age
18 years ago
Hi!

Want to save to my Database the previos(last) page the user acessed before turning into my page. How can I do this from a HTML page. Can history.previos be an idea?

Challenges:
The HTML is using a flash-file:
<object classid="clsid 27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="750" height="590" id="finnkrana_web" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="xy.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#d2e7f0" /><embed src="xy.swf" quality="high" bgcolor="#d2e7f0" width="750" height="590" name="xy" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
So I want to open the flash file after I have saved the history, therefore I can see a problem using javascript and forms..

Any ideas?

Thanks!

Age
Hi!

This question might be very easy... I have 2 different applications where the first one links to the other. I want to set the name om the user in the session and then use this in the next. What I am doing is:
1.
String name="STRHEI";//request.getAttribute("name").toString();
session.setAttribute("bruker",name);
<a href=http://localhost:9080/XXX/XXX.jsp>Tips</a>
2.
session = request.getSession(true);
String profils=(String)session.getAttribute("bruker");
System.out.println("jsp="+profils);

Prints out null.... Why isn't the value in the session? Does the href starts a new session? WHat is the workaround?

Age
19 years ago
Figured.

The problem was ; after imports....

Age
19 years ago
Hi!

Using a websphere server and have uppgraded my system to use J2EE1.3 instead of 1.2. Somehow my application is looking for classes I use in:
org.apache.jsp.* instead og where it belongs.. Don't find org.apache.jsp in my classpath and don't understand why/where the server take this from. Seems like it looks for every class I import in my JSP in this library, if its not specified in imort..

Age
19 years ago
Figured it out myself... Just make sure you have the last map first!!! NOt logical at all, but then it works.
19 years ago
Hi!

I have problems to rout myself down to the right map in LDAP.
WHat I want is to go down 3levels on the OU. Have problems with this, because I can only make 2 levels down. 1 from URl and 1 from the search. Where and how can I get down to that level? Have tried:
NamingEnumeration answer = ctx.search("OU=Tveita,OU=NEW","name=*", s); With no luck.


Hashtable env = new Hashtable(1000);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://xxxxxl01.kloabos.no:389/OU=Salgsdivisjonen,DC=obos,DC=no");

env.put(Context.SECURITY_AUTHENTICATION,"simple");
ResourceBundle bun= ResourceBundle.getBundle("prop");
BASE64Decoder dec= new BASE64Decoder();
String usrname= new String(dec.decodeBuffer(bun.getString("usrname")));
String password=new String(dec.decodeBuffer(bun.getString("password")));
env.put(Context.SECURITY_PRINCIPAL,usrname);
env.put(Context.SECURITY_CREDENTIALS,password);
DirContext ctx = new InitialDirContext(env);
SearchControls s=new SearchControls();
String[] attrIDs = {"mail", "name"};
s.setReturningAttributes(attrIDs);
s.setSearchScope(SearchControls.OBJECT_SCOPE);
NamingEnumeration answer = ctx.search("OU=Tveita","name=*", s);

�ge
19 years ago
Hi!

Want to have a button that works the same as the :TO: in outlook. Brings up all my contacts and i can choose one. Is this easy to implement? Have tried to search on the net, without luck. We ae using active directory(LDAP), and I have thought to do get data from the LDAP-call and show it in a list, but is it a easier way?

Age
19 years ago
Think you misunderstood the question. The answer was too simple. The questions was not how to have the text behind a picture without using tables. I try to demonstrate:

text1text1text1text1text1text1 PICTUREPICTUREPICTUREPICTUREPICTUREPIC
text1text1text1text1text1text1 PICTUREPICTUREPICTUREPICTUREPICTUREPIC
text1text1text1text1text1text1 PICTUREPICTUREPICTUREPICTUREPICTUREPIC
text1text1text1text1text1text1 PICTUREPICTUREPICTUREPICTUREPICTUREPIC
text1text1text1text1text1text1 PICTUREPICTUREPICTUREPICTUREPICTUREPIC
text1text1text1text1text1text1 Picturetext
text1text1text1text1text1text1text1text1text1text1text1text1text1text1
text1text1text1text1text1text1text1text1text1text1text1text1text1text1

You see my problem is to get this text under the picture...
Hi!

Have a long text that wraps around a picture and. Wants to get picture text right under the picture. How can I do this? Here is my code:


<HTML><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>IE/Win: problem with float + clear on the same element</title>
<style type="text/css">
body {
background-color: #fff;
color: #000;
}
.b2 {
float: left;
width: 50%;
background-color: #aaf;
clear: left;
}
</style>
</head>
<BODY text=black leftmargin=5 rightmargin=400>
<TABLE><TBODY>
<TR><TD width=500>
<IMG src=https://obos1.obos.no/usikret/presse/DSCN1183.jpg hspace=4 vspace=4 width=250 align=right alt=Bildetekst>
</IMG>
<div class="b2" id="test" style="width:250px;visibility:visible;color: red;" align="left">picturetext</div>
<FONT face=arial size=2>this is an test text<BR><BR></FONT>
</TD></TR>
</TBODY></TABLE>
</BODY></HTML>

Best regards Age