Eivind Rasmussen

Greenhorn
+ Follow
since Dec 05, 2003
Merit badge: grant badges
For More
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 Eivind Rasmussen

Hi, thanks for the answer. Unfortunatly it didn't have any effect on the phones I tested with.
Any other ideas anyone?
(Hope its ok to post a xhtml question in the html section..)

I have written a xhtml page for mobile phones, and I�m experiencing a word-wrapping problem on some phones. Some mobile phones choose to split up words at the end of a line. E.G. If the word �text� is at the end of a line and the word won�t fit on the line (only 3 chars left to use on that line), the phone writes �tex� on this line, and �t� at the start of the next line. So far I have found that this issue occurs on these handsets: Samsung A680, LG 325 and Nokia 6225. Below is the code I use when I experience this problem. Anybody who can help? Any feedback is deeply appreciated.

The code I use:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html>
<head>
<title>my page</title>
<link href="xhtml_css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>
This is the text where some words get wrapped on some handsets.
<br/>
<a href=�a link">ok</a>
</p>
</body>
</html>

Values in the stylesheet which may be relevant:
p{
white-space: normal;
color: #666666;
}
body{
margin:0px;
padding:0px;
background:#FFFFFF;
}


Best regards,
Eivind
Hi,
I am about to install tomcat, and I'm wondering what version to use. I'm currently using 4.0.4 on another server, but I want to upgrade my tomcat on my new server. The Jakarta site "encourage all users to upgrade to Tomcat 5.x whenever possible.", but I'm worried about installing a unstable version. Any suggestions?
All feedback is deeply appreciated

Eivind
19 years ago
Hi,
I have a jsp page, which uses java-beans. I am using tomcat 4.0.4. I'm also using SSL in order to get a secure connection to this page. This page has been working fine for quite some time now, but lately it has started to act weird. Most of the time it works fine, but approximately once a day, it is impossible to display the page in my browser. This lasts for about an hour, and all of a sudden, it will display correct again. What happens is this: I enter the URL in my browser, and I'm informed that I'm about to enter a "secure site", I enter my username and password, and then the browser just loads for ever (nothing is displayed). The tomcat log doesn't display any errors, and it doesn't seem like my jsp page is ever read (the first line in my jsp page is a system.out, but this line is never written in the tomcat log). The reason why I think this is a tomcat related problem, is that when I restart my tomcat, the page will display correctly again.

I know that the info I have posted here might not be enough to make any conclusions, but I'm happy for any feedback on this one.

Thanks

Eivind
19 years ago
Hi, I am experiencing a problem when trying to post a xml document from one jsp to another.

This from the page I post (xml doc is in postParams):
URL url = new URL(serverURL);
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
conn.setUseCaches(false);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(postParams.toString());
wr.flush();

// Get the response
BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ( (line = rd.readLine()) != null) {
myResponse += line;
}
wr.close();
rd.close();

This is from the page that receives the document:
InputStream input = request.getInputStream();
int k;
int aBuffSize = 1024;
String StringFromWS="";
byte buff[] = new byte[aBuffSize];
OutputStream xOutputStream = new ByteArrayOutputStream(aBuffSize);

while ( (k=input.read(buff) ) != -1){
System.out.println("k2="+k);
xOutputStream.write(buff,0,k);
}
System.out.println("testing: K is "+k);


The input.read(buff) always return -1 (the buffer is empty). Why is this? I thought that request.getInputStream() always would return the entire inputstream.

Any help is deeply appiciated.

Thanks,
Eivind
19 years ago
JSP
Hi,
does anybody know how to find the server-name (in the code) of the server im running my java-program on. I've tried all the System-properties, but still cant fint the server-name.
19 years ago
Hi,
I sometimes experience that JBuilders codecompletion doesn't work. This usually happens when i'm writing JSP pages. Does anybody know how to fix this, or is it a JBuilder error?
Hi, I'll do my best to explain my problem:
I submitt this form by pressing the submit-button accept.
( The form: )
<----------------------------------THE FORM-------------------->
<%
System.out.println("<<<<<<<<<TESTING CCC>>>>>>>>>");
session.setAttribute("profileFocused",cProfileFocused);
if(cProfileFocused.getTlfnumber() != null ) { %>
<form method="post" action="profilemoderator.jsp?<%=String.valueOf( cCalendar.getTime().getTime() )%>">
<table>
<tr>
<td>
<table cellpadding="10" align="left">
<tr>
<td>
<table align="left" valign="top" border="4" width="600">
<tr>
<td colspan="2"><b><%=cProfileFocused.getNick()%> (<%=cProfileFocused.getGender()%> <%=cProfileFocused.getAge()%> </b> wants gender: <%=cProfileFocused.getWantedGender()%></td>
</tr>
<tr>
<td rowspan="2" width="30%" align="center"><%= (cProfileFocused.getHasImage() == null)?"no picture":"<img src=\"../wap/images/accepted/"+cProfileFocused.getHasImage()+"\""%></td>
<td height="70" align="center"><i><%=cProfileFocused.getProfiletext()%></i></td>
</tr>
<tr>
<td>
<textarea name="edited" cols="40" rows="5"><%=cProfileFocused.getEditedProfiletext()%></textarea>
<%
System.out.println("<<<<<<<<<TESTING EEE"+cProfileFocused.getEditedProfiletext()+">>>>>>>>>");
%>
</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td>
<input type="submit" name="reject" value=" Reject "/>
<br>
<input type="submit" name="accept" value=" Accept"/>
</td>
</tr>
</table>
</form>
<%}
System.out.println("<<<<<<<<<TESTING DDD>>>>>>>>>");
%>
<-------------------------------------------------------------->
And this is what I do with the submit:
<----------------------THE ACTION WHEN RECIEVING THE SUBMIT----------->
if( request.getParameter("accept") != null ) {
cProfileFocused = ((sms3.game.match.feed.ProfileObject)session.getAttribute("profileFocused"));
String cEditedText = request.getParameter("edited");
if( cProfileFocused != null && cProfileFocused.getTlfnumber() != null ) {
sms3.game.match.feed.ProfileObject cTmpRunner= cProfileAccepted;
while( cTmpRunner != null && cTmpRunner.next != null ) {
if( cTmpRunner.next.getTlfnumber().equalsIgnoreCase(cProfileFocused.getTlfnumber()) ) {
cTmpRunner.next = cTmpRunner.next.next;
}
cTmpRunner = cTmpRunner.next;
}
session.setAttribute("profileFocused", null);
cProfileFocused.setEditedProfiletext(cEditedText);
cProfileFocused.next = cProfileAccepted.next;
cProfileAccepted.next = new sms3.game.match.feed.ProfileObject(cProfileFocused);
cProfileAccepted.next.next = cProfileFocused.next;
session.setAttribute("accepted",cProfileAccepted);
cProfileFocused = new sms3.game.match.feed.ProfileObject();
}
}
<----------------------------------------------------------------->
And this works just fine, UNTILL I press the submit-button "many times really fast". What happens then is that I recieve the rigth sessionAttribute(((sms3.game.match.feed.ProfileObject)session.getAttribute("profileFocused"))
, but the old
request-Parameter(String cEditedText = request.getParameter("edited") .
Hope I've managed to explain this..
Can anybody help me?
20 years ago
JSP